View Full Version : Setting Render Element filename on pre-render script?
DaveWortley 05-17-2009, 09:57 PM I'm trying to fix the problem of render elements not working with strip rendering.
I've written a script which assembles an image from all the strips, which works fine :) (mainly because the 2nd passes in backburner keep failing on our network)
Now i'm trying to write a pre/post render script which will save out the elements.
For those who don't know... when using strip rendering the strip renders and the element and saves the strip as _STP000x_*filename*.tga but saves the element as filename_*renderelement*.tga with no _STP000x_ prefex, so on every strip render it overwrites the renderelement.
So I wrote a pre-render script which (just for now) makes a random file name for the render element and sets it before the render. But this just stops the render element from being saved on a single render, and does nothing using strip rendering.
a = maxOps.GetCurRenderElementMgr()
setsilentmode true
b = a.getrenderelement 0
rendEPath = a.getrenderelementfilename 0
r = random 1 20
newpath = (substring rendEPath 1 (rendEpath.count - 4)) + r as string + ".tga"
a.setrenderelementfilename 0 newpath
So now I guess I have to try it as a post-render script. How can i acess the gbuffer information?
I've thought about writing a script that copies and renames the rendered element so it doesn't get overwritten but that leaves me with another problem.
Is it possible for a post-render script to determin which strip it is currently rendering?
|
|
PiXeL_MoNKeY
05-17-2009, 10:46 PM
I don't think the problem is the name, I think the problem is how BB saves the name. So to fix that you will need to bypass the strip rendering and submit wach strip yourself.
I would suggest submitting a crop render that goes through the needed strips (ie send separate jobs per strip). This would ensure that all strips and elements would have unique names. Then you could stitch them together as you currently are.
-Eric
DaveWortley
05-17-2009, 11:13 PM
Problem is with that is we use strip rendering on a large scale. Often rendering a 12,000x8000 pixel image in 200 strips to make the most of using the render farm. It would take far too long to submit each strip as a single job and would really slow down the manager and be very difficult to work with if we were kicking off say 30 renders one night....
MikeOwen
05-18-2009, 07:40 AM
I guess you want to fix this problem via code, but can I strongly suggest you consider investing in a cutting-edge renderfarm management tool which would handle strip rendering for you automatically and is production proven?
http://www.franticfilms.com/software/products/deadline/download/
Free for the first 2 slaves and includes all maxscript code on how their strip rendering works :-)
Mike
DaveWortley
05-18-2009, 12:51 PM
Yeah been asking for Deadline for a while but not getting it for the moment :(
Thinking I might write my own strip renderer for now using the cmd renderer and crop render.
profusion
05-27-2009, 08:14 AM
I have been looking at exactly the same problem, and my conclusion was that BB overwrites each strips with the same name.
My conclusion was to use the callback on postrender, and then rename the current stip (proof of concept was with vray alpha)
callbacks.addScript #postRender filename:"postRename.ms" id:#super persistent:true
-- postRename.ms
re = maxOps.GetCurRenderElementMgr()
renderOutput_filepath = getFilenamePath rendoutputfilename
renderOutput_filename = getFilenameFile rendoutputfilename
renderOutput_fileExtension = getFilenameType rendoutputfilename
new_element_PathAndFilename_string = renderOutput_filepath + renderOutput_filename + "_vrayalpha_" + "0000" + renderOutput_fileExtension
new_element_Filename_string = renderOutput_filename + "_vrayalpha_" + "0000"
element_filepath = getFilenamePath (re.GetRenderElementFilename 0)
element_filename = getFilenameFile (re.GetRenderElementFilename 0)
element_fileExtension = getFilenameType (re.GetRenderElementFilename 0)
element_PathAndFileName = element_filepath + element_filename + "0000"
element_CompleteName = element_PathAndFileName + element_fileExtension
renameFile element_CompleteName new_element_PathAndFilename_string
Is works, now I just need to work some more on the assemble part of the script...
profusion
05-27-2009, 08:40 AM
Just noticed: http://forums.cgsociety.org/showthread.php?f=98&t=765736 :shrug:
Kramsurfer
05-27-2009, 10:02 PM
I wonder if AD understands the number of hour spent trying to get BB to work in a production enviroment?? But I'm sure glad to have that new steering wheel...
I've spent a few days chasing this one too.. same ideas meantioned but no rock solid solution...
thatoneguy
05-28-2009, 01:04 AM
Problem is Backburner is for Max and Combustion.
That's just not good enough for most people's farms. I think backburner should be abandoned and if they want to offer free Max render management work out some sort of limited 'lite' version of deadline.
PiXeL_MoNKeY
05-28-2009, 01:29 AM
Don't forget Toxik and Burn also. They are run off of Backburner as well.
-Eric
Kramsurfer
05-28-2009, 10:56 PM
If they added Deadline, I would happily accept that as an annual point release! :-)
ZeBoxx2
05-29-2009, 06:40 PM
It would also mean that - short of hotfixes and such - any updates to Deadline would have to wait for the next point version in subscription, or the next full release. There's pros and cons to major applications merging in such functionality.
DaveWortley
05-30-2009, 12:14 PM
I was told by Autodesk themselves that BackBurner was going to become Open-Sourced...
PiXeL_MoNKeY
05-30-2009, 07:23 PM
I was told by Autodesk themselves that BackBurner was going to become Open-Sourced...The question is who at Autodesk told you that? I have heard one too many times, that someone from Autodesk said something that was incorrect or that person did know all the information. It would be nice if they opened it up, but I won't believe it until I see it.
-Eric
MikeOwen
05-31-2009, 09:55 AM
Making backburner open sourced still won't fix the problem that it's fundamental architecture was wrong as ADSK's original design brief was to support only a max. 50 machines! I would forget all about backburner and just think about investing in deadline which will gives it's developers the cash it needs to further enhance an already brilliant system.
CGTalk Moderation
05-31-2009, 09:55 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.