MarioNoMaster Posted May 31, 2017 Share Posted May 31, 2017 Hi, I`am building my first setup in BabylonJS with PBR Materials and HDR maps. Everything worked fine for me until I hit the "Environment Irradiance": So the HDR Map is used for irradiance and reflection. Ok, in most cases thats what you want, but I want to illuminate my model with scene lights and use the HDR only for reflections (or maybe have the option to toggle between) - for me, it gives me more control. With the HDR map and scene lights, my scene will be to bright. I found some options like: var pbr = new BABYLON.PBRMaterial("pbr", scene); pbr.directIntensity = 1.0; pbr.environmentIntensity = 1.0; But this only controls either the light intensity in the scene or the hdr intensity (both reflection and irradiance). So I dont see an option here to turn down the irradiance of the HDR. In the doc i read about this topic: "The fact that we extract the Harmonics from the texture is the reason why we were entitled to use an High Dynamic Range format. The generation could skip the harmonics generation step if you instantiate an HDRTexture with its parameter generateHarmonics set to false." I tried this but it doesn`t work for me. I used the playground demo in the doc ( http://www.babylonjs-playground.com/#1P98HI#2 ) and updated the HDRCubeTexture line like this: var hdrTexture = new BABYLON.HDRCubeTexture("textures/country.hdr", scene, 512, true, false); //first boolean: noMipMap // 2nd boolean: generateHarmonics? The first boolean works, I can turn off / on MipMaps. But the 2nd boolean has no effect. Can someone push into the right direction? regards, Mario Quote Link to comment Share on other sites More sharing options...
Sebavan Posted May 31, 2017 Share Posted May 31, 2017 Hello, There is no separate control for it unfortunately and the material is moving fast with a plan to change it in the next month: I will try to see if I can integrate this change as well. Quote Link to comment Share on other sites More sharing options...
MarioNoMaster Posted June 1, 2017 Author Share Posted June 1, 2017 Hi, thanks for the info Sebavan! Ok, so this means there is no option to not use the HDR illumination right now (like skipping the generateHarmonics, as mentioned in the doc) ? I tried to overwrite the sperical harmonics but unfortunately it didn`t work (maybe because Im a noob and without examples its difficult for me ). Is this possible in theory? Because the lighting information must be stored somehow, right? Good to know that the PBS Material is WIP right now. An additional parameter to control the HDR irradiance would be nice! 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.