Skybox (video games)
Encyclopedia
A skybox is a method of creating backgrounds to make a computer and video games level
Level (computer and video games)
A level, map, area, or world in a video game is the total space available to the player during the course of completing a discrete objective...

 look bigger than it really is. When a skybox is used, the level is enclosed in a cuboid; and the sky, distant mountains, distant buildings, and other unreachable objects are projected onto the cube's faces (using a technique called cube mapping
Cube mapping
In computer graphics, cube mapping is a method of environment mapping that uses a six-sided cube as the map shape. The environment is projected onto the six faces of a cube and stored as six square textures, or unfolded into six regions of a single texture...

), thus creating the illusion of distant three-dimensional surroundings. A skydome employs the same concept but uses either a sphere
Sphere
A sphere is a perfectly round geometrical object in three-dimensional space, such as the shape of a round ball. Like a circle in two dimensions, a perfect sphere is completely symmetrical around its center, with all points on the surface lying the same distance r from the center point...

 or a hemisphere
Sphere
A sphere is a perfectly round geometrical object in three-dimensional space, such as the shape of a round ball. Like a circle in two dimensions, a perfect sphere is completely symmetrical around its center, with all points on the surface lying the same distance r from the center point...

 instead of a cube.

Processing of 3D
3D computer graphics
3D computer graphics are graphics that use a three-dimensional representation of geometric data that is stored in the computer for the purposes of performing calculations and rendering 2D images...

 graphics is computationally expensive, specifically in real-time games, and poses multiple limits. Levels have to be processed at tremendous speeds, making it difficult to render vast skyscapes in real-time. Additionally, realtime graphics generally have depth buffers with limited bit-depth which puts a limit on the amount of detail that can be rendered at a distance.

To compensate for these problems, games often employ skyboxes. Traditionally, these are simple cubes with up to 6 different textures placed on the faces. By careful alignment, a viewer in the exact middle of the skybox will perceive the illusion of a real 3D world around it, made up of those 6 faces.

As a viewer moves through a 3D scene, it is common for the skybox to remain stationary with respect to the viewer. This technique gives the skybox the illusion of being very far away since other objects in the scene appear to move, while the skybox does not. This imitates real life, where distant objects such as clouds, stars and even mountains appear to be stationary when the viewpoint is displaced by relatively small distances. Effectively, everything in a skybox will always appear to be infinitely distant from the viewer. This consequence of skyboxes dictates that designers should be careful not to carelessly include images of discrete objects in the textures of a skybox since the viewer may be able to perceive the inconsistencies of those objects' sizes as the scene is traversed.

The source of a skybox can be any form of texture
Texture mapping
Texture mapping is a method for adding detail, surface texture , or color to a computer-generated graphic or 3D model. Its application to 3D graphics was pioneered by Dr Edwin Catmull in his Ph.D. thesis of 1974.-Texture mapping:...

 including photographs, hand-drawn images, or pre-rendered 3D geometry. Usually, these textures are created and aligned in 6 directions, with viewing angles of 90 degrees (which covers up the 6 faces of the cube).

Skydomes can be created using Hugin
Hugin (software)
Hugin is a cross-platform open source panorama photo stitching and HDR merging program developed by Pablo d'Angelo and others. It is a GUI front-end for Helmut Dersch's Panorama Tools and Andrew Mihal's Enblend and Enfuse...

, Panorama Tools and Enblend.

Advanced skyboxes

As technology progressed it became clear the default skybox had severe disadvantages. It could not be animated and all objects in it appeared to be infinitely distant, even if they were close-by. Starting in the late 1990s, some game designers built small amounts of 3D geometry to appear in the skybox to create a better illusion of depth, in addition to a traditional skybox for objects very far away. This constructed skybox was placed in an unreachable location, typically outside the bounds of the playable portion of the level, to prevent players from entering the skybox.

In older versions of this technology, such as the ones presented in the game Unreal
Unreal
Unreal is a first-person shooter video game developed by Epic MegaGames and Digital Extremes and published by GT Interactive in May 1998...

, this was limited to movements in the sky, such as the movements of clouds. Elements could be changed from level to level, such as the positions of stellar objects, or the color of the sky, giving the illusion of the gradual change from day to night. The skybox in this game would still appear to be infinitely far away, as the skybox, although containing 3D geometry, did not move the viewing point along with the player movement through the level.

Newer engines, such as the Source engine
Source engine
Source is a 3D game engine developed by Valve Corporation. It debuted in June 2004 with Counter-Strike: Source and shortly thereafter Half-Life 2, and has been in active development ever since...

, continue on this idea, allowing the skybox to move along with the player, although at a different speed
Parallax
Parallax is a displacement or difference in the apparent position of an object viewed along two different lines of sight, and is measured by the angle or semi-angle of inclination between those two lines. The term is derived from the Greek παράλλαξις , meaning "alteration"...

. Because depth is perceived on the compared movement of objects, making the skybox move slower than the level causes the skybox to appear far away, but not infinitely so. It is also possible, but not required, to include 3D geometry which will surround the accessible playing environment, such as unreachable buildings or mountains. They are designed and rendered at 1/16 scale, and then resized to appear much larger, whilst using much less CPU power. This effect is called "3D skybox".

In the game Half-Life 2
Half-Life 2
Half-Life 2 , the sequel to Half-Life, is a first-person shooter video game and a signature title in the Half-Life series. It is singleplayer, story-driven, science fiction, and linear...

, this effect was extensively used in showing The Citadel, a huge structure in the center of City 17. In the closing chapters of the game, the player travels through the city towards the Citadel, the skybox effect making it grow larger and larger progressively with the player movement, completely appearing to be a part of the level. As the player reaches the base of the Citadel, it is broken into two pieces. A small lower section is a part of the main map, while the upper section is in the 3D skybox. The two sections are seamlessly blended together to appear as a single structure.

External links

  • http://developer.valvesoftware.com/wiki/Skybox_%282D%29
  • http://compiz-themes.org/index.php?xcontentmode=6110
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK