i’m programming an outdoor-engine…
the most difficult part ist probably to draw only the visible part…
for now, i am here :
build an octree
calculate which end-of-octree-boxes are visible because of their distance to the viewer
reduce the number of visible parts down to 1/4 by frustum culling
quite good, but not enough.
lets assume i stand in front of a hill. all i see is the hill, containing 200 triangles. behind it is another hill, a bit smaller. behind this one is another and so on.
i see 200 triangles, and MUCH more are calculated.
my idea is : you can see 1,2 or 3 sides of an end-of-octree-box. is it possible to ask opengl “has anything been drawn there yet ?”
if yes, i could skip the box, and all polys contained in it, by “theoretically draw” 3 quads
Originally posted by HamsterofDeath:
my idea is : you can see 1,2 or 3 sides of an end-of-octree-box. is it possible to ask opengl “has anything been drawn there yet ?”
if yes, i could skip the box, and all polys contained in it, by “theoretically draw” 3 quads
I came across some papers/tuts on terrain occlusion culling (in SW of course).I don’t have any links but you shouldn’t have much trouble with google.I doubt they’re worth the implementation though.
i got another idea :
i pick out a high point (for example the highest point of every hill) then find out the biggest cone possible that fits under this point without touching the landscape -
from a single point of view, the cone is a triangle, and every octree-box completely behind this triangle is invisible
few calculations - big speedup