how frustum cull big stuff like terrain

Started by
11 comments, last by Dawoodoz 7 years, 10 months ago

how to cull terrain ?

is the time consuming to generate AABB of terrain?

Advertisement

Yeeaaaaaahh.... no. It's not time consuming at all. In fact, it's a metric F ton easier.

Generally you can cull terrain by the simple use of a quad tree, which generates the AABBs for you. The benefit of this is for larger worlds you can skip multiple tests with the quad tree as if an entire node fits in your frustum, by rule of thumb all child nodes do as well.

Cut it up in smaller chunks is also an option.

Crealysm game & engine development: http://www.crealysm.com

Looking for a passionate, disciplined and structured producer? PM me

Generally you can cull terrain by the simple use of a quad tree, which generates the AABBs for you. The benefit of this is for larger worlds you can skip multiple tests with the quad tree as if an entire node fits in your frustum, by rule of thumb all child nodes do as well.

...and if an entire node is outside, then so also are all child nodes. It's only for nodes that intersect that you need to descend and test children, so even if the dataset is huge, it's an exponential reduction with the first handful of tests lopping off a large percentage of it.

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

Generally you can cull terrain by the simple use of a quad tree, which generates the AABBs for you. The benefit of this is for larger worlds you can skip multiple tests with the quad tree as if an entire node fits in your frustum, by rule of thumb all child nodes do as well.

...and if an entire node is outside, then so also are all child nodes. It's only for nodes that intersect that you need to descend and test children, so even if the dataset is huge, it's an exponential reduction with the first handful of tests lopping off a large percentage of it.

...and your worse cases will normally be the edges of the frustum and near the camera. Which in retrospect, you saved a lot of time.

Octrees! https://github.com/gametutorials/tutorials/tree/master/OpenGL/Octree

who can give me a simple turtorial about quad tree terrain?

Google can! There is like 12 good articles and some with code when I searched for "quad tree terrain". And it's much faster than waiting for a reply here.

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety." --Benjamin Franklin

OcTrees do not work very well on terrain unless it's voxel based terrain. Other wise you're going to hurt yourself more than you're optimizing.

who can give me a simple turtorial about quad tree terrain?

http://www.rastertek.com/tertut05.html

The concept for a Quad tree is not that hard. You recurssively subdivide spaces till you have x number of triangles contained inside of it.

is quad tree lod terrain == quad tree + lod terrain ?

I read the book <Focus on 3D terrain programming> , but I don't know what it say about the quad tree lod terrain, it seems not to be quad tree + lod terrain,

but another algorithm.

This topic is closed to new replies.

Advertisement