[osg-users] load a osg model with rigged animation (exported by 3dsmax)

Andrea Martini martini.andrea at gmail.com
Fri Nov 24 02:58:03 PST 2017


Hi Raymond,
thank you (and thank to Alberto) for your quick answer. I executed osganimationhardware with the osgt file (3dsmax), but the application didn't find any animation:  animationManager is null after the readFile


Code:
osg::ref_ptr<osg::Node> node = osgDB::readNodeFile("RightHandRigged3.osgt");
 //same result with readRefNodeFiles("RightHandRigged3.osgt");
    osg::ref_ptr<osg::Group> root = dynamic_cast<osg::Group*>(node.get());
    if (!root)
    {
        std::cout << psr.getApplicationName() <<": No data loaded" << std::endl;
        return 1;
    }

    {
        osgAnimation::AnimationManagerBase* animationManager = dynamic_cast<osgAnimation::AnimationManagerBase*>(root->getUpdateCallback());
        if(!animationManager)
        {
            osg::notify(osg::FATAL) << "no AnimationManagerBase found, updateCallback need to animate elements" << std::endl;
            return 1;
        }
    }



As you suggested, i'm trying with osgt  by blender and with fbx.

Can i use  osganimationhardware to test fbx model with animation?
Is osganimationhardware the right example i should use to view the rigged animation?

Thank you!

Cheers,
Andrea

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=72446#72446







More information about the osg-users mailing list