Skybox Basics: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
No edit summary
 
(31 intermediate revisions by 18 users not shown)
Line 1: Line 1:
[[Category:Level Design FAQ]]
{{LanguageBar}}
[[Category:Skybox]]
__NOTOC__
{| style=float:right
| [[File:Toolsskybox.gif|thumb|<tt>toolsskybox</tt> for 2D and 3D skyboxes]]
| [[File:Toolsskybox2d.gif|thumb|<tt>toolsskybox2d</tt> for 2D skyboxes]]
|}
'''Skyboxes''' are solutions intended to make maps look bigger than they are. They are typically used to display the sky, along with distant, unreachable areas and landscapes, such as distant mountains or buildings. Even though it is called a '''sky'''-box, it does not need to represent a sky in the usual sense.
 
There are two types of skyboxes in the Source engine: '''2D Skyboxes''' and '''3D Skyboxes'''. A map can have both.
 
In-game, the player will see any skybox ''through'' any surface textured with <tt>tools/[[Tool textures (Source)#skybox|toolsskybox]]</tt> or <tt>tools/[[Tool textures (Source)#skybox2d|toolsskybox2d]]</tt>. The difference between these is that the former displays both the 2D skybox and the 3D skybox on top, whereas the latter displays only the 2D skybox.


'''Skyboxes''' are solutions intended to make maps look bigger than they are. They are typically used to display the sky, along with distant, unreachable areas and landscapes, such as distant mountains or buildings.
To learn how to use skybox brushes in a level, see [[Skybox Optimization]].
{{warning|'''Do not''' get tempted into ''Boxing'' the entire level with a hollow skybox brush. This can drastically increase [[VVIS]] compile times to infinity, and can cause performance issues on lower-end hardware (poor optimization). The only type of map where this is acceptable is if your map is nothing but a bunch of platforms floating in mid-air as seen in [[Xen]] or {{Rc|2}}. A skybox should instead typically only envelope the upper part of the playing field of a map.}}


In the Source engine, the skybox is locked to the player's viewpoint, never moving or changing perspective as they move, creating the illusion of distance.
== 2D Skybox ==
[[File:Skybox_editor_comparison.gif|thumb|An animated {{wiki|GIF}} comparing the view in the editor and the view in-game for a '''2D Skybox'''. Its name is <tt>cs_tibet</tt> from CS:GO.]]
{{main|Skybox (2D)}}
2D Skyboxes give the effect of a giant cube surrounding the map, used for applying textures in its interior faces. It is locked to the player's viewpoint, never moving or changing perspective as they move, creating the illusion of distance. These textures usually consist of the ground meeting the sky to the horizon, clouds, and other distant details.


Be aware that while the most primitive shape of a skybox is a six-sided box completely enveloping the entire map, this will have a big impact on performance, compile times, and will basically create more problems than it solves. (If you have leaks, do not get tempted into using this method. The only type of map where you can use a skybox in this way, is if your map is nothing but a bunch of platforms floating in mid-air.)
The 2D skybox for a level is set in the ''[[worldspawn|Map Properties]]'' dialog of Hammer.


A skybox should instead be reserved for places the player can see but is just out of reach of (by touch or with thrown/launched objects), typically only enveloping the upper part of the playing field of a map.
The texture name is '''tools/toolsskybox2d'''. You can also use '''tools/toolsskybox''' for a 2D skybox if there is no 3D skybox in place.
{{note|In {{hl2|2}} the default 2D skybox has visible seams. This is not your fault. Select a different one.}}
{{Note|The {{code|toolsskybox2d}} texture has been removed in {{src2|2}}.}}


There are two types of skyboxes in the Source engine:
== 3D Skybox ==
{{main|3D Skybox}}
This new addition for skyboxes became available with the {{src|2}} engine. It's not a skybox in the literal sense, but rather is geometry constructed by the level designer, projected outside the bounds of the gameplay area on the map. Maps ''do not require'' a 3D skybox to be created &mdash; it is a purely optional visual addition to the map.


===[[Skybox (2D)|2D Skybox]]===
There are many in-game assets designed to work in 3D Skyboxes. Search in the Model Viewer Browser for ''skybox'' to find some scaled down models. You may need [[Model Viewer]].
Consists gives the effect of a giant cube surrounding the map used for applying textures in its interior faces. These textures usually consists of the ground meeting the sky in the horizon, clouds, and other distant details. The 2D skybox for a level is set in the ''Map Properties'' dialog of Hammer.


===[[3D Skybox]]===
The texture name is '''tools/toolsskybox'''.
This new addition for skyboxes became available with the Source engine. It's a surrounding area constructed by the level designer, outside the bounds of the gameplay area on the map. Players can never reach the 3D skybox. Maps ''do not require'' a 3D skybox to be created &mdash; it is a purely optional visual addition to the map. See [[3D Skybox]] for more information.


===See Also===   
== See also ==   
*[[Skybox lighting]]
*[[Skybox Optimization]] - A tutorial on how to optimize a skybox.
*[[Skybox Optimization]] - A tutorial on how to optimize a skybox.
*[[light_environment]] - An entity to control the light that skybox textures emit.
*[[env_cascade_light]] - {{csgobranch|only|addtext={{strata}}{{bms}}}}. An entity which produces real-time, accurate lighting from skybox textures.
[[Category:Skybox]]

Latest revision as of 22:06, 13 June 2025

English (en)Español (es)Русский (ru)中文 (zh)Translate (Translate)
toolsskybox for 2D and 3D skyboxes
toolsskybox2d for 2D skyboxes

Skyboxes are solutions intended to make maps look bigger than they are. They are typically used to display the sky, along with distant, unreachable areas and landscapes, such as distant mountains or buildings. Even though it is called a sky-box, it does not need to represent a sky in the usual sense.

There are two types of skyboxes in the Source engine: 2D Skyboxes and 3D Skyboxes. A map can have both.

In-game, the player will see any skybox through any surface textured with tools/toolsskybox or tools/toolsskybox2d. The difference between these is that the former displays both the 2D skybox and the 3D skybox on top, whereas the latter displays only the 2D skybox.

To learn how to use skybox brushes in a level, see Skybox Optimization.

Warning.pngWarning:Do not get tempted into Boxing the entire level with a hollow skybox brush. This can drastically increase VVIS compile times to infinity, and can cause performance issues on lower-end hardware (poor optimization). The only type of map where this is acceptable is if your map is nothing but a bunch of platforms floating in mid-air as seen in Xen or Ricochet Ricochet. A skybox should instead typically only envelope the upper part of the playing field of a map.

2D Skybox

An animated Wikipedia icon GIF comparing the view in the editor and the view in-game for a 2D Skybox. Its name is cs_tibet from CS:GO.
Main article:  Skybox (2D)

2D Skyboxes give the effect of a giant cube surrounding the map, used for applying textures in its interior faces. It is locked to the player's viewpoint, never moving or changing perspective as they move, creating the illusion of distance. These textures usually consist of the ground meeting the sky to the horizon, clouds, and other distant details.

The 2D skybox for a level is set in the Map Properties dialog of Hammer.

The texture name is tools/toolsskybox2d. You can also use tools/toolsskybox for a 2D skybox if there is no 3D skybox in place.

Note.pngNote:In Half-Life 2 Half-Life 2 the default 2D skybox has visible seams. This is not your fault. Select a different one.
Note.pngNote:The toolsskybox2d texture has been removed in Source 2 Source 2.

3D Skybox

Main article:  3D Skybox

This new addition for skyboxes became available with the Source Source engine. It's not a skybox in the literal sense, but rather is geometry constructed by the level designer, projected outside the bounds of the gameplay area on the map. Maps do not require a 3D skybox to be created — it is a purely optional visual addition to the map.

There are many in-game assets designed to work in 3D Skyboxes. Search in the Model Viewer Browser for skybox to find some scaled down models. You may need Model Viewer.

The texture name is tools/toolsskybox.

See also