This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
gamedev:pbr [2012/12/02 02:07] – created dragonlord | gamedev:pbr [2020/04/05 10:35] – [Ad-hoc Rendering Methods] dragonlord | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | {{tag> | ||
<WRAP youarehere> | <WRAP youarehere> | ||
- | [[: | + | [[: |
</ | </ | ||
For a much more in depth discussion about the topic of using physically based rendering in games see the [[http:// | For a much more in depth discussion about the topic of using physically based rendering in games see the [[http:// | ||
- | ====== | + | ====== |
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 17: | Line 19: | ||
====== Fresnel ====== | ====== Fresnel ====== | ||
+ | <WRAP box 200px right :en> | ||
+ | {{ : | ||
+ | <WRAP centeralign> | ||
+ | </ | ||
In the Ad-hoc methods lighting is typically split up into a **diffuse** and a **specular** term summed up. Diffuse lighting contribution usually comes from **Subsurface Reflectance** while specular reflections comes from **Surface Reflectance**. Whereas in Ad-hoc methods theres two quantities are not always summing up properly to 1 they do in the Microfacet BRDF case. This is required as otherwise the entering and exiting light would not be the same. To achieve this the Microfat BRDF uses the **fresnel effect**. If you look at a round object made of polished plastic you will notice how the reflection of the environment at a surface point pointing straight at your face is rather low while towards grazing angle the reflection is nearly mirror like. The proper use of this Fresnel Effect is important to ensure the correct distribution of light contribution between the Surface and the Subsurface Reflectance. All materials exhibit this Fresnel Effect at grazing angles even dull materials like concrete. The difference is only that the surface is so rough the reflection at grazing angle is too blurry to recognize it as what it truely is. Artists do not have to alter the fresnel parameters as there exist better parameters that offer more intuitive control. Messing with Fresnel Factors is only a source of problems. | In the Ad-hoc methods lighting is typically split up into a **diffuse** and a **specular** term summed up. Diffuse lighting contribution usually comes from **Subsurface Reflectance** while specular reflections comes from **Surface Reflectance**. Whereas in Ad-hoc methods theres two quantities are not always summing up properly to 1 they do in the Microfacet BRDF case. This is required as otherwise the entering and exiting light would not be the same. To achieve this the Microfat BRDF uses the **fresnel effect**. If you look at a round object made of polished plastic you will notice how the reflection of the environment at a surface point pointing straight at your face is rather low while towards grazing angle the reflection is nearly mirror like. The proper use of this Fresnel Effect is important to ensure the correct distribution of light contribution between the Surface and the Subsurface Reflectance. All materials exhibit this Fresnel Effect at grazing angles even dull materials like concrete. The difference is only that the surface is so rough the reflection at grazing angle is too blurry to recognize it as what it truely is. Artists do not have to alter the fresnel parameters as there exist better parameters that offer more intuitive control. Messing with Fresnel Factors is only a source of problems. | ||
+ | <WRAP clear></ | ||
- | ====== | + | ====== |
One of the interesting properties of the Microfacet BRDF is that the **individual functions** used to build up the entire BRDF can be **exchanged and mixed** from a large pool of existing functions. All of them though exhibit some sort of speculiarity and roughness parameter although their actual values do vary, To make the life of artists easy while still allowing Graphic Modules to choose whatever combination of BRDF function pieces they like three generic parameters have been defined: Color, Reflectivity and Roughness. These values are **decoupled** in contrary to the Ad-hoc version. Due to the decoupling the individual appearance properties can be modified while keeping the result **consistent across all kinds of lighting conditions**. The individidual texture properties linked to these parameters contain detailed information. | One of the interesting properties of the Microfacet BRDF is that the **individual functions** used to build up the entire BRDF can be **exchanged and mixed** from a large pool of existing functions. All of them though exhibit some sort of speculiarity and roughness parameter although their actual values do vary, To make the life of artists easy while still allowing Graphic Modules to choose whatever combination of BRDF function pieces they like three generic parameters have been defined: Color, Reflectivity and Roughness. These values are **decoupled** in contrary to the Ad-hoc version. Due to the decoupling the individual appearance properties can be modified while keeping the result **consistent across all kinds of lighting conditions**. The individidual texture properties linked to these parameters contain detailed information. | ||
Line 31: | Line 38: | ||
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: | 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: | ||
- | ===== Dielectric and Non-Dielectric | + | ===== Dielectric and Metallic |
- | In games materials can be classified roughly in two main categories: dielectric and non-dielectric. Dielectric materials all all kinds of metals. These materials | + | <WRAP box 150px right :en> |
+ | {{ : | ||
+ | <WRAP centeralign> | ||
+ | </ | ||
+ | <WRAP box 150px right :en> | ||
+ | {{ : | ||
+ | <WRAP centeralign> | ||
+ | </ | ||
+ | |||
+ | In games materials can be classified roughly in two main categories: dielectric and metallic. Metals | ||
<WRAP center round important 80%> | <WRAP center round important 80%> | ||
Using these decoupled parameters the artist can alter the individual material properties in a way that it is consistent across various lighting conditions. Put simple the artists can create materials without requiring to know about what kind of lighting condition the game uses. He can create the material once and it will just work no matter if at night, at day or in a phychodelic dream world. The artist does not have to go back and forth testing his materials. This increases productivity and reduces frustration. | Using these decoupled parameters the artist can alter the individual material properties in a way that it is consistent across various lighting conditions. Put simple the artists can create materials without requiring to know about what kind of lighting condition the game uses. He can create the material once and it will just work no matter if at night, at day or in a phychodelic dream world. The artist does not have to go back and forth testing his materials. This increases productivity and reduces frustration. | ||
</ | </ | ||
+ | <WRAP clear></ | ||
- | ===== Less texture | + | ===== Lesser and more intuitive Texture |
Another advantage of these texture parameters is the reduction in texture authoring work. With Ad-hoc methods one needs a color texture, a specular color texture, some kind of glossiness texture and potentially exponent, fresnel and other parameters to fix lighting problems. With the physically based rendering system an artist only really needs to create a color texture and a roughness texture since reflectivity is most of the time a constant for the same material. Physically based rendering makes the life of game developers and artists easier as changing lighting conditions won't break the created materials which is especially a pain if you have to redo all textures. | Another advantage of these texture parameters is the reduction in texture authoring work. With Ad-hoc methods one needs a color texture, a specular color texture, some kind of glossiness texture and potentially exponent, fresnel and other parameters to fix lighting problems. With the physically based rendering system an artist only really needs to create a color texture and a roughness texture since reflectivity is most of the time a constant for the same material. Physically based rendering makes the life of game developers and artists easier as changing lighting conditions won't break the created materials which is especially a pain if you have to redo all textures. | ||
<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 | + | 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 |
</ | </ | ||
Line 51: | Line 68: | ||
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**, | 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**, | ||
</ | </ | ||
- | + | ||
+ | ====== Example Materials ====== | ||
+ | Images of some example materials can be found in the **[[gamedev: |