Page 1 of 1

A terrain set made in Wolfram alpha

Posted: Fri May 13, 2022 11:16 am
by lennyhome
I started with this function:

Code: Select all

z = (cos(x * pi) + 1) * (cos(y * pi) + 1) / 4
And I got this:
Image

In 2D, this is where the Wang tiles are found:
Image
Image
Tile 5 is a blend of Tile 1 and 4
Tile 10 is a blend of Tile 2 and 8

I'm sure all of this is obvious for some people, but it was news to me. Unless I already did this, then forgot about it and then did it again.

Adding 2 patterns and using it to cross-fade between them:
Image

Re: A terrain set made in Wolfram alpha

Posted: Wed May 18, 2022 3:04 pm
by TMC
Those crossblended tiles look surprisingly nice. Also, I just realised that I wanted just such a tileset of white-to-black gradients to use for transparent shadow layers (to use as a demo or wiki article, once it's possible to modify map layer blending in the map editor). I wasn't sure which function to use, so thanks for this. Althoguh... those diagonal pieces are maybe not smooth enough to use for shadows, they draw too much attention. I suppose it can be fixed by adjusting the radius.

Placing such shadow tiles by hand is tedious so actually that's specifically something I wanted autotiling for.

Re: A terrain set made in Wolfram alpha

Posted: Wed May 18, 2022 11:08 pm
by lennyhome
It doesn't look great the because there is no art involved. I just wanted to explore the possibility. To make shadows, I think the function should be rotated 45 degrees on the Z axis. Also I suspect the derivative can be used as a bump map to make hills. I haven't tried that yet properly.

Same pattern but with no rotation on the left and with 45 degrees rotation on the right:
Image

I just realized that there are 2 possible ways to generate the full size corner pieces, so I've updated the pattern.

Same but with some color re-mapping.
Image

And I think this concludes this little adventure.