This script is called a require in batch render script- And in working with AWS Deadline- They claim it ships with Octane.
I find no trace of this in any installed folders- Where is it?- Where can I get a copy of it?
./rrb
octane_render_utils_lua
Hi,
it should be shared by Thinkbox Deadline directly, not by us.
Anyway, please try with the following LUA script for AWS Thinkbox:
download/file.php?id=85243
ciao,
Beppe
it should be shared by Thinkbox Deadline directly, not by us.
Anyway, please try with the following LUA script for AWS Thinkbox:
download/file.php?id=85243
ciao,
Beppe
Thank You for the response. AWS does supply a version of the cmdbatch as you have shared here.bepeg4d wrote:Hi,
it should be shared by Thinkbox Deadline directly, not by us.
Anyway, please try with the following LUA script for AWS Thinkbox:
download/file.php?id=85243
ciao,
Beppe
What I am after is what is being called on line 26: require("octane_render_utils_lua")
octane_render_utils
./rrb
2022-07-12 11:08:39: 0: STDOUT: Started logging on 12.07.22 11:08:34jobigoud wrote:It is inside the engine and loaded by it. It's not a separate file.I find no trace of this in any installed folders- Where is it?
Do you have a particular error?
2022-07-12 11:08:39: 0: STDOUT: OctaneRender Enterprise 2021.1.5 (11000500)
2022-07-12 11:08:39: 0: STDOUT: [string "octane_render_utils_lua"]:200: bad argument #3 to 'gsub' (string/function/table expected) (line: 200)
2022-07-12 11:08:39: 0: STDOUT: Stopped logging on 12.07.22 11:08:39
This is from deadline log- the selected output format is exr- all passes- single file - I can't solve if I cant see line 200 or whatever it may be- has to be a way to print or dump these utils
I have found a solve for this. From the research entailed in the quest, and from the @jobigoud clue- octaneRenderUtil must be a compiled C script- I can see part of through lua- but not line by line. The solve was to change the functions that handle fileFormat/imageSaveFormat and exrCompression type to use their index number as in API.
I have found a solve for this. From the research entailed in the quest, and from the @jobigoud clue- octaneRenderUtil must be a compiled C script- I can see part of through lua- but not line by line. The solve was to change the functions that handle fileFormat/imageSaveFormat and exrCompression type to use their index number as in API. This is working- but the cause is not clear to me.rrbarb wrote:jobigoud wrote:I can't solve if I cant see line 200 or whatever it may be- has to be a way to print or dump these utilsI find no trace of this in any installed folders- Where is it?
IT would be very helpful to have a digest of the expected content that ocataneRenderUtils expects to be present.
`octane_render_utils_lua` contains internal helper functions shared between various render scripts / jobs. We are not making those public as we can't/don't want to guarantee that the interface won't change in the future. If we would make it public, then we would not be able to update/modify it easily since otherwise existing user projects might get screwed.
The function you are having trouble with is
Particularly this line:
I guess you used an invalid enum value for
EDIT: I just had a look at your script. It would have been better to just write a script from scratch using only functionality from our Lua API instead of taking an older batch render script and then ripping out all the GUI stuff and then hacking the rest to try to make it work something totally different than what it intended to do.
The function you are having trouble with is
octaneRenderUtils.createFilename()
:
Code: Select all
-- Creates a filename based on a passed in filename template.
--
-- @param[in] template
-- Filename template with embedded %? chars which are substituted by something else.
-- @param[in] renderTargetIx
-- Index of the render target.
-- @param[in] frameIx
-- Frame index.
-- @param[in] subFrameIx
-- Sub-frame index.
-- @param[in] name
-- Name of the render target node
-- @param[in] imageSaveFormat
-- Type of the output image (in octane.imageSaveFormat)
-- @param[in] pass
-- Name of the current render pass.
function octaneRenderUtils.createFilename(template, renderTargetIx, frameIx, subFrameIx, name,
imageSaveFormat, pass)
assert(template, "expected template")
assert(renderTargetIx, "expected renderTargetIx")
assert(frameIx, "expected frameIx")
assert(subFrameIx, "expected subFrameIx")
assert(name, "expected name")
assert(imageSaveFormat, "expected imageSaveFormat")
assert(pass, "expected pass")
-- round to integer value incase frameix has a float value
frameIx = math.floor(frameIx + 0.5)
-- common extension for our image output types
local fileExtensions =
{
[octane.imageSaveFormat.PNG_8 ] = "png",
[octane.imageSaveFormat.PNG_16] = "png",
[octane.imageSaveFormat.EXR_16] = "exr",
[octane.imageSaveFormat.EXR_32] = "exr",
}
local s = template
-- %i -> index of the render target
s = string.gsub(s, "%%i", string.format("%d", renderTargetIx))
-- %f or %F -> frame number prefixed with zeroes (i.e. 1 -> 001)
s = string.gsub(s, "%%f", octaneRenderUtils.prefixWithZeroes(frameIx, 4))
s = string.gsub(s, "%%F", octaneRenderUtils.prefixWithZeroes(frameIx, 4))
-- %s -> sub frame number
s = string.gsub(s, "%%s", string.format("%d", subFrameIx))
-- %n -> name of the node
s = string.gsub(s, "%%n", name)
-- %e -> extension
s = string.gsub(s, "%%e", fileExtensions[imageSaveFormat])
-- %t -> timestamp (h_m_s)
s = string.gsub(s, "%%t", os.date("%H_%M_%S"))
-- %p -> render pass name
s = string.gsub(s, "%%p", pass)
return s
end
Code: Select all
s = string.gsub(s, "%%e", fileExtensions[imageSaveFormat])
imageSaveFormat
.EDIT: I just had a look at your script. It would have been better to just write a script from scratch using only functionality from our Lua API instead of taking an older batch render script and then ripping out all the GUI stuff and then hacking the rest to try to make it work something totally different than what it intended to do.
In theory there is no difference between theory and practice. In practice there is. - Yogi Berra
This is not my script. The use is same as intention- however I will take you advise and look into that. ThankYou!abstrax wrote: EDIT: I just had a look at your script. It would have been better to just write a script from scratch using only functionality from our Lua API instead of taking an older batch render script and then ripping out all the GUI stuff and then hacking the rest to try to make it work something totally different than what it intended to do.
./rrb