[osg-users] Independent Animation of Shared Objects

OpenSceneGraph Users osg-users at lists.openscenegraph.org
Thu Apr 23 17:35:10 PDT 2020


 I could load 3,000 animated models and have them perform their animations
independently of each other.
I managed to make it work by cloning from the shared node using:
instanceNode = sharedNode->clone(osg::CopyOp::DEEP_COPY_CALLBACKS |
osg::CopyOp::DEEP_COPY_NODES));

Thanks so much!

On Mon, Apr 20, 2020 at 11:52 AM Mauricio Franco <maufranco at gmail.com>
wrote:

> Hi Robert,
> Thanks a lot for the prompt answer.
> Assuming the CPU can handle the load or that we reduce the number of
> instances, how can I achieve independent animations?
>
> Let's say I have a node containing the FBX file loaded with osgDB called
> SharedNode.
> And I have two instances sharing the same node:
> Instance1:  PAT->SharedNode
> Instance2:  PAT->SharedNode
>
> I extract the animation manager from the shared node and place a copy of
> it in the PATs of each instance.  Then I play one instance and then both
> instances start to play.
>
> Is it possible to share the FBX model while achieving independent
> animations?
>
> Thanks in advance,
>
> Mauricio.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to osg-users+unsubscribe at googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/osg-users/CAOzxF1MWjWs8rnohzB4Mi3yVQ6efFTsFu%2B_DQCHDf8C5cBXiEw%40mail.gmail.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20200423/1440dc7d/attachment.html>


More information about the osg-users mailing list