A terrain set made in Wolfram alpha

Talk about things that are not making games here. But you should also make games!

Moderators: Bob the Hamster, marionline, SDHawk

Post Reply
lennyhome
Slime Knight
Posts: 115
Joined: Fri Feb 14, 2020 6:07 am

A terrain set made in Wolfram alpha

Post 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
Last edited by lennyhome on Sat May 21, 2022 11:44 pm, edited 1 time in total.
TMC
Metal King Slime
Posts: 4310
Joined: Sun Apr 10, 2011 9:19 am

Re: A terrain set made in Wolfram alpha

Post 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.
lennyhome
Slime Knight
Posts: 115
Joined: Fri Feb 14, 2020 6:07 am

Re: A terrain set made in Wolfram alpha

Post 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.
Post Reply