Jump to content
  • Advertisement
Sign in to follow this  
Emanuele Russo

Infinite terrains and Memory management

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

Hello, I'm working on a 3d engine with the purpose to create an application that generates infinite terrains, creates procedural buildings and so on. One big issue that I can't handle is the memory management, RAM and VRAM. From the system memory point of view, I create and destroy LODs as soon as my avatar abandons them and enters in new ones, and this is fine. But how about video memory? What if in a LOD there is too much stuff and my video memory overflows? Is this only responsibility of the application programmer, or there is a known way to handle this? Actually even the system memory is a bit tricky to manage for me. I divide my world in a grid and when my avatar enters in one I create the stuff and when he leaves I destroy it. But if the user goes in and out the border of a sector of my grid, this approach it's not efficient. So I store some sectors in memory, to handle the case my user comes back; but this way there is the risk to run out of memory. Again, what is the smartest way to handle these problems? Can you suggest me some books to read, or websites to visit? Thanks a lot, Emanuele

Share this post


Link to post
Share on other sites
Advertisement
As long as you use some decent LOD system why would you run out of memory? Assuming your just using a height field like most games, all it requires is a 2 byte height value and a normal which only requires 2-4 bytes. Use a system like ChunkedLOD or clipmaps and your biggest memory issues will be the textures and even that isn't so huge it would overflow your memory.

Share this post


Link to post
Share on other sites
Quote:
Original post by silvermace
look into Geometry Clip Maps, Losasso and Hoppe '04
http://research.microsoft.com/~HOPPE/gpugcm.pdf

addresses some of the issues you mention and may give you some ideas about how others handle larger terrain datasets. Well written paper IMO.


I cobbled together a version of Malvar's PTC image compression (very slow still, needs alot of optimization) and have a 16,984 x 16,984 16 bit heightmap compressed using lossy compression to about 10MB of memory (using PTC and residuals/interpolation as per Losasso and Hoppe's documents) For what it's worth I can't tell the height data has been compressed.

Formski

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!