By Ilia Shevchenko
This ray tracing application is a simple implementation that progressively evolves through various stages to achieve realistic rendering of 3D scenes. The program demonstrates key concepts in computer graphics, including intersection calculations, material properties, lighting, shadows, and recursive ray tracing.
To compile and run the application, use the following commands:
make clean run
To test the application, execute:
make clean test
The initial stage involves testing the basic functionality of the Image
class with gradient patterns.
The program introduces the first implementation of sphere intersections to handle basic geometric shapes.
Materials for spheres are implemented to simulate surface properties, adding realism to the rendered scenes.
The application incorporates diffuse lighting to simulate how surfaces interact with light, providing a more realistic appearance.
To avoid unrealistic brightness, intensity clamping is introduced, ensuring that light intensities are within a reasonable range.
Specular lighting is implemented using the Phong reflection model, enhancing the visual quality of reflective surfaces.
The program adds shadows, ambient lighting, and correct reflection from the nearest object, improving scene realism.
Recursive ray tracing is implemented to simulate reflections, refractions, and more complex lighting effects.
The Plane
and virtual Object
class implemented, expanding the variety of objects that can be rendered in the scene.(Previous Object
class renamed to Sphere
)
The final evolution introduces anti-aliasing - rendering the scene multiple times to get smoother image.