gltf model instancedMesh question #1553
Answered
by
rabelais88
neciszhang
asked this question in
Q&A
-
Hi, I import a gltf model, it's return like
I wan't the mesh-box as a instancedMesh(include meshA,meshB,meshC),could you give me some ideas? Thanks a lot! |
Beta Was this translation helpful? Give feedback.
Answered by
rabelais88
Jul 28, 2021
Replies: 1 comment 3 replies
-
no you can't. An instancedMesh only accepts one geometry and one material,
|
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
neciszhang
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
no you can't. An instancedMesh only accepts one geometry and one material,
as stated in Three.js official doc.
there are two possible solutions for this:
drei/useGLTF()
withmesh
and rely on its caching ability. the performance drop is unnoticeable in most simple use cases.instancedMesh
and move the positions altogether to the same position by accessing their refs. IMO, it gets really messy.