# PBR parameters

## PBR Lighting Model Components

<table><thead><tr><th width="186">Name</th><th>Description</th><th>Components</th></tr></thead><tbody><tr><td>Indirect Diffuse</td><td>Models diffuse lighting from the environment.</td><td>Specified by a special diffuse texture created from the sky texture. <br>Controlled via <code>envmap_intensity</code> in the environment. <br>Affected by the angle of incidence.</td></tr><tr><td>Indirect Reflection</td><td>Models environmental reflections.</td><td>Specified by a special specular texture created from the sky texture. <br>Controlled via <code>envmap_intensity</code> in the environment. <br>Affected by the angle of incidence and surface roughness.</td></tr><tr><td>Direct Diffuse</td><td>Models lighting by a light source on matte surfaces.</td><td>Set in the environment as <code>diffuse*diffuse_intensity</code> <br>Affected by the angle of incidence.</td></tr><tr><td>Direct Reflected</td><td>Models lighting by a light source on glossy surfaces.</td><td>Set in the environment as <code>diffuse*diffuse_intensity</code><br>Affected by the angle of incidence and surface roughness.</td></tr></tbody></table>

## Key PBR parameters

### **Diffuse**&#x20;

(Also known as Albedo) Reflects the color of the material without considering lighting. This texture defines the basic color of an object under white light, making it a fundamental texture for most materials in 3D scenes.

<table><thead><tr><th width="160">Texture name</th><th width="147">Components</th><th>Map decryption</th></tr></thead><tbody><tr><td><code>&#x3C;name></code></td><td>3 channels in sRGB gamma space</td><td>The map contains the color information of each surface pixel under white light</td></tr></tbody></table>

{% hint style="info" %}
Diffuse maps do not contain information about the glossiness or reflectivity of the material; these aspects are controlled by other texture maps.&#x20;
{% endhint %}

{% hint style="info" %}
Diffuse values can't be near zero since even materials like soot and coal reflect some light.
{% endhint %}

### **Ambient Occlusion**

Essential for ensuring that indirect lighting does not illuminate gaps in objects such as tree trunks, dark spaces between pipes, and similar areas.\
This texture setup helps to realistically portray how light interacts with complex surfaces by emphasizing areas that should remain dark due to blocked light sources.

<table><thead><tr><th width="153">Texture name</th><th width="143">Components</th><th>Map decryption</th></tr></thead><tbody><tr><td><code>&#x3C;name>_ao</code></td><td>1 channel <br>linear space ranging from [0..1]</td><td><strong>White areas</strong> in the texture represent open parts of the model. <br><strong>Black areas</strong> are fully self-shadowed regions where diffuse light cannot reach. <br><strong>Dark areas</strong> define parts of the model or material that are shadowed from external lighting due to obstructions by other parts of the model or material.</td></tr></tbody></table>

### **Metallic**

Metallic texture is crucial for simulating metallic materials in models, as metallic components reflect light differently compared to dielectrics.

<table><thead><tr><th width="152">Texture name</th><th width="154">Components</th><th>Map decryption</th></tr></thead><tbody><tr><td><code>&#x3C;name>_mt</code></td><td>1 channel<br>linear space ranging from [0..1]</td><td><strong>Black</strong> represents non-metallic parts of the model (dielectrics). <br><strong>White</strong> indicates metallic areas.<br><strong>Intermediate</strong> values are used for regions where metal partially appears.</td></tr></tbody></table>

{% hint style="info" %}
The diffuse color defines the inherent color of the metal where `metallic` is non-zero.
{% endhint %}

{% hint style="info" %}
The `metallic` should be set to 0 for non-metallic materials such as soil, water, stones, tree bark, leaves, wood, and concrete.&#x20;
{% endhint %}

### **Roughness**

Roughness **t**exture determines the light reflection pattern on a surface based on the physical properties of the material, thus affecting the perception of the material's realism.

<table><thead><tr><th width="155">Texture name</th><th width="153">Components</th><th>Map decryption</th></tr></thead><tbody><tr><td><code>&#x3C;name>_rg</code></td><td>1 channel<br>Linear space ranging from [0..1]</td><td><p><strong>Black</strong> represents smooth surfaces such as glass or calm water. </p><p><strong>White</strong> indicates rough surfaces like dry dirt or dust.<br><strong>Intermediate</strong> values determine the degree of roughness.</p></td></tr></tbody></table>

{% hint style="info" %}
Roughness **v**alues close to 0 should be avoided as they produce very small, high-contrast highlights, leading to aliasing in the image.
{% endhint %}

### **Normal**

**The Normal map** texture simulates detailed surface relief by reflecting light, applicable in both PBR and Phong lighting models.

<table><thead><tr><th width="152">Texture name</th><th width="178">Components</th><th>Map decryption</th></tr></thead><tbody><tr><td><code>&#x3C;name>_nm</code></td><td>3 channels in sRGB gamma space</td><td>Each pixel contains normal coordinates encoded in RGB channels as XYZ coordinates.</td></tr></tbody></table>

