Issues with Changing envMapIntensity for All Objects in Three.js

Hi everyone :raised_hands:t2:,

I’m encountering an issue with Three.js where I’m trying to change the envMapIntensity for all objects in the scene. Despite modifying it correctly in the console, I don’t see any effect in the rendering.

Here’s a brief overview of what I’ve done:

  1. Scene Setup: I’ve set the scene.background and scene.environment to an environmentMap. This should, theoretically, apply the environment map globally without needing to set it individually on each object.

  2. Traversing and Setting envMapIntensity: I traverse through all objects in the scene and set their envMapIntensity property. Although this appears to work (I see the values change in the console), there’s no visible change in the rendering.

Here’s a link to my code snippet where you can see the implementation details.

Additionally, I’ve been following the course “ThreeJS Journey,” and in the tutorial, this approach seems to work just fine.

Questions:

  1. Is there a special way to ensure that changes to envMapIntensity are correctly applied to all objects, especially when using a global environment map?
  2. Is it possible that recent updates to Three.js have altered how envMapIntensity is handled compared to what was shown in the tutorial?

Any guidance or suggestions on how to resolve this would be greatly appreciated!

Thanks in advance :sparkling_heart:!

1 Like

Thanks a ton for the help! Really appreciate it :sparkling_heart:!

1 Like