how to cull terrain ?
is the time consuming to generate AABB of terrain?
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.
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.
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.
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.
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.