Skybox (2D): Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
(this should be in an existing category to appear on the main list, and Materials looks most appropriate)
Line 21: Line 21:
*In [[Hammer]], go to Map > Map Properties > Skybox Texture Name and type in your skyname, without the side tags.
*In [[Hammer]], go to Map > Map Properties > Skybox Texture Name and type in your skyname, without the side tags.


[[Category:Mapping]]
[[Category:Materials]]

Revision as of 08:38, 28 June 2005

In Source, the skybox is a series of six images, joined together to make a cube. The cube is then locked to the player's viewpoint and acts as the most distant area of a map, usually the sky. Because the skybox is fixed to the player's viewport, it never changes perspective, allowing the cube to appear as a seamless whole.

Creating a 2D skybox

  1. Prepare your TGA files (i.e. skynameBK.tga, skynameFT.tga, skynameUP.tga, skynameDN.tga, skynameRT.tga, skynameLF.tga)
  2. Convert the TGA images to VTF (this will create a $SKYNAME.txt which you will later edit then rename to $SKYNAME.vmt)
  3. After conversion, open the .txt and add:
"UnlitGeneric"
 {
 // Original shader: BaseTexture
 "$basetexture" "skybox/$SKYNAME"
 "$nofog" 1
 $ignorez 1
 }
  • For each file, append the appropriate image tag to the sky name (i.e. bk, ft, rt, lf, up, dn)
  • Rename the .txt files to .vmt
  • Now go into your mod's materials folder and create the folder skybox.
  • Copy your new VTF and VMT files into the skybox folder.
  • In Hammer, go to Map > Map Properties > Skybox Texture Name and type in your skyname, without the side tags.