Jean-Sébastien Guay wrote:
Hi all,

I have been checking out osgAnimation in the past few days, and one thing that hasn't been clear to me is whether it supports animation mixing or blending, and how. For example, if a character goes from standing to walking, then walking to running, can I set it up so that the transition between these animations is smooth? Supposing I have a walk cycle and a run cycle animations set up correctly of course.

I think Cedric answered this, but...

We don't use osgAnimation (yet), but the code to do basic animation blending is pretty trivial. We just do a basic slerp or nlerp (normalized lerp) at each joint. Most of the time, you don't even need to take joint limits into account (at least for humans) to get decent results. This can get a lot fancier, of course, but we haven't had a need for it yet.

but he has only a walk cycle. Could anyone point me to an example model that would have multiple animations set up so I can look at how it's been done and try it out? Preferably in Collada or FBX format.

I've got a few Collada characters that we created, although I'm not sure if I'm allowed to hand them out (e-mail me privately if you're interested). Again, though, I don't use osgAnimation, so I'm not sure if they're completely compatible. The Collada spec is kind of flexible on how multiple animations are handled on a single character in the same document. It seems as if it's up to the application to determine how it wants to interpret the library_animations hierarchy.

For our characters, we just have a set of top-level animations ("walk", "jog", "run"), with the actual animation curves for each joint declared underneath each top-level animation.

On the subject of models, does anyone know of any place (web site) where I could buy skinned and animated models of characters? I presume such a resource exists, but I wanted to know if people had a specific one to recommend.

turbosquid.com always looked impressive to me, but I can't say we've ever actually bought anything.


Finally, osganimationhardware nathan.osg is giving me problems. It crashes after showing the first frame in State::setVertexAttribPointer() called from RigGeometry::drawImplementation() - stack trace below.

I'd really like to be able to see the hardware skinning. With the character at the link above, osganimationviewer (software skinning I presume) runs well but the update time is close to 16ms per frame on my pretty recent machine. I'm thinking if that time is spent updating the vertex arrays for the skinning, there might be a chance the hardware skinning would reduce that? Obviously using a lighter mesh would too, and I won't be using that exact mesh in our project, but anything that can help us maintain a good frame rate is welcome.

From my experience, hardware skinning is critical. For models of decent complexity (a couple thousand verts), the CPU just isn't up to the task if you get more than a couple of them on screen (at least not without significant efforts to optimize the code, but writing a vertex shader is a lot easer).

--"J"

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to