vendredi 23 septembre 2016

3d rendering engine - Raytracing


Always in the way of my school, we had to create a big team project because of allowed us to search a internship in a company.

In a team of 4 students, we have choose to develop a 3d rendering engine, using the raytracing technic. It's use for generate realistic image by reproduce the behavior of light. We had to create the engine from scratch, so, we have choose to develop it in C with the SDL2 library.
This is the list of features that we implemented:

- The program run in multithread.
- We have develop our shader system, can be blend like the Photoshop layers.
- We support Diffuse, Specular shaders..
- Reflection
- Refraction, according to the Snell-Descartes law.
- Primitif rendering: Sphere, Cube, Cone, Cylinder..
- 3d Model rendering: Wavefront .obj parsing, composed with triangles.
- Textures (.jpg, .png..)
- Procedural Textures (Damier, Perlin noise..)
- Normal map rendering.
- Colored shadows: if the light passes though a transparent object, then the colors are projected, like a stained glass window.
- Manage scenes contents with tree system. (Object can be child of another object, relative position etc..)
- Hitbox system for optimisation, ray can ignore some objects that are not in the trajectory.
- Bitmap (BMP) export.
- Live scenes edit with a GUI.

You can found the source code here: http://github.com/Chr0nos/rt