{% hint style="info" %}
The difference between normal maps for OpenGL and Direct3D (DirectX) lies in the orientation of the green channel (Y-axis). \
In OpenGL, the green channel is positive (Y+), indicating that normals are lit from above. In contrast, Direct3D (DirectX) uses a negative green channel (Y-), which suggests that normals are lit from below. \
This difference affects how light and shadow are perceived on textured surfaces within 3D environments.
{% endhint %}

### **Lightmap**

**Lightmap** contains pre-calculated diffuse lighting information for use in scenes, useful when local ambient occlusion for the material and a global map for the entire object are present.

<table><thead><tr><th width="155">Texture name</th><th width="142">Components</th><th>Map Decryption</th></tr></thead><tbody><tr><td><code>&#x3C;name>_nlm</code></td><td>1 channel in linear space ranging from [0..1]</td><td><strong>Black</strong> <strong>areas</strong> denotes fully shaded areas of the model. <br><strong>White</strong> <strong>areas</strong> indicates illuminated areas.<br><strong>Intermediate values</strong> represent varying degrees of lighting.</td></tr></tbody></table>

**Usage examples**:

* A fence model utilizes a tiled material texture with an ambient occlusion map and a lightmap for the assembled fence.
* A tank's tracks model includes an ambient occlusion texture for a tiled section of the track and a lightmap accounting for both the tank and the position of the rollers.

### **Translucency**

**Translucency map** texture dictates the translucency and thickness of the material, determining how much light passes through.

<table><thead><tr><th width="149">Texture name</th><th width="146">Components</th><th>Map decryption</th></tr></thead><tbody><tr><td><code>&#x3C;name>_tl</code></td><td>1 channel<br>Linear space [0..1]</td><td><strong>Black areas</strong> represent opaque sections of the model.<br><strong>White areas</strong> indicate full transparency.<br><strong>Intermediate values</strong> denote varying degrees of translucency.</td></tr></tbody></table>

**Usage examples:** \
The channel dictates only light passage; color is determined by the diffuse texture. \
Used in textures like grass and leaves to prevent them from appearing dark on the side opposite the light source.

### **Height**

Special texture used to simulate three-dimensional details on flat surfaces using parallax technique, enhancing detailed surfaces without significant performance costs.

<table><thead><tr><th width="149">Texture name</th><th width="146">Components</th><th>Map decryption</th></tr></thead><tbody><tr><td><code>&#x3C;name>_hm</code></td><td>1 channel<br>Linear space [0..1]</td><td><strong>White areas</strong> represent "high" points of the surface. <br><strong>Black areas</strong> are "low" points. <strong>Gray</strong> scale indicates various height levels.</td></tr></tbody></table>

{% hint style="warning" %}
Not considered in the current PBR implementation.
{% endhint %}

### **Emissive**

Texture simulates glowing effects and other light sources that should appear self-illuminating.

<table><thead><tr><th width="152">Texture name</th><th width="145">Components</th><th>Map decryption</th></tr></thead><tbody><tr><td><code>&#x3C;name>_em</code></td><td>3 channels<br>Linear space</td><td>The color on the map directly influences the color of the emitted light. <br>The intensity of the glow is determined by the color brightness on the map. <br>Brighter colors lead to more intense glow.</td></tr></tbody></table>

**Usage example:**\
Ideal for visual representation of light sources within textured objects, often used to add visual depth and enhance scene perception.

### **Reflectance**

Sets the reflectivity for dielectrics, used as a material parameter.\
The reflectance is fixed at 4% as this is the typical value for most materials.

## Texture names in the game resources

### **Textures from GEM2**

<table><thead><tr><th width="190">File name</th><th>Corresponding texture map</th></tr></thead><tbody><tr><td><code>&#x3C;name></code></td><td>Diffuse</td></tr><tr><td><code>&#x3C;name>_nm</code></td><td>Normal Map</td></tr><tr><td><code>&#x3C;name>_sp</code></td><td>Specular</td></tr><tr><td><code>&#x3C;name>_lm</code></td><td>Light Map</td></tr><tr><td><code>&#x3C;name>_hm</code></td><td>Height Map</td></tr><tr><td><code>&#x3C;name>_prlx</code></td><td>Alternative Version of Height Map</td></tr></tbody></table>

### **Added in PBR**

<table><thead><tr><th width="193">File name</th><th>Corresponding texture map</th></tr></thead><tbody><tr><td><code>&#x3C;name>_ao</code></td><td>Ambient Occlusion</td></tr><tr><td><code>&#x3C;name>_mt</code></td><td>Metallic</td></tr><tr><td><code>&#x3C;name>_rg</code></td><td>Roughness</td></tr><tr><td><code>&#x3C;name>_tl</code></td><td>Translucency</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bestway.com.ua/textures-and-materials/physically-based-rendering/pbr-parameters.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
