CUBE
Defines a six sided environment cube from a 6-frames sky sprite.
Type:
flag
(flags2, sky definition only)
Remarks:
- The sides of the sky cube are drawn at a distance of Camera.clip_far
from the viewer. The sky z parameter can be used to move the cube up and down.
The x, y, angle, and scale parameters are ignored.
- The sprite image must consist of 6 adjacent square frames in the following
order: west, north, east, south, down, up. Thus its file name must end with
'+6' and its width must be six times larger than its height. Each frame
must be a power of 2 in size, like 512x512. The frames must be tiled in
a way that they can be wrapped around a cube.
- Compressed images (DDS) don't support frames and thus can
not be used for sky cubes.
This restriction does not apply for A7.7 or above.
-
A lot of sky images can be found at game artwork pages (such as http://1000skies.com/)
.
The sky sprite image can be put together by adding the single cube images
in the order bk, rt, ft, lf, dn, up from left to right.
-
Sky cube images can also be assigned to the sky box in WED, and are then automatically rendered with the CUBE flag.
Example (lite-C):

ENTITY* mountain_cube =
{
type = "mountains+6.tga";
flags2 = SKY | CUBE | SHOW;
layer = 2;
z = 30; // move 30 pixels upwards
}
See also:
DOME, SCENE, ent_createlayer
► latest
version online