Skip to content

🌈 Mini ray tracer β€” Discovering 3d graphics using hyper-realistic lighting

License

Notifications You must be signed in to change notification settings

RubenNijhuis/Mini-Ray-Tracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌞 Mini Ray Tracer β€” made with ❀️ and 🧠

Discovering 3d graphics using hyper-realistic lighting generation
β€’ Built by Job van der Zweep and Ruben Nijhuis

CI compile & run test


24 balls in a hallway with multicoloured lights and color transitions


πŸƒβ€β™€οΈ β€” Quick Start

It's very important to clone recursively as this project contains submodules!

$ git clone --recursive https://github.com/RubenNijhuis/Mini-Ray-Tracer.git
$ make run

If you're on Linux(Debian-like), you have to install the prerequisites for MLX42 β†’ first:

sudo apt install build-essential libx11-dev libglfw3-dev libglfw3 xorg-dev

Features

  • Phong shading
  • Sphere, cylinder, plane and disc geometries
  • Camera & object rotations
  • Multi & colored spot light support
  • Multithreaded rendering with squares to see progress

πŸ—£ β€” Command list

$ ./bin/minirt [path-to-'.rt'-file]
Runs the program with an example rt file

$ make norm
Outputs the norminette across the src and include folder of every project

$ make test
Test the functions of MiniRT using Criterion

$ make run
Run the program with a default file test from the assets folder

$ make submodules
Pulls the most recent versions of the submodules 
!! BEWARE !! this could import breaking changes

πŸ— β€” Project structure

Mini-Ray-Tracer -/
  - πŸ–Ό assets -/    # All types of assets, output img
  - πŸ“¦ bin -/       # Mini-Ray-Tracer output
  - πŸ‘€ include -/   # The .h files of the project
  - πŸ“š libs -/      # Our custom and vendor libraries
  - ⛲️ src -/       # Source files
  - πŸ§ͺ test -/      # Testing directory
  - .gitmodules     # Describes what submodules are installed
  - Makefile        # Compiling && linking magic happens here
  ...

πŸŽͺ β€” Module folder structure

In this project we tried to adhere to a more modular structure of our project. Creating components that have one entry point and abstract the inner-workings.

Each module has a folder and file that match name-wise. Every other file can be seen as a part of that bigger module. In some cases some functions might be exposed to the larger project as it follows the DRY principle more.

πŸ“ Folder name
  - File with that same folder name (this is the module entry point)
  - ...supporting files
  - Potential README explaining the setup and usage

πŸ§ͺ β€” Testing

$ make test
Test the functions of MiniRT using Criterion

Criterion Testing Library β†’


πŸ“ β€” Notes

Our tips to write your own raytracer β†’

About

🌈 Mini ray tracer β€” Discovering 3d graphics using hyper-realistic lighting

Topics

Resources

License

Stars

Watchers

Forks