miniRT project is about creating a simple raytracer to produce a realistic render.
implement such raytracer required us to learn linear algebra and calculus to understand how to perform calculation in 3D space properly and learning to
the usage of matrices to transform the point in different spaces like World Space, Object Space, Tangent Space and the process of implementing cartesian coordinates system and converting a point in it to different coordinate systems and the usage of vectors to apply
transformations and the process to solve implict and parametric equations and the process of differentiation.
Our raytracer supports wide ranges of features:
- Primitives: Support of multiple primitives with full control of their transformations and their properties.
- Light Managment: The managment of multiple point lights from specific position, intensity and color.
- Shadows: The support of hard shadows by checking if an object is covering a light source.
- Scene Management: Support for providing a file with information of the scene to render.
- Phong shading: The simulation of light reflection and the distribution of light with phong shading model based on the normal vector.
- UV Mapping: An accurate support for texture mapping on primitives.
- Bump Mapping: The support for perturbing the normal vectors of a surface to simulate the look of uneven surface.
- Reflection: The support of reflective surface with recursive ray intersections.
- Field of view (FOV): Implementation of fov to control the focal length of the camera.
- Gamma Correction: Ability to control the gamma in the shader
- HDR: Ability to represent colors in high dynamic range then converted to LDR with ACES approximation
- Supersampling: The ability to represent colors in the scene more accuratly by shooting multiple rays for each pixel
First compile the project by running make then run the miniRT executable with an scene provided as argument.
Scenes are defined with .rt extension which contains all the objects to render including their properties, the following is the objects which can be added in the scene and their properties:
| ID |
Intensity |
Color |
| A |
Float |
RGB |
| ID |
Position |
Normal Vector |
FOV |
| C |
Vec3 |
Vec3 |
Int |
| ID |
Position |
Intensity |
Color |
| L |
Vec3 |
Int |
RGB |
| ID |
Position |
Normal Vector |
Color |
| pl |
Vec3 |
Vec3 |
RGB |
| ID |
Position |
Radius |
Color |
| sp |
Vec3 |
Float |
RGB |
| ID |
Position |
Normal Vector |
Diameter |
Height |
Color |
| cy |
Vec3 |
Vec3 |
Float |
Float |
RGB |
| ID |
Position |
Scale |
Normal Vector |
Coefficients |
Color |
| hy |
Vec3 |
Vec3 |
Vec3 |
Vec3 |
RGB |
All primitvies has miscellaneous properties which can be provided after the required properities which are the following:
| ID |
Datatype |
Info |
| color: |
String |
Color map to apply |
| bump: |
String |
Bump map to apply |
| reflect: |
Float |
Applies reflect with provided intensity |
| phong: |
Vec3 |
Control the phong shader properties |