Notifications
Clear all

[Closed] Any script to automate render for different max files ?

Hi all, does anyone has any idea if there’s a script out there which can automate render for different max files & have the stills output to their respective folders & with the image filenames according to what I wanted?

I’m currently working on a project that needs me to render 4 stills of different views (Front, Left, Back & user) out of each max file (character model). And I’ve got more than a thousand different max files that needs to rendered this way. Each max files have their own folder to store the rendered stills with. And the stills are supposed to be named according to the “character’s name” followed by “_front.jpg/ _back.jpg/ _left.jpg/_qtr.jpg”. Currently what I can do is to manually do all these work & save them out to their respective folders; which was kind of tedious. So I was wondering if there’s any script that can do this task automatically or if not close to this.

Would appreciate if anyone knows about this. Thanks!

Phang

8 Replies

Phang,

Why don’t you use network rendering for this? you can do it with one computer and it will keep trying any jobs that fail and is very reliable. It is also very easy to set up. Not to mention that it uses less memory than an interactive session of max so you can render larger scenes.

Josh.

It’s not “scripting” but there is the “command line rendering” possibility that allows you to launch rendering without opening the file, from a dos prompt. look for it in the help file.

I do not know it very well myself, but you can specify the camera (or a view ? I don’t know), a file output, etc…

May be you can build a text file with all your max file (thousand ?? huh…) that will basically be the batch file for your rendering.

There are certainly people here who can explain better than me this procedure.

Jerome

Thanks j_man, kachoudas for answering. However that’s not applicable for my case. Probably I didn’t explain enough… The situation is the max files I had isn’t all saved with the viewport views setup properly yet; proper as in views set to front, left, back & user (3-quarter) with the character “zoom extents” in each view. And the thing is each character (LOD lev 1-4) each have their own “render” folder to store the stills in. So my question was if there’s any script out there that can do all these task for you instead of me going through every files to setup the front, left, back & user views with the characters zoom extented, then saved out each renders to their destinated folders. The most important thing is I won’t have to open up all the various max files to render the stills out individually. Maybe something that allows me to render outside max by setting up those files needing render & I can set the folders to save for the renders.

Thanks everyone.

hey,

Well I don’t know of any script that is available, but it would be stright forward to write a script to load files, do a zoom extends and then render them. How is the render output setup? I don’t know if you have much scripting experience but you could read in teh MXS help about

getfiles
loadmaxfile
max commands – max zoomext sel all
render

If you’re very adventurous you could read about the netrender interface but if you’re unexperienced I’d avoid it.

there are just to many what ifs for me to say, “heck I’ll write you one!”

Cheers,

Josh.

Thanks for the direction man. I didn’t know maxscript could do such things… cool. I know nuts about maxscript, always wanted to pick that up but just too lazy to go through the tutorials.

Anyway, I think it’s alright, because I just want to know if there’s any free script that does such things. Really appreciate all the help given, I think I’m getting alot more interested in maxscript now. Can’t wait to explore more on it.

Cheers!

this is a simple script , write for my friend early .maybe u can use it for study .
u can just change some sentence of the script file about the command “render”. see the help document of the script about “render” command .
or some question , tell me .

 
--directory render .
-----------------------------------------
-- by lan haibo . shanghai china .
-----------------------------------------
-- [email="ehblan@hotmail.com"]ehblan@hotmail.com[/email]
-----------------------------------------
-- this is a simple script that can render
--all max files in a directory .just for 
-- my friend chenzhiguo . 
-----------------------------------------
rollout  therenderfile  "dir-render"
(
global theDirOfMax=maxfilepath
global theFiles=""

label thelabel "the dir:"
edittext theDirName  
button renderP "-render the dir-"
label nothing ". . . . . ."
button rendercommand "- render current dir -"
--end of define.
on renderP pressed do
(
theDirOfMax = theDirName.text
print thedirofmax
	theFiles=getfiles (theDirOfMax+"[\\*.max](file://\*.max)")
 for fileVer=1 to theFiles.count do
 (
 resetmaxfile #noprompt
 loadMaxFile theFiles[fileVer] quiet:true
	--setquietmode true
	 max quick render
 resetmaxfile #noprompt
	)
)
on rendercommand pressed do
  (
 theFiles=getfiles (theDirOfMax+"*.max")
 for fileVer=1 to theFiles.count do
 (
 resetmaxfile #noprompt
 loadMaxFile theFiles[fileVer] quiet:true
	--setquietmode true
	max quick render
 resetmaxfile #noprompt
	)
  )
) 
CreateDialog therenderfile 
 

Cool… thanx for sharing hblan I’ll use it for reference to learn scripting next time. Managed to get another colleague to custom write the script I need for the project. Anyway, thanks to all those who’ve replied & shared.

Cheers!

look at this script. it does just a perspective render of max files in a folder (and subfolders). in fact, you need to add several lines of code to render views you need.