Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / 3D Theory & Graphics / Skeletal animation optimizations Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
bongo

May 29, 2005, 01:45 AM

I have a few questions about skeletal animation and some possible optimizations I have been thinking about.

For example, assume that you are about to skin an entity's vertices. Would it not be possible to check first if the entity is visible and only do the skinning if the entity is in the view frustum of the viewer? I would think this is a worthwile optimization. As you would avoid skinning entities that are not visible in the scene.

Another question that I have along the same lines is this. During entity update I update the animation frame based on the time step since the last frame. I also orient the bones of the animation based on the current animation frame and timestep. My question is this. Would it also not be possible to eliminate the generating the bone orientations for the current frame if the entity is not visible? That way all I do is update the current frame the entity is on. I only update bone orientations only if the entity is in view. I think this should be possible. Anyways I would appreciate any help anyone can give me and if my post helps anyone out all the better.

 
Reedbeta

May 29, 2005, 01:56 AM

Absolutely, if you are doing software skinning do not bother with the calculations unless you know the entity is visible (use a bounding box or similiar, and test it against the viewing frustum).

If you are doing skinning with a vertex shader then it's even simpler - you just don't draw the entity when it's outside the frustum (ordinary frustum culling).

 
Bumper

May 30, 2005, 02:50 AM

What is better for a RTS game like Dawn of War, software skinning or hardware skinning? Say we have around 50-100 units at the screen?

 
Crash

May 30, 2005, 08:46 AM

For an RTS where you don't need easy access to the actual geometry of the models for collision detection, doing it on the hardware will be a huge win.

-M

 
netrion

May 30, 2005, 02:43 PM

Here are some optimizations I'm using.

- Check the current animation frame against the last one updated and don't update unless they are different, this is a bit more tricky if you are interpolating between frames
- For objects far away turn off animation blending, update less often, etc.
- Use LOD skeletons as well as meshes, or prune the skeleton so finger joints and details aren't updated if the object is far away

Note: One problem with not updating bones of objects not on screen is if you have objects attached to bones (like weapons) that may be on screen.

 
Wernaeh

May 30, 2005, 06:14 PM

>>
Note: One problem with not updating bones of objects not on screen is if you have objects attached to bones (like weapons) that may be on screen.

 
bongo

May 30, 2005, 06:27 PM

>Note: One problem with not updating bones of objects not on screen is if you >have objects attached to bones (like weapons) that may be on screen.

Another thing you can do is have special joints in your model called "attach" joints. These joints are animated from frame to frame but are not part of the skeleton. So they do not have a parent joint for example. Even if your model is not visible, these "attach" joints are always updated. This way any objects attached to the "attach" joints will always be rendered in the correct position regardless of whether the main model is visible or not.

So even though the attach joints are always updated. It is still far less computationally expensive to update these joints than the entire joint hierarchy of the model.

 
This thread contains 7 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.