PDA

View Full Version : Selecting frames to render



tasmanian
09-08-2003, 06:27 AM
Say you want to render frames 1,3,7 and frames 12-16 from a scene all in one go.


How can we do this in LW or do I have to add it to the feature requests ?:)

Lewis
09-08-2003, 10:45 AM
AFAIK ther eis no native way to do tha tin lyout :(.

You can set render 1,3,5,7... or similar if you set render step by 2 but you can't say render form 1-6 and then 10, 12, 13 ..

But i saw one plugin wich can mix cameras while rendering or to say he can do that you can switch cameras while you render. I'am not home now so i can't see name of plugin but it's free and it somewher eon flay :).

In that way you could copy few same cameras and set plugin to switch form camera to camera and you willget only desired angles of your model/render.

Titus
09-08-2003, 11:25 AM
It's really trivial (from a programmer's point of view) to do this with a little Lscript.

problemchild
09-08-2003, 02:05 PM
I use the screamernet controller on one machine to these kind of test renders and/or jobs.

cheers

Beamtracer
09-08-2003, 03:08 PM
I'd like to see Lightwave gain an After-Effects-style render queue, but I guess that would be a feature request, wouldn't it!

Matt
09-09-2003, 02:29 AM
I've always wanted this feature too.

I imagine it being like printing in Quark XPress where you can specify certain pages and / or ranges of pages, or in LightWave terms frames . . .

i.e. 1,2,6,7,9-30,32,33,35,40-45 etc.

fxnut
09-09-2003, 06:11 AM
Titus, I'm not so sure it's as trivial as you think. I just tried controlling the renderer using a generic script:

for (i=0;i<5;i++)
{
PreviewFirstFrame(i);
PreviewLastFrame(i);
FirstFrame(i);
LastFrame(i);
FrameStep(1);
RenderScene();
}

and it ignores all calls to RenderScene apart from the last one. Otherwise you're right, it would be trivial! If someone knows a way to get around this, I'll be able to post an LScript that'll do exactly what you guys have been talking about.

Regards

Andy

fxnut
09-09-2003, 06:31 AM
Hmm, actually I think I've figured it out. I need to use a Master Class Lscript. I'll hopefully be posting something up here soon.

Regards

Andy

fxnut
09-09-2003, 07:16 AM
Here ya go. Just save the text below as something like "RenderFrameList.ls". To use it, go to the Master Plugins dialog, select Lscript and load the file you just saved. Double click on it to access the panel where you can type in something like:

0,1,2,20-40,50

press OK and it'll go off and render the frames you selected.

Regards

Andy



@version 2.3
@warnings
@script master
@name RenderFrameList


frameList;
curFrame=0;
numFrames=0;
controlledRender=false;
orig_renderstart=0;
orig_renderend=0;
orig_renderstep=0;
orig_previewstart=0;
orig_previewend=0;
orig_sceneframe=0;

create
{
setdesc("Render Frame List");
}

flags
{
return(SCENE);
}


options
{
inputStr = recall("input","");

validString=false;
while(!validString)
{
reqbegin("Render Frames");
reqsize(230,120);

c0 = ctltext("","Example: 0,1,2,10-20,50");
ctlposition(c0,12,7,115,13);

c1 = ctlstring("Frames",inputStr);
ctlposition(c1,35,35);

return if !reqpost();

inputStr = getvalue(c1);

reqend();

if(scanString(inputStr)==false)
{
info("Invalid character. Only numbers, commas, and hyphens allowed");
}
else if(compileList(inputStr)==false)
{
info("Invalid sequence");
}
else
{
store("input",inputStr);
validString=true;
}
}
if(numFrames>0)
{
scene = Scene();
//Save original parameters
orig_renderstart=scene.renderstart;
orig_renderend=scene.renderend;
orig_renderstep=scene.renderstep;

orig_previewstart=scene.framestart;
orig_previewend=scene.frameend;
orig_sceneframe=scene.currenttime*scene.fps;

curFrame=1;
controlledRender=true;

AutoConfirm(1);
framenum = integer(frameList[curFrame]);
PreviewFirstFrame(framenum);
PreviewLastFrame(framenum);
FirstFrame(framenum);
LastFrame(framenum);
FrameStep(1);
RenderScene();
}
}

compileList: inputStr
{
tokens = parse(",",inputStr);

numTokens = sizeof(tokens);

numFrames=1;
for(i = 1; i < numTokens+1; i++)
{
subTokens = parse("-",tokens[i]);
if(sizeof(subTokens)==1)
{
item = subTokens[1];
frameList[numFrames]=item.asInt();
numFrames++;
}
else if(sizeof(subTokens)==2)
{
itema = subTokens[1];
itemb = subTokens[2];

a=itema.asInt();
b=itemb.asInt();
if(a>b)
{
return false;
}
for(j = a; j<b+1; j++)
{
frameList[numFrames]=j;
numFrames++;
}
}
else
{
return false;
}
}
numFrames--;
return true;
}


scanString: str
{
len = size(str);
for(i=1;i<len+1;i++)
{
charVal = ascii(strsub(str,i,1));
if((charVal<48 || charVal>57) && charVal!=44 && charVal!=45) return false;
}
return true;
}

process: event, command
{
if(event == RENDER_DONE)
{
if(controlledRender)
{
curFrame++;
if(curFrame<numFrames+1)
{
framenum = integer(frameList[curFrame]);
PreviewFirstFrame(framenum);
PreviewLastFrame(framenum);
FirstFrame(framenum);
LastFrame(framenum);
FrameStep(1);
RenderScene();
}
else
{
controlledRender=false;

//Restore original values
PreviewFirstFrame(orig_previewstart);
PreviewLastFrame(orig_previewend);
FirstFrame(orig_renderstart);
LastFrame(orig_renderend);
FrameStep(orig_renderstep);
GoToFrame(orig_sceneframe);
AutoConfirm(0);
}
}
}
}

omeone
09-09-2003, 08:22 AM
wow, thanks fxnut, I'll put it to the testo asap!

robinson
09-09-2003, 10:37 AM
WOW fxnut, I was waiting for something like that for years !!!

THANXS:D

Lewis
09-09-2003, 08:15 PM
Works GREAT, thanks fxnut it's really great :)

I wonder why Newtek didn't made something similar loong time ago :)?

This would be great addition in Render tab or just find way to incorporate that in curent render setup window (c'mon newtek) ;)

Thnaks one more time

Exper
09-10-2003, 01:50 AM
WOW...
Great and Holy fxnut! :D :D

Bye.

Matt
09-10-2003, 02:09 AM
not tried it yet, but this is excellent if it does! cheers FX! :)

fxnut
09-10-2003, 03:24 AM
No problem guys. If you find any bugs etc. then let me know as I'm planning to extend this script to work in conjunction with my CameraDirector (http://www.andynicholas.com/thezone/index.php?area=downloads) plugin. I'm also looking to include the ability to change all sorts of parameters based on the current rendering camera (including rendered image size). Any other feature requests are welcome.

Beamtracer, you said you'd like to see an AfterEffects style render queue. How do you see this working? Do you mean that it would allow you to automatically load different scenes and render off specified frames?

BTW, in case you guys are wondering why I'm doing all this for nothing (aside from the fun I get from doing it anyway), it's partly because I'm starting a new job shortly and I reckon I'm gonna need to use LScript quite a bit. Hence the more I can get into it now before I start the better. Thanks for the training! :D

Andy

Exper
09-10-2003, 03:46 AM
Great tool!

Start a Thread into "LW - Third Party"! ;)

Bye.