Simple 3D-object renderer based on Raytracing.
- Clone the repository:
git clone https://github.com/eldeshue/miniRT.git
- Navigate to the project directory:
cd miniRT
- Build the project:
make all
- Start the project:
./miniRT {scene description file}
to run this project on Linux, you need X11 library.
- Clone the repository:
git clone https://github.com/eldeshue/miniRT.git
- Navigate to the project directory:
cd miniRT
- Change branch:
git switch 49-feat-minirt-for-linux
- Build the project:
make all
- Start the project:
./miniRT {scene description file}
To run miniRT, user need to describe a scene to render. miniRT take as a first argument a scene description file with the .rt extension.
all direction vector's(camera's view, plane normal, cylinder, ... ) must be normalized.
- Camera
C {position x},{position y},{position z} {viewing direction vector x},{viewing direction vector y},{viewing direction vector z} {hFOV, degree}
- Ambient Light
A {Intensity, 0.0~1.0} {color, R, 0~255},{color, G, 0~255},{color, B, 0~255}
- Light Source
L {position x},{position y},{position z} {Intensity, 0.0~1.0} {color, R, 0~255},{color, G, 0~255},{color, B, 0~255}
- Plane Object
pl {position x},{position y},{position z} {normal vector x},{normal vector y},{normal vector z} {color, R, 0~255},{color, G, 0~255},{color, B, 0~255}
- Sphere Object
sp {center position x},{center position y},{center position z} {diameter} {color, R, 0~255},{color, G, 0~255},{color, B, 0~255}
- Cylinder Object
cy {center position x},{center position y},{center position z} {direction vector x},{direction vector y},{direction vector z} {diameter} {height} {color, R, 0~255},{color, G, 0~255},{color, B, 0~255}
- Cone Object
co {plane center position x},{plane center position y},{plane center position z} {tip position x},{tip position y},{tip position z} {color, R, 0~255},{color, G, 0~255},{color, B, 0~255}
For further information, please refer to the files in the scene directory.
./miniRT {scene description file}
miniRT was created by eldeshue and HyWChoi.
If you have any questions or comments about miniRT, please contact eldeshue.