i am trying to get the progress of the frame rendering.
While i am firing a render i want to update a progress bar for the gurrent sample progress
Help please ...
Help : Is there any timer function at the api ?
- stratified
- Posts: 945
- Joined: Wed Aug 15, 2012 6:32 am
- Location: Auckland, New Zealand
Hi,
No there isn't any timer functionality but it wouldn't help you in this case because you don't know in advance how long your render would take anyway.
If you track progress while rendering you have register a render callback. This callback will be called by the render engine to inform on intermediate results. Here's a small snippet that shows you how it works:
cheers,
Thomas
No there isn't any timer functionality but it wouldn't help you in this case because you don't know in advance how long your render would take anyway.
If you track progress while rendering you have register a render callback. This callback will be called by the render engine to inform on intermediate results. Here's a small snippet that shows you how it works:
Code: Select all
-- select a render target node and render it
local renderTargetNode = octane.project.getSelection()[1]
local function renderCallback(result)
print("-- intermediate result was reported back from the render engine")
-- print out what's in result
for k,v in pairs(result) do
print(k, v)
end
end
-- start rendering
octane.render.start
{
renderTargetNode = renderTargetNode,
maxSamples = 1000,
callback = renderCallback,
}
Thomas
How often this callback function is been called ?
Cause i did that and it was called at the end..
Cause i did that and it was called at the end..
ok i got it
i havent seen the result parameter in callback function
SOLVED
thanks
i havent seen the result parameter in callback function
SOLVED
thanks
- stratified
- Posts: 945
- Joined: Wed Aug 15, 2012 6:32 am
- Location: Auckland, New Zealand
Hi,gmillas wrote:How often this callback function is been called ?
Cause i did that and it was called at the end..
It's called every time Octane tonemaps the render result (and the standalone refreshes it's viewport). In the beginning this is very often but if you don't modify the scene anymore it will converge. Then it's called roughly every 5 seconds.
But you shouldn't rely on how often this is called, we have a result when we have a result

cheers,
Thomas