Search the Community
Showing results for tags 'spherical harmonics'.
-
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