Jump to content

PBRMaterial - Intensity & Brightness of ReflectionTexture


MrGroove
 Share

Recommended Posts

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 

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...