Is there a way to get only a view objects/shaders in the scene lit by IBL.?
Id like to get only the metal shaders be iluminated by the IBL.
Yep, just play with environmentIntensity: https://www.babylonjs-playground.com/#4AJ16M#55
These are the golden lines. Thanks
scene.materials.forEach(function(material){
if(material.metallic == 0){
material.environmentIntensity = 0;
Does this also work if the metallic is controlled by a texture?
if(material.metallic == 0 && material.metallicTexture == undefined){}
Thanks im sure our coding department will know what todo.
Made a fast scene to showcase what i want todo.
Only the metal area should get brighter if i ad the env light.
Here .babylon file.sphere.zip (364.9 KB)
I’m not sure if this usecase is possible.
Thanks. In this case we try to compensate the light with darker dielectric materials.
dielectric materials?
Interesting…
Everything not metal is a dielectric.
Thats the reason why the metalness texture is black or white.
Just a thought, but if you can split into 2 materials, you would be able to control their environment lighting independently. Of course depends on the actual asset how feasible that is.
In this case its not possible we need pixel exact seperation.
There are a lot fo textures in the scene.
Thanks pjoe. I want to try that.