Code:
renderer.PostEffectsUpdated += new EventHandler<VRayEventArgs>((source, e) => { Console.WriteLine(" ~~~ Got a new denoised image!"); RenderElement denoiseRE = renderer.RenderElements.Get(RenderElementType.DENO ISED); // You shouldn't perform slow operations inside this callback because this will block the event queue. VRayImage denoisedImage = denoiseRE.GetImage(); denoisedImage.SaveToPNG(outputImagePath, transparent, 16); }); renderer.StartSync(); renderer.WaitForRenderEnd(); Console.WriteLine(" ~~~ First manual denoising"); renderer.DenoiseNow(); renderer.WaitForRenderEnd(50000); Console.WriteLine(" ~~~ Second manual denoising"); renderer.DenoiseNow(); renderer.WaitForRenderEnd();
Comment