# Basic knowledge about HDR

{% hint style="info" %}
You can open the Environment Editor by pressing the F6 key
{% endhint %}

## **Key components for HDR lighting**

The following sections must be enabled in the environment preset settings:

* eye\_adaptation - enabled
* tone\_mapping - enabled
* tone\_mapping - aces

The main HDR parameter is `target_exposure` in the `eye_adaptation` section.

<figure><img src="/files/5akO8YQmV2nW2x29BFbG" alt="" width="375"><figcaption><p>Key components for the HDR  lighting </p></figcaption></figure>

## **Conditions for correct HDR operation**

For HDR to function properly, there must be light at varying brightness ranges, with screen brightness differing by at least 5-10 times.

The working range is from 0.001 to 10.

## **Lighting components**

<table><thead><tr><th width="326">Component</th><th>Description</th></tr></thead><tbody><tr><td>light.ambient_intensity</td><td>Intensity of ambient lighting that spreads evenly across the scene.</td></tr><tr><td>light.diffuse_intensity</td><td>Intensity of diffuse lighting that determines the brightness of surfaces facing the light source.</td></tr><tr><td>light.envmap_amount</td><td>Amount of light reflected from the environmental map, used for creating reflections.</td></tr><tr><td>light.environment_intensity</td><td>Intensity of lighting from the environment, including natural and reflected light.</td></tr><tr><td>haze.intensity</td><td>Intensity of haze or fog, adding an atmospheric effect and altering scene visibility.</td></tr><tr><td>HDR sky textures</td><td>Use of high dynamic range textures for the sky to achieve realistic light transitions.</td></tr><tr><td>Quadratic attenuation in light sources</td><td>A light attenuation formula that realistically distributes light as distance increases.</td></tr><tr><td>Speculars for all materials</td><td>Adjustment of specular properties for all materials, adding highlights and reflected light</td></tr></tbody></table>

{% hint style="info" %}
The final color for lighting parameters containing intensity (e.g., light.ambient, light.diffuse, haze.color, and others) is calculated using the formula:

`result_color = color * intensity`

The final brightness depends on the brightness of the color itself and the intensity parameter
{% endhint %}

<figure><img src="/files/K0zngyPwmFEKjJwKWelD" alt="" width="375"><figcaption><p><strong>Examples of lighting parameter settings, including color and its intensity</strong></p></figcaption></figure>

### **Real-life brightness levels**

<table><thead><tr><th>Parameter</th><th width="160">Light Intensity</th><th>Description</th></tr></thead><tbody><tr><td>candle</td><td>10</td><td>Imitation of candle light, creating a cozy atmosphere</td></tr><tr><td>cloud_at_night</td><td>0.00033</td><td>Dim lighting under a cloudy night sky</td></tr><tr><td>cloud_at_night (lit by moon)</td><td>0.0419</td><td>Cloudy night sky illuminated by the moon</td></tr><tr><td>frosted_bulb_60w</td><td>1200</td><td>Light from a 60-watt frosted bulb</td></tr><tr><td>monitor</td><td>3</td><td>Imitation of light from a monitor</td></tr><tr><td>moon_surface</td><td>30</td><td>Light mimicking the luminosity of the moon's surface</td></tr><tr><td>sky_cloudy</td><td>20</td><td>Light on a cloudy day</td></tr><tr><td>sky_day</td><td>60</td><td>Bright sunlight during the day</td></tr><tr><td>sky_night (lit by moon)</td><td>0.00085</td><td>Night light when illuminated by the moon</td></tr><tr><td>sky_night_dark</td><td>4e-006</td><td>Very dim night lighting</td></tr><tr><td>sky_night_noon</td><td>0.00124</td><td>Night lighting without additional light sources</td></tr><tr><td>sky_rise_skyline</td><td>0.0019</td><td>Dawn or dusk</td></tr><tr><td>star</td><td>0.00196</td><td>Light from a distant star</td></tr></tbody></table>

## Tonemapper settings

{% hint style="info" %}
Tonemapper settings should be the same across the entire project
{% endhint %}

If you need a specific frame appearance - use a LUT.

For understanding the operation of adaptation and HDR, it is very useful to enable the display of curves for HDR parameters using the console command `v_hdrHistogramOn 1`

<figure><img src="/files/gJ12QUT0Y1PlfFz69UBV" alt=""><figcaption><p>Fig 1. Tonemapper curve</p></figcaption></figure>

**Decoding Figure 1:**

* Red line - tonemapping curve (automatically calculated by the tonemapping formula and its parameters)&#x20;
* Yellow line - brightness value selected by auto exposure&#x20;
* Green lines - exposure\_min, exposure\_max&#x20;
* Blue lines - horizontal brightness readings&#x20;

## **Objects for testing color**

To test colors in game resources, there are 3 test entity located in the **service** folder of the **Entity Editor** \[1]:

* color\_checker\_gradient - for testing the display of monochrome gradients
* color\_checker\_kodak - for testing brightness levels
* color\_checker - for testing the transmission of standard shades

<figure><img src="/files/SjMil49O8Wm4xzAeyma0" alt=""><figcaption></figcaption></figure>

Learn more about creating and configuring environment presets

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th data-type="content-ref"></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td>Step-by-step guide to developing custom environment presets</td><td><a href="/pages/TkUmVRpRfZsJloY0GYq5">/pages/TkUmVRpRfZsJloY0GYq5</a></td><td><a href="/files/ueYOF7YCEEu954WYabzW">/files/ueYOF7YCEEu954WYabzW</a></td></tr><tr><td>Detailed instructions for fine-tuning environment presets</td><td><a href="/pages/rs7XIxeFSLX1NjiyVseZ">/pages/rs7XIxeFSLX1NjiyVseZ</a></td><td><a href="/files/ueYOF7YCEEu954WYabzW">/files/ueYOF7YCEEu954WYabzW</a></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/editor/environment-editor/basic-knowledge-about-hdr.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.
