Saving renders with progressive samples (beauty,denoised)

Forums: Saving renders with progressive samples (beauty,denoised)
Forum for OctaneRender Lua scripting examples, discussion and support.

Saving renders with progressive samples (beauty,denoised)

Postby jalley » Tue Sep 19, 2023 9:08 am

jalley Tue Sep 19, 2023 9:08 am
Hi,

Our team (we are licensed customers) is experiencing some challenges when it comes to saving images during progressive rendering in Octane through Lua scripting, especially when attempting to vary the Samples Per Pixel (spp).

The Problem:
# When we render images with progressive rendering enabled, we're having difficulty saving examples with different spp settings. It seems like Octane isn't able to save various spp configurations as expected. We've explored the Octane Lua scripting, but we're still facing issues.

Our Goal:
# Our ultimate goal is to generate a sequence of images with varying spp values to analyze the trade-offs between rendering time and image quality.

What We've Tried So Far:
# We've looked into the Octane documentation for Lua scripting but haven't found a straightforward solution. We have tried to pause() the Octane renderer from Lua, update the samples configuration, then continue()

nodeRenderTarget:getInputNode(octane.P_KERNEL):setPinValue(octane.P_MAX_SAMPLES, 4)
local result = octane.render.start(propsRenderStart)
SaveRender(nodeRenderTarget:getInputNode(octane.P_KERNEL):getPinValue(octane.P_MAX_SAMPLES))

nodeRenderTarget:getInputNode(octane.P_KERNEL):setPinValue(octane.P_MAX_SAMPLES, 8)
octane.render.continue()
SaveRender(nodeRenderTarget:getInputNode(octane.P_KERNEL):getPinValue(octane.P_MAX_SAMPLES))

# We've attempted to use a render callback in a Lua script, but this doesn't seem to save the images as expected, skipping certain spp values. E.g. we would like to save 8,16,32,256,1024 but 32 is skiped ^^


local propsRenderStart = {
callback = renderCallback,
doUpdate = true,
maxRenderTime = 86400,
renderTargetNode = nodeRenderTarget,
restart = true,
statisticsCallback = statisticsCallback
}

Any help with Lua scripting would be greatly appreciated.

Thanks in advance for your assistance and support. We look forward to your responses.

Best regards,
jalley
http://www.jalley.com
jalley
Licensed Customer
Licensed Customer
 
Posts: 27
Joined: Thu Aug 31, 2017 6:00 pm

Re: Saving renders with progressive samples (beauty,denoised)

Postby jobigoud » Tue Sep 19, 2023 10:44 am

jobigoud Tue Sep 19, 2023 10:44 am
Don't quote me on this but I don't think you can get that kind of precision from the render callback intermediate results, the engine will call your callback when it emits a new image but it doesn't do this at each sample.

If it's possible you could call render.start() in a loop, restarting from zero each time. First make a 8spp render, then a 16spp one, etc.
User avatar
jobigoud
OctaneRender Team
OctaneRender Team
 
Posts: 230
Joined: Sat Aug 15, 2015 1:28 pm

Re: Saving renders with progressive samples (beauty,denoised)

Postby jalley » Wed Sep 20, 2023 8:03 am

jalley Wed Sep 20, 2023 8:03 am
Yeah, the restart solution is our current implementation, but it is very inefficient. We want to know if there is a way of continuing the render from the samples you reached in the last render to avoid recalculating the same samples each time.
jalley
Licensed Customer
Licensed Customer
 
Posts: 27
Joined: Thu Aug 31, 2017 6:00 pm

Re: Saving renders with progressive samples (beauty,denoised)

Postby frankmci » Wed Sep 20, 2023 5:17 pm

frankmci Wed Sep 20, 2023 5:17 pm
It's a workaround for sure, but since Live viewer picks up where it left off when you raise samples it seems like you should be able to build an OS level automation of the Live Viewer/Octane Settings to export an image, increase the sample rate, pause for X seconds, export image, increase samples, pause, etc. I've done similar things with Mac OS Automator, so I'm guessing there is something similar on PC these days. We are now mostly on PC, so I should probably look into this myself, too.

Looks like Jitbit Macro Recorder might do the trick.
https://www.jitbit.com/macro-recorder/
Technical Director - C4D, Maya, AE, - Washington DC
frankmci
Licensed Customer
Licensed Customer
 
Posts: 827
Joined: Fri May 26, 2017 2:00 pm

Return to Lua Scripting


Who is online

Users browsing this forum: No registered users and 32 guests

Sat Apr 27, 2024 9:24 am [ UTC ]