Replies: 1 comment 1 reply
-
They share the same material. So changing one material changes them all. If you want to avoid this you can use the <mesh
geometry={nodes.Cylinder.geometry}
material={materials.metal.clone()}
position={[0, 1.35309779644, 0.06925085187]}
scale={[1, 0.771013319492, 1]}
material-color={0x0000ff}
/>
<mesh
geometry={nodes.Cylinder001.geometry}
material={materials.metal.clone()}
position={[0, 1.347179532051, 0.065558932722]}
scale={[1, 0.771013319492, 1]}
material-color={0x00ff00}
/> NOTE: this is an example, and you probably don't want to clone the materials in the render method because they'll clone each react-render of the component, i'm just showing the example |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
NOTE: The discord invite link for support is invalid
I have a model in which multiple mesh geometry share the same material. If i add value to
material-color={'#ffffff}
the color changes for all mesh that share the material name. Is it possible to change the color of each mesh individually without effecting other meshes?I tried providing simple color prop to mesh but doesnt do anything.
i.e
Beta Was this translation helpful? Give feedback.
All reactions