Could someone help me out with a very basic task:
using LUA, I want to know if the current render target has finished rendering (had reached the samples/pixel)
if I do in Script window: print (octane.renderState), it will return "table".
I am new to LUA/octane - forgive my blindness on the subject: is this octane.renderState just a variable/holder for different states? or is this a function that can be called to find the state of current rendering?
I have also tried: octane.renderJobStatus
Sorry again for the very basic level, I have only used maxscript and MEL, I didn't expect to take me so long to retrieve some simple system variables using LUA.
(What I need is a very basic .lua that will be called from a batch line. All this .lua has to do is to check if samples are reached and save the render passes as layered exr.... )
ANY feedback greatly appreciated !
THANKS
.renderState - simpliest possilbe question... please help
Hi tomsawyer,
if I have understood correctly your question, I would go in another direction:
If you search "octane.render.PROPS_RENDER_RESULT_STATISTICS", you can find all the info about the RenderResultStatistics table.
Let me know if this solution works for you.
ciao beppe
if I have understood correctly your question, I would go in another direction:
Code: Select all
stats = octane.render.getRenderResultStatistics()
print(stats.renderTime, stats.estimatedRenderTime, "\n")
if stats.renderTime ~= stats.estimatedRenderTime then
print("Rendering")
else
print("FINISHED")
end
Let me know if this solution works for you.
ciao beppe
If the render was started using
If you have indeed a script which is called from a batch file, you would have a call to
octane.render.start
, then it is finished when that function call returns.If you have indeed a script which is called from a batch file, you would have a call to
octane.render.start
, followed by a call to octane.render.saveRenderPasses
(or saveRenderPassesMultiExr
).Thanks for the hints!
@ Beppe: i have used something similar - I check if the renderState is 4 (rendering)
@roeland - thanks: the render is started by a batch file indeed. It worked with the above function, but using octane.render.start makes more sense - I will use this.
I am using octane.render.saveRenderPassesMultiExr
Any idea how to enable tonemapping?
Thanks for help!
Tom
@ Beppe: i have used something similar - I check if the renderState is 4 (rendering)
Code: Select all
local function isDone()
renderIsDone = false
stats = octane.render.getRenderResultStatistics()
if (stats.renderState == 4) then renderIsDone = true end
return renderIsDone
@roeland - thanks: the render is started by a batch file indeed. It worked with the above function, but using octane.render.start makes more sense - I will use this.
I am using octane.render.saveRenderPassesMultiExr
Any idea how to enable tonemapping?
Thanks for help!
Tom
The values of
Saving HDR images with tonemapping is a bit unusual, but it can be done by setting the last parameter of that function to true. But if you want to do any meaningful post-processing with the render passes you'll probably need the images without tonemapping applied.
-Roeland
.renderState
are constants in the octane.renderState
enumeration, and 4 is the value of octane.renderState.FINISHED
.Saving HDR images with tonemapping is a bit unusual, but it can be done by setting the last parameter of that function to true. But if you want to do any meaningful post-processing with the render passes you'll probably need the images without tonemapping applied.
-Roeland