MrGroove Posted November 4, 2018 Share Posted November 4, 2018 Hi, is it possible to change the "intensity" of a reflection texture? I have an object with PBR Materials and a reflection texture from a dds-file (CubeTexture). If I switch off all lights in the scene, the texture is still shown. As a user, I would expect, that everything is "dark". Is it possible to change the brightness / oapcity / intensity of a reflection Texture? Best Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted November 5, 2018 Share Posted November 5, 2018 I was trying to set scene.environmentTexture.level to 0 but only metallic materials fade in black, so here my solution, switch all PBRMaterials.environmentIntensity to 0: for(let i=0; i < scene.materials.length; i++){ scene.materials[i].environmentIntensity = 0; } https://www.babylonjs-playground.com/index.html#K4S3GU#39 Quote Link to comment Share on other sites More sharing options...
MrGroove Posted November 5, 2018 Author Share Posted November 5, 2018 Thank you,. But my problem is, i have to use "natural" lights. When I use environmentIntensity, they don't affect the material. Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted November 5, 2018 Share Posted November 5, 2018 Ok, I thought your reflections comes from the envTexture, but actually you're using a specific reflectionTexture on your PBRMaterial, that's it? In my playground above, lowering the envIntensity still works (cubemap on the cube): https://www.babylonjs-playground.com/index.html#K4S3GU#41 But you can also access to the cubemap intensity itself using its level: yourMaterial.reflectionTexture.level = 0; https://www.babylonjs-playground.com/#UU7RQ#214 Quote Link to comment Share on other sites More sharing options...
Guest Posted November 5, 2018 Share Posted November 5, 2018 Teasing..teasing... Soon you will be able to change everything dynamically to debug even faster V!nc3r 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.