94 lines
1.9 KiB
YAML
94 lines
1.9 KiB
YAML
# ======================================================
|
|
# metal.yml
|
|
#
|
|
# This file demonstrates how to make a simplistic metal
|
|
# texture using the Phong illumination model.
|
|
#
|
|
# by Jamis Buck <jamis@jamisbuck.org>
|
|
# ======================================================
|
|
|
|
# ======================================================
|
|
# the camera
|
|
# ======================================================
|
|
|
|
- add: camera
|
|
width: 400
|
|
height: 300
|
|
field-of-view: 1.047
|
|
from: [1, 2, -5]
|
|
to: [0, 1, 0]
|
|
up: [0, 1, 0]
|
|
|
|
# ======================================================
|
|
# the light
|
|
# ======================================================
|
|
|
|
- add: light
|
|
at: [-9, 9, -9]
|
|
intensity: [1, 1, 1]
|
|
|
|
# ======================================================
|
|
# the scene
|
|
# ======================================================
|
|
|
|
# the floor
|
|
- add: plane
|
|
material:
|
|
pattern:
|
|
type: checkers
|
|
colors:
|
|
- [ 0.7, 0.7, 0.7 ]
|
|
- [ 0.3, 0.3, 0.3 ]
|
|
transform:
|
|
- [ scale, 0.6, 0.6, 0.6 ]
|
|
ambient: 0.02
|
|
diffuse: 0.7
|
|
specular: 0
|
|
reflective: 0.05
|
|
|
|
# the room
|
|
- add: cube
|
|
material:
|
|
color: [ 0.7, 0.7, 0.7 ]
|
|
diffuse: 0.8
|
|
ambient: 0.1
|
|
specular: 0
|
|
transform:
|
|
- [ translate, 0, 0.99, 0 ]
|
|
- [ scale, 10, 10, 10 ]
|
|
|
|
- add: sphere
|
|
transform:
|
|
- [ translate, 0, 1, 0 ]
|
|
material:
|
|
color: [ 0.9, 0.9, 1 ]
|
|
ambient: 0.1
|
|
diffuse: 0.6
|
|
specular: 0.4
|
|
shininess: 5
|
|
reflective: 0.1
|
|
|
|
- add: sphere
|
|
transform:
|
|
- [ scale, 0.6, 0.6, 0.6 ]
|
|
- [ translate, 1.5, 0.6, -0.3 ]
|
|
material:
|
|
color: [ 0.9, 1, 0.9 ]
|
|
ambient: 0.1
|
|
diffuse: 0.6
|
|
specular: 0.4
|
|
shininess: 5
|
|
reflective: 0.1
|
|
|
|
- add: sphere
|
|
transform:
|
|
- [ scale, 0.5, 0.5, 0.5 ]
|
|
- [ translate, -1.1, 0.5, -0.9 ]
|
|
material:
|
|
color: [ 1, 0.9, 0.9 ]
|
|
ambient: 0.1
|
|
diffuse: 0.6
|
|
specular: 0.4
|
|
shininess: 5
|
|
reflective: 0.1
|