OGRE-Next  4.0.0unstable
Object-Oriented Graphics Rendering Engine
Ogre::PbsBrdf Namespace Reference

Enumerations

enum  PbsBrdf {
  FLAG_UNCORRELATED = 1u << 31u , FLAG_SPERATE_DIFFUSE_FRESNEL = 1u << 30u , FLAG_LEGACY_MATH = 1u << 29u , FLAG_FULL_LEGACY = 1u << 28u ,
  FLAG_HAS_DIFFUSE_FRESNEL = 1u << 27u , BRDF_MASK = 0x00000FFF , Default = 0x00000000 , CookTorrance = 0x00000001 ,
  BlinnPhong = 0x00000002 , DefaultUncorrelated = Default | FLAG_UNCORRELATED , DefaultHasDiffuseFresnel = Default | FLAG_HAS_DIFFUSE_FRESNEL , DefaultSeparateDiffuseFresnel ,
  CookTorranceHasDiffuseFresnel = CookTorrance | FLAG_HAS_DIFFUSE_FRESNEL , CookTorranceSeparateDiffuseFresnel , BlinnPhongHasDiffuseFresnel = BlinnPhong | FLAG_HAS_DIFFUSE_FRESNEL , BlinnPhongSeparateDiffuseFresnel ,
  BlinnPhongLegacyMath = BlinnPhong | FLAG_LEGACY_MATH , BlinnPhongFullLegacy = BlinnPhongLegacyMath | FLAG_FULL_LEGACY
}
 

Enumeration Type Documentation

◆ PbsBrdf

Enumerator
FLAG_UNCORRELATED 
FLAG_SPERATE_DIFFUSE_FRESNEL 
FLAG_LEGACY_MATH 
FLAG_FULL_LEGACY 
FLAG_HAS_DIFFUSE_FRESNEL 
BRDF_MASK 
Default 

Most physically accurate BRDF we have.

Good for representing the majority of materials. Uses:

  • Roughness/Distribution/NDF term: GGX
  • Geometric/Visibility term: Smith GGX Height-Correlated
  • Normalized Disney Diffuse BRDF,see "Moving Frostbite to Physically Based Rendering" from Sebastien Lagarde & Charles de Rousiers
CookTorrance 

Implements Cook-Torrance BRDF.

Uses:

  • Roughness/Distribution/NDF term: Beckmann
  • Geometric/Visibility term: Cook-Torrance
  • Lambertian Diffuse.

Ideal for silk (use high roughness values), synthetic fabric

BlinnPhong 

Implements Normalized Blinn Phong using a normalization factor of (n + 8) / (8 * pi) The main reason to use this BRDF is performance.

It's cheaper, while still looking somewhat similar to Default. If you still need more performance, see BlinnPhongLegacy

DefaultUncorrelated 

Same as Default, but the geometry term is not height-correlated which most notably causes edges to be dimmer and is less correct.

Unity (Marmoset too?) use an uncorrelated term, so you may want to use this BRDF to get the closest look for a nice exchangeable pipeline workflow.

DefaultHasDiffuseFresnel 

This used to be 'Default' in OgreNext 2.4 and earlier.

The diffuse component is multiplied against the inverse of the specular's fresnel to maintain energy conservation.

This has the nice side effect that to achieve a perfect mirror effect, you just need to raise the fresnel term to 1; which is very intuitive to artists (specially if using coloured fresnel)

However after research and feedback from the community, most DCC tools out there (e.g. Marmoset) don't do this; and users expect consistency.

Therefore the new Default BRDF in 3.0 does not include diffuse fresnel

DefaultSeparateDiffuseFresnel 

Same as DefaultHasDiffuseFresnel but the fresnel of the diffuse is calculated differently.

Normally the diffuse component would be multiplied against the inverse of the specular's fresnel to maintain energy conservation. This has the nice side effect that to achieve a perfect mirror effect, you just need to raise the fresnel term to 1; which is very intuitive to artists (specially if using coloured fresnel)

When using this BRDF, the diffuse fresnel will be calculated differently, causing the diffuse component to still affect the colour even when the fresnel = 1 (although subtly). To achieve a perfect mirror you will have to set the fresnel to 1 and the diffuse colour to black; which can be unintuitive for artists.

This BRDF is very useful for representing surfaces with complex refractions and reflections like glass, transparent plastics, fur, and surface with refractions and multiple rescattering that cannot be represented well with the default BRDF.

CookTorranceHasDiffuseFresnel 

CookTorrance, but w/ diffuse fresnel. See DefaultHasDiffuseFresnel.

CookTorranceSeparateDiffuseFresnel 

CookTorrance but w/ separate diffuse fresnel.

See DefaultSeparateDiffuseFresnel

        Ideal for shiny objects like glass toy marbles, some types of rubber.
        silk, synthetic fabric. 
BlinnPhongHasDiffuseFresnel 

BlinnPhong but w/ diffuse fresnel. See DefaultHasDiffuseFresnel.

BlinnPhongSeparateDiffuseFresnel 

BlinnPhong but w/ diffuse fresnel. See DefaultSeparateDiffuseFresnel.

BlinnPhongLegacyMath 

Implements traditional / the original non-PBR blinn phong:

  • Looks more like a 2000-2005's game
  • Ignores fresnel completely.
  • Works with Roughness in range (0; 1]. We automatically convert this parameter for you to shininess.
  • Assumes your Light power is set to PI (or a multiple) like with most other Brdfs.
  • Diffuse & Specular will automatically be multiplied/divided by PI for you (assuming you set your Light power to PI). The main scenario to use this BRDF is:
  • Performance. This is the fastest BRDF.
  • You were using Default, but are ok with how this one looks, so you switch to this one instead.
BlinnPhongFullLegacy 

Implements traditional / the original non-PBR blinn phong:

  • Looks more like a 2000-2005's game
  • Ignores fresnel completely.
  • Roughness is actually the shininess parameter; which is in range (0; inf) although most used ranges are in (0; 500].
  • Assumes your Light power is set to 1.0.
  • Diffuse & Specular is unmodified. There are two possible reasons to use this BRDF:
  • Performance. This is the fastest BRDF.
  • You're porting your app from Ogre 1.x and want to maintain that Fixed-Function look for some odd reason, and your materials already dealt in shininess, and your lights are already calibrated.

Important: If switching from Default to BlinnPhongFullLegacy, you'll probably see that your scene is too bright. This is probably because Default divides diffuse by PI and you usually set your lights' power to a multiple of PI to compensate. If your scene is too bright, kist divide your lights by PI. BlinnPhongLegacyMath performs that conversion for you automatically at material level instead of doing it at light level.