Jump to content

PBR / HDR and Environment Irradiance


MarioNoMaster
 Share

Recommended Posts

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

Link to comment
Share on other sites

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!

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...