IBL rendering in OgreV2

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


chengzhigao
Gnoblar
Posts: 5
Joined: Tue Nov 26, 2019 6:53 am

IBL rendering in OgreV2

Post by chengzhigao »

Hi,

I was researching on IBL PBS rendering in OgreV2, I found that it somehow works with the reflection map by setting "datablock->setTexture( Ogre::PBSM_REFLECTION, texture );" from the PbsMaterial sample. However, from the V1 it seems the IBL setting of PBS sample contains 2 cubemaps, diffuse and specular. I did not see any relevant information or example on setting up a diffuse IBL cube map in V2. Will the reflection cubemap itself have the same result as the combination of Diffuse+Specular in V1 example? Can someone share some example or codes on this topic(PBS+IBL in Ogre V2)?

I would really really appreciate your answer and lights on this.

thanks & regards,
Spencer
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5505
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1372

Re: IBL rendering in OgreV2

Post by dark_sylinc »

Hi!

You don't need to do anything because by default we use the higher mips of the reflection map for diffuse IBL.

In Ogre 2.2 'envFeatures' was added setAmbientLight which controls this behavior. If EnvFeatures_DiffuseGiFromReflectionProbe bit is not set, then we won't use the reflection maps' higher mips for diffuse IBL.

This is useful if you have more accurate sources of diffuse GI information (such as VCT or Irradiance Fields with Depth).
chengzhigao
Gnoblar
Posts: 5
Joined: Tue Nov 26, 2019 6:53 am

Re: IBL rendering in OgreV2

Post by chengzhigao »

Thanks very much for your reply. I am new to Ogre3D.
1.) In this case where would the diffuse come from if the current reflection map is the highest level?
2.) Does it means i can not use another texture as the diffuse env map?
3.) If i disable the flag EnvFeatures_DiffuseGiFromReflectionProbe, does that mean it wont have diffuse color in this case ? If it still has, where would the diffuse come from?

If i would like to know more about this in source code, which file or example do you recommend to explorer?
Also can you provide some high level information or documentation on Ogre convert the HLMS to lower PBR shader?

Thanks & Regards,
Spencer