Frustrum Culling help

Started by
2 comments, last by SuperVGA 12 years, 2 months ago
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?
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.

NBA2K, Madden, Maneater, Killing Floor, Sims http://www.pawlowskipinball.com/pinballeternal

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
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.

This topic is closed to new replies.

Advertisement