User Tools

Site Tools


gamedev:pbr

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
gamedev:pbr [2012/12/03 23:31] dragonlordgamedev:pbr [2020/04/05 10:36] (current) dragonlord
Line 1: Line 1:
 +{{tag>graphic pbr hdrr rendering}}
 <WRAP youarehere> <WRAP youarehere>
-[[:start|Start Page]] >> [[gamedev:main|Game Development with the Drag[en]gine]] >> **Physically based Rendering**+[[:start|Start Page]] >> [[:gamedev|Game Development with the Drag[en]gine]] >> **Physically based Rendering**
 </WRAP> </WRAP>
 +
 +====== Physically based Rendering ======
  
 For a much more in depth discussion about the topic of using physically based rendering in games see the [[http://renderwonk.com/publications/s2010-shading-course/|SIGGRAPH Course Notes]] especially the course notes and slides about //Physically-Based Shading Models in Film and Game Production//. Another source of information can be found in a blogg post about [[http://seblagarde.wordpress.com/2011/08/17/hello-world/|adopting a physically based shading model]]. This page here contains only the important parts to understand the PBR as used in the Drag[en]gine. For a much more in depth discussion about the topic of using physically based rendering in games see the [[http://renderwonk.com/publications/s2010-shading-course/|SIGGRAPH Course Notes]] especially the course notes and slides about //Physically-Based Shading Models in Film and Game Production//. Another source of information can be found in a blogg post about [[http://seblagarde.wordpress.com/2011/08/17/hello-world/|adopting a physically based shading model]]. This page here contains only the important parts to understand the PBR as used in the Drag[en]gine.
  
-====== Ad-hoc Rendering Methods ======+====== Rendering Methods ====== 
 There exist various rendering models that can be used to render computer graphics. Nearly all of the rendering in games is using a sort of **ad-hoc rendering method**. These are rendering methods that contain parameters in the rendering equations that are **interlinked** and/or **unintuitive to use**. These game engines or rendering engines expose some kind of **specularity** value typically paired with some kind of **exponent** parameter. The specularity represents in these systems the strength of the specular reflections of light sources on a material. The expoonent on the other hand defines the shape of the specular reflection. A well known method is the Phong rendering in which the specular exponent is of a cosine form whereas the specularity is a percentage value between 0% and 100% of the light added as specular reflection. The main problem with these systems is that in reality the speculiarty and exponent values vary across the material for different **viewing directions** as well as different **lighting conditions**. One set of parameters tuned for one lighting condition does usually not work well at all for an entirely different lighting condition. This is due to the fact that for different lighting conditions these parameters have to adjusted. This is though neither feasible to do nor is it easy for the artist. What is the proper specular exponent to use for a model? And what is the correct specular reflection strength to use? Answering these questions for an artist is a problem in many cases. In the end these Ad-hoc rendering methods result in artificial renders and artists having to adjust lighting parameters whenever the lighting conditions change in a scene. There exist various rendering models that can be used to render computer graphics. Nearly all of the rendering in games is using a sort of **ad-hoc rendering method**. These are rendering methods that contain parameters in the rendering equations that are **interlinked** and/or **unintuitive to use**. These game engines or rendering engines expose some kind of **specularity** value typically paired with some kind of **exponent** parameter. The specularity represents in these systems the strength of the specular reflections of light sources on a material. The expoonent on the other hand defines the shape of the specular reflection. A well known method is the Phong rendering in which the specular exponent is of a cosine form whereas the specularity is a percentage value between 0% and 100% of the light added as specular reflection. The main problem with these systems is that in reality the speculiarty and exponent values vary across the material for different **viewing directions** as well as different **lighting conditions**. One set of parameters tuned for one lighting condition does usually not work well at all for an entirely different lighting condition. This is due to the fact that for different lighting conditions these parameters have to adjusted. This is though neither feasible to do nor is it easy for the artist. What is the proper specular exponent to use for a model? And what is the correct specular reflection strength to use? Answering these questions for an artist is a problem in many cases. In the end these Ad-hoc rendering methods result in artificial renders and artists having to adjust lighting parameters whenever the lighting conditions change in a scene.
  
Line 36: Line 40:
 represents the alignment of mirrors on the surface. This determines hw sharp the reflections are and thus how broad the specular hightlight is. This parameter is the most complicated one because the different BRDF function possibilities for the Surface Reflectance have all kinds of roughness parameters going from 0 all the way up to infinity. For an artist this is not easy to use. For this reason a special definition has been created with a generic roughness parameter in the range from 0 (mirror) to 1 (fully diffuse) with a gradual change from mirror to diffuse. This way the Graphic Module can decide itself what BRDF function to use and maps the roughness parameter itself. The **[[gamedev:textureproperties:roughness|roughness]]** texture property represents this generic parameter and contains more information about it. represents the alignment of mirrors on the surface. This determines hw sharp the reflections are and thus how broad the specular hightlight is. This parameter is the most complicated one because the different BRDF function possibilities for the Surface Reflectance have all kinds of roughness parameters going from 0 all the way up to infinity. For an artist this is not easy to use. For this reason a special definition has been created with a generic roughness parameter in the range from 0 (mirror) to 1 (fully diffuse) with a gradual change from mirror to diffuse. This way the Graphic Module can decide itself what BRDF function to use and maps the roughness parameter itself. The **[[gamedev:textureproperties:roughness|roughness]]** texture property represents this generic parameter and contains more information about it.
  
-===== Dielectric and Non-Dielectric Materials =====+===== Dielectric and Metallic Materials =====
 <WRAP box 150px right :en> <WRAP box 150px right :en>
-{{ :gamedev:material_reflectivity2.png |Gold reflection (dielectric)}} +{{ :gamedev:textureproperties:reflectivity2.png |Gold reflection (metallic)}} 
-<WRAP centeralign>Gold reflection (dielectric)</WRAP>+<WRAP centeralign>Gold reflection (metallic)</WRAP>
 </WRAP> </WRAP>
 <WRAP box 150px right :en> <WRAP box 150px right :en>
-{{ :gamedev:material_reflectivity.png |Paint reflection (non-dielectric)}} +{{ :gamedev:textureproperties:reflectivity.png |Paint reflection (dielectric)}} 
-<WRAP centeralign>Paint reflection (non-dielectric)</WRAP>+<WRAP centeralign>Paint reflection (dielectric)</WRAP>
 </WRAP> </WRAP>
  
-In games materials can be classified roughly in two main categories: dielectric and non-dielectricDielectric materials all all kinds of metals. These materials have the disticntive property that they have next to no Subsurface Reflectance (**[[gamedev:textureproperties:color|color]]**) but a rather high Surface reflectance (**[[gamedev:textureproperties:reflectivity|reflectivity]]**). On the other hand for all other materials including crystals that are non-dielectric the situation is vice versa. They have very little Surface Reflectance (**[[gamedev:textureproperties:reflectivity|reflectivity]]**) but instead all their glory is in the Subsurface Reflectance (**[[gamedev:textureproperties:color|color]]**).All these materials, no matter if dielectric or not, have in common that the component wise sum of the Surface (**[[gamedev:textureproperties:reflectivity|reflectivity]]**) and Subsurface Reflectance (**[[gamedev:textureproperties:color|color]]**) does not exceed 1. Also all these materials have at least 2% F0 reflectivity even if they are fully diffuse. This is a main difference towards Ad-hoc methods where most objects do not reflect their environment. With physically based rendering all objects even the most matte one have a slight environment reflection.+In games materials can be classified roughly in two main categories: dielectric and metallicMetals have the disticntive property that they have next to no Subsurface Reflectance (**[[gamedev:textureproperties:color|color]]**) but a rather high Surface reflectance (**[[gamedev:textureproperties:reflectivity|reflectivity]]**). On the other hand for all other materials including crystals that are dielectric the situation is vice versa. They have very little Surface Reflectance (**[[gamedev:textureproperties:reflectivity|reflectivity]]**) but instead all their glory is in the Subsurface Reflectance (**[[gamedev:textureproperties:color|color]]**).All these materials, no matter if dielectric or not, have in common that the component wise sum of the Surface (**[[gamedev:textureproperties:reflectivity|reflectivity]]**) and Subsurface Reflectance (**[[gamedev:textureproperties:color|color]]**) does not exceed 1. Also all these materials have at least 2% F0 reflectivity even if they are fully diffuse. This is a main difference towards Ad-hoc methods where most objects do not reflect their environment. With physically based rendering all objects even the most matte one have a slight environment reflection.
  
 <WRAP center round important 80%> <WRAP center round important 80%>
Line 57: Line 61:
  
 <WRAP center round important 80%> <WRAP center round important 80%>
-The importance shifts thus from authoring two or more textures (specular color, glossiness, exponent) of unintuitive parameters working at only one lighting condition to one roughness texture with an intuitive parameter. If metallic and non-metallic materials are mixed in the same texture an optional simple, lower resolution reflectivity texture can be created. This texture is quick to do and can be small. Furthermore the same roughness texture works even if the material shifts from being metallic to non-metallic or if lighting conditions change. This is a net reduction in texture authoring time and disk space.+The importance shifts thus from authoring two or more textures (specular color, glossiness, exponent) of unintuitive parameters working at only one lighting condition to one roughness texture with an intuitive parameter. If metallic and dielectric materials are mixed in the same texture an optional simple, lower resolution reflectivity texture can be created. This texture is quick to do and can be small. Furthermore the same roughness texture works even if the material shifts from being metallic to dielectric or if lighting conditions change. This is a net reduction in texture authoring time and disk space.
 </WRAP> </WRAP>
  
Line 66: Line 70:
 Physically based rendering is thus foremost about **reducing the material parameters** artists and game developers have to deal with to a small set of **intuitive**, **stable** yet **versatile** parameters they can take from real world materials. This improves productvitiy and simplicity of material creation no matter what lighting conditions the material is used at later on. Physically based rendering makes the life of game developers and artists easier allowing them to better create their visions in less time. Physically based rendering is thus foremost about **reducing the material parameters** artists and game developers have to deal with to a small set of **intuitive**, **stable** yet **versatile** parameters they can take from real world materials. This improves productvitiy and simplicity of material creation no matter what lighting conditions the material is used at later on. Physically based rendering makes the life of game developers and artists easier allowing them to better create their visions in less time.
 </WRAP> </WRAP>
- + 
 +====== Example Materials ====== 
 +Images of some example materials can be found in the **[[gamedev:pbr:examplematerials|Example Materials Preview]]**. 
gamedev/pbr.1354577507.txt.gz · Last modified: 2012/12/03 23:31 by dragonlord