static void RunFovExperiment() { CultureInfo.DefaultThreadCurrentCulture = CultureInfo.InvariantCulture; SceneRegistry.AddSource("../Scenes"); float[] resolutions = new[] { 0.25f, 1.0f, 3.0f, }; foreach (float resolutionScale in resolutions) { Benchmark bench = new(new VcmExperiment(true), new() { SceneRegistry.LoadScene("RoughGlassesIndirect", "NarrowFov", maxDepth: 10), SceneRegistry.LoadScene("RoughGlassesIndirect", "WideFov", maxDepth: 10), SceneRegistry.LoadScene("RoughGlassesIndirect", maxDepth: 10), SceneRegistry.LoadScene("RoughGlasses", "NarrowFov", maxDepth: 10), SceneRegistry.LoadScene("RoughGlasses", "WideFov", maxDepth: 10), SceneRegistry.LoadScene("RoughGlasses", maxDepth: 10), SceneRegistry.LoadScene("RoughGlassesIndirect", "Lens", maxDepth: 10), SceneRegistry.LoadScene("RoughGlassesIndirect", "Lens", maxDepth: 10), }, $"Results-{resolutionScale:0.000}", (int)(640 * resolutionScale), (int)(480 * resolutionScale), FrameBuffer.Flags.SendToTev); bench.Run(); } }
static void Main(string[] args) { // Register the directory as a scene file provider. // Asides from the geometry, it is also used as a reference image cache. SceneRegistry.AddSource("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.LoadScene("CornellBox", maxDepth: 5), SceneRegistry.LoadScene("CornellBox", maxDepth: 2).WithName("CornellBoxDirectIllum") }, "Results/PathVsVcm", 512, 512, FrameBuffer.Flags.SendToTev); // Render the images benchmark.Run(format: ".exr"); // 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(); }
static void RunFastFwdExperiment() { SceneRegistry.AddSource("../Scenes"); float resolutionScale = 2.0f; Benchmark bench = new(new VcmExperiment(true, false), new() { SceneRegistry.LoadScene("LampCaustic", maxDepth: 10), SceneRegistry.LoadScene("LampCausticNoShade", maxDepth: 10), }, $"Results-FastForward", (int)(640 * resolutionScale), (int)(480 * resolutionScale), FrameBuffer.Flags.SendToTev); bench.Run(); }
static void RunBench(int splitfactor) { int resolutionScale = 2; SceneRegistry.AddSource("../Scenes"); Benchmark bench = new(new BidirExperiment(), new() { SceneRegistry.LoadScene("ModernHall"), SceneRegistry.LoadScene("LivingRoom"), SceneRegistry.LoadScene("TargetPractice"), SceneRegistry.LoadScene("HomeOffice"), SceneRegistry.LoadScene("RoughGlasses"), SceneRegistry.LoadScene("RoughGlassesIndirect"), SceneRegistry.LoadScene("IndirectRoom"), SceneRegistry.LoadScene("MinimalistWhiteRoom"), SceneRegistry.LoadScene("LampCaustic"), }, $"Results-x{splitfactor}", 640 * resolutionScale, 480 * resolutionScale, FrameBuffer.Flags.SendToTev); bench.Run(format: ".exr"); }
static void RunRadiusExperiment() { SceneRegistry.AddSource("../Scenes"); float resolutionScale = 2.0f; Benchmark bench = new(new RadiusExperiment(), new() { SceneRegistry.LoadScene("ModernHall"), SceneRegistry.LoadScene("LivingRoom"), SceneRegistry.LoadScene("TargetPractice"), SceneRegistry.LoadScene("HomeOffice"), SceneRegistry.LoadScene("RoughGlasses", maxDepth: 10), SceneRegistry.LoadScene("RoughGlassesIndirect", maxDepth: 10), SceneRegistry.LoadScene("IndirectRoom"), SceneRegistry.LoadScene("MinimalistWhiteRoom"), SceneRegistry.LoadScene("LampCaustic", maxDepth: 10), }, "Results", (int)(640 * resolutionScale), (int)(480 * resolutionScale), FrameBuffer.Flags.SendToTev); bench.Run(); Process.Start("python", "./radiusfigure.py").WaitForExit(); }