<p>What you describe is essentially a deep raster. Most modern renderers implement this in fact it is implemented in several ways. There are even sopecific technical positions that rely on this technology in form of lighting, color grading and compositioning artists</p>

<p>The first technique is multipass rendering which is basically just this dumping of render data out of the renderer for fast defered rendering.  All rendering engines on the planet can do this, though all do not implement dumping it out of one render, most do however). What you then do is you integrate these dumped buffers in a compositioning app (Nuke, Fusion, maybe even after effects, you can even do this in photoshop) where you can do final tweaks and changes. This is a very old idea and has been used for more than 30 years. It has certain drawbacks bit overall this means you night be able to pull off even calculation changes that would be too costly to do with a re-render. So color of objects</p>

<p>Many systems also support interactive sessions that cache the computations, in what is essentially a deep raster. This way its possible to recalculate not only color but even the position, decay of individual lights at interactive speeds. The most modern ones of these are frankly quite sophisticated and can also issue the renderer to rerender in background. Animation studios have lots of people working on these to make them better.</p>

<p>You can even use this trick to change camera position for the second stereo camera without recomputing your scene.</p>

CC BY-SA 3.0
2016-08-17T16:52:14.343Z
Thanks! Do you know where I can read more about this? Maybe the documentation page of a freely available renderer?
Daan Michiels
CC BY-SA 3.0
2016-08-17T17:11:28.703Z
@DaanMichiels Pixar used to have a video showing their relight and continious render capabilities go search for renderman
joojaa
CC BY-SA 3.0
2016-08-17T09:54:42.610Z
2016-08-17T09:54:42.610Z
joojaa
<p><strong>Intro</strong></p>
<p>Maxwell Render has a feature called <em>multilight</em>, where one can ray-trace a scene with multiple light sources, and <strong>change the brightness</strong> of the individual light sources <em>afterwards</em>.
Luxrender has a similar feature called <em>light groups</em>.</p>
<p>I image that behind the scenes, these renderers keep track of the contributions of the different light sources separately, and then composing a final image (given brightnesses of light sources) just amounts to mixing these per-light contributions with appropriate coefficients. Effectively, instead of keeping track of the color of a ray as a tuple (R,G,B), one keeps track of more numbers (R1, G1, B1, R2, G2, B2, ..., Rk, Gk, Bk) if there are k light sources (let's assume no spectral rendering, just for ease of notation -- it's conceptually identical).</p>
<p>From a mathematical point of view, the final image is a <strong>linear combination</strong> of the images resulting from the individual light sources.</p>
<hr />
<p><strong>Question</strong></p>
<p>Now it seems interesting to have a similar feature that allows <strong>changing the colors of objects</strong> in the scene <em>after rendering</em>.
This can be done with an entirely similar technique: suppose that we have two objects whose color we want to be able to change after rendering. The final image is a <strong>polynomial</strong> in the color of these objects, with two variables (one for each object) and of degree n, where n is the maximum number of bounces for a ray.</p>
<p>Specifically, instead of keeping track of tuples (R,G,B), the integrator would keep track of
expressions of the form (R00,G00,B00) + (R10,G10,B10)x + (R01,G01,B01)y + (R11,G11,B11)xy + (R21,G21,B21)x²y + ..., for a total of k^n terms, where k is the number of colors you want to be able to change, and n the maximum number of bounces.
For modest k and n, this certainly seems tractable. Color calculations become more expensive, as does storing the resulting &quot;polynomial-image&quot;, but all the geometric calculations are identical.</p>
<blockquote>
<p>Is this feature implemented in any widely available renderers?</p>
<ul>
<li><p>If so, which ones?</p>
</li>
<li><p>If not, why not? Is this not something that's useful in practice? Is it not computationally feasible?</p>
</li>
</ul>
</blockquote>
<hr />
<p><strong>Remark</strong></p>
<p>I hope I've made myself clear in my explanation. I don't know much about computer graphics (mathematician by training), so my notation may be unusual. More general that just changing the colors of objects, one could change more properties of materials after rendering. For example, the transparency of objects could be changed afterwards (though assuming importance sampling is used by the integrator, this comes at the cost of noise, I guess).</p>

