raytracer-c/scenes/shadow-glamour-shot.yml
2020-12-20 19:09:52 -05:00

70 lines
1.4 KiB
YAML

# =========================================================
# shadow-glamour-shot.yml
#
# Produces the banner image from the "Rendering soft
# shadows" bonus chapter for "The Ray Tracer Challenge",
# by Jamis Buck.
#
# <jamis@jamisbuck.org>
# =========================================================
- add: camera
width: 1920
height: 1080
field-of-view: 0.7854
from: [-3, 1, 2.5]
to: [0, 0.5, 0]
up: [0, 1, 0]
- add: light
corner: [-1, 2, 4]
uvec: [2, 0, 0]
vvec: [0, 2, 0]
usteps: 10
vsteps: 10
jitter: true
intensity: [1.5, 1.5, 1.5]
# Put the light in the middle of a "shining" cube so that it can show
# up in reflections as a physical thing. Naturally, the cube must
# opt out of shadow tests...
- add: cube
transform:
- [ scale, 1, 1, 0.01 ]
- [ translate, 0, 3, 4 ]
material:
shadow: false
color: [1.5, 1.5, 1.5]
ambient: 1
diffuse: 0
specular: 0
- add: plane
material:
color: [1, 1, 1]
ambient: 0.025
diffuse: 0.67
specular: 0
- add: sphere
transform:
- [ scale, 0.5, 0.5, 0.5 ]
- [ translate, 0.5, 0.5, 0 ]
material:
color: [1, 0, 0]
ambient: 0.1
specular: 0
diffuse: 0.6
reflective: 0.3
- add: sphere
transform:
- [ scale, 0.33, 0.33, 0.33 ]
- [ translate, -0.25, 0.33, 0 ]
material:
color: [0.5, 0.5, 1]
ambient: 0.1
specular: 0
diffuse: 0.6
reflective: 0.3