PDA

View Full Version : Rendering Multiple Frames from LScript or Commander



DavidLCarson
05-03-2008, 06:36 PM
I'm trying to render a sequence of frames without calling 'renderscene' (Due to a bug in Lightwave)

I can step through each frame and render it individually, but I would really like to automate the process.. something like this:
{
GoToFrame 1
Render Frame
GoToFrame 2
RenderFrame
...
GoToFrame 20
RenderFrame
}

But everything I try gives the same result: Lightwave runs from frame 1 to frame 20, and then renders only frame 20!

I've tried doing this as a generic lscript. I've tried putting the call to RenderFrame like this:

newtime: id, frame, time
{
if(frame < 21){
CommandInput("RenderFrame");
CommandInput("NextFrame");
}

}

I've tried using the LScript Commander and just listed the commands
GoToFrame 1
Render Frame
GoToFrame 2
RenderFrame
...
GoToFrame 20
RenderFrame

All give the same result: Layout runs from frame 1 to frame 20 and then renders frame 20.

Is what I'm trying to do possible?

evenflcw
05-04-2008, 01:55 AM
Well, apparently a generic script just isn't going to cut it. The (first) call to RenderFrame() obviously isn't executed until the script reaches the end. So you will have to write a Master Script to handle this. From the master script you'll also be able to check for the RENDER_DONE flag.

Have you looked on FLAY.com if there might not be something there you could use? I think I remember someone making a script/plugin to bucket render from within LW. Perhaps it could be (ab)used for your purposes. I would venture a guess that most render managers would call the singel frame render function.

DavidLCarson
05-04-2008, 10:47 AM
Thanks for the input. I think you're right about this requiring a Master Script. Learning how to write Master Scripts was not how I'd planned to spend the day, but I suppose it will be a handy skill to have...

evenflcw
05-05-2008, 12:31 PM
It will be a very handy skill. Master script being persistent and aware of what is going on is good stuff. They also allow you to turn what otherwise would be a modal generic script into something interactive as you can create non-model panels instead. Just that ability is worth a few hours reading and experimenting.