User Tools

Site Tools


gamedev:textureproperties:roughness

Summary

Texture Property Nameroughness
DescriptionDefines the roughness of a surface
Excepted Data Source2 component image
Data Range0 to 1 for all image components
Default Value(1, 1)
Affected ModulesGraphic
Linked Propertiesroughness.remap.lower, roughness.remap.upper

Description

The roughness texture property defines the roughness of the surface. This property is one of the most important properties in the physically based rendering approach. In other game engines specular reflection also includes the surface roughness together with the reflectivity which results in troubles working with such a combined value. The roughness on the other hand decouples the shape of the reflection from the intensity of the reflection. The reflectivity texture property determines in general the intensity of reflections while this texture property determines the shape of the reflection. Two pices of plastic for example have the same reflectivity. One of them is though rather smooth with a low roughness value while the other is rather dull with a higher roughness value. The appearance of the plastic is totally different. The different roughness value alters the shape, intensity and bluriness of the reflection on the plastic material. To get a good looking material good values for this texture property are important.

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 physically based rendering considers a material to be composed of tiny mirror segments. Taking a small area on the surface we can look at the set of tiny mirrors included there. For all of them we determine how far (in degrees) their orientation deviaties from the surface normal. The largest deviation is then used as the maximum deviation from the surface normal. This deviation has a physical meaning now. If a small particle is dropped on this point of the surface it can bounce away from the surface normal at most this amount of deviation. This angle is used as the roughness value mapped to the range from 0 to 1 hence 0 degrees maps to 0 and 90 degrees maps to 1. The beauty on this definition is that the roughness is now a linearly changing quantity. Changing the roughness graudually changes the size of the size and bluriness of the reflection als gradually. This allows to use artists to work with roughness in a more natural way than other definitions can provide. From this definition it is also clear that a value of 0 with no angle deviation results in a mirror like reflection while a value of 1 with angle deviation all around the surface results in a very dull rubber like appearance.

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 reflectivity is way different. The same goes for a dull piece of plastic compared with a dull piece of metal. Both have the same roughness value although they are different materials.

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:

MaterialRoughness
Polished plastic or metal0
Smooth plastic or metal with slight blury reflections still well recognizeable what is reflected0 - 0.1
Rougher plastic or metal with blurry reflections where only larger shapes can be regonized0.1 - 0.2
Rough plastic or metal or smooth leather0.2 - 0.3
Rougher leather0.3 - 0.4
Cast iron/weathered plastic0.4 - 0.5
Clean rubber0.5 - 0.6
Weathered rubber0.6-0.8
Dull rubber, cement and other nearly diffuse objects0.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.

Roughness Chart for Artists

Roughness Chart for Artists

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

Materials with same reflectivity but different roughness

Materials with same reflectivity but different roughness. Left image has a high roughness (rubber). Middle image has average roughness (rough plastic). Right image has very low roughness (polished plastic).

You could leave a comment if you were logged in.
gamedev/textureproperties/roughness.txt · Last modified: 2012/12/05 19:45 by dragonlord