# Common Ray Tracing Scenes for Testing

{% file src="<https://3464970502-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JUKGJZ67JX02QZdPhsy%2Fuploads%2F1U2rLFqJmDB3iC5eXBrz%2Fraytracing_scenes.zip?alt=media&token=c7687465-5aa9-4164-80a3-81588e4db33e>" %}

#### Cornell Box

```
Camera   0 0 40   0 1 0   0 0 9.9  36.5   1
Output   512   512   CornellBox.png
BounceDepth   1
ShadowBias 0.005

## Lights ##
AmbientLight   0.05 0.05 0.05
PointLight   0 9 0   1 1 1

## The Box ##

Material   1 1 1   0.8 0.8 0.8   0 0 0   0 0 0   0

# Floor
Triangle   -10 -10 10   10 -10 -10   -10 -10 -10
Triangle   10 -10 10   10 -10 -10   -10 -10 10

# Ceiling
Triangle   -10 10 10   10 10 -10   -10 10 -10
Triangle   10 10 10   10 10 -10   -10 10 10

# Front wall
Triangle   -10 -10 -10   10 10 -10   -10 10 -10
Triangle   10 -10 -10   10 10 -10   -10 -10 -10

# Red wall
Material   1 0 0   1 0 0   0 0 0   0 0 0   0
Triangle   -10 10 10   -10 -10 -10   -10 10 -10
Triangle   -10 -10 10   -10 -10 -10   -10 10 10

# Blue wall
Material   0 0 1   0 0 1   0 0 0   0 0 0   0
Triangle   10 -10 10   10 10 -10   10 -10 -10
Triangle   10 10 10   10 10 -10   10 -10 10

## Stuff in the box ##

# Diffuse Sphere
Material   1 1 1   0.8 0.8 0.8   0 0 0   0 0 0   0
Sphere   5 -6 1   4

# Mirror Sphere
Material   1 1 1   0 0 0   0 0 0   0.9 0.9 0.9   0
Sphere   -5 -6 -5   4
```

<figure><img src="https://3464970502-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JUKGJZ67JX02QZdPhsy%2Fuploads%2FpgKOaEA8xo7Rlkmbbh8A%2FCornellBox.png?alt=media&#x26;token=f76016d4-227d-48f3-be12-c9e953781221" alt="" width="256"><figcaption></figcaption></figure>

#### Four spheres (recursive test)

```
Camera   0 0 1   0 1 0   0 0 -1   45   1
Output   512   512   RecursiveTest.png
BounceDepth   5
ShadowBias 0.0001

AmbientLight   0.05 0.05 0.05
PointLight   0 0 -1.5   0.75 0.75 0.75

PushMatrix
Material   0 0 1   0 0 1   1 1 1   0.9 0.9 0.9   50
Translate   -1 0 -3
Sphere   0 0 0   0.5
PopMatrix

PushMatrix
Material   1 0 0   1 0 0   1 1 1   0.9 0.9 0.9   50
Translate   1 0 -3
Sphere   0 0 0   0.5
PopMatrix

PushMatrix
Material   0 1 0   0 1 0   1 1 1   0.9 0.9 0.9   50
Translate   0 -1 -3
Sphere   0 0 0   0.5
PopMatrix

PushMatrix
Material   1 1 0   1 1 0   1 1 1   0.9 0.9 0.9   50
Translate   0 1 -3
Sphere   0 0 0   0.5
PopMatrix
```

<figure><img src="https://3464970502-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JUKGJZ67JX02QZdPhsy%2Fuploads%2F2wvSVD4ig3xmX5NVsVVS%2FRecursiveTest.png?alt=media&#x26;token=7cf11fec-dfad-49d1-b0b3-efd5c183323b" alt="" width="256"><figcaption></figcaption></figure>

#### Shadow Test 1

<figure><img src="https://3464970502-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JUKGJZ67JX02QZdPhsy%2Fuploads%2FRm3EWpDqEyxHCjrq3Cq2%2FShadowTest1.png?alt=media&#x26;token=c9559f4d-9283-440d-8df7-e4f42d8a4d4a" alt="" width="256"><figcaption></figcaption></figure>

#### Shadow Test 2

<figure><img src="https://3464970502-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JUKGJZ67JX02QZdPhsy%2Fuploads%2FP4q87mVhoZF26rkFk9B6%2FShadowTest2.png?alt=media&#x26;token=592f5def-eabb-4f40-b1f3-b4ab8ff6712c" alt="" width="256"><figcaption></figcaption></figure>

#### Sphere Shading 1

<figure><img src="https://3464970502-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JUKGJZ67JX02QZdPhsy%2Fuploads%2FuDcoxtPSZ7LX5ChppY7G%2FSphereShadingTest1.png?alt=media&#x26;token=56ffd0a9-1827-48e0-b5e3-59b50997f6b1" alt="" width="256"><figcaption></figcaption></figure>

#### Sphere Shading 2

<figure><img src="https://3464970502-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JUKGJZ67JX02QZdPhsy%2Fuploads%2FqjmWydMQ8RvWsx3nKuRj%2FSphereShadingTest2.png?alt=media&#x26;token=9e537500-daa1-4357-b152-ddb030fbf169" alt="" width="256"><figcaption></figcaption></figure>

#### Triangle Shading Test

<figure><img src="https://3464970502-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3JUKGJZ67JX02QZdPhsy%2Fuploads%2FhVTCqKQFGHcOWQCdk8sq%2FTriangleShadingTest.png?alt=media&#x26;token=863afcea-f404-4ed7-8d7f-cba6f7559324" alt="" width="256"><figcaption></figcaption></figure>
