Skip to content

keenemeck/raytracing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logo

Ray Tracing

Ray tracer written in C++.

Installation

  1. Clone the repo
    git clone https://github.com/keenemeck/raytracing.git
  2. Build the project
    make
  3. Run the program
    ./main > images/image.ppm
    You can also redirect the image output elsewhere

Usage

Modifying the scene is done by either adding primitives in the main.cpp, or by loading .objs.

By default, a cornell box with a bunny will be rendered, but any obj file may replace it. Note that scaling and offsetting may be required to make the model fit the scene. Running the output once will suggest outputs that should center the obj in the box.

A primitive's color or material properties (reflectivity, or emissivity) can be modified in the primitive's .mat member variable.

For higher fidelity renders, try raising the camera's image dimensions, or increasing the sample count per pixel. Both examples can be found in main.cpp.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages