Jump to content
  • Advertisement


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


Fractal Terrains

This topic is 6439 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

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

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!