Jump to content
  • Advertisement
Sign in to follow this  
WebsiteWill

To subdivide or not to subdivide?

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

That is the question :) Actually it is... Is it necessary to subdivide a terrain mesh in the modeling program before exporting it? For instance, say I have a level with 100,000 vertices. It's relatively flat (meaning no overhangs) so it will fit nicely into a quad tree culling algorithm. Do I export all 100k vertices as a single object and let the terrain engine break up the vertices into nodes of the correct sizes or would it be better to first subdivide the mesh down to the lowest level (say something with 1000 vertices per) and load them into the terrain engine each as separate nodes? I think subdividing first would allow me to stream data in and out more efficiently so I can make a seamless world. However, this isn't a big concern as I don't mind having zone boundaries (seemless is not a big issue for me, in fact I'm planning against it). However, even for a terrain engine with distinct land masses each in separate files, would I gain any performance by first breaking the terrain into chunks? Thanks, Webby

Share this post


Link to post
Share on other sites
Advertisement
It may be more efficient to manually split the terrain in certain areas, say, where there is a high concentration of vertex data. I don't know the details of how your engine splits the terrain on its own though, or what you mean by the "correct sized" nodes, so I can't exactly weight the pros and cons of doing one over the other (or a combination of both) [smile]

Share this post


Link to post
Share on other sites
By correct size I mean apply a quad tree structure to it, but split the mesh on the node boundaries. This way they are all perfect squares (except maybe the outer edges if the original terrain is not started from a square).

However, simply dividing the terrain into perfect squares won't handle cases where a terrain has more detail in some places than in others. For this reason I am thinking it might be best to let the terrain engine sort the vertex data into nodes as it sees fit. This way I can make leaves have X vertices maximum. This will result in the quad tree not being fully developed (meaning node 1 may get subdivided twice while node 3 might need 6-7 subdivision iterations). I guess this would actually be a benefit as in the worst case I'll have to traverse say 6 nodes and in the best case I'll only have to traverse 1 instead of always traversing 6 nodes to make sure I have all of the data.

Gonna go toy around with this for a while to see what I can come up with.

Thanks,
Webby

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!