Multiple skyboxes in TF2

Discussion in 'Mapping and Modeling' started by Bottiger, Mar 6, 2021.

Thread Status:
Not open for further replies.
  1. Bottiger

    Bottiger Administrator

    Steam:
    In css and csgo you can change the skybox with a convar. Unfortunately the code to update the skybox is missing in TF2.

    There is a way to have multiple skyboxes in tf2 as long as you use a 3d skybox. This method was discovered by Berke and is the most reliable method that doesn't have graphical glitches or random crashes.

    --------------------------------
    Find the skybox vtf files by extracting the VPK files in the game. You will see file names like sky_upward_ft.vtf sky_upward_bk.vtf. The skybox is broken up into 6 different sides to make a cube.

    open VTFEdit.
    click File -> Import File

    Import skybox images in this order.

    They must first be rotated clockwise by this amount in the photo editor of your choice.

    ft = rotate -90
    bk = rotate 90
    lf = rotate 180
    rt = rotate 0
    up = rotate 0
    dn = rotate 0

    files must be imported in the correct order.
    "1.tga" "2.tga" "3.tga" "4.tga" "5.tga" "6.tga"

    In "Texture Type" set to "Environment Map"
    Uncheck "Generate Mipmaps"
    Click "Advanced". Click "Generate Sphere Map"
    Check "Clamp S" and "Clamp T"

    Save the VTF file.

    Save this as the VMT
    "WindowImposter"
    {
    "$envmap" "folder_in_materials/the_mat"
    "$nofog" 1
    }

    Put the VTF and VMT file in the appropriate materials folder.

    Make a hollow cube in the 3d skybox covering the 2d sky textures. Make it a func_brush.

    Apply the VMT to the insides of your cube. Then show/hide the cube to toggle the sky.
     
    • Like Like x 2
    • Useful Useful x 2
    • Neat Neat x 1
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice