<p>That's just how the Reinhard operator works. If the scene has very high dynamic range important detail may be lost near the high luminance region as you found since both will map near <code>0.99</code>. Reinhard is a form of global operator. There are other types of algorithms using local operators which tonemap the pixel based on the intensity of the underlying neighborhood like a 3x3 or 5x5 region. </p>

<p>I'd recommend reading <code>HDR Imaging Acquisition, Display and Image Based Lighting</code> by Erik Reinhard. It's a very good book and explains much of the concepts.</p>

CC BY-SA 4.0
2019-06-12T15:32:59.287Z
I will have a look at the reading you recommended. Very interesting topic. Thanks.
JimZer
CC BY-SA 4.0
2019-06-12T14:05:45.290Z
2019-06-12T14:05:45.290Z
gallickgunner
<p>I'm implementing a pbr ray tracer. Let's say that I'm at the end of the process:
for each pixel pi, I accumulated the radiance value in vector pi = (radR, radG, radB). At this point, these values are unbounded, so I use the Reinhard tone mapper to have values between 0 and 1. Then I can scale it in the device range, for instance [0, 255] for usual computer images. </p>

<p>Here is my problem, the Reinhard tone mapping <strong>is not aware of the range of radiance in the whole scene</strong>. I mean to compute the tone mapping I do: pi = pi / (1 + pi). 
So if pi = (100, 100, 100), the tone mapped pi is (100/101, 100/101, 100/101), but if pi = (1000, 1000, 1000), the tone mapped pi is (1000/10001, 1000/1001, 1000/10001). So the <strong>final values will be really close</strong> after tone mapping but <strong>one should be a lot greater than the other</strong>, right?</p>

<p>Am I doing something wrong, or missing something?</p>

<raytracing><rendering><lighting><physically-based>
Tone Mapping in a physically based rendering ray tracer
JimZer
# Tone Mapping in a physically based rendering ray tracer

(Asked by: username_0 on 2019-06-11)

I'm implementing a pbr ray tracer. Let's say that I'm at the end of the process:
for each pixel pi, I accumulated the radiance value in vector pi = (radR, radG, radB). At this point, these values are unbounded, so I use the Reinhard tone mapper to have values between 0 and 1. Then I can scale it in the device range, for instance [0, 255] for usual computer images.

Here is my problem, the Reinhard tone mapping **is not aware of the range of radiance in the whole scene**. I mean to compute the tone mapping I do: pi = pi / (1 + pi).
So if pi = (100, 100, 100), the tone mapped pi is (100/101, 100/101, 100/101), but if pi = (1000, 1000, 1000), the tone mapped pi is (1000/10001, 1000/1001, 1000/10001). So the **final values will be really close** after tone mapping but **one should be a lot greater than the other**, right?

Am I doing something wrong, or missing something?

**Tags:** raytracing, rendering, lighting, physically-based


---

## 1 answers

### Answer by username_1 on 2019-06-12. Score: 4 | Accepted answer

That's just how the Reinhard operator works. If the scene has very high dynamic range important detail may be lost near the high luminance region as you found since both will map near `0.99`. Reinhard is a form of global operator. There are other types of algorithms using local operators which tonemap the pixel based on the intensity of the underlying neighborhood like a 3x3 or 5x5 region.

I'd recommend reading `HDR Imaging Acquisition, Display and Image Based Lighting` by Erik Reinhard. It's a very good book and explains much of the concepts.

> **Comments:**
> **username_0**: I will have a look at the reading you recommended. Very interesting topic. Thanks.  

---

