0

I understand that meshNormalMaterial maps normal vectors to RGB colors. Is there a way to override the default colors? Instead of x being red, y being green and z being blue, I want to update x, y, and z to custom hexadecimal color values. Is this possible?

  • i don't think that's how it works. the three colors are most likely normalized x/y/z vectors translated to rgb. i don't see anything in the threejs source that would allow you to set predefined colors. – hpalu Jul 31 '20 at 23:27
  • 1
    @KatieShamus Yes it is possible. Use `material.onBeforeCompile()` to modify `MeshNormalMaterial`, as in https://threejs.org/examples/webgl_materials_modified.html. – WestLangley Jul 31 '20 at 23:48

0 Answers0