IMAGES

From 3DGE Wiki
Jump to: navigation, search

Images

Stored in image.ddf or in the DDFIMAGE data lump

Image.ddf allows you to define images to be used in the game, and is mainly useful for using PNG, TGA, and JPG images inside EDGE. Once defined here, you can then use this image in all other DDF definitions.

Each entry describes an "image" and consists of an image type and a name separated by a colon (:), enclosed in square brackets, followed by a series of commands that specify additional properties.

When using filenames, directories must be separated by / instead of the \ character which is normally used under Windows. The reason is because the \ character has a special meaning in DDF: it is the escape character, and "\n" is used to put newlines into DDF strings.

Format

IMAGE_DATA entries have the following format:


[ENTRY_TYPE:ENTRY_NAME]
IMAGE_DATA=[IMAGE TYPE]:[FORMAT]:[IMAGE NAME];

Where each command is as follows:

COMMAND DESCRIPTION
[ENTRY_TYPE] This can be either GFX, SPR, TEX or FLAT depending on whether the image is a graphic, a sprite, a texture or a flat.
[ENTRY_NAME] The name can be something entirely new e.g. MYJPG01 or it can replace an existing entry e.g. TITLEPIC.
[IMAGE_TYPE] This can be either COLOUR, BUILTIN, FILE, or LUMP. The most useful two are FILE for external images and LUMP for internal wad lump images.
[FORMAT] Only used if the image type is LUMP and must be JPEG or JPG or PNG depending on the image to be used.
[IMAGE_NAME] In the case of:
- LUMP and FILE it's the name of the actual file in the wadfile or on the hard drive.
- COLOUR it's a hexadecimal value to define an RGB colour.
- BUILTIN it's a type of lighting.

Here are some examples of IMAGE_DATA entries:

Solid colours

IMAGE_DATA = COLOUR:#FF7F00;

Built-in (only used to create special images for dynamic lighting and shadows)

IMAGE_DATA = BUILTIN:QUADRATIC;

Internal/External Images

IMAGE_DATA = FILE:"retex/startan3.png"; //External image file

IMAGE_DATA = LUMP:[JPEG or JPG or PNG or TGA]:"JFLOOR48"; //Internal wad lump


ADDITIONAL COMMANDS

The following is a list of additional commands that are accepted by each image entry:

COMMAND TYPE EXPLANATION
X_OFFSET [integer] The X offset for sprites.
Y_OFFSET [integer] The Y offset for sprites.
SCALE [float] Bigger scale makes the image bigger (cover more space)
ASPECT [float] Bigger aspect makes the image wider (height is unchanged)
SPECIAL

[#special [special]]

A comma separated list of special flags. See below.

SPECIALS

These allow some control over the ways the image is used.

SPECIAL EXPLANATION
CROSSHAIR For weapon crosshair sprites: center it on screen
FORCE_NOMIP Force mipmapping to be disabled. For internal use only.
FORCE_SMOOTH Force smoothing to be enabled. For internal use only.
FORCE_CLAMP Force clamping (image cannot repeat). For internal use only.

EXAMPLES

The following is an example of a complete image entry:

//A fairly normal PNG image
[gfx:EDGETTL]
IMAGE_DATA = LUMP:PNG:"PNG001";

TODO: add normal and spec image tutorials!

Doom Definition Files
DDFlogo.gif