Creating custom ANM files

From EDukeWiki
Revision as of 04:09, 21 February 2020 by Fox (talk | contribs) (Move lists to the cutscene / animsounds pages)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Duke Nukem 3D uses the DeluxePaint Animation format for displaying its cutscenes and logos. These are a sequence of ZSoft PCX images within the ANM file.

You can create your own ANM files, as well as extract the PCX files from an existing ANM file by using the ANIM2PCX tool. FFmpeg (and its descendents ffplay and mplayer) also support ANMs as input.

Although ANM files are limited to an 8-bit palette, each ANM holds its own palette, independent of any stored in the game. This palette remains constant for every frame of an ANM. Please note that the first color index in the palette used is used as background color during blitting and filling of the screen. All resulting pillarboxing will use this color as the background color. While the animation changes, it's also possible that you will see the screen filled with this color for a single game tic. Therefore, it is highly recommended to ensure the first palette index is RGB #000000, black.

By default, the game looks for a file with the extension .ANM for each animation file.

VP8 replacement

You can also use the VP8 video codec inside an IVF container for custom animations. Simply give your IVF file the same name as an ANM and place it in one of EDuke32's search paths. For example: LOGO.IVF.

Note that VP8 videos will only display when using 32-bit OpenGL video mode--not the 8-bit classic software renderer. Also note that the hardcoded sounds (listed below) of any ANM replaced by an IVF will not play. Instead, use the animsounds def command to specify new ones. Further note that the IVF container does not hold audio--all audio for a VP8 video must be added via animsounds.

To create VP8 video, see the Utilities page.