Reputation: 649
I recently upgraded from three.js version r110 to r124 because I needed some new features in r124. However now my meshes don't reflect light the way they used to, everything looks different! 😢
Does anyone know what changed between these versions that would have this effect and how I can undo it without reverting to the older version?
Here are some photos to show what i'm talking about... You can see in picture ONE (r110) the light clearly reflects off the cylinder but in picture TWO (r124) the effect is not clear at all!
It's a little difficult to share the code here because the example is part of a large project but the only thing that has changed between these two photos is the three.js version number. In both photos I am using black standard material and a white point light.
ONE
TWO
Upvotes: 0
Views: 358
Reputation: 8423
The accepted answer did not help in my case. I have a number of THREE.PointLight
s. After updating, objects seemed to no longer reflect the light coming from these.
I had to decrease the decay
setting of the lights to 0.01
(down from 4
)
Upvotes: 0
Reputation: 10165
As per my comment...
The roughness and metalness default values for MeshStandardMaterial were changed in r112.
So setting your material roughness and metalness to the values that were previously the defaults "0.5" should produce a material that looks the same as pre r112.
Upvotes: 1