User Tools

Site Tools


gamedev:textureproperties:reflectivity

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:textureproperties:reflectivity [2012/12/03 23:50] dragonlordgamedev:textureproperties:reflectivity [2019/05/24 23:43] (current) – ↷ Links adapted because of a move operation dragonlord
Line 1: Line 1:
 +{{tag>graphic skin texture reflection}}
 <WRAP youarehere> <WRAP youarehere>
-[[:start|Start Page]] >> [[gamedev:main|Game Development with the Drag[en]gine]] >> [[gamedev:skinproperties|Skin Texture Properties]] >> [[gamedev:texturepropertylist|Texture Property Database]] >> **reflectivity**+[[:start|Start Page]] >> [[:gamedev|Game Development with the Drag[en]gine]] >> [[gamedev:skinproperties|Skin Texture Properties]] >> [[gamedev:texturepropertylist|Texture Property Database]] >> **reflectivity**
 </WRAP> </WRAP>
  
-<WRAP boxheader> +====== Skin Texture Property: reflectivity ====== 
-====== Summary ====== + 
-</WRAP> +Defines the per-color reflectivity/reflectance
-<WRAP boxcontent> +
-|Texture Property Name|reflectivity| +
-|Description|Defines the per-color reflectivity/reflectance|+
 |Excepted Data Source|3 component image| |Excepted Data Source|3 component image|
 |Data Range|0 to 1 for all image components| |Data Range|0 to 1 for all image components|
Line 14: Line 13:
 |Affected Modules|Graphic| |Affected Modules|Graphic|
 |Linked Properties|[[gamedev:textureproperties:reflectivity_gamma|reflectivity.gamma]]| |Linked Properties|[[gamedev:textureproperties:reflectivity_gamma|reflectivity.gamma]]|
-</WRAP> 
  
 ====== Description ====== ====== Description ======
-The **reflectivity** texture property defines the per-color reflectivity or reflectance of a material at a **zero viewing angle**. This is more than the simple **specular reflectivity** parameter typically found in other game engines since the Drag[en]gine adepts a **[[gamedev:pbr|physically based rendering]]** approach. The zero angle reflectivity is often specified as the **F0 reflectance**. This is the value required to be used for this texture property. Important to note is the fact that this texture property is **gamma corrected** using the value of the **[[gamedev:textureproperties:reflectivity_gamma|reflectivity.gamma]]** texture property which is by default 2.2 . This is due to the fact that reflectivity can be an image. Using sRGB color space artists can work with shades of dark gray colors for the very low values of non-dielectric materials which is still well visible while editing the image. Hence if you use a static value or static color for this texture property the value has to be **raised to the power of 1.0/2.2** first to obtain the correct reflectivity value during rendering unless the **[[gamedev:textureproperties:reflectivity_gamma|reflectivity.gamma]]** is set to 1. For all values it is marked if they are in **linear space** or **sRGB** space. Use the sRGB values for this texture property if **[[gamedev:textureproperties:reflectivity_gamma|reflectivity.gamma]]** is not set to 1. 
  
-Every material in the real world has an F0 reflectance larger than 0 with the reflectance approaching 100% reflectivity at grazing angles. The distintive feature of **non-dielectric** (aka non-metallic) materials is a low reflectivity typically between 2% and 4% equal in all color components and a large sub-surface reflectance. Bright non-dielectric materials like crystals can go up to 17% reflectivity. **Dielectric** materials (aka metals) on the other hand have a nearly no sub-surface reflectance and a high reflectivity value between 56% and 97%. Metals thus need something to reflect as otherwise they appear black. Furthermore metals can have variable reflectivity values for individual color components. Gold for example has different reflectance values for each color components while a metal like iron has mostly the same reflectance value in all color components. This simulates the fact that metals have a varying reflectance over the color spectrum. Using red, green and blue samples is enough. Most of the time you can sample a mid-gray reflection in an object to obtain a reasonable reflectivity value. This table gives you a selection of reflectivity values starting with lowest going to highest for typical materials you can use straight away.+The **reflectivity** texture property defines the per-color reflectivity or reflectance of a material at a **zero viewing angle**. This is more than the simple **specular reflectivity** parameter typically found in other game engines since the Drag[en]gine adepts a **[[gamedev:pbr|physically based rendering]]** approach. The zero angle reflectivity is often specified as the **F0 reflectance**. This is the value required to be used for this texture property. Important to note is the fact that this texture property is **gamma corrected** using the value of the **[[gamedev:textureproperties:reflectivity_gamma|reflectivity.gamma]]** texture property which is by default 2.2 . This is due to the fact that reflectivity can be an image. Using sRGB color space artists can work with shades of dark gray colors for the very low values of dielectric materials which is still well visible while editing the image. Hence if you use a static value or static color for this texture property the value has to be **raised to the power of 1.0/2.2** first to obtain the correct reflectivity value during rendering unless the **[[gamedev:textureproperties:reflectivity_gamma|reflectivity.gamma]]** is set to 1. For all values it is marked if they are in **linear space** or **sRGB** space. Use the sRGB values for this texture property if **[[gamedev:textureproperties:reflectivity_gamma|reflectivity.gamma]]** is not set to 1. 
 + 
 +Every material in the real world has an F0 reflectance larger than 0 with the reflectance approaching 100% reflectivity at grazing angles. The distintive feature of **dielectric** materials is a low reflectivity typically between 2% and 4% equal in all color components and a large sub-surface reflectance. Bright dielectric materials like crystals can go up to 17% reflectivity. **Metallic** materials on the other hand have a nearly no sub-surface reflectance and a high reflectivity value between 56% and 97%. Metals thus need something to reflect as otherwise they appear black. Furthermore metals can have variable reflectivity values for individual color components. Gold for example has different reflectance values for each color components while a metal like iron has mostly the same reflectance value in all color components. This simulates the fact that metals have a varying reflectance over the color spectrum. Using red, green and blue samples is enough. Most of the time you can sample a mid-gray reflection in an object to obtain a reasonable reflectivity value. This table gives you a selection of reflectivity values starting with lowest going to highest for typical materials you can use straight away.
  
 <WRAP center 100%> <WRAP center 100%>
Line 37: Line 36:
 </WRAP> </WRAP>
  
-For most non-dielectric materials the reflectivity stays thus between 2% and 4%. The reflectivity image is thus not required to be of high resolution nor does it need that much of attention during authoring. If your material is not a metal use 3% (0.2 reflectivity in sRGB) and you are correct in most situations. If you have a metal pick the value from the table and you are all set too. Do not place **material imperfections and variations** in the reflectivity image as this is not going to help much. Use the **[[gamedev:textureproperties:roughness|roughness]]** texture property instead. This one adds a lot more subtle varitions to a material. Hence most of the time using just a static value or static color for this texture property is more than enough. Spend your time on the **[[gamedev:textureproperties:roughness|roughness]]** texture property instead.+For most dielectric materials the reflectivity stays thus between 2% and 4%. The reflectivity image is thus not required to be of high resolution nor does it need that much of attention during authoring. If your material is not a metal use 3% (0.2 reflectivity in sRGB) and you are correct in most situations. If you have a metal pick the value from the table and you are all set too. Do not place **material imperfections and variations** in the reflectivity image as this is not going to help much. Use the **[[gamedev:textureproperties:roughness|roughness]]** texture property instead. This one adds a lot more subtle varitions to a material. Hence most of the time using just a static value or static color for this texture property is more than enough. Spend your time on the **[[gamedev:textureproperties:roughness|roughness]]** texture property instead. 
 + 
 +You can calculate this value also from the **index of refraction**(ior) for transparent objects. In this case the formula goes like this: 
 +**reflectivity = (ior - 1)^2 / (ior + 1)^2**
  
 The source is typically an 8 bit image with 3 color components with the color components inside the range from 0 to 1. Most of the time though a static value or static color is enough. The source is typically an 8 bit image with 3 color components with the color components inside the range from 0 to 1. Most of the time though a static value or static color is enough.
  
-The default value for this texture property is (0.2, 0.2, 0.2) which is the reflectivity of a common non-metal solid surface expressed in the sRGB color space.+The default value for this texture property is (0.2, 0.2, 0.2) which is the reflectivity of a common dielectric solid surface expressed in the sRGB color space.
  
 ====== Examples ====== ====== Examples ======
 +
 <WRAP column 45%> <WRAP column 45%>
 <WRAP center box 450px> <WRAP center box 450px>
-{{ :gamedev:textureproperties:reflectivity.png |Paint reflection (non-dielectric)}} +{{ :gamedev:textureproperties:reflectivity.png |Paint reflection (dielectric)}} 
-<WRAP centeralign>Paint reflection (non-dielectric). The **reflectivity** here is set to 0.17 (F0 of 2%) as the paint is a non-dielectric material. One can see how the fresnel effect pulls the reflectivity towards 1 at grazing angles. This effect is automatic due to **[[gamedev:pbr|Physically Based Rendering]]**. For most materials 0.17-0.23 as **reflectivity** is the correct choice.</WRAP>+<WRAP centeralign>Paint reflection (dielectric). The **reflectivity** here is set to 0.17 (F0 of 2%) as the paint is a dielectric material. One can see how the fresnel effect pulls the reflectivity towards 1 at grazing angles. This effect is automatic due to **[[gamedev:pbr|Physically Based Rendering]]**. For most materials 0.17-0.23 as **reflectivity** is the correct choice.</WRAP>
 </WRAP> </WRAP>
 </WRAP> </WRAP>
Line 53: Line 56:
 <WRAP column 45%> <WRAP column 45%>
 <WRAP center box 550px> <WRAP center box 550px>
-{{ :gamedev:textureproperties:reflectivity2.png |Gold reflection (dielectric)}} +{{ :gamedev:textureproperties:reflectivity2.png |Gold reflection (metallic)}} 
-<WRAP centeralign>Gold reflection (dielectric). The **reflectivity** here is set to (1, 0.856, 0.570) and **[[gamedev:textureproperties:color|color]]** set to black since gold is a metal and thus dielectric. A black **[[gamedev:textureproperties:color|color]]** and a high **reflectivity** is the distinguishing property of metals. In the case of gold the **reflectivity** also varies across the color components.</WRAP>+<WRAP centeralign>Gold reflection (metallic). The **reflectivity** here is set to (1, 0.856, 0.570) and **[[gamedev:textureproperties:color|color]]** set to black since gold is a metal. A black **[[gamedev:textureproperties:color|color]]** and a high **reflectivity** is the distinguishing property of metals. In the case of gold the **reflectivity** also varies across the color components.</WRAP>
 </WRAP> </WRAP>
 </WRAP> </WRAP>
  
 <WRAP clear></WRAP> <WRAP clear></WRAP>
gamedev/textureproperties/reflectivity.1354578604.txt.gz · Last modified: 2012/12/03 23:50 by dragonlord