File formats: Difference between revisions
Out of compressed texture formats we support, only DXT3 supports transparency well enough |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 8: | Line 8: | ||
* somewhat default | * somewhat default | ||
* small uncompressed size since it is binary | * small uncompressed size since it is binary | ||
* loading code can be slow | * loading code can be slow | ||
Line 15: | Line 15: | ||
* somewhat default | * somewhat default | ||
* larger uncompressed size since it is text | * larger uncompressed size since it is text | ||
* loading code can be slow | * loading code can be slow | ||
=== OBJ === | === OBJ === | ||
* | * obj support has been added to TDM fairly recently, there aren't many missions yet that use it. | ||
* uncompressed size is large because it is text | * uncompressed size is large because it is text | ||
* loading is very fast | * loading is very fast | ||
== Ragdolls == | == Ragdolls == | ||
Line 59: | Line 58: | ||
* The mainstream format is mp4 + h264 + aac for FMV. | * The mainstream format is mp4 + h264 + aac for FMV. | ||
* There is also still legacy support for ROQ which is an old format used in Doom 3. | * There is also still legacy support for ROQ which is an old format used in Doom 3. | ||
All the other formats are disabled in the FFmpeg build that we use. | |||
=== In-game videos === | === In-game videos === | ||
One specific case is animated textures (e.g. water), and they are usually implemented as a pack of copy/pasted if-s in a material file, which point to different frame images. Something like "Motion JPEG/TGA/PNG/DDS" | One specific case is animated textures (e.g. water), and they are usually implemented as a pack of copy/pasted if-s in a material file, which point to different frame images. Something like "Motion JPEG/TGA/PNG/DDS". It's also possible to display a video on a texture. | ||
Line 72: | Line 71: | ||
=== TGA === | === TGA === | ||
The simplest uncompressed format, basically default in case compression is not used. | The simplest uncompressed format, basically default in case compression is not used. | ||
Used often for normalmap textures | |||
* Supports transparency. | * Supports transparency. | ||
Line 84: | Line 84: | ||
Lossy format, pretty small and rather fast to load. | Lossy format, pretty small and rather fast to load. | ||
* '''Does not''' supports transparency. | * '''Does not''' supports transparency. | ||
Usually used for screenshots and maybe GUI images, otherwise not popular. Usually used for DarkRadiant editor image. | |||
=== DDS === | === DDS === | ||
This is container which can in principle store both compressed and uncompressed data, but | This is container which can in principle store both compressed and uncompressed data, but is used only for precompressed textures. TDM supports DXT1 (BC1), DXT3 (BC2), DXT5 (BC3) (and 3Dc (BC5) for normalmaps, since 2.10), RGTC compressed formats (each of these formats has a bunch of pseudonymes). | ||
DXT3 | DXT3 and DXT5 support transparency (but in different ways). | ||
If you use compressed DDS, then you can be sure it will be displayed as is, as no further processing it applied to it. Sometimes it is good, sometimes it is bad. | If you use compressed DDS, then you can be sure it will be displayed as is, as no further processing it applied to it. Sometimes it is good, sometimes it is bad. | ||
The engine has fast compressor/decompressed for all texture compression formats, so if you supply TGAs and they are compressed on load, you only lose in mission size. | The engine has a fast compressor/decompressed for all texture compression formats, so if you supply TGAs and they are compressed on load, you only lose in mission size. | ||
[http://wiki.polycount.com/wiki/DXT Info on DXT compression formats]<br> | |||
[http://wiki.polycount.com/wiki/3Dc Info on 3Dc compression format] (for normalmaps) | |||
== Sound files == | == Sound files == |
Latest revision as of 23:25, 19 January 2025
A list of file formats usable in TDM:
Models
LWO
- somewhat default
- small uncompressed size since it is binary
- loading code can be slow
ASE
- somewhat default
- larger uncompressed size since it is text
- loading code can be slow
OBJ
- obj support has been added to TDM fairly recently, there aren't many missions yet that use it.
- uncompressed size is large because it is text
- loading is very fast
Ragdolls
The only format is .af text format, which is handmade for Doom 3. No changes here since Doom 3.
It is notoriously hard to create/edit. The only tool is the Windows-only builtin command editAFs, and this is the only in-game editor which has no outside alternatives. We wanted to port it to either DarkRadiant or at least better GUI framework, but it did not happen (yet).
Animation
MD5
- md5mesh --- Doom 3 custom text format which represents a mesh attached to skeleton (joints, weights, etc.)
- md5anim --- custom text format that represents an animation of a skeleton.
MD3
This is Doom 3 custom text format which represents linear vertex morphing.
It is rarely used, but it is a perfect fit in case animation is clearly not "skeletal" (e.g. animated grass or water).
Others
- Some hardcoded pieces of code which transform a mesh into something else, that are enabled via "deform" keyword in a material. The most known example is particles. All of this is very specific and uses custom formats.
- Maya ascii format (.ma, mb), currently no further known info on it.
- OpenFlight model (.flt), currently no further known info on it.
Video
- The mainstream format is mp4 + h264 + aac for FMV.
- There is also still legacy support for ROQ which is an old format used in Doom 3.
All the other formats are disabled in the FFmpeg build that we use.
In-game videos
One specific case is animated textures (e.g. water), and they are usually implemented as a pack of copy/pasted if-s in a material file, which point to different frame images. Something like "Motion JPEG/TGA/PNG/DDS". It's also possible to display a video on a texture.
Textures and images
(Images inside guis (briefing, readables) use the same material loading system, so they should support all the same image formats.)
TGA
The simplest uncompressed format, basically default in case compression is not used. Used often for normalmap textures
- Supports transparency.
PNG
- Lossless compression, but pretty slow to load.
- Supports transparency.
- Should therefore be OK for some GUI images for example, but not used on a large scale.
JPG
Lossy format, pretty small and rather fast to load.
- Does not supports transparency.
Usually used for screenshots and maybe GUI images, otherwise not popular. Usually used for DarkRadiant editor image.
DDS
This is container which can in principle store both compressed and uncompressed data, but is used only for precompressed textures. TDM supports DXT1 (BC1), DXT3 (BC2), DXT5 (BC3) (and 3Dc (BC5) for normalmaps, since 2.10), RGTC compressed formats (each of these formats has a bunch of pseudonymes). DXT3 and DXT5 support transparency (but in different ways).
If you use compressed DDS, then you can be sure it will be displayed as is, as no further processing it applied to it. Sometimes it is good, sometimes it is bad. The engine has a fast compressor/decompressed for all texture compression formats, so if you supply TGAs and they are compressed on load, you only lose in mission size.
Info on DXT compression formats
Info on 3Dc compression format (for normalmaps)
Sound files
OGG
- Relatively widespread open format with lossy compression.
- Default used format
- OGG files are loaded on level start, but decompressed on the fly.
WAV
- Simple uncompressed sound file.
- Larger than OGG. Potentially higher quality.
- The "shakes" feature of materials specifically asks for WAV.