Archived

This topic is now archived and is closed to further replies.

TheLabRat

Fractal Terrains

Recommended Posts

TheLabRat    122
Im trying to generate fractal terrain using the "Mars" voxel demo algorithm - It explains how to recursively use smaller and smaller blocks within blocks and average the height of the corners of each edge and set that as the height at the middle of each edge (for each of the four edges) then subdivide into another four blocks until the size of the block being worked on is two units across the edge. All this does is slope the terrain nicely between the original edges (which were set to random values before the algorithm begins), not generate nice bumpy terrain. Help!

Share this post


Link to post
Share on other sites
MK42    127
Hi!

You probably have to add a random value to the average values you generate. Say you start out with values from 0-127. You average those and add a random value between 0 and 128. Now, in the next subdivision step, you only add a random value between 0 and 64, etc...

This will make things look rough. I might have the ranges screwed up, but you should get the idea.

- MK42

Share this post


Link to post
Share on other sites