Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Render script

Render script

Anonymous
Not applicable
454 Views
3 Replies
Message 1 of 4

Render script

Anonymous
Not applicable
I'm completly new to scripting in max but I have to do a few renderings that require a few render passes so I'm trying to write a script that will help me. I need to do the following:

select object a and make it visible to the camera
select group b and make it visible to the camera
load render preset 1
set the finalgather map name (this render will save FG for the next to renders, so I'd like to set the final gather map name to scene name)
render
select object a and make it invisible to the camera
load render preset 2
set the output file
set the finalgather map
render
select object a and make it visible to the camera
select group b and make it invisible to the camera
load render preset 3
set the finalgather map
set the output file
render

Thanks for your help!
0 Likes
455 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable
0 Likes
Message 3 of 4

Anonymous
Not applicable
Thanks for the links, I'm looking at the solutions atm, it looks very promising.

PS: I've almost written the script that I want already, might finish it just for fun 😄
0 Likes
Message 4 of 4

Anonymous
Not applicable
Finished my script, maybe it helps someone. Just need to add submitting to deadline, to make it fully automated (that's why I have 3 buttons atm, I click on first one then sumit to deadline, then second one,...). It's much simpler, easier to use and more universal for my kind of work than those render managers, so I think I'll stick to it (plus submitting to deadline isn't fully functional, there are some limitations for the free usage) 😄
rollout ShowHide "Show Hide" width:250 height:50
(
button showAll "Show All"
button showGroup "Show Group"
button showObject "Show Object"


on showAll pressed do (
select $a
$.primaryVisibility = on
select $b
$.primaryVisibility = on
renderpresets.loadAll 0 (GetDir #renderPresets + "\\preset1.rps")
renderers.current.finalgatherfilename = "e:\\" + maxfilename +".fgm"
)

on showGroup pressed do (
select $a
$.primaryVisibility = off
renderpresets.loadAll 0 (GetDir #renderPresets + "\\preset2.rps")
renderSaveFile = true
renderers.current.finalgatherfilename = "e:\\" + maxfilename +".fgm"
rendOutputFilename = "e:\\"+maxfilename +".tif"
)

on showObject pressed do (
select $a
$.primaryVisibility = on
select $b
$.primaryVisibility = off
renderpresets.loadAll 0 (GetDir #renderPresets + "\\preset3.rps")
renderers.current.finalgatherfilename = "e:\\" + maxfilename +".fgm"
rendOutputFilename = "e:\\"+maxfilename+".jpg"
)
)

--
-- create the rollout window and add the rollout
if showHideFloater != undefined do
(
closerolloutfloater showHideFloater
)
showHideFloater = newRolloutFloater "Show Hide" 250 225
addRollout ShowHide showHideFloater
0 Likes