Material - sketchbooks99/mypt GitHub Wiki
Lambertian
Lambert surface. An appearance of object with this material is rough surface. The incident light scatters random direction in hemisphere along with surface normal.
beginPrimitive
shape sphere radius 1
material lambertian color 0.8 0.8 0.8
endPrimitive
Applying texture
beginPrimitive
shape sphere radius 1
material lambertian checker color1 0.3 0.3 0.3 color2 0.9 0.9 0.9
endPrimitive
Metal
Metallic surface. The light is reflected to specular direction. The light is reflected in perfect specular direction, fuzz
can express rough metal by randomly selecting direction in cone along with reflective direction.
beginPrimitive
shape sphere radius 1
material metal color 0.9 0.7 0.3 fuzz 0.03
endPrimitive
Dielectric
Transparent surface with arbitrary index of refraction (IOR). The light refract or reflect to a direction which is determined by IOR and incident direction of ray.
beginPrimitive
shape sphere radius 1
material dielectric color 1 1 1 ior 1.5
endPrimitive
Emitter
Emissive surface. The surfaces emit light from their own. When the ray intersect to this surface, ray tracing is terminated. You can set intensity
to change the strength of emittance.
beginPrimitive
shape sphere radius 1
material emitter color 1 1 1 intensity 10
endPrimitive
Normal
This material is mainly used to verify the normal of object. You can set this to emissive material with emit
.
beginPrimitive
shape sphere radius 1
material normal emit # `emit` : optional
endPrimitive