Skip to content

ValentinRapp/Raytracer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Raytracer

CPU powered raytracer written in C++

image

Requirements

The pre-compiled binaries won't work on anything else

Usage

./raytracer [file.scene]

The program will create a output.ppm file. To view the produced image, you can do so using the included viewer

./PPM_viewer [file.ppm]

Presentation

This is the first ever image I've ever gotten from my raytracer

image

Ladies and Gentlemen, behold the sphere!

This was supposed to be a raycasted sphere, well... Something definitely didn't go as planed.

The first ever sphere, for real this time

image

As you can see by the shadow below the sphere, this is already raytraced and illuminated by the sky.

Reflective surfaces

image

Here I had to implement a proper material class that handles rays differently depending on the choosen material.

Planes

image

Spheres are cool, but what's cooler is being able to render any type of surface, so here's planes. I wish I had the time to implement triangles, This would've allowed me to support obj files and my raytracer would've been able to render actual 3D meshes.

Cornell Box

image

This scene introduces 2 new main things. First of all, an actual light material that illuminates its surroundings, it was limited to light from the sky before that. And also boxes, which is a simple mix of 6 planes. You can see some very nice penumbra shadows in the scene, as well as some subtle indirect lighting hitting the roof.

Bonus render

image

This image doesn't really introduces anything new, but I just think it looks cool and it deserves to be showcased :)

About

CPU driven C++ raytracer

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors