PDA

View Full Version : Additional SDK & LScript support for image sequences



fxnut
09-16-2003, 06:03 AM
Hmm, the title kinda says it all!

It'd be great if it were possible to somehow access the different frames of a loaded image sequence or movie. It'd open up all sorts of cool shortcuts to use textures instead of rendering hi poly objects.

See this thread for an example
http://vbulletin.newtek.com/showthread.php?s=&threadid=11040

Ideally something like this would be very cool (in Lscript syntax):


image = image("MyImageSequence);
if(image.isSequence)
{
numFrames = image.getNumFrames();
for(i=1;i<numFrames+1;i++)
{
frame = image.getFrame(i);
framename = image.getFrameFilename(i);
color = frame.getPixel(0,0);
.
.
.

}
}

I guess there may be problems with such random access to images in a sequence, as it's very unlikely they'd all be loaded into RAM. But I think the developer should be allowed to make up their own mind on performance hits based on such access. Empowering users to make these sorts of decisions allows us to trade off what might be a performance hit to some people, against having long render times or laborious donkey work.

Regards

Andy

Jarno
09-16-2003, 06:47 PM
Supposedly this can be done with the evaluate() function in the imagelist global (in C, I don't know what the equivalent is in lscript). It takes an image ID and a time and returns a pixmap ID. However, it is bugged and only ever returns the pixmap of an image sequence at the current time instead of the given time.

---JvdL---

fxnut
09-17-2003, 03:11 AM
Thanks Jarno, I hadn't spotted that. Shame it doesn't work then eh?! :)