| |||||||||
A skybox is a pre-rendered backdrop of "infinite-distance" surroundings used in 3D video games. It is used to create the illusion of distant three-dimensional surroundings. In the real world, distant objects such as clouds, stars, and mountains on the horizon appear to travel along with the viewer's motion, because their distance causes the viewer's translation to be negligible relative to them.
In a video game, the skybox is a cube comprised of six images, whose inside faces are displayed behind all other three-dimensional objects, and its position is fixed so that its center is always aligned to the camera's location. The six images are pre-rendered so that the seams of the cube are invisible, so it does not appear to be a cube. The resulting illusion is that objects pre-rendered in the skybox appear to be distant.
More advanced video games have expanded the use of the skybox to include other objects in addition to the pre-rendered cube, so that the skybox creates a better illusion of depth and can include animated objects. An alternative to the cube used in some games is a pre-rendered sphere.