Sky (DED, 1.9.7 →)
Syntax
<Copy> Sky
{
ID = "";
Flags = flaga | flagb | flagc;
Height = 0.666667;
Horizon offset = 0.0;
Light color { 1.0 1.0 1.0 };
Layer 1/2
{
Flags = flaga | flagb | flagc;
Texture = "";
Offset = 0.0;
Color limit = 0.0;
};
Model
{
ID = "";
Layer = 0;
Frame interval = 1.0;
Color { 1.0 1.0 1.0 1.0 };
Offset factor { 0.0 0.0 0.0 };
Rotate { 0.0 0.0 };
Yaw = 0.0;
Yaw speed = 0.0;
Execute = "";
};
}
If the Copy attribute is used, all the data of the previous definition is copied to this one. For the first definition in a file Copy has no effect.
ID
The identifier of this definition. This is used when referencing sky definitions from Map Info definitions.
Flags
Name | Description |
sphere | Draw the sky sphere even when sky models have been set up. |
Height
Height of the sky sphere (0-1). The real height is an angle determined using Pi/2 * (sky height), which means if the sky height is 1, the sphere covers the whole sky.
Horizon offset
Angle offset to sky vertices, in radians. Negative angles move the horizon downwards.
Light color
RGB color. Outdoor areas will be tinted this color.
Layer 1...2
Only one of Texture/Flat/Sprite/System can be specified for a given layer. If more are specified, the last is used.
- Flags
- Sky layer flags.
Name | Description |
enable | Enable layer. By default the layer is disabled and will not be rendered. |
mask | Layer texture's color zero should be masked. |
- Texture
- Name of the texture to use for this layer.
- Flat
- Name of the flat to use for this layer.
- Sprite
- Name of the sprite_frame to use for this layer.
- System
- Name of a system texture to use for this layer. (For debug purposes only.)
- Offset
- A horizontal offset applied to the texture coordinates of the layer.
- Color limit
- Specifies how small an intensity (0-1) the sky fadeout color (top line of the texture) can have before the fadeout color is reduced to black.
Model
There can be up to 32 Model blocks in a Sky definition. Each block defines one a sky model.
- ID
- Identifier of the Model definition that describes the 3D model. If left empty, this sky model will be disabled.
- Layer
- The sky layer this model is associated with. Valid values are 1 and 2. If zero, model does not depend on the sky layers. If set to nonzero, the sky model is hidden when the associated layer is hidden (i.e. not enabled).
- Frame interval
- The number of seconds between frame changes. Sky model animation is interpolated. The model is animated by going through all its frames one by one.
- Color
- RGBA color for the model.
- Offset factor
- The position of the sky model may depend on the coordinates of the camera. The Offset factor key sets a factor for each axis (X, Y, Z) separately. Small factors (< 1.0) can be used to create the illusion that the sky model is larger than it really is. If the factors are zero, the sky model's origin will be positioned at the camera's viewpoint.
- Rotate
- Additional rotation around the X and Z axes, respectively (in degrees). These are applied after normal rotation.
- Yaw
- Initial rotation around the Y axis (in degrees).
- Yaw speed
- Angular velocity around the Y axis (in degrees per second).
- Execute
- Console command string to be executed every time the model advances one frame.
Examples
Sky {
ID = "sky1";
Height = 0.49;
Horizon offset = -0.105;
Layer 1 {
Flags = enable;
Texture = "SKY1";
}
}