Author Topic: ANI tips  (Read 1817 times)

0 Members and 1 Guest are viewing this topic.

Offline Liberator

  • Poe's Law In Action
  • 210
Anybody have any good tips for making ANIs using ANIbuilder?

I have a four frame replacement for the Missile targeting ani, and when I try to make it, ANIbuilder crashes.
« Last Edit: April 06, 2003, 07:12:35 pm by 607 »
So as through a glass, and darkly
The age long strife I see
Where I fought in many guises,
Many names, but always me.

There are only 10 types of people in the world , those that understand binary and those that don't.

 

Offline diamondgeezer

Gonna point out the obvious ones here I'm afraid - you're using 8-bit PCX images, yes?

Also, there's something about a palette, but I'm not sure about that bit - I'd be interested meself if someone were to enlighten us...

 

Offline Liberator

  • Poe's Law In Action
  • 210
Basically all I did was copy and animate the one in the demo.

Since ANIveiw only saves bitmaps I loaded them into PSP and rotated it 90 degrees, then I saved that and repeated that twice to get four images for animation.  

Then I load ANIbuilder and load the first frame, it's named 2_lock0000 , ANIbuilder picks up the other four and say I've got 4 frames of animation, which is correct.

I go into Advanced Settings and set the following:

Action when palette does not match to Automatically adapt to first frame.

Type of Animation to Ship/Weapon

I leave the Frames per second set to default.


Then I hit Start and it asks me to set the "Loop Point".  I tell it to loop when it gets back to loop at the 3rd frame and ANIbuilder crashes with the following:

ANIBLD32 caused an invalid page fault in
module ANIBLD32.EXE at 0167:00402753.
Registers:
EAX=00000400 CS=0167 EIP=00402753 EFLGS=00010297
EBX=00000000 SS=016f ESP=006ae64c EBP=00000005
ECX=01282000 DS=016f ESI=0000024b FS=4027
EDX=01281fdc ES=016f EDI=00000024 GS=0000
Bytes at CS:EIP:
88 19 41 89 4c 24 28 0f bf 4c 24 6e 4d 47 3b f9
Stack dump:
0072fbd4 006aeb08 006af424 00000001 00000009 00430094 00000034 00000001 01274250 00000036 01282000 0801050a 00000000 00340035 00480048 0f000000
So as through a glass, and darkly
The age long strife I see
Where I fought in many guises,
Many names, but always me.

There are only 10 types of people in the world , those that understand binary and those that don't.

 

Offline Sesquipedalian

  • Atankharz'ythi
  • 211
At no point in that narrative did you mention converting the images to PCX format.  That would be your problem.  I should also point out that ANIView does in fact save to other formats besides .bmp, including .pcx, so use that.
Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

The Scroll of Atankharzim | FS2 syntax highlighting

 

Offline Petrarch of the VBB

  • Koala-monkey
  • 211
All frames must be of the same size, and use the same pallette.

 

Offline Liberator

  • Poe's Law In Action
  • 210
They are all the same size, format, and color depth(256).

It's a moot point, it's fixed now.  I DLed Max Sterling's ANI name file generator and that seemed to fix it.
So as through a glass, and darkly
The age long strife I see
Where I fought in many guises,
Many names, but always me.

There are only 10 types of people in the world , those that understand binary and those that don't.

 

Offline Petrarch of the VBB

  • Koala-monkey
  • 211
Quote
Originally posted by Liberator
They are all the same size, format, and color depth(256).


Ahh, but they have to be the same 256 colours.

But, as you say, it is now fixed.

  
Quote
diamondgeezer: "Also, there's something about a palette, but I'm not sure about that bit - I'd be interested myself if someone were to enlighten us..."


Making good-looking ANI files was triggering myself too. I have searched over and over to bypass the palette problem... and I think I have finally found a working solution.

So, this is my (improvised) tutorial on how to build a FS2 ANI from an AVI file:

1/. Prior to anything else, you will need these tools:
        * VirtualDub
        * Pseudocolor plugin for VirtualDub
        * A palette file for use along with this plugin; this file will describe the color palette used by FS2 by any of its ANI files; to make it, simply open Notepad (or EditPad Lite  ...), begin a new file and copy what follows in the blank window:

0 0 0
15 15 15
35 35 35
55 55 55
71 71 71
91 91 91
107 107 107
127 127 127
143 143 143
163 163 163
179 179 179
199 199 199
219 219 219
235 235 235
255 255 255
255 255 255

Each line (or index) corresponds to a Red Green Blue triplet; each of these triplets forms a color (0 0 0 = black; 255 255 255 = white ...); if you would unpack an original FS2 ANI and open one of the resulting PCX files in Paint Shop Pro, you would see that the color palette it uses "looks like" the above one. After pasting the text, save the document to "freespace2.map" in \plugins\palettes.

        * ImageConverter Basic (about 3600Kb).  This program will convert 24-bit BMP files to 8-bit PCX ones in a single operation :) This is a demo version, but it is enough for our purposes; by the way, I don't see where is its limitation ...
   * AC: I prefer using Volition's command-line tool instead of ANIBUILDER32 because it is just simpler and you cannot define with the latter a looping point above the 100th frame. Therefore, if you would wish to build an ANI from out of more than 100 PCX files, there would be a problem when defining this point...

2/. Launch VirtualDub, open your movie; since a FS2 ANI file has a specific size (160x120), you will need to resize your movie; as same as the movie color palette correction, this will be achieved by using filters.

---- Movie resizing ---- Go to Video/Filters; click on Add and select the "Resize" filter (or the "Smart Resize" one if you have it). In the dialog that opens, select 160 as the new width and 120 as the new height. As for the filter mode, I personally enjoy the "precise bilinear" mode. Click on OK to validate your settings.

---- Color palette correction ---- Go to Video/Filters; click on Add and select the "pseudocolor" filter. In the dialog that opens, select "freespace2.map" as the palette file. Click on OK.

You can already preview the result by pressing F5.

---- Dumping movies frames to *BMP* files ---- Go to File/Save image sequence. In the dialog that opens, be sure to select 4 as the mimimum number of digits in the filename (AC needs this). Click on OK when you are done with this dialog.

3/. Converting 24-bit BMP files to 8-bit PCX ones. Go in the directory where you have saved the frames. Select them all; right click and select ImageConverter Basic/Convert to PCX. A small dialog opens asking you for settings regarding the convertion to perform. Click on the "Go" button when you have all set correctly.

4/. Last stage: building the ANI out of these PCX. If you use AC, and that the first PCX file is named "test0000.pcx" for instance, then simply run AC like this: ac test0000.pcx

At this point, AC should have created an ANI file in the directory from where you have run it, "test.ani" here.


That's all! I hope I have been clear enough in my explanations and that this method will suit your needs ;)