CompuServe Thread

PingPong anim problem

5 messages in this thread
#35905From: Leslie T. BartiromoFeb 21, 1992 10:07 PM
Keith, I'm having a problem with Director 2 playing an anim file. I used Black Belt System's Image Processor to create 20 pictures in IFF24 format (80 X 50 resolution.) I am trying to "morph" picture #1 into #20. I rendered each 24 bit image to its own HAM picture having its own palette. I assembled the pictures, 1 through 20, into an anim with the PD makeanim. I tried to ping pong the anim in DPaint4 but, unless I did something wrong, it doesn't support anims that that change palettes and I get a mess. I used the pingpong Director 2 script (modifying only the path, file names, and deleting the sound info) it works fine when going from frame 1 to 20 but reversing the anim screws up the palette. Am I doing something wrong? Thanks.
#36054From: Right Ans. Inc., DoyleFeb 26, 1992 12:07 AM
The problem pingponging ANIM files that have palette changes, is you have to insure that EACH frame has the proper palette change. As you move forward through an ANIM file, you may encounter a palette change say, from Palette 1 to Palette 2 at frame #5. If you do not also have a Palette 1 change attached to frame #4, when the ANIM reverses, it will not display with the correct palettes. Programs that are "smart" in that they only include palette changes on frames that need them may only be considering the palette changes required when playing the ANIM forward. When playing such an ANIM in reverse, the required palette changes occur on different frames. Our solution, is to use the makeanim library routines with The Director or the latest version of "makeanim" and make sure that you tell it to save a palette with EVERY frame. This insures that every frame will have the palette change necessary to display it regardless of the direction of playback. This should cure the problem you are having. Keith
#36093From: Leslie T. BartiromoFeb 26, 1992 8:16 PM
I assembled my anim with your PD program makeanim but what pretty much fixed the problem was when I ran the resulting anim through Director 2's convertanim script. Now the anim works fine from frame 1 to 20 and then 20 to frame 2 when it reaches the first frame the palette screws up. When it cycles again the anim is okay until it reaches frame one again. The anim looks pretty good otherwise but I can't seem to play it on any of my anim players except The Director. The only thing I can think that I might have done wrong is when I assembled the anim with makeanim I didn't duplicate the first two frames at the end of the file. Is this needed for a pingpong anim? Any idea when Director 2 Toolkit will be out?
#36121From: Right Ans. Inc., DoyleFeb 27, 1992 1:33 AM
Whether or not the two overlap frames are included in an ANIM used for ping-pong, shouldn't affect the palette, but you probably don't want the last two frames included. Either that, or you will want to name the ANIM ending in .anim1 which tells The Director to act as if the last two frames do not exist. Again, what is most important for ping-ponging ANIMs that have varying colormaps is to make absolutely sure that every ANIM frame has a palette chunk saved with it, which can be accomplished{~{ by using the MakeANIM library, and using the DO makeanim.all,1 to enable colormaps for each frame when saving the ANIM. You could modify convertanim to do this before the label "top" which is the main playback-save loop. Keith
#36143From: Leslie T. BartiromoFeb 27, 1992 7:20 PM
I have made the change in the convertanim script and will experiment with the program sometime tonight or tomorrow. Thanks for the tip.