[Closed] Split Scan Line – Strip Rendering
I’m trying to write a script that automatically submits a job and set it to strip rendering at strips of 32pixels high.
Can’t seem to find any documentation on how to access the strip setup.
not sure
as for your first post:
i wrote a script that will automatically split and submit regions to backburner not too long ago. It’s got some cool functionality like displaying a viewport grab and then being able to highlight and submit specific regions to backburner. I can post it tomorrow when I get into work if you like.
Otherwise you’ll want to look up the NetRender interface in the maxscript reference and you’ll need to use the viewport.setRegionRect <viewport index> <box2> function to set your region before creating each render job.
Would be interested to see it… Does it automatically stich the bits together again? I use the split scanline feature when rendering images that are like 10,000 x 5,000 so it can be rendered across a bunch of blades, and the 2nd pass job stitches the 200 odd strips back together again.
I know some people for images that big split it into 4 and render them on one machine each, and then stitch them in photoshop, but I need to break the big scenes down to hundreds of strips to render quickly.
I’m not trying to do anything ground breaking here, i just don’t want to have to go through the process of clicking render dialog, making sure network render is on, render, connect, define, set size, ok, submit. Trying to do that all with one button using maxscript. So I can combine it with some workflow/pipeline tools I’ve written.
Currently got this…
m = netrender.getmanager() --get a NetManager instance
--start this session
--m.connect #manual "nimbus"
--m.connect #manual "nimbus" port:1234
m.connect #manual "100.100.100.100"
job = m.newjob file:"g:\ est.max"
job.suspended = true --jobs can be submitted as suspended
job.state --should be unsubmitted
job.includeMaps = true --turn on "Include Maps"
--srv_list = m.getservers() --get the server list to assign to the job
--job.submit servers:srv_list --specify which servers to use for the job
job.submit() --this uses all servers for the job
Which i’ve got from the maxscript reference, but there is no code reference for turning on split scan line, or defining the height.
Render netrender: true
This is reportedly broken, which is frustrating as it would improve the workflow a bit.
i’ve never used the split scanlines feature before – just did a quick test and it seems pretty cool. what are the downsides ?
We don’t have a completely automatic process for rendering and stitching large images but i’ve written a few scripts that do help.
Generally we use my script which submits each region to backburner as a seperate job, then we either use a maxscript that i wrote to combine the renders, which makes use of max’s CompositeMap map and RenderMap function, or stitch together in photoshop manually. The latter is annoying but sometimes the former can produce unwanted results due to overlapping pixels where the alpha channels are non 255 white.
I have been looking into using python with max and photoshop recently and just today I finished the functionality for a python script which will automatically stitch files together for you in photoshop based off their alpha channels. I’m still new to python though so there’s no UI yet but i plan on making one asap.
I think the bottom line is: split scan lines via maxscript is just not possible…
Also in case you havn’t already discovered: you cannot set backburner dependencies via maxscript either which is a major pain.
The main problem with split scanline is when using GI you sometimes get differences in the strips depending on what sort of light tracing you’re using.
Split Scanlines is possible using the 3dsmaxcmd.exe command-line rendering. Check the 3ds Max Help file for “Command-Line Rendering Switches” for proper usage. You should be able to write a script to submit a 3dsmaxcmd job from inside 3ds Max.
-Eric
Cheers for that will investigate whether it’ll do what i want it to, seems a bit long winded but should be useful.
I finally ran into a situation where I needed this. Here is what I came up with:
theName = (filterstring maxFileName “.max”)[1] – Create a name variable based on Current Scene
thefile = ((GetDir #temp) + “\”+theName+”_Temp.max”) – Create a temp file to store to use for submitting
saveMaxFile theFile useNewFile:false – Save the temp file
theMngr = “render1” – Place the name of your manager here as a string
sSplit = ” -split:5,0 ” – Set the Split Parameters
sParam = “-submit:”+themngr+” “”+thefile+”””+sSplit+”-jobName “”+theName+””” – 3dsmaxcmd.exe Commands
HiddenDosCommand (“3dsmaxcmd.exe “+sParam) startpath:(getDir #maxroot) – Submit the job
deletefile theFile – delete the temp file
Hope this will help someone else out that needs it.
-Eric
Hehe i noticed this thread, just wanted to point out that the new version of LPM supports command line rendering and split scanline. There is a video tutorial on split scanline too, its the last video tutorial called “3rd party Network Managers/ Render Strips”
The only downside is it creates the stitch job, but doesn’t create the dependencies and there is no script or command-line commands to alter or set this :/.
-Eric