The Marathon Markup Language - OpenGL-Rendering Element: <opengl>
This kind of element is for modifying the OpenGL rendering. Currently, only modifications of texture rendering are implemented, with opacity control and texture substitution. This element has these kinds of child elements, <txtr_clear>, <texture>, and <fog>.
The first one, <txtr_clear>, clears the landscape options, setting them back to their defaults; if it has an attribute of "coll", it will clear the sequences for the collection specified in that attribute's value; if not, it will clear all the sequences. However, this command can be followed by commands to set up texture options, which will then be executed as if no "txtr_clear" command had been issued.
The second one, <texture>, specifies the texture options themselves. It takes these attributes:
Note: all resulting values will be pegged to the range 0 to 1. Here are the various opacity types:
- coll: which collection (mandatory).
- clut: which color table. Values 0 to 7 are the familiar color-table values, and there are two special values: -1 means all the color tables and 8 means the infravision color table (default: -1 -- all of the tables).
- bitmap: which one to apply the options to (mandatory).
- opac_type: what type of opacity to use (default: 0 -- crisp edges).
- opac_scale: scaling value for the opacity; how much to multiply it by (default: 1 -- no change).
- opac_shift: shift value for the opacity; how much to add after multiplying (default: 0 -- no change).
- void_visible: can see into the void (what's not in any map polygon) through this texture; can cause smearing and weird show-through (default: false; cannot see into void).
- normal_image: the name of the file whose image content to substitute in "normal" rendering (sensitive to light levels).
- normal_mask: the name of the file whose image content becomes the opacity mask for "normal" rendering (sensitive to light levels). It must be used with a normal_image file.
- glow_image: the name of the file whose image content to substitute in "glowing" rendering (independent of light levels).
- glow_mask: the name of the file whose image content becomes the opacity mask for "glowing" rendering (independent of light levels). It must be used with a glow_image file.
- image_scale: The amount to scale a substituted sprite, from pixel units to internal distance units. If it is zero or less, then it and the offsets are ignored.
- x_offset: The amount to shift the top left corner rightward, in internal units.
- y_offset: The amount to shift the top left corner downward, in internal units.
Crisp edges. The opacity threshold is 0.5. Fuzzy edges. Fuzzy edges with opacity = average of color channels. Fuzzy edges with opacity = maximum of color channels. The opacities of all but the first will be scaled and shifted with opac_scale and opac_shift. The first one of these is good for objects with well-defined edges; the others are good for clouds, flames, energy-weapon bolts, and so forth, which will not have sharp boundaries. The average and maximum modes were included as a way of producing variable opacity without adding any new files; this hack was inspired by the semitransparency handling in the Tomb Raider series. The idea here is that the brighter regions are likely to be the more opaque ones in these cases. I've put both of them in because they behave somewhat differently; max has the same strength for saturated colors as for grays, while mean has less strength for saturated colors than for grays.
The third one, <fog>, has these attributes: on: (boolean; default: false) depth: the fog depth in World Units (default: 8) and a color subelement, which indicates the fog color (default: gray [red = green = blue = 0.5]).