Visualize ray-tracing by representing sampling ray with line.
-
Trace light ray (shadow ray) to check whether this fragment can reach the light source.
-
Set object's material :
-
Phong's color : compute local color (+light source color)
-
Flectiont&fraction coeffiecent : determines the weight of color from reflect&refract ray
-
Index : Snell's law
-
-
Continuously draw ray.
- Performance : should not be memoryless (trace ray every frame).
- Realtime user interaction : ray origin, object material&position.
- Text label : display each ray properties.
- Problem with no-thickness surface
- Point light + shadow map + cube with reflect&refract property, max ray depth = 2.
- Black light ray means can not reach the light source.
- White sampling ray mens intersect with on one.
- Point light + 3 mirrors + opaque object (the yellow one), max ray depth = 6.
- Draw object in wireframe mode for displaying purpose.
- All refract rays are white.
ray_scene1.mp4
- Point light + sphere with reflect&refract property, max ray depth = 2.
- Color of light ray represents the color from Phong's model from that light source.
- Also, color of sampling ray represents color from it's children.