Score: 125/100
Finished: 11.07.2024
This project is an introduction to the beautiful world of Raytracing.
- Use
make
to compile the project. - For higher resolution use
make hd
.
- Run the program with
./miniRT [scene.rt]
. - Example scenes are in the
scenes
directory.
Every scene needs to have a .rt
extension. A detailed Explanation of the object Configuration can be found here: Object Syntax
# simple example scene
A 0.5 255,255,255
L -50,40,0 0.6 255,255,255
C 0,0,-10 0,0,1 70.0
sp 0,0,0 5 255,255,255
- Camera
- Lights: Point, Ambient
- Solids: Sphere, Plane, Triangle, Cylinder, Cone
- Materials (for all Objects)
- Textures:
- Checkered (for all Objects)
- UV Checkerboard (Spheres)
- Image Textures (Spheres)
- Bump Maps (Spheres)
- Multithreading (number of threads as optional paramter on the camera object)
- Anti-Aliasing (number of samples as optional parameter on the camera object)
- Shadows
- Reflections
- Full Phong Shading
Left: Checkered using global coordinates, Right: Checkered using UV coordinates. Colors can be defined in the scene file.
TC checkered 255,255,255 0,0,0 1
TUC uvcheckered 0,0,0 255,255,255 40
All objects can have a reflection value between 0 and 1. Also there is a maximum recursion depth for reflections that can be set as an optional parameter on the camera object.
Using the mini-rt-mesh-converter to convert .obj
files to .rt
files, you can render complex objects. Make sure your .obj
file is triangulated.
For spheres you can use image textures and bump maps. The bump map is a greyscale image that will be used to displace the normals of the sphere. The image texture is a regular image that will be mapped onto the sphere.
TF earth scenes/assets/earth.png
B bump scenes/assets/earth_bump.png
Anti-Aliasing can be enabled by setting the number of samples on the camera object. The more samples, the smoother the edges. Left: No Anti-Aliasing, Right: Anti-Aliasing with 100 samples.
You can have multiple lights in the scene. The color and intensity of the light can be set in the scene file.