Sign in to follow this  

Very Big HeightMap Problems

This topic is 2850 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 and sorry about my bad English.(I use XNA) Now I use a 256X256 height map to my scene. I'm tried to use a 2048X2048 but the game was very very slowly,and it was in the same terrain scene. When I try a 1024X1024 height map my game dont work when I press on the debug button. How big scene games render a very big terrains? If I use a small heightmap and small models,the terrain's texture detail level is very bad and it will be ugly.

Share this post


Link to post
Share on other sites
1)How can i split the terrain to smaller parts? What do you mean? I dont understand you.
2)How can I do culling in XNA?
3)What is frustum culling ?

Thank you very much!

Share this post


Link to post
Share on other sites
There is a quad-tree implementation you can use hosted on Codeplex -> http://quadtreeload.codeplex.com/

There is also a tutorial here that takes you though how to implement quad-tree rendering for terrain.

http://msmvps.com/blogs/valentin/archive/2008/09/30/smart-terrain-rendering-with-xna.aspx

I used the quad-tree component from codeplex and it worked great for a 2048x2048 heightmap.

Share this post


Link to post
Share on other sites
I did a quad-tree implementation for XNA for the very same thing. A Quad-tree is basically a tree structure that divides itself by four. So for example, you start with a root node which has four children nodes, each of those nodes then has four children nodes, etc.

The idea is that because your heights maps are divisble by four i.e. 2048x2048 you can split them into smaller chunks in the tree structure. How deep you go into the tree depends on your requirements - i think I did a recursive tree which means you can run out of stack if you go too far.

So you pick your depth and divide your terrain to fit evenly into each node, then you can frustum cull each terrain against a bounding box that describes how big this particular chunk of terrain is. I think XNA has a frustum class im sure, there are some articles floating about for XNA frustum culling heres one (http://www.nfostergames.com/Lessons/SimpleViewCulling.htm).

Another advantage of this is that because all the child nodes are contained within their respective parent node you can cull them just by checking if their parents node is visible in the frustum! Saving you lots of time.

I think thats about all I can remember now! I haven't touched this for over a year!

Share this post


Link to post
Share on other sites

This topic is 2850 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this