Jump to content
  • Advertisement
Sign in to follow this  
ic0de

OpenGL fitting Geomipmapping into my existing tree system

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

In my OpenGL based renderer I organize all the scenery in my world into a BVH tree which allows me to efficiently cull objects outside of the frustum. The leaves of the BVH tree are a data structure that I called a chunk, a chunk is simply a bunch of vertex data that is rendered using one draw call. The other day I added a loader for heightmaps and that was fairly straightforward, it generated a bunch of triangle tiles and offset the vertices by the heightmap value then the resulting data was stored in one chunk. Obviously drawing all the vertices in the heightmap in one go results in terrible performance. So I looked into geomipmapping which seems to fit my needs, the problem is the fact that geomipmapping requires I split up my chunks obviously but I am unsure how I should organize this from a Software architecture point of view. Should I totally separate terrain from the rest of the world and keep it in a separate tree? or should I just throw heightmap chunks into the regular BVH tree probably deriving a class heightmapChunk which adds LoD code? should I nest a quad tree inside my BVH as a node, in that case the whole quadtree is analogous to one regular chunk? 

Share this post


Link to post
Share on other sites
Advertisement

I always run world layer stuff (terrain, BSP, portals, whatever) as a completely separate block of rendering than the BVH for small in-world objects.

Share this post


Link to post
Share on other sites

Do you put the heightmap in the same data structure as the rest of the world scenery (buildings etc.) though?

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!