Mixing correctly image based lighting with classical lighting

Started by
0 comments, last by Hodgman 7 years ago

Hi,
Image Based Lighring (IBL) is the use of pre-computed radiance and irradiance cubemap (for the actual most used at least).
My question is about to mix correctly IBL with classical lighting (PBR), meaning mix the result of radiance and irradiance sampling.
I tried multiple thing but i'm not sure how to achieve the most physically correct result :
1) LightingResult += DiffuseColor * Irradiance + Radiance * Reflectance
2) On each light do DiffuseFactor * Irradiance + SpecularFactor * Radiance * Reflectance
For the second version, the ambient light should do AmbientLight * Irradiance if i'm correct.
I'm not sure the first version is correct because then you always have one lighting and never have black result.
So, I guess the second version is more correct or a more correct calcule exists.
Thanks

Advertisement

IBL is just another light source, like a point light, spot light etc... Every light source should be added together.

Every light causes a diffuse reflection and a specular reflection. Those need to be added together for each light too.

If you're using IBL, you don't need "AmbientLight" any more -- ambient light is a hack to make sure that nothing is black. IBL is a modern version of that same idea :)

To get better shading in cracks/crevices, you can use some kind of Ambient Occlusion technique to darken the IBL lighting in some places.

This topic is closed to new replies.

Advertisement