Gzave Posted April 12, 2018 Share Posted April 12, 2018 Hello, I have problems casting shadows on objects that have PBR material and environmentTexture. I don't know how to dim the light emitted by the environmentTexture, or even better, make the intensity of the reflection related to the lights of the scene. Since shadows are the areas on the objects where there is no light, and the reflection of the environment texture is not affected by the lights, I can't get shadows on the object. Please, check the following example. http://www.babylonjs-playground.com/#BCHEUP There is a barely visible shadow on the PBR ball, from the torus. My questions are: 1) How can I make the ball dim/brighten according to the lights of the scene to some extend. 2) How can I change the intensity of the light of the environment texture, so that I can change the "intensity" of the reflected light of the ball, regardless of the surrounding lights? So that I can control how much the lights of the scene affect the brightness of the object. Thanks in advance! babbleon 1 Quote Link to comment Share on other sites More sharing options...
Sebavan Posted April 12, 2018 Share Posted April 12, 2018 For more info on light setup in PBR you can take a look at : http://doc.babylonjs.com/how_to/physically_based_rendering_master#light-setup Basically light falloff is not the same in std and pbr, but you can use usePhysicalLightFalloff to make them alike. The environmentIntensity is the main property controlling the environment intensity. The usePhysicalLightFalloff and environmentIntensity are only available in the PBRMaterial and not the 2 simpler versions. Relying on them could look like : https://www.babylonjs-playground.com/#BCHEUP#1 And converting your material like : https://www.babylonjs-playground.com/#BCHEUP#2 Gzave 1 Quote Link to comment Share on other sites More sharing options...
Gzave Posted April 17, 2018 Author Share Posted April 17, 2018 Thank you very much, your examples helped! 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.