CC BY-SA 3.0
2016-08-17T05:43:20.467Z
I don't know if any renderers implement something like this, but one thing that springs to mind is this would only be useful when objects have a single solid color, or just a few discrete colors. It wouldn't scale when textures are used, for instance (although I suppose you could apply a global RGB tint to the texture with this method).
Nathan Reed
CC BY-SA 3.0
2016-08-17T09:55:34.360Z
@NathanReed no thats one of the first things people made these things do.
joojaa
<raytracing><pathtracing>
Changing colors after raytracing
Daan Michiels
# Changing colors after raytracing

(Asked by: username_0 on 2016-08-17)

**Intro**

Maxwell Render has a feature called *multilight*, where one can ray-trace a scene with multiple light sources, and **change the brightness** of the individual light sources *afterwards*.
Luxrender has a similar feature called *light groups*.

I image that behind the scenes, these renderers keep track of the contributions of the different light sources separately, and then composing a final image (given brightnesses of light sources) just amounts to mixing these per-light contributions with appropriate coefficients. Effectively, instead of keeping track of the color of a ray as a tuple (R,G,B), one keeps track of more numbers (R1, G1, B1, R2, G2, B2, ..., Rk, Gk, Bk) if there are k light sources (let's assume no spectral rendering, just for ease of notation -- it's conceptually identical).

From a mathematical point of view, the final image is a **linear combination** of the images resulting from the individual light sources.

---

**Question**

Now it seems interesting to have a similar feature that allows **changing the colors of objects** in the scene *after rendering*.
This can be done with an entirely similar technique: suppose that we have two objects whose color we want to be able to change after rendering. The final image is a **polynomial** in the color of these objects, with two variables (one for each object) and of degree n, where n is the maximum number of bounces for a ray.

Specifically, instead of keeping track of tuples (R,G,B), the integrator would keep track of
expressions of the form (R00,G00,B00) + (R10,G10,B10)x + (R01,G01,B01)y + (R11,G11,B11)xy + (R21,G21,B21)x²y + ..., for a total of k^n terms, where k is the number of colors you want to be able to change, and n the maximum number of bounces.
For modest k and n, this certainly seems tractable. Color calculations become more expensive, as does storing the resulting "polynomial-image", but all the geometric calculations are identical.

> Is this feature implemented in any widely available renderers?
>
> * If so, which ones?
> * If not, why not? Is this not something that's useful in practice? Is it not computationally feasible?

---

**Remark**

I hope I've made myself clear in my explanation. I don't know much about computer graphics (mathematician by training), so my notation may be unusual. More general that just changing the colors of objects, one could change more properties of materials after rendering. For example, the transparency of objects could be changed afterwards (though assuming importance sampling is used by the integrator, this comes at the cost of noise, I guess).

**Tags:** raytracing, pathtracing

> **Comments:**
> **username_1**: I don't know if any renderers implement something like this, but one thing that springs to mind is this would only be useful when objects have a single solid color, or just a few discrete colors. It wouldn't scale when textures are used, for instance (although I suppose you could apply a global RGB tint to the texture with this method).  
> **username_2**: @username_1 no thats one of the first things people made these things do.  

---

## 1 answers

### Answer by username_2 on 2016-08-17. Score: 2 | Accepted answer

What you describe is essentially a deep raster. Most modern renderers implement this in fact it is implemented in several ways. There are even sopecific technical positions that rely on this technology in form of lighting, color grading and compositioning artists

The first technique is multipass rendering which is basically just this dumping of render data out of the renderer for fast defered rendering. All rendering engines on the planet can do this, though all do not implement dumping it out of one render, most do however). What you then do is you integrate these dumped buffers in a compositioning app (Nuke, Fusion, maybe even after effects, you can even do this in photoshop) where you can do final tweaks and changes. This is a very old idea and has been used for more than 30 years. It has certain drawbacks bit overall this means you night be able to pull off even calculation changes that would be too costly to do with a re-render. So color of objects

Many systems also support interactive sessions that cache the computations, in what is essentially a deep raster. This way its possible to recalculate not only color but even the position, decay of individual lights at interactive speeds. The most modern ones of these are frankly quite sophisticated and can also issue the renderer to rerender in background. Animation studios have lots of people working on these to make them better.

You can even use this trick to change camera position for the second stereo camera without recomputing your scene.

> **Comments:**
> **username_0**: Thanks! Do you know where I can read more about this? Maybe the documentation page of a freely available renderer?  
> **username_2**: @username_0 Pixar used to have a video showing their relight and continious render capabilities go search for renderman  

---

