Jump to content
  • Advertisement
Sign in to follow this  
baddogj

terrain generation( need advice)

This topic is 5016 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

i have created my CTERRAIN class and all the functions that i will need. I wasn't able to find a site that would give me good information. my problem is, my computer is slow, so what is the fastest realistic way to generate terrain and level of detail? [Edited by - baddogj on October 23, 2004 9:05:40 PM]

Share this post


Link to post
Share on other sites
Advertisement
You could just use a heightmap(s) that was randomly generated pre-runtime. That would be the fastest way to do it.

Or you could hack something together with naturally curvy things - sine functions. Just use a lookup table and some complex functions:
 // x = x-value; z = z-value
this.y = const1 * sine(const2*x + const3) + const4 * sine(const5*z + const6) + etc

This is basically just assigning a sine function to each of the x and z axises, and making the y-value their summation. Where the constants are randomly generated. This also makes it easy to re-create the same map.

The downfall of this is that it will produce "repeating" maps - thus you need to have quite a few different sine functions at once for both the x and z axises for a more random feel. More complex equations for the axises yields more complex landforms.

Share this post


Link to post
Share on other sites
thanks for the comment. i will try and do that when i get more experience. now i have two questions.
is roam or geomipmapping a faster method for level of detail?

also, are there any other fast methods of generatin terrain?

[Edited by - baddogj on October 23, 2004 7:19:11 PM]

Share this post


Link to post
Share on other sites
ROAM and GeoMM don't generate terrain...they are just algorithms for adjusting the level of detail of your terrain on the fly. IE: Not drawing unneccesary triangles.

For Generating terrains google the following:

Perlin Noise
Fractal Brownian Motion
Fault Algorithm
Diamond Square Algorithm

Those are just a few methods out there to generate terrain.

Share this post


Link to post
Share on other sites
Well, the speed of GeoMM or ROAM depend alot on how you implement them :p

However, these days, GeoMM is probably faster due to the fact that it is alot more hardware friendly. Basically all you need to do is use a different Index Buffer for each level of Detail. (If you don't care so much about cracks).

Roam is alot more precise, but requires the CPU to diddle with every vertex, which is not a good thing these days.

ROAM 2.0 should be out soon..(might be already?) and it is supposed to be alot more hardware-friendly.

Also google for "Geometry Clipmaps" a Level of detail method developed by a guy at Microsoft. pretty impressive demo.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!