The FreeSpace 2 Open engine is able to use several different mediamedia file formats for audio, animation and video playbacks. Retail FreeSpace 2 used the .WAV and .ANI file formats, but the currently the FreeSpace 2 Open supports several .OGG container files as well. Support for .MP3 file format was removed in favor of the .OGG. Game engine also supports special .EFF animations.
.OGG, or Ogg (see Ogg file format), is a file format for compressed multimedia files and a popular competitor to .MP3. Unlike MP3, Ogg uses an open-source, open-standard format and a permissive license, both of which allow it to be incorporated into the FS2_Open source code. Also unlike MP3, Ogg is a container format, meaning that it can contain video data (via the Theora codec ) in addition to audio data (via the Vorbis codec).
Since Ogg delivers significantly smaller file sizes than .WAV, while retaining substantially the same level of audio quality, it is becoming more and more frequently used in FSO-targeted mods. Ogg is not, however, a lossless format -- i.e., it is not possible to exactly reconstruct the original data from an .OGG file because some is "lost" in the conversion process. This is not usually a problem, however, because a high-quality .OGG file is usually indistinguishable from the source. The lossless counterpart to Ogg Vorbis is .FLAC, which can be contained in Ogg also.
Vorbis uses a quality parameter between -1 and 10 as a measure of quality. 5 is the default, giving around 160kbps. The higher the number, the higher the quality, but anything over 5 is probably pointless.
Audacity and Goldwave are two popular programs that allow .WAV files to be converted to .OGG Vorbis audio. Audacity is Free Software, while Goldwave is shareware that ceases to function after a period of time. oggdropXPd is an useful drag-and-drop encoder.
Please note that this is a fso feature and is not supported by the original retail FreeSpace 2.
The most common sound file format. WAVs are uncompressed and take up a larger amount of space than almost any other sound file type, so consider converting them to the .OGG format (supported only by SCP) before including them in your campaign. Audacity and Goldwave are two examples of programs that can make this conversion. oggdropXPd is an useful drag-and-drop encoder.
FreeSpace uses the .ANI format for animation effects. It can be used either for an effect (explosions, etc.), an interface animation, or as a ship texture.
- AniView, an ANI-viewing utility
- AniBuilder, a utility that can create ANI files out of a series of 16 bit images
Creating an ANI file
Using AniBuilder (link provided above), one can create new .ANI files from .AVI movies.
To create your own .ANI:
- Set up a scene in a 3D animation program or in FreeSpace. Volition used 3ds Max (an expensive modeling program) for their animations.
- Using a free recording software such as for example GameCam to record the scene.
- Use for example Bink to convert the AVI into a series of 16-bit (or less) PCX files, as AniBuilder will not accept non-PCX images, or images of more than 16 bit color depth.
- Use AniBuilder to convert the PCX files to an ANI.
FreeSpace 2 uses the .EFF ASCII format text files to store information about animated effects. These animated effects can be used for various effects such as in game animations and animated textures. Please note that this is a fso feature and is not supported by the original retail FreeSpace 2.
Creation of EFF animation
- For EFF animation all the individual frames of the animation have to be present in one of the graphic file formats supported by the game engine.
- All files related to the .EFF animation have to named so that the name of actual .EFF animation forms the basic structure of the filename.
- Graphic files add the 4 digit number - that identifies the frame where the file is used - after the animation name, starting from 0 (example_0000.dds, example_0001.dds etc.)
- ASCII file contains the information of the animation (example.eff)
Contents of .EFF file
- Defines the file format of the graphics file used for the .EFF animation
- Syntax: String, for example DDS
- Defines the length of the number of the frames in the animation
- Syntax; Integer
- Used optionally to define the frames per second value for the animation
- Syntax: Integer
Let's say you have three .dds (tga and pcx are also acceptable) files (named 1_000, 1_0001, and 1_0002) you want to make into an animation, but you don't want to use anibuild and therefore comprimise quality.
Your .eff file would be like this:
Filename (the filename, not information to be entered. This must match up with characters before _xxxx in frames): 1.eff
$Type: DDS $Frames: 3 $FPS: 5
This .eff effect file would display one frame after another at 5 frames a second, skipping back to the beginning at the end. Please note that .eff cannot be used for streaming files (head animations, icons, mainhall, cbanis, ect.) and is meant ONLY for weapon/explosion effects and animated textures.