Skip to content

avilapa/vxt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Samples

version 0.2.1

What is vxt?

vxt is a CPU based multithreaded path tracing renderer written in C++, based on the book Ray Tracing the Next Week by Peter Shirley. The purpose of this project is purely academic as this is my first contact with path tracing techniques! So far so fun :^)

Features

  • Multithreaded Tiled Rendering in CPU.
  • Creation of Image Previews in the process.
  • Objects: Sphere, Box, Axis Aligned Plane, Volume, AABB (all capable of being Translated and Rotated).
  • Bounding Volume Hierarchy Acceleration Structure.
  • Materials: Lambertian, Metal, Glass, Isotropic (Fog/Smoke), Diffuse Light.
  • Textures (used in all materials): Image Based, Noise, Custom.
  • Realistic Camera: Depth of Field, Motion Blur.

Building

[A vs2017 Solution is provided by default]

This project uses GENie.lua to create the project solution. Open a CMD in the root directory and execute the following commands to re-create a solution:

cd project
..\tools\genie [parameters] <vs2017|vs2015>

The solution will be located in project/vs/vxt-Raytracer.sln.

API

#include "main.h"
#include "../../include/renderer/renderer.h"

VXR_DEFINE_APP_MAIN(vxt::Main)

namespace vxt
{

  void Main::init()
  {
    constexpr uint32 width = 400;
    constexpr uint32 height = 400;
    constexpr uint32 samples_per_pixel = 500;
    constexpr uint32 num_threads = 8;

    // Note: Use Background for lit scenes, and GradientBackground for unlit scenes!
    Renderer renderer(width, height, samples_per_pixel);
    renderer.render(new CornellBoxScene(), 
		    new Background(), 
		    CornellBoxScene::camera(width, height), 
		    "output.bmp", num_threads);

    exit_ = true;
    Application::init();
  }

} /* end of vxt namespace */

Dependencies

Contact

Mail: victorap97@gmail.com

Twitter: https://twitter.com/97torvic

Web/Blog/Portfolio: https://avilapa.github.io/portfolio

Gallery

Final Cornell Lights Random Earth Reflections Noise