<p>Just treat it as a special case of a point light + shadow ray. Whenever a ray hits the screen (or any surface onto which you'd like to project the slide), fire another "projector" ray back towards the projector. If it is not obscured, then use the X &amp; Y angles (relative to the coordinate system of the projector) to look up a texture map of the slide.</p>

CC BY-SA 3.0
2018-04-19T09:32:00.323Z
2018-04-19T09:51:15.437Z
2018-04-19T09:51:15.437Z
Simon F
<p>Graphics is all about cheating when possible.</p>

<p>The projector can be a spotlight where the color of the light depends on the direction of the light vector.</p>

<p>It's the same math required for shadow mapping with it.</p>

CC BY-SA 3.0
2018-04-20T02:48:25.963Z
"color depends on the direction" — by that do you mean that I can represent the projector white light going through the slide and taking on the color of that pixel?
Alexis Wilke
CC BY-SA 3.0
2018-04-19T09:32:50.317Z
2018-04-19T09:32:50.317Z
ratchet freak
<p>This is kind-of the same as ratchet freak's answer, but fleshed out a little more.</p>

<p>The usual way to handle this is with a special projector light type. It's like a spotlight, but (usually) with a square instead of circular fall-off. That is, when you cast a shadow ray to the light, you don't just measure a single angle (or radius) from the light's axis, you measure $(x, y)$ co-ordinates in the light's space. You divide these co-ordinates by the size of the projection (a parameter of the light just like the cone spotlight's angle parameter), and use the result for a texture look-up in the image you want to project.</p>

<blockquote>
  <p>If so, wouldn't any light ray bounce on that screen creating a mess?</p>
</blockquote>

<p>If you're using a GI system, the high-frequency lighting detail that you get from a projector light will create a more challenging GI environment. You can control the badness by making the albedo of the surface you're projecting onto as small as you can get away with. If you don't need accurate GI results, you can use a proxy in the GI system instead of the real projector map. The proxy could have an aggressively blurred image, or even a normal spot-light whose colour is the average of the whole image. The blur technique is very applicable to a path tracer, while a single colour would be simplest for a radiosity or virtual lights implementation.</p>

CC BY-SA 3.0
2018-04-19T14:58:20.250Z
2018-04-19T14:58:20.250Z
Dan Hulme
<p>I want to create a scene where a room includes a projector and a white screen.</p>

<p>How is a Ray Tracing environment functioning in such a setup? Is the light from the projector going through a slide and then the color reflecting on the white screen? If so, wouldn't any light ray bounce on that screen creating a mess?</p>

CC BY-SA 3.0
2018-04-19T10:49:35.760Z
Is this a ray-tracer you control, or are you trying to make a scene that will work with a particular (off the shelf) renderer?
Dan Hulme
CC BY-SA 3.0
2018-04-19T14:42:06.067Z
@DanHulme I'll be in control.
Alexis Wilke
<raytracing>
How is a projector handled in a Ray Tracing environment?
Alexis Wilke
# How is a projector handled in a Ray Tracing environment?

(Asked by: username_0 on 2018-04-19)

I want to create a scene where a room includes a projector and a white screen.

How is a Ray Tracing environment functioning in such a setup? Is the light from the projector going through a slide and then the color reflecting on the white screen? If so, wouldn't any light ray bounce on that screen creating a mess?

**Tags:** raytracing

> **Comments:**
> **username_1**: Is this a ray-tracer you control, or are you trying to make a scene that will work with a particular (off the shelf) renderer?  
> **username_0**: @username_1 I'll be in control.  

---

## 3 answers

### Answer by username_2 on 2018-04-19. Score: 4

Just treat it as a special case of a point light + shadow ray. Whenever a ray hits the screen (or any surface onto which you'd like to project the slide), fire another "projector" ray back towards the projector. If it is not obscured, then use the X & Y angles (relative to the coordinate system of the projector) to look up a texture map of the slide.


---

### Answer by username_3 on 2018-04-19. Score: 3

Graphics is all about cheating when possible.

The projector can be a spotlight where the color of the light depends on the direction of the light vector.

It's the same math required for shadow mapping with it.

> **Comments:**
> **username_0**: "color depends on the direction" — by that do you mean that I can represent the projector white light going through the slide and taking on the color of that pixel?  

---

### Answer by username_1 on 2018-04-19. Score: 3

This is kind-of the same as username_3's answer, but fleshed out a little more.

The usual way to handle this is with a special projector light type. It's like a spotlight, but (usually) with a square instead of circular fall-off. That is, when you cast a shadow ray to the light, you don't just measure a single angle (or radius) from the light's axis, you measure $(x, y)$ co-ordinates in the light's space. You divide these co-ordinates by the size of the projection (a parameter of the light just like the cone spotlight's angle parameter), and use the result for a texture look-up in the image you want to project.

> If so, wouldn't any light ray bounce on that screen creating a mess?

If you're using a GI system, the high-frequency lighting detail that you get from a projector light will create a more challenging GI environment. You can control the badness by making the albedo of the surface you're projecting onto as small as you can get away with. If you don't need accurate GI results, you can use a proxy in the GI system instead of the real projector map. The proxy could have an aggressively blurred image, or even a normal spot-light whose colour is the average of the whole image. The blur technique is very applicable to a path tracer, while a single colour would be simplest for a radiosity or virtual lights implementation.


---

