You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my project, I have a character model which can contain up to hundreds of animations. The target is Android mobile devices so I don't want a single .glb file to be too large to have to load into memory, as every session might end up only using 5-10 animations out of the entire set. I would think the best way to approach this would be to try to separate the animations and the model into separate files, however I'm unable to get this to work for me using this library.
To illustrate this; I have two RenderableInstances which are of the exact same model, and I try to apply the animation from one model to another, but nothing happens:
Nodenode_A = newNode();
Nodenode_B = newNode();
// node_A and node_B are both Node objects with RenderableInstance of the same model filenode_A.setRenderable(modelRenderable);
node_B.setRenderable(modelRenderable);
ModelAnimationmodelAnimation = node_B.getRenderableInstance().getAnimation(0);
ObjectAnimatoranimation = node_A.getRenderableInstance().animate(modelAnimation);
animation.start();
My other thoughts on how I might get this to work would be to modify the json structure inside the .gltf file at runtime, adding the animations in and then compiling that into a .glb file but not sure how that would work.
Also would like to know if any of you think think this is the wrong approach and that I should just stuff all the animations into one .glb file and disregard the impact on memory as I have no experience in this matter.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In my project, I have a character model which can contain up to hundreds of animations. The target is Android mobile devices so I don't want a single .glb file to be too large to have to load into memory, as every session might end up only using 5-10 animations out of the entire set. I would think the best way to approach this would be to try to separate the animations and the model into separate files, however I'm unable to get this to work for me using this library.
To illustrate this; I have two RenderableInstances which are of the exact same model, and I try to apply the animation from one model to another, but nothing happens:
My other thoughts on how I might get this to work would be to modify the json structure inside the .gltf file at runtime, adding the animations in and then compiling that into a .glb file but not sure how that would work.
Also would like to know if any of you think think this is the wrong approach and that I should just stuff all the animations into one .glb file and disregard the impact on memory as I have no experience in this matter.
Beta Was this translation helpful? Give feedback.
All reactions