Name: Andy Jun Cheng Low
Student Number: 1136438
Username: ANDYJUNCHENG
Email: [email protected]
- Implement vector mathematics
- Fire a ray for each pixel
- Calculate ray-entity intersections
- Output primitives as solid colours
- Diffuse materials
- Shadow rays
- Reflective materials
- Refractive materials
- The Fresnel effect
- Anti-aliasing
-
Option A - Emissive materials
-
Option B - Ambient lighting/occlusion
-
Option C - OBJ models
-
Option D - Glossy materials
-
Option E - Custom camera orientation
-
Option F - Beer's law
-
Option G - Depth of field
-
(Glossy Materials) Glossy materials have a reflective component and a diffuse component, we choose a suitable ratio between the two to obtain the desired glossy effect
-
(Beer's Law) Calculate the light absorbance of a material, depending on the color obsorbence of the material
-
(Depth of field) Shoot a ray through the pixel with a fixed focal length to find the focal point, fire multiple random rays within a circle about the camera determined by the aperture size throught the focal point and obtain an average color
Rendering time 10 minutes and 13 seconds.
With the following command:
dotnet run -- -f tests/final_scene.txt -o output.png --aperture-radius 0.01 --focal-length 0.8
dotnet run -- -f tests/sample_scene_1.txt -o images/sample_scene_1.png -x 4
dotnet run -- -f tests/sample_scene_2.txt -o images/sample_scene_2.png -x 4
- Basic ray tracing - https://www.scratchapixel.com/lessons/3d-basic-rendering/introduction-to-ray-tracing
- Depth of field - https://stackoverflow.com/questions/13532947/references-for-depth-of-field-implementation-in-a-raytracer
- Beer's law - https://www.flipcode.com/archives/Raytracing_Topics_Techniques-Part_3_Refractions_and_Beers_Law.shtml