akshat-sj / pathbyter

monte-carlo based pathtracer written in c++ with no external libraries

Repository from Github https://github.comakshat-sj/pathbyterRepository from Github https://github.comakshat-sj/pathbyter

pathbyter

A self-contained pathtracer written in c++ for physically based rendering using Monte Carlo methods for realistic light simulation and image rendering.

Getting Started

Setting up the quality

The samples per pixel of the image will be directly proportional to the quality of the image as well as the time taken for it to render. You can customize the width and height of our viewport as well. We can change all this in the main function of main.cpp

    int w =1024;
    int h =768;
    int samps = 400; //1600 spp (can modify)

Changing the scene

You can edit the scene as well, the default scene is that of a cornell box. The scene is located in the sphere.h header file

    //object(radius,position,emission,color,material type)
    sphere(16.5,vec3(27,16.5,47),vec3(0,0,0),vec3(0.99,0.99,0.99), SPEC),

Executing program

Compile the program using the makefile

make

If the compilation is successful, execute the main program

main

Renders made using pathbyter(rendered at 2400 spp)

Scene with spheres of various types

man

Cornell Box

gun

Built With

  • C++ - the programming language used

Acknowledgments

About

monte-carlo based pathtracer written in c++ with no external libraries


Languages

Language:C++ 63.0%Language:C 34.8%Language:Makefile 2.2%