Creating custom ANM files: Difference between revisions

From EDukeWiki
Jump to navigation Jump to search
Daedolon (talk | contribs)
Fox (talk | contribs)
Move lists to the cutscene / animsounds pages
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Duke Nukem 3D uses the [http://wiki.multimedia.cx/index.php?title=DeluxePaint_Animation DeluxePaint Animation format] for displaying its cutscenes and logos. These are a sequence of [http://en.wikipedia.org/wiki/PCX ZSoft PCX images] within the ANM file.
Duke Nukem 3D uses the [http://wiki.multimedia.cx/index.php?title=DeluxePaint_Animation DeluxePaint Animation format] for displaying its cutscenes and logos. These are a sequence of [http://en.wikipedia.org/wiki/PCX 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 [http://archive.dukertcm.com/knowledge-base/downloads-rtcm/duke3d-tools-editart/anim2pcx.zip ANIM2PCX tool]. FFmpeg (and its descendents ffplay and mplayer) also support ANMs as input.
You can create your own ANM files, as well as extract the PCX files from an existing ANM file by using the [http://dukeworld.duke4.net/rtcm/duke3d-tools-editart/anim2pcx.zip 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 [http://en.wikipedia.org/wiki/Bit_blit 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.
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 [http://en.wikipedia.org/wiki/Bit_blit 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.
==List of animations==
These are all the animations that exist by default in Duke Nukem 3D (1.5) and their framerates. All animations are played in sequence with the exception of <code>RADLOGO</code> and <code>DUKETEAM</code>, which only have a single frame and are displayed until the user gives any input. You can edit the framerates in the source file [{{EDuke32 source|source/anim.c}} anim.c].
{| class="wikitable"
|-
! #
! Name
! Framerate
! Description
|-
| 1
| cineov2
| 120/10 = 12 fps
| Episode 2 ending
|-
| 2
| cineov3
| 120/10 = 12 fps
| Episode 3 ending
|-
| 3
| RADLOGO
| 120/10 = 12 fps
| Duke Nukem 3D logo at the end of Episode 3
|-
| 4
| DUKETEAM
| 120/10 = 12 fps
| Development team with big heads
|-
| 5
| logo
| 120/9 &#x2248; 13.<span style="text-decoration: overline">3</span> fps
| Intro with missile exploding behind the nuke sign
|-
| 6
| vol41a
| 120/14 &#x2248; 8.<span style="text-decoration: overline">571428</span> fps
| Episode 4 intro part 1
|-
| 7
| vol42a
| 120/18 &#x2248; 6.<span style="text-decoration: overline">6</span> fps
| Episode 4 intro part 2
|-
| 8
| vol4e1
| 120/10 = 12 fps
| Episode 4 ending part 1
|-
| 9
| vol43a
| 120/10 = 12 fps
| Episode 4 intro part 3
|-
| 10
| vol4e2
| 120/14 &#x2248; 8.<span style="text-decoration: overline">571428</span> fps
| Episode 4 ending part 2
|-
| 11
| vol4e3
| 120/10 = 12 fps
| Episode 4 ending part 3
|}


By default, the game looks for a file with the extension .ANM for each animation file.
By default, the game looks for a file with the extension .ANM for each animation file.
Line 80: Line 14:


To create VP8 video, see [[Utilities#Movies (.ivf)|the Utilities page]].
To create VP8 video, see [[Utilities#Movies (.ivf)|the Utilities page]].
==Full list of sounds played for each animation==
By replacing these sounds, you can customize your own animation files with new sound files. The frames they're played on are hard-coded, but listed here for ease of use. As with the framerates, these can be edited further in the source file [{{EDuke32 source|source/anim.c}} anim.c].
{| width="75%"
|- valign="top"
|
{| class="wikitable"
|+ cineov2
! Frame
! Sounds
|-
| 1
| WIND_AMBIENCE
|-
| 26
| ENDSEQVOL2SND1
|-
| 36
| ENDSEQVOL2SND2
|-
| 54
| THUD
|-
| 62
| ENDSEQVOL2SND3
|-
| 75
| ENDSEQVOL2SND4
|-
| 81
| ENDSEQVOL2SND5
|-
| 115
| ENDSEQVOL2SND6
|-
| 124
| ENDSEQVOL2SND7
|}
|
{| class="wikitable"
|+ cineov3
! Frame
! Sounds
|-
| 1
| WIND_REPEAT
|-
| 98
| DUKE_GRUNT
|-
| 102
| THUD<br>SQUISHED
|-
| 124
| ENDSEQVOL3SND3
|-
| 134
| ENDSEQVOL3SND2
|-
| 158
| PIPEBOMB_EXPLODE
|}
|
{| class="wikitable"
|+ logo
! Frame
! Sounds
|-
| 1
| FLY_BY
|-
| 19
| PIPEBOMB_EXPLODE
|}
|
{| class="wikitable"
|+ vol41a
! Frame
! Sounds
|-
| 1
| INTRO4_1
|-
| 12
| INTRO4_2
|-
| 7
| INTRO4_3
|-
| 26
| INTRO4_4
|}
|}
{| width="75%"
|- valign="top"
|
{| class="wikitable"
|+ vol42a
! Frame
! Sounds
|-
| 1
| INTRO4_B
|-
| 12
| SHORT_CIRCUIT
|-
| 34
| SHORT_CIRCUIT
|-
| 18
| INTRO4_5
|}
|
{| class="wikitable"
|+ vol4e1
! Frame
! Sounds
|-
| 3
| DUKE_UNDERWATER
|-
| 35
| VOL4ENDSND1
|}
|
{| class="wikitable"
|+ vol43a
! Frame
! Sounds
|-
| 10
| INTRO4_6
|}
|
{| class="wikitable"
|+ vol4e2
! Frame
! Sounds
|-
| 11
| DUKE_UNDERWATER
|-
| 20
| VOL4ENDSND1
|-
| 39
| VOL4ENDSND2
|-
| 50
| (all sounds stopped)
|}
|}
{| class="wikitable"
|+ vol4e3
! Frame
! Sounds
|-
| 1
| BOSS4_DEADSPEECH
|-
| 40
| VOL4ENDSND1<br>DUKE_UNDERWATER
|-
| 50
| BIGBANG
|}

Latest revision as of 04:09, 21 February 2020

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.