Network rendering region render via script

Hello!

I am a visual designer working with architectural visualization. I have more than once had a problem with large image renderings. I would like to know if anyone knows a existing script, or is willing to give me advice (I am a beginner with MaxScript) which allows you to define 3ds Max to send a new render job assignment for server.

The properties i would like to define:
-Total output size (or tell 3ds max to use scene settings)
-Tiles count, preferably up to 36 etc.
-Pixel overlap
-Save path including img-file type for the job (or tell 3ds Max to use scene settings)
-Automatically join the fragments together when all renders are finished.
-Send the render job to open Network Job assignment menu or give me the options via the script.

Any advice is highly appreciated! Cheers!

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
wallkall's picture

This is what i've got so far

global defWidth=renderWidth
global defHeight=renderHeight
global defPath=pathConfig.removePathLeaf rendOutputFilename
global defFname=pathConfig.stripPathToLeaf rendOutputFilename

rollout SplitRender "Split Render Settings" width:400 height:200
(
group "Split amount and size" (
radiobuttons splitcount "Pieces to split render in:" labels:#("1", "4", "9", "16", "36") default:4
spinner width "Total width:" type:#integer range:[0,32000,defWidth] enabled:false
spinner height "Total height:" type:#integer range:[0,32000,defHeight] enabled:false
spinner overlap "Pixel overlap:" type:#integer
)

group "Rendering" (
checkbox show "Show image while rendering" checked:true align:#left
checkbox notcustom "Use scene settings" checked:true
label lx1
button doRender "Render"
)

group "Network" (
button SendJob "Send Job To Network"
)

on SendJob pressed do (
macros.run "Render" "RenderButtonMenu_Submit_to_Network_Rendering"
)

on doRender pressed do (

a = splitcount.state
b = splitcount.state * splitcount.state

w = width.value / a
h = height.value / a

bm = bitmap w h
--p = overlap.value - 1
p = overlap.value
wasCancelled=false

for i=0 to b-1 do (
row = i / a
col = i - floor(row) * a

render cancelled:&wasCancelled renderType:#blowup region:#((w/a)*col,(h/a)*row,w/a*(col+1)+p,(h/a)*(row+1)+p) outputwidth:w outputheight:h outputfile:(defPath + "\\" + (row+1) as string + "-"+ ((col+1)as integer) as string + "_" + defFname) vfb:show.checked progressbar:show.checked to:bm
)
)
)

-- create the rollout window and add the rollout
if splitRenderFloater != undefined do
(
closerolloutfloater splitRenderFloater
)
SplitRenderFloater = newRolloutFloater "Split Render to Network Job" 400 600
addRollout SplitRender SplitRenderFloater

fn initRenderValues = (
-- init values from render dialogue:
defWidth=renderWidth
defHeight=renderHeight
defPath=pathConfig.removePathLeaf rendOutputFilename
defFname=pathConfig.stripPathToLeaf rendOutputFilename

format "Rendering to %\n" defPath
format "Filename: %\n" defFname

)

initRenderValues()

pixamoon's picture

`

Looks like you are on good track,

to submit to network rendering: better use NetRenderAutomation than standard one :
http://forums.cgsociety.org/showthread.php?f=98&s=9f6abfed0537ff7aa7a752...

Didn't have time to check code closer, but what is the question now ? just connect tiles together ?

wallkall's picture

At this point the

At this point the fragmentation of the picture is working properly, but when sending the job to the manager it seems to lose the image-tile commands and renders only one whole image.

Thanks for the NetRenderAutomation, got the connection to the manager and job sended, but the same problem occured, only one whole image seems to be rendering. Any ideas? Where do I need to implement the code for the image-tiles to ensure the manager to understand it?

And also the connecting the tiles is still under work, haven't had so much time alongside other work to check that out. Any ideas are appreciated!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.