Thanks for your research Alessandro :)
Vertex caches sound like just another way to store morph geometry.
osgAnimation::MorphGeometry is just a series of 1 or more geometries (each
one stored in a MorphTarget) so in theory it should be as simple as loading
each bit of vertex cache geometry into a MorphTarget. I hope it proves that
simple!

On 9 June 2010 10:24, Alessandro Terenzi <[email protected]> wrote:

> Hi,
> as you know I wanted to try to add the possibility to read vertex animation
> data from point cache files, so I started looking at existing code in order
> to figure out where the integrations should be done. I have really basic
> experience with animations in OSG, so I'd like to share my ideas with you
> before doing anything.
>
> First of all, looking at the FBX SDK doc it looks like that there are 3
> ways "*geometries can be deformed: using skinning, shapes, or vertex
> caches. A vertex cache is a way to store directly the vertex animations
> inside a cache file"*. Looking at the existing code in osgfbx, I see that
> what is managed so far are 'static', 'rigged' and 'morph' geomerty types
> that I guess correspond to no animations or skinning and shapes deformers
> respectively. I thought to add also another type (GEOMETRY_CACHE)
> corrensponding to KFbxDeformer::eVERTEX_CACHE.
>
> In the examples provided with the SDK there is the "ViewScene" example that
> shows how to load point cache files (there are just 2 functions to use
> almost in a straightforwar way: PreparePointCacheData() and
> ReadVertexCacheData()).
>
> Well, this is the easy part I guess. But then I don't know how to handle
> that animation data...of course there are no bones for this kind of
> animation, also there is just one shape (unlike morphing where I guess at
> least 2 shapes are required) so I can just think about creating an
> UpdateCallback that keeps reading animation data (of course loaded once
> forever outside the application loop) and keeps updating vertex positions.
>
> What do you think about this? Can you give me suggestions or point me to
> other examples that do almost the same thing?
>
> Thanks.
> Alessandro
>
> PS: along the ViewScene example there is a sample FBX file (Humanoid.FBX)
> that I'll suggest you to check, it should contain at least skinning
> animation, but is not played correctly.
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to