pailhead / three-instanced-mesh

wrapper around THREE.InstancedBufferGeometry
MIT License
109 stars 14 forks source link

How do we override material colors? #30

Closed trusktr closed 4 years ago

trusktr commented 4 years ago

I tried to setColorAt(i, new THREE.Color('red')) for all my "objects", but they still come out as blue from my material.

GLTFLoader is what is loading the material, then I pass it into InstancedMesh. Are there cases where the InstancedMesh colors do not override the material color?

trusktr commented 4 years ago

Alright, I did something simpler and threw away the material that came from GLTFLoader, and just made a MeshPhongMaterial with no color defined, and now it works.

trusktr commented 4 years ago

Ah, the GLTF material had emissive. That explains it. Sorry for the noise!