pathtracer/examples/colorful.yaml
Bruno BELANYI 552c0cb966 library: implement refraction
This necessitated to rework how light properties for a material were
given. A material can have either reflectivity or transparency. This
changes the parsing of materials, using a `LightProperty` structure at
its core.

This is does not implement the true Fresnel equations to take into
account the amount of reflection that an incident goes through when
encountering a transparent object.
2020-03-19 18:23:20 +01:00

84 lines
1.6 KiB
YAML

# Optional field
aliasing_limit: 10
# Optional field
reflection_limit: 5
camera:
origin: [0.0, 0.0, 0.0]
forward: [ 1.0, 0.0, 0.0]
up: [0.0, 1.0, 0.0]
fov: 90.0
distance_to_image: 1.0
x: 1920
y: 1080
# Optional field, each key itself being optional
lights:
ambients:
- color: {r: 0.05, g: 0.05, b: 0.05}
directionals:
- direction: [0.5, 0.5, 0.5]
color: {r: 0.0, g: 0.5, b: 0.0}
- direction: [0.5, 0.5, -0.5]
color: {r: 0.0, g: 0.0, b: 0.5}
- direction: [0.7, -0.5, 0.0]
color: {r: 0.5, g: 0.0, b: 0.0}
points:
- position: [0.0, 0.0, 0.0]
color: {r: 0.2, g: 0.2, b: 0.2}
spots:
- position: [0.0, 0.0, 0.0]
direction: [1.0, 0.0, 0.0]
fov: 5.0
color: {r: 1.0, g: 1.0, b: 0.0}
objects:
- shape:
type: sphere
center: [4.5, 0.0, 0.0]
radius: 0.4
material:
type: uniform
diffuse:
r: 0.0
g: 0.0
b: 0.0
specular:
r: 1.0
g: 1.0
b: 1.0
# Optional fields (go together)
#transparency: 0.5
#index: 1.5
texture:
type: uniform
color:
r: 1.0
g: 1.0
b: 1.0
- shape:
type: sphere
# Optional field
# inverted: false
center: [10.0, 0.0, 0.0]
radius: 5.0
material:
type: uniform
diffuse:
r: 1.0
g: 1.0
b: 1.0
specular:
r: 1.0
g: 1.0
b: 1.0
# Optional field
#reflectivity: 0.0
texture:
type: uniform
color:
r: 1.0
g: 1.0
b: 1.0