User Tools

Site Tools


specular_lys_new

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
specular_lys_new [2017/04/29 11:51]
adavies
specular_lys_new [2017/05/07 20:41]
adavies removed
Line 80: Line 80:
 It has become very common to use "​roughness texture maps" to describe the specular reflection of a material. Note that these are not equivalent to It has become very common to use "​roughness texture maps" to describe the specular reflection of a material. Note that these are not equivalent to
 actual academic roughness which is defined as the root mean square slope of the profile. actual academic roughness which is defined as the root mean square slope of the profile.
-Roughness texture maps in computer graphics have for practical reasons been defined as a more even distribution of blurriness. In the following we will refer to the roughness in texture maps as "​perceptual roughness"​ and when we refer to roughness we are referring to academic roughness. ​+Roughness texture maps in computer graphics have for practical reasons been defined as a more even distribution of blurriness. In the following we will refer to the roughness in texture maps as "​perceptual roughness"​ and when we refer to roughness we are referring to academic roughness.
  
-Perceptual roughness, roughness and specular power can all be thought of as different parametrizations for the same parameter and it is possible to convert back and forth. For instance the conversions from roughness to perceptual roughness and back again are+Perceptual roughness, roughness and specular power can all be thought of as different parametrizations for the same parameter and it is possible to convert back and forth. For instance the conversions from roughness to perceptual roughness and back again are:
  
 <code glsl>​float RoughnessFromPerceptualRoughness(float fPerceptualRoughness) <code glsl>​float RoughnessFromPerceptualRoughness(float fPerceptualRoughness)
Line 114: Line 114:
 Thus we should not think of perceptual roughness as specifically for GGX or specular power as specifically for Blinn-Phong BRDFs. Thus we should not think of perceptual roughness as specifically for GGX or specular power as specifically for Blinn-Phong BRDFs.
 Finally for those using "​smoothness texture maps". These are simply equal to one minus the perceptual roughness and vice versa. Finally for those using "​smoothness texture maps". These are simply equal to one minus the perceptual roughness and vice versa.
 +
 +
 +[{{https://​s3.amazonaws.com/​docs.knaldtech.com/​docuwiki/​perceptual_vs_rdq_plot.png?​nolink|Perceptual roughness vs academic roughness (Rdq).}}]
  
 === Burley === === Burley ===
  
-In Lys we currently support three ways to distribute blurriness across MIP levels. Burley, Default and Log2.+In Lys we currently support three ways to distribute blurriness across MIP levels. Burley((Brent Burley. Physically-Based Shading at Disney. https://​disney-animation.s3.amazonaws.com/​library/​s2012_pbs_disney_brdf_notes_v2.pdf)), Default and Log2.
  
 Burley is the most straight forward and the one we recommend using for image based lighting. Burley is the most straight forward and the one we recommend using for image based lighting.
-The top MIP level will always be used for a 100% sharp reflection (roughness 0.0) and the offset from the bottom MIP level specified using “MIP Offset” in the specular group determines where we have 100% blurriness (roughness 1.0). The default offset of 3 corresponds to MIP level 8x8. Checking “Coarse Irradiance” in the 3D Preview will enable using the MIP level at your chosen offset for diffuse lighting.+The top MIP level will always be used for a 100% sharp reflection (roughness 0.0) and the offset from the bottom MIP level specified using “MIP Offset” in the specular group determines where we have 100% blurriness (roughness 1.0). The default offset of 3 corresponds to MIP level 8x8. Checking “Coarse Irradiance” in the 3D Preview will enable using the MIP level at your chosen offset for diffuse lighting ​in the viewport. 
 + 
 +Note that our implementation of BurleyToMip() below differs from the more typical form as cube maps convolved in Lys are based on RdotL and not NdotH. You can find a more detailed description in [[specular_lys_new#​pre-convolved_cube_maps_vs_path_tracers|Pre-convolved Cube Maps vs Path Tracers]].
  
 <code glsl>​float BurleyToMip(float fPerceptualRoughness,​ int nMips, float NdotR) <code glsl>​float BurleyToMip(float fPerceptualRoughness,​ int nMips, float NdotR)