This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
gamedev:textureproperties:roughness [2019/05/09 08:34] – removed dragonlord | gamedev:textureproperties:roughness [2019/05/24 23:43] (current) – ↷ Links adapted because of a move operation dragonlord | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | {{tag> | ||
+ | <WRAP youarehere> | ||
+ | [[: | ||
+ | </ | ||
+ | ====== Skin Texture Property: roughness ====== | ||
+ | |||
+ | Defines the roughness of a surface. | ||
+ | |||
+ | |Excepted Data Source|2 component image| | ||
+ | |Data Range|0 to 1 for all image components| | ||
+ | |Default Value|(1, 1)| | ||
+ | |Affected Modules|Graphic| | ||
+ | |Linked Properties|[[gamedev: | ||
+ | |||
+ | ====== Description ====== | ||
+ | |||
+ | The **roughness** texture property defines the roughness of the surface. This property is one of the most important properties in the **[[gamedev: | ||
+ | |||
+ | There exist different algorithms to deal with roughness in rendering. All of them have though **no useful physical meaning** of the parameters making it hard for artists to work with them properly. This texture property uses a physical basis for the definition of the value to use. The **[[gamedev: | ||
+ | |||
+ | Due to the decoupling you can use the same roughness values for different kinds of materials. Hence a glassy reflecting plastic has the same roughness value as a glassy reflecting piece of chrome metal yet their **[[gamedev: | ||
+ | |||
+ | This texture property uses no gamma corrections. Images have to be painted in a linear space fashion. The artists aids below take this into account. | ||
+ | |||
+ | Adding small variations to the roughness image can add a lot of credibility to a material. In general use a roughness value above 0.5 for all kind of dents, bumps, cuts, cravices and scratches to underline the microfractures present due to the damage. Also wear and tear as well as weathered parts on a model tend to have roughness value above 0.5 as the material becomes porous and brittle on these places. Also for very dull reflections use roughness values closer to 1 while for glossy to glassy reflections use roughness values close to 0. Using a roughness value of 0 turns the object into a perfect mirror while a roughness value of 1 turns the object into a diffuse lit one. A roughness value of 0.5 is a good starting value. This table here gives you a good starting point: | ||
+ | |||
+ | <WRAP center 100%> | ||
+ | ^Material^Roughness^ | ||
+ | |Polished plastic or metal|0| | ||
+ | |Smooth plastic or metal with slight blury reflections still well recognizeable what is reflected|0 - 0.1| | ||
+ | |Rougher plastic or metal with blurry reflections where only larger shapes can be regonized|0.1 - 0.2| | ||
+ | |Rough plastic or metal or smooth leather|0.2 - 0.3| | ||
+ | |Rougher leather|0.3 - 0.4| | ||
+ | |Cast iron/ | ||
+ | |Clean rubber|0.5 - 0.6| | ||
+ | |Weathered rubber|0.6-0.8| | ||
+ | |Dull rubber, cement and other nearly diffuse objects|0.8-1| | ||
+ | </ | ||
+ | |||
+ | To help artists a **Roughness Chart** is provided. The chart features on top a row of plastic and metal materials as they appear in the game using the default OpenGL graphic module. This gives an impression on how blurry the reflection is and how the shape of the reflections widens and gets weaker with changing roughness values. The lower row is a special row where only the specular reflection of a light source is shown. This row is better suited to compare a real world object if a tiny light source is reflected in the object in a dark room. In the middle is a color picker the artist can use to sample the roughness value he wants to paint with. Click on the image to download it. | ||
+ | <WRAP download 1100px center> | ||
+ | {{ : | ||
+ | <WRAP centeralign> | ||
+ | </ | ||
+ | |||
+ | |||
+ | Optionally the second color component can be used to specify a different roughness value. This can be used to simulate metals that have anisotropic reflections. A typical example is brushed metal. Due to the brushing the reflections are elongated along perpendicular to the brushing direction. This can be simulated using two different roughness values one for along the brushing direction and the other perpendicular to it. Here this is limited to the texture U and V direction. The red color component (component 0) maps to the U texture direction and the green color component (component 1) maps to the V texture direction. If two color components are used anisotropic reflections are used. If one color component is used normal reflections are used. Using the same value for both color components has the same effect. | ||
+ | |||
+ | The source is typically an 8 bit image with 1 color component inside the range from 0 to 1. 0 represents a glassy surface with sharp reflections. 1 represents a full diffuse surface with only diffue reflection. | ||
+ | |||
+ | The default value for this texture property is (1,1) hence fully diffuse. | ||
+ | |||
+ | ====== Examples ====== | ||
+ | |||
+ | <WRAP center 100%> | ||
+ | <WRAP center box 620px> | ||
+ | {{ : | ||
+ | <WRAP centeralign> | ||
+ | </ | ||
+ | </ |