Material { ID = "" Width = 0.0 Height = 0.0 Flags = flag1 | flag2 Layer { Stage { Texture = "" Offset { 0 0 } Tics = 0 Rnd = 0 Glow = 0.0 Glow Rnd = 0.0 } } Light { Pattern offset { 0 0 } Pattern skip { 0 0 } Stage { Offset { 0 0 } Distance = 0.0 Tics = 0 Rnd = 0.0 Color { 0 0 0 } Levels { 0 0 } Radius = 0.0 Bottom map = "" Side map = "" Top map = "" Halo radius = 0.0 Flare map = "" Flare texture = 0 # deprecated } } }
uri by which the material will be known. The ID is used when applying the material directly to a world surface (for example, in a map_editor), or, when referencing it in other definitions. The IDs are considered unique within the defined namespace (i.e., only the latest Material with a given ID will be used).
Currently there are 4 recognized material namespace identifiers:
The material documentation details their use and the mechanics of the abstraction with regard to mod compatibility.
The dimensions of the material, in world units.
The material dimensions need not equal those of the texture(s) used by it's layers. Allowing the material to be scaled independently.
Name | Description |
---|---|
dontdraw | Surfaces with this material will never be drawn. |
skymask | Surfaces with this material will cut a “window” through which the sky is visible. The layers of the material itself will never be drawn. |
Currently only 1 layer is supported in a material. (Support for more layers will be added later).
Texture = "Flats:FLOOR4_8";
Up to 16 light decorations can be attached to the material. Using light decorations one can embellish a material with a wide variety of (possibly animated) lighting effects. The order in which lights are defined does not matter.
For each world surface using the material, Doomsday will automatically project lights into the world relative to the surface normal and according to the repeat pattern you define.
Used with pattern skip to offset the origin of the pattern. For example:
Pattern offset { 1 0 } # shift the origin of the pattern one full horizontal repeat
Normally the light is repeated on a surface as many times as the texture or flat repeats. The pattern skip values allow sparser repeats for horizontal and vertical patterns, respectively. For example:
Pattern skip { 1 2 } #> light appears on every second horizontal repeat and every third vertical repeat. <#
Stages are used for animating the properties of a light over time. Each light can have many stages and will cycle through each in the defined order.
Using stages it is possible to animate a wide variety of interesting lighting effects.
Levels { 100 200 } #> Not visible below light level 100 and fades to full brightness when nearing light level 200. Fully-bright over 200. <#
Note: When both the minimum and maximum values are equal (irrespective of value) the levels will be ignored because the intended behavior is ambiguous.
-
to disable the map entirely. (No light will then be cast in that direction).Flare map = "myflaremap.png" # loaded from the data/<game>/flaremaps folder
Alternatively, Doomsday provides a small built-in selection of flare maps, which are specified by their unique ID:
ID | Description |
---|---|
0 | Smart algorithm which selects a built-in flare map dynamically, according to the attributes of the light and relative position of the viewer. |
1 | Airy disk corona, with subtle noise. |
2 | Inverse diffraction disc. |
3 | 22° halo. |
4 | Burst with cross formation of light pillars. |
For example:
Flare map = "1" # Use the default, Airy disk style corona.
Built-in flare map (i.e., texture) ID to use for the halo.