Skip to main content
GameDev.net gamedev.net
🔒 Locked

Models with Skeletal Animation and Occlusion Culling

Started by V3rt3x Mar 10, 2009 at 4:08 PM 0 replies 1k views
Original Post
V3rt3x
V3rt3x
Hello, My 3D scene is composed of a world and objects: - the world has static geometry data; - the objects have dynamic geometry data: 3D models with skeletal animation. I render the world by using a BSP tree or an octree, so that I can draw only visible triangles (thanks to frustum culling). Now I need to determinate which objets I'll need to draw. Currently, I need to compute the bounding box of each object to see if it fits or intersects the frustum. My problem is that in order to compute the bounding box of an object, I have to compute *all* vertices of objet's model (given its animated skeleton). I'd like to avoid having to compute *all* vertices of *every* object present in my world, for just drawing 10% of them, or maybe less. Since multiple 3D models can share a skeleton (and thus, can share animations), it's quite hard to precompute a bounding box. Without skeletal animations, but only model frames (like in the MD2 format), it's easy to precompute the bounding box because I know the geometry of the model for each frame. But with a skeleton, it will depend on the model it is applied to. A solution would be to precompute the bounding box of every 3D model, for each skeleton frame and for each animation I may want it to play. Then at runtime, I'll interpolate the bounding boxes of current and next skeleton frames to get the real model's bounding box. I'd like to know if there are other methods for occlusion culling and skeleton models. For those who had to implement a 3D engine like this, how did you cope with that? Thanks.
BrianH
BrianH
When you apply a animation set / skeleton to a model, could you compute the maximum bounding box for all frames and then just use that? Storing a bounding box for each frame seems overkill. This should not take too long to compute.

Or, if load time is hindered too much, perhaps you could do this as part of the content pipeline and store in a meta file, something like:


green_orc
Green Orc
orc.mod
green_orc.mat
medium_biped.skel
biped_all.anim

100
400
100



Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.