Color

From The DarkMod Wiki
Revision as of 17:57, 28 November 2020 by Geep (talk | contribs)
Jump to navigationJump to search

Note:

The name if this article contains no underscore at the front due to technical limitations of the wiki, the correct name is _color.

The _color spawnarg consists of three space-separated color values for red, green and blue. Each is expressed as a decimal fraction of range 0.0-1.0. The spawnarg sets simultanously the three spawnargs shaderParm0, shaderParm1 and shaderParm2.

This spawnarg is often used to set RGB colors for materials that contain a color stage. Thus different entities with different _color spawnargs will be colored differently in the game.

Usage

In DR's Entity Inspector, add the _color spawnarg with a dummy value, then select that item to see an additional field with the corresponding RGB values each expressed in the range 0-255, and a color swatch button. You can text-edit either form of RGB, and it will change the other form and the color swatch.

Furthermore, clicking on the swatch button brings up the color picker, where you can pick the color:

  • visually with the mouse
  • by RGB values, each of range 0..255 (and it is far easier to edit these here, separately, than in the field discussed above)
  • by Hue/Saturation/Luminance values

No matter how chosen, when done, the settings will be in the required format.

If you wish to dim or recolor the light cast by a torch or brazier, which is typically due to an attached "flame", you would use the spawnarg "set _color on flame" [note the space after 'set'], with the triplet values in the required format. This adjusts the brightness and coloration of the light thrown, but will not affect how the flame itself appears. (For that, see Colored Flame Lights).

TIP: "set _color on flame" doesn't provide you with a color picker. Temporarily add a _color spawnarg to get the picker. Use it to choose your color and generate the needed triplet, which you can then copy over to "set _color on flame".

See also