Skip to content

Ray tracing engine with real-time preview GUI written in C++ using OpenGL and ImGUI.

License

Notifications You must be signed in to change notification settings

bassel97/racer-cpp-ray-tracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

drawing Racer Engine

drawing

A ray tracing engine developed in c++, with real time preview and edit using openGL and ImGUI.

Create for practice.

Development documentation:

5. Emissive objects instead of point lights

In action preview: cornell box

4. 3D Model loading and rendering

In action preview: model loading

3. GUI window for adjusting data

In action preview: GUI preview

2. Real-time preview then rendering

Real-time preview Rendered Image
Real-time preview Rendered Image

In action preview: Real-time preview

1. Simple spheres ray tracing:

Rendering an image given a file with spheres positions (Position, Scale, Color, Reflection properties), lights and camera properties.

Input file Image
NEAR 1
LEFT -1
RIGHT 1
BOTTOM -1
TOP 1
RES 600 600
SPHERE s1 0 0 -10 2 4 2 0.5 0 0 1 1 0.9 0 50
SPHERE s2 4 4 -10 1 2 1 0 0.5 0 1 1 0.9 0 50
SPHERE s3 -4 2 -10 1 2 1 0 0 0.5 1 1 0.9 0 50
SPHERE s4 0 0 -1 0.25 0.25 0.5 0 0 0.5 1 1 1 0 50
LIGHT l1 0 0 -1 0.3 0.3 0.3
LIGHT l2 10 10 -10 0.9 0.9 0
LIGHT l3 -10 5 -5 0 0 0.9
BACK 1 1 1
AMBIENT 0.2 0.2 0.2
Spheres ray tracing

TODO list and improvements:

  • Correct reflection.
  • Seperate files and create application structue.
  • More seperation files and create application structue.
  • Add more complex shapes.
  • Implement OBJ importing with materials.
  • Replace the input file to be in a JSON formula.
  • Use OpenGL to live show effects.
  • Use ImGUI to make changes in scene.
  • Use ImGizmos to actively manipulate the scene.
  • Introduce threading to the project.
  • Try to use graphics card in accelerating.
  • Commenting.
  • Styling using google sheets.

About

Ray tracing engine with real-time preview GUI written in C++ using OpenGL and ImGUI.

Topics

Resources

License

Stars

Watchers

Forks

Packages