Jump to content
  • Advertisement
Sign in to follow this  
ic0de

Frustrum Culling help

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

hi
I have sort of implemented frustum culling, I can test points against the frustum but I haven't been able to eliminate that much geometry, my world is stored in a VBO, which is generated from a world structure containing vertices in sequential order and some other stuff. Basically I cant figure out a way that it makes sense to regenerate my VBO every frame so that I can knock off some vertices. For the moment I have simply been testing world objects, like enemies and items and leaving the world alone. Is there a way to cull the world without regenerating the VBO every time?

Share this post


Link to post
Share on other sites
Advertisement
You don't cull vertices, you cull objects. So for instance terrain, cut it into a grid of chunks and cull chunks of the terrain. If you have a barrel in your world, it should go into 1 vbo and draw that vbo over and over, then you can cull all of the barrels. So: Never cull triangles, only objects. Never update VBO's every frame, the point of them is so that you load once and never touch again.

Share this post


Link to post
Share on other sites
You don't cull vertices, you cull objects. So for instance terrain, cut it into a grid of chunks and cull chunks of the terrain. If you have a barrel in your world, it should go into 1 vbo and draw that vbo over and over, then you can cull all of the barrels. So: Never cull triangles, only objects. Never update VBO's every frame, the point of them is so that you load once and never touch again.


do I need to modify the file structure I use to store the map or can I automatically subdivide it at load time

Share this post


Link to post
Share on other sites
Hi ic0de,

Yes, you can subdivide at load and then push as many vbos as possible to your card as few times as possible.
Then tell it which ones to render as what your frustrum culling procedure returned.
It's ususally recommended to subdivide into a tree. K-D, Quad or Octree, depending on the density and uniformity of your scene.

But like dpadam said, create some chunks consisting of data inside a cullable region (such as an axis-aligned cube),
and create vbos for every chunk.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!