View Full Version : Script to write individual-frame batch files?
Stahlberg 09-16-2002, 05:58 AM My rendering keeps crashing on one machine, after one or two frames. The thing is, that one (or two) frames are ok, so theoretically, if I could write out one line for each frame in my batch file I should be ok. But who wants to type several hundred lines just for that... so I'm wondering is there some kind of utility where this could be automated, just writing the same line over and over except for the 2 numbers (start frame and end frame) being incremented by one for each line?
|
|
MCronin
09-16-2002, 06:14 AM
Are you using Windows? If so, I'd be happy to write a little application for you that would spit out a script file for you. It shouldn't take too long. Just post an example of what the script should look like and I'll give it a go.
bentllama
09-16-2002, 06:16 AM
Now I am no MEL guru by any means...but couldn't you just query the timerange and use that number [the framecount] to successively render each frame?
BigFatMelon might be the guy to ask about this...
Or another way you could do it is to write a batch file that has every frame specified in the file.
Stahlberg
09-16-2002, 06:52 AM
bentllama, I'm no MEL guru either, quite the opposite in fact. :) My problem is this file is too heavy to render from Maya, so I close it to run a batch file. But even then it's too heavy on this one machine, it will start executing one line in the batch file, then after a couple frames either freeze up or crash and go to the next line. I'm hoping - by keeping each batch real short - that it won't get to the freezing-up point, so ideally I want to write out one batch for each frame, or maybe every second frame. That should do it I think.
Thanks MCronin, that would be great, save me from carpal tunnel! :) I'm using WindowsXP on that machine.
ACFred
09-16-2002, 06:58 AM
Try downloading and installing Smedge on that one computer. Smedge allows you to set a frame range, say 1-150, and then set a packet size. A packet is the number of frames that will be rendered for the individual mayabatch instance. If you set packet size to 2, it'll do 2 frames, mayabatch will stop and the next instance of mayabatch will start, etc.
Smedge is available at:
www.uberware.net/smedge2/ (http://www.uberware.net/smedge2/)
Hope that helps.....
MCronin
09-16-2002, 07:03 AM
Arghh, and I really wanted to write this stupid little program:)
Anyway, it's a general purpose script/batch generator, and it's almost done. Right now it's a console app, if Win XP has a console, you should be able to use it. If people like it I'll put a GUI on it. Check back here in a bit and I'll post it.
MCronin
09-16-2002, 08:02 AM
http://home.earthlink.net/~mdcronin1/images/batchmonkey.exe
Here's the program.
It's pretty simple.
It asks for two strings of text a range and an increment vaule.
So, if you say,
string1: "render blahblah"
start: "1"
end: "2000"
increment: "1"
string2: ".tif"
it's going to output a file
render blahblah1.tif
render blahblah2.tif
render blahblah3.tif
.
.
.
render blahblah2000.tif
It'll use floating points if you want half values or whatever in the range, but it doesn't do padding (0001, 0002, etc)
If you need padded numbers let me know. If you'd rather have a littel GUI let me know. If you need a different format for the text let me know.
MCronin
09-16-2002, 08:38 AM
There was something severly wrong with that last version. I just posted a new one. It should work fine now.
http://home.earthlink.net/~mdcronin1/images/batchmonkey.exe
Stahlberg
09-16-2002, 03:11 PM
Wow thanks, what a great forum! I'll try both Smedge and yours MCronin - man I'm jealous! Wouldn't it be great to be able to say "I'm going to write some software now..." :)
MCronin
09-19-2002, 11:40 AM
Here's a new that outputs scripts like this:
<USER TEXT> -s 0 -e 0 <MORE USER TEXT>
<USER TEXT> -s 1 -e 1 <MORE USER TEXT>
etc.
as per Mr. Stahlberg's request. Hope you guys find it useful. Again, if anyone is using it, and want's it to do other things like padding or have a GUI or whatever just PM me.
http://home.earthlink.net/~mdcronin1/images/SSmayabatch.exe
alexx
09-19-2002, 12:01 PM
hey steven,
if you use NT you can open a command shell and type in the following line:
for /L %a in (10,1,100) do render -s %a -e %a myScene.mb
that will render the frames 10-100 with a stepping of 1, meaning one by one which is what i guess you need
have fun
cheers
alexx
Stahlberg
09-20-2002, 01:55 AM
Thanks alexx, that's very useful to know. Is there an 'NT manual for dummies' or something, where would I find out more stuff like this?
Thanks, MCronin, script works great!
alexx
09-20-2002, 08:49 AM
i am quite sure there is something like that but i dont know one.
sorry..
DimitrisLiatsos
09-20-2002, 11:48 AM
Hi Mr. Stahlberg !!!
when my renders crach(mainly 'cuase of memory) i just write a simple Batch file " render.bat" which i put in the project
The file inside has a simple mel structure with many lines like these below ( example..not the correct mel)
Render -filename from frame 1 to 10
Render -filename from frame 11 to 20
Render -filename from frame 21 to 30
Render -filename from frame 31 to 40
..
..
Render -filename from frame 91 to 100
Just an easy way to leave the render and get some sleep!!!
:)
playmesumch00ns
09-20-2002, 12:28 PM
get perl installed on your machine, then just make a perl script to do this for you, piece of piddle. It's definitely worth having in the long run too
playmesumch00ns
09-20-2002, 12:31 PM
It would be even easier if windows had a proper shell *sigh*
MCronin
09-20-2002, 05:01 PM
psst..Maya runs on Linux, OSX and Irix. Don't tell anyone.
Stahlberg
09-21-2002, 06:52 AM
Perl... heard of that, but couldn't tell the difference between a perl script and any other scripting language (except maybe html and mel) if you held a gun to my head. And at 43 I think I'm probably too old to learn (and too busy anyway). I'm not stupid, I'm good at reading, but... I don't know...
If I could, and did have time, where should I start? And how? Books from Amazon.com? Just curious. and a bit jealous... :)
CGTalk Moderation
01-13-2006, 04:00 PM
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.