-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathProgram.cs
More file actions
24 lines (19 loc) · 1.07 KB
/
Program.cs
File metadata and controls
24 lines (19 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
using SeeSharp.Examples;
// Register the directory as a scene file provider.
// Asides from the geometry, it is also used as a reference image cache.
SceneRegistry.AddSourceRelativeToScript("../Data/Scenes");
// Configure a benchmark to compare path tracing and VCM on the CornellBox
// at 512x512 resolution. Display images in tev during rendering (localhost, default port)
Benchmark benchmark = new(new PathVsVcm(), [
new (SceneRegistry.Find("CornellBox"), maxDepth: 5),
new (SceneRegistry.Find("CornellBox"), maxDepth: 2, name: "CornellBoxDirectIllum"),
], "Results/PathVsVcm", 512, 512, FrameBuffer.Flags.SendToTev);
// Render the images
benchmark.Run();
// Optional, but usually a good idea: assemble the rendering results in an overview
// figure using a Python script.
Process.Start("python", "./SeeSharp.Examples/MakeFigure.py Results/PathVsVcm PathTracer Vcm")
.WaitForExit();
// For our README file, we further convert the pdf to png with ImageMagick
Process.Start("magick", "-density 300 ./Results/PathVsVcm/Overview.pdf ExampleFigure.png")
.WaitForExit();