Jump to content
  • Advertisement
Sign in to follow this  
Zwigby

Terrain Engine Idea

This topic is 4845 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 an idea for rendering a really large terrain. My idea is to basically have large grids that make up the whole world. And with these grids i run LOD algo on the visable ones and then render them. Now i know this is nothing revolutionary but i have still have parts that i haven't quite figured out. Like how do i interconnect the grids when needed? I mean other wise its just two meshes sitting next to each other. Also i was thing of using quadtrees on the grids and was wondering if any of this is really feasable. Thanks in advance for all advice. Zwigby

Share this post


Link to post
Share on other sites
Advertisement
the issue you mention is tearing, or cracking at the seams. there are a number of approaches ... skirts for one (look into chunked lod). it really depends on what lod algorithm you choose to apply to a terrain 'grid cell' .. roam will have different methods for fixing seams than would chunked lod than would geoclipmaps than would <fill-in-the-blank>. in my xp, it truly is best chosen after the lod solution is decided.

quadtrees are quite suitable for this approach...and not only is this not revolutionary ... but it is quite common. however, it can be an enlightening project if you actually finish it ... so i do dare say it is worth the effort.

and if you want TRULY large terrains (100K by 100K with <=10M posts), then you need also think about paging in/out terrain data (which is a whole other issue that can be quite obnoxious)

Share this post


Link to post
Share on other sites
Quote:
Original post by Zwigby
I have an idea for rendering a really large terrain. My idea is to basically have large grids that make up the whole world. And with these grids i run LOD algo on the visable ones and then render them. Now i know this is nothing revolutionary but i have still have parts that i haven't quite figured out. Like how do i interconnect the grids when needed? I mean other wise its just two meshes sitting next to each other. Also i was thing of using quadtrees on the grids and was wondering if any of this is really feasable. Thanks in advance for all advice.

Zwigby


Did you even look up geomipmapping? Because it takes care of exactly what you just mentioned.

Share this post


Link to post
Share on other sites
oconnellseanm, I have a looked into it briefly, but if you have any resources you could point me into the direction of I would very much appreciate it.

screwtape, Is there anywhere i can read up on paging in and out terrain data? And thanks for the information on tearing.


Zwigby

Share this post


Link to post
Share on other sites
Zwigby,

Don’t overcomplicate it. It’s not really that hard. If you take a 1024x1024 map and split it into a bunch of 64x64 maps, it’s generally pretty easy to do. A few suggestions:

1. Make sure the outer edge of each cell matches the outer edge of the adjoining cells. Then when they are placed next to each other they match perfectly. You don’t need to seam, except that on some video cards it might show cracks due to floating point inaccuracies. In other words, if your first cell is 0-63, don’t start the next cell at 64, but instead repeat the value at 63.
2. Only load the surrounding cells, keeping the player/camera in the middle cell. As the camera crosses over a boundary (edge cell) shift all the cells and load the next batch. If done right, it’ll have no performance impact. This way you can have very large planets on disk, but only load the portion of the planet you are on.
3. Use any LOD you want. As long as the shape doesn’t change, the neighboring cells should still match up. So what if they are left as two objects next to each other, as long as there aren’t any holes, and things lineup correctly. After all, we’re simulating reality, so keep it a simulation. If the gamer never knows they are multiple object, then you’ve done a good job
4. Take a look at my screen shots. They do something similar to what you are suggesting. All the code is dynamic, so I can handle any size terrain. The screenshots are from a variety of planets I’ve assembled, but most are using my 1024x1024 (or 16x16 cells, with each cell being 64x64). My largest planet so far is from a 12,800 x 12,800 heightmap which breaks down to 200x200 cells of 64x64 each. Based on an additional scaling algorithm and detail map I’m using, the terrain ends up being about 1,450 miles long or 2,102,500 square miles.

http://screenshots.3dmuve.com


Best of luck and let me know if I can help with anything

PS: I suggest skipping LOD for now, until you get things working. Then go back and implement LOD.

Quad

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!