This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
gamedev:textureproperties:reflectivity [2019/05/09 16:30] – dragonlord | gamedev:textureproperties:reflectivity [2019/05/09 16:32] – removed dragonlord | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | {{tag> | ||
- | <WRAP youarehere> | ||
- | [[: | ||
- | </ | ||
- | ====== Skin Texture Property: reflectivity ====== | ||
- | |||
- | Defines the per-color reflectivity/ | ||
- | |||
- | |Excepted Data Source|3 component image| | ||
- | |Data Range|0 to 1 for all image components| | ||
- | |Default Value|(0.2, 0.2, 0.2)| | ||
- | |Affected Modules|Graphic| | ||
- | |Linked Properties|[[gamedev: | ||
- | |||
- | ====== 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: | ||
- | |||
- | 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%> | ||
- | ^Material^Reflectivity linear^Reflectivity sRGB^Reflectivity sRGB as RGB^ | ||
- | |Water|(0.02, | ||
- | |Plastic low|(0.03, 0.03, 0.03)|(0.203, | ||
- | |Glass low|(0.04, 0.04, 0.04)|(0.232, | ||
- | |Plastic high|(0.05, 0.05, 0.05)|(0.256, | ||
- | |Glass high|(0.08, 0.08, 0.08)|(0.317, | ||
- | |Ruby|(0.08, | ||
- | |Diamond|(0.17, | ||
- | |Iron|(0.56, | ||
- | |Copper|(0.95, | ||
- | |Gold|(1.00, | ||
- | |Aluminium|(0.91, | ||
- | |Silver|(0.95, | ||
- | </ | ||
- | |||
- | 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: | ||
- | |||
- | 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 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 ====== | ||
- | |||
- | <WRAP column 45%> | ||
- | <WRAP center box 450px> | ||
- | {{ : | ||
- | <WRAP centeralign> | ||
- | </ | ||
- | </ | ||
- | |||
- | <WRAP column 45%> | ||
- | <WRAP center box 550px> | ||
- | {{ : | ||
- | <WRAP centeralign> | ||
- | </ | ||
- | </ | ||
- | |||
- | <WRAP clear></ |