How to clone a VRM model? #1172
Replies: 9 comments 3 replies
-
|
Cloning the entire VRM! I have never thought of it. What is your purpose here? |
Beta Was this translation helpful? Give feedback.
-
|
+1 |
Beta Was this translation helpful? Give feedback.
-
|
+1 |
Beta Was this translation helpful? Give feedback.
-
|
Any updates? |
Beta Was this translation helpful? Give feedback.
-
|
+1 |
Beta Was this translation helpful? Give feedback.
-
|
One (not performant) workaround it to use different urls to load the same model: |
Beta Was this translation helpful? Give feedback.
-
|
+1 |
Beta Was this translation helpful? Give feedback.
-
|
world peace can be achieved if yall enable vrm cloning 🙏 |
Beta Was this translation helpful? Give feedback.
-
|
still no workaround for this problem? I try to clone |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
In Three.js you can reuse glTF models by cloning them prior to adding them to the scene. Adding multiple copies of the same
gltf.sceneinstance can otherwise lead to unexpected behavior.For simple models this can be accomplished via
gltf.scene.clone(). For models with skinned meshes, more care must be taken to clone internal objects. In these cases, you may clone the model usingSkeletonUtilsfromthree/examples:See discussion: https://discourse.threejs.org/t/how-to-clone-a-model-thats-loaded-with-gltfloader/23723/8
As VRM is an extension of glTF, I expect to be able to clone VRM models in a similar way as regular glTF models. However, while I can clone the
gltf.scenewithSkeletonUtils.clone()as shown above, this doesn't clone theVRMobject associated with it, so I lose out on VRM functionality.Example code: https://jsfiddle.net/mattrossman/satvh5kr/3/
As you can see in the example, I can clone and reposition the model, but I don't have a
VRMobject for the copy.Is there a suggested way to fully clone VRM models? I see a VRMHumanoid.clone() method in the API reference, but I'm not sure if/how it would be used here.
Beta Was this translation helpful? Give feedback.
All reactions