How do you create a custom skybox?

Discussion in 'Mapping Questions & Discussion' started by SeanMcPhearless, Oct 15, 2015.

  1. SeanMcPhearless

    SeanMcPhearless L2: Junior Member

    Messages:
    91
    Positive Ratings:
    51
    There is a skybox I'm using that has mountains and I'd like to remove them, how do I find the skybox 'image'? and how can I use the edited skybox in Hammer? I'm currently using the thunder mountain skybox only because its the only storm related skybox I know of.
     
  2. killohurtz

    aa killohurtz Distinction in Applied Carving

    Messages:
    1,006
    Positive Ratings:
    1,160
    This is a pretty lengthy process, but I'll try to keep it simple:
    1. Use GCFScape to extract the files. You'll need to open tf2_textures_dir.vpk in the /tf folder, navigate to materials/skybox, and extract all 6 .vtfs for the skybox you want. Then open tf2_misc_dir.vpk and take the .vmts from the same directory (to be used for reference later).
    2. Use VTFEdit to convert the .vtfs to an image format like .png or .tga
    3. Open the images in Photoshop, GIMP, or something similar and edit the mountains out
    4. Convert the new images back to .vtf in VTFEdit. Check the flags Clamp S, Clamp T, SRGB, No Mipmap, and No Level of Detail. Make sure you name each one with the same suffix as the original (up, dn, lf, rt, ft, bk)
    5. Prepare the 6 .vmts for using the originals as a reference. You can simply rename each file to match your new sky name, and be sure to change the name in the file path written inside as well. It should look something like this:
    sky_name_01rt.vmt
    Code:
    "sky"
    {
        "$nofog" "1"
        "$ignorez" "1"
        "$basetexture" "skybox\sky_name_01rt"
    }
    
    Once you have the .vtf and .vmt for each side, drop them all in tf/materials/skybox, and then you will be able to use it in Map Properties. Don't forget to pack the skybox when you release the map!
     
    • Thanks Thanks x 2
  3. SeanMcPhearless

    SeanMcPhearless L2: Junior Member

    Messages:
    91
    Positive Ratings:
    51
    Wow! Thank you! This is extremely helpful. What do you mean by 'packing the skybox' though? Is that just including a download of the skybox next to a download of my map?
     
  4. killohurtz

    aa killohurtz Distinction in Applied Carving

    Messages:
    1,006
    Positive Ratings:
    1,160
    Oh, not quite. Let me elaborate.

    When you use a custom asset in your map (i.e. anything the game doesn't ship with) you need to pack it into the .bsp so that other people playing your map can see it. Most people use either VIDE and Pakrat to do this. To check if your map is packed properly afterwards, you can either load up TF2 and type sv_pure 2 in the console before loading the map, or open the .bsp in GCFScape and check the contents of the materials and models folders.
     
    • Thanks Thanks x 2
  5. SeanMcPhearless

    SeanMcPhearless L2: Junior Member

    Messages:
    91
    Positive Ratings:
    51
    Oh, Okay, Gotcha. I'll remember to pack it! Thanks!