Page 1 of 1
View Frustrum Culling
Posted: Thu Oct 01, 2009 2:17 pm
by diki
hi,
looking for a
new way to cull
many objects, i tried to implement the parts that i understood in
this article - basically, it is about not rendering anything outside of the camera view (the blue wireframe in this demo). it's not much, but looks useful & performant enough. your thoughts please :)
demo keys:
mouse to look around
arrow keys to rotate frustrum (camera view)
Posted: Thu Oct 01, 2009 2:30 pm
by Kjell
Dude,
You're digging a hole for yourself

Don't get me wrong, I'm happy to see people make good use of the libraries I posted .. but this won't do for your project either.
The main flaw is that you're using accurate frustum culling in combination with position coordinates of models. So when you get up close to a large object, there's a significant chance the "pivot" will be off-screen and thus it won't be rendered ( while it should ). The solution would be to use the model's AABB .. but this means a whole lot more math.
Start small & simple ~
K
Posted: Fri Oct 02, 2009 9:04 am
by diki
hi,
i was thinking about checking for bounding sphere, which would still be accurate enough & really easy on the math :)
Posted: Fri Oct 02, 2009 11:57 am
by Kjell
Hi diki,
Spheres are a bit of a strange choice when all of your meshes so far are square + axis-aligned .. but it would work yes. Obviously though, you end up using a accurate method such a frustum culling together with not-so-accurate data .. plus you still probably want to use AABB for a first collision pass as well no ( instead of Sphere-Bounds )?
Keep in mind that these types of techniques are normally never scripted / always coded. And that a open-end / massive-scale city like in GTA is one of the hardest things to pull off ( at a decent frame-rate ).
K