User Guide (PathTracer) - cmu462/Scotty3D GitHub Wiki

Welcome! PathTracer is Scotty3D's realistic, globally illuminated renderer, capable of creating images of complex scenes using path tracing.

PathTracer is run with the following basic syntax, where the second argument is a path to any COLLADA file

./scotty3d ../media/pathtracer/basic/sphere_diffuse.dae

Note that PathTracer exists alongside MeshEdit in Scotty3D! Everything in MeshEdit continues to be available, and we will now use an additional set of commands to interact with PathTracer.

Pressing the R key toggles display to the rendered output of your ray tracer. Rendering is an inherently computationally expensive process that can take anywhere between a second to several hours, depending on the settings and desired quality of the output image. (WARNING: Pressing any other command key while rendering will lead to the rendering process being cancelled!) Also, if you press R in the starter code, you will see a black screen (You have not implemented your ray tracer yet! ). However, a correct implementation of the assignment will generate a picture of the cow that looks like the one below.

Pressing M returns to the mesh edit mode. Pressing V displays the BVH visualizer mode, which will be a helpful visualization tool for examining the bounding volume hierarchy, which is a crucial part of this assignment.

Importantly, both R and V mode depends on correct implementation of triangulation, especially when rendering generic polygon meshes. Without triangulation, generic polygon meshes will not be correctly in both these modes.

The full list of key commands is as follows:

Command Key
Return to mesh edit mode M
Show BVH visualizer mode V
Show ray traced output R
Decrease area light samples (RT mode) -
Increase area light samples (RT mode) +
Decrease samples (camera rays) per pixel [
Increase samples (camera rays) per pixel ]
Descend to left child (BVH viz mode) <
Descend to right child (BVH viz mode) >
Move to parent node (BVH viz mode) ?
Reset camera to default position SPACE
Edit a vertex position (left-click and drag on vertex)
Rotate camera (left-click and drag on background)
Zoom camera (mouse wheel)
Dolly (translate) camera (right-click and drag on background)

Pathtracer makes additionally accepts command line options:

Option Description
-t <INT> Number of threads used for rendering (default=1)
-s <INT> Set the number of camera rays per pixel (default=1) (should be a power of two)
-l <INT> Number of samples to integrate light from area light sources (default=1, higher numbers decrease noise but increase rendering time)
-m <INT> Maximum ray "depth" (the number of bounces on a ray path before the path is terminated)
-h Print command line help
-w <PATH> Run Pathtracer without GUI, save render to PATH
-d <w>x<h> When running with the -w flag, controls the output resolution. For example, the flag -d 800x600 will cause -w to output an 800x600 image. No effect when not using -w.

For example:

./scotty3d -w output.png -d 800x600 -m 4 -t 8 -s 1024 ../media/pathtracer/advanced/CBspheres_lambertian.dae
⚠️ **GitHub.com Fallback** ⚠️