Hello Dominik,
Dominik Rau wrote:
> Am 30.07.2009 um 22:15 schrieb Carsten Neumann:
>> FWIW I'm in the process of extending the collada loader to support
>> (some) animations and vertex skinning.
>
> That's awesome news Carsten. Can you give us some more details about
> what to expect when? I'm also happily offering myeslf as guinea pig
> for testing (after my vacation ;) )...
I've added a Skeleton NodeCore that has a set of SkeletonBones and
Geometries attached to it. I currently plan to support GPU vertex
skinning only, so basically when a bone has changed the skeleton will
recompute its matrix and update a uniform array of matrices that get
passed to a shader.
The animation system currently consists of essentially five base types:
- AnimationTrack: stores a single data "stream" for animation - you can
think of this as a single curve for key frame animation (the curve can
produce scalar, vector or matrix data, though).
Also contains two strings (target, subTarget) that identify the
destination for the data (e.g. FieldContainer, Field name).
- AnimationTemplate: holds a bunch of tracks together. It stores all
data that makes up a single animation sequence.
Animation: this holds all the playback information (current time etc.)
for an animation and is created by instantiating an AnimationTemplate.
- AnimationChannel: this relates to AnimationTrack the same way
Animation relates to AnimationTemplate, it is the playback data
structure and instead of two strings describing its target it has an
actual pointer to it and knows how to write data into its target.
- AnimationManager: the main interface to interact with animations. From
here templates are instantiated, animations started, stopped, and destroyed.
As far as the collada support goes, the ideas are a bit more vague since
collada allows just plain crazy constructs as animation constructs, e.g.
you can have a node with:
<rotate>1 0 0 15</rotate>
<rotate id="rotY1">0 1 0 0</rotate>
<rotate>0 0 1 25</rotate>
<translate>5 0 0</translate>
<rotate>1 0 0 40</rotate>
<rotate id="rotY2">0 1 0 0</rotate>
<rotate>0 0 1 -20</rotate>
and then have an animation target the angle value of "rotY1" and
"rotY2". I have a very hard time seeing a good way to reproduce this on
the runtime side where normally this whole transformation stack gets
folded into a single matrix (which of course does not work if rotations
in the middle of the stack change all the time).
So what exactly will or will not work in the end is a bit dependent on
what comes out of Maya and what reasonable constraints we can put on our
artists ;)
Cheers,
Carsten
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users