[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Speed up movie in object graphics.

in article MPG.1354d2ccee3cef80989ab2@news.frii.com, David Fanning at
davidf@dfanning.com wrote on 5/4/00 12:34 pm:

> Erik Hummel (erik.hummel@philips.com) writes:
>> On WNT and with IDL5.3 I'll have an application with movie functionality
>> of images (say 256x256 byte array). The application is based on Object
>> Graphics. The movie is very slow (lower than 10 images/s).
>> The CW_Animate application of IDL is much faster, but with structured
>> graphics.
>> My question is how to speed up the movie. To me seems an option using
>> the Read (or GetProperty, Image_Data) method of IDLgrWindow and redraw
>> these screen dumps. Has someone experience with this
>> and is this indeed the way?
> I don't have any experience animating object graphics
> images. Mostly, I think, because it would never occur
> to me to use object graphic images for this purpose.
> I can imagine it would be slow. And the READ or
> GET_PROPERTY, IMAGE_DATA is not going to help much,
> since reading from the window *still* results in
> an image object.
> I think what I would do is pull each 2D image out
> of its image object using the GET_PROPERTY, DATA
> method and load those images into XINTERANIMATE
> (or CW_ANIMATE, I guess). This won't cause a problem
> unless you are running on an 8-bit display, in which
> case your colors will go a little crazy in the rest of
> your application while the movie is running. But it will
> work perfectly on a 24-bit display, which--if you are
> writing object graphics applications in the first place--
> I'm sure you have. :-)
> Cheers,
> David
I have implemented an object movie method that is pretty fast. With images
256x256 it would run faster than I can see! It plays IDLgrImages which you
send to it as a series of objects. An advantage of it over XINTERANIMATE is
that you don't need to know how many frames you want beforehand, you can
view the movie as it grows and add more frames as you go along. The plan was
to also have the ability to send it models which could then be manipulated
while the movie was playing. I did not get far with this because it was too
slow to render each frame each time around and my models were to big. But
the idea was to re-render just when you make a change and otherwise replay
the stored images in the same way as above. Probably not too much work to
get that part working.....
I can post the code if it is of interest. (Just need to add some comments
which seem to have fallen out of my code :-))