I notice that there’s a global environment map property on the scene, but there’s no corresponding envMapIntensity
property. I want to be able to dim the environment map at night time, and it’s not practical to iterate through every material (I have hundreds of GLTF-loaded models).
Is setting renderer.toneMapping
to one of the renderer constants types and using renderer.toneMappingExposure
not sufficient for your use case?
I’m not familiar with tone mapping. How would that work?
The problem I’m having is this: I have a directional light source - sunlight - and ambient hemisphere lights. During the night, I reduce the intensity of these light sources, as well as making them bluer. This works for all of the non-PBR materials which now appear very dark. However, the PBR materials are still being illuminated by the environment map, so are only slightly reduced in brightness. This means that they now appear relatively much brighter than the non-PBR materials.
i don’t think you can. exposure imo affects everything, including unlit materials and that may not what you want.
everything changes once you take control of the environment yourself. remember, you have PMREMGenerator.fromScene, the environment map isn’t limited to a hard baked image/hdri. draw the hdri on a sphere and now you can rotate it, set intensity etc.
Individual materials already have an envMapIntensity
property, so the functionality already exists internally within three.js. I’m just asking why this isn’t available globally, since it seems inconsistent to allow a global default for environmentMap
but not one for envMapIntensity
.
It seems like this would be a relatively easy thing to add, and could be made backwards compatible.
it would definitively be nice, just like rotations. but nothing like that exists atm.
Probably simple enough to implement, but would require some decisions about the API… At some point having too many properties on the Scene or Renderer becomes a design problem. Previous thread, feel free to comment!