Status
Not open for further replies.

Bottiger

Administrator
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.

--------------------------------

Use this program and follow the instructions.

https://github.com/bottiger1/Cubemaker

Old Obsolete Method - Don't bother using this

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.

Drag each VTF file into the VTFEdit window and click export to export each file as TGA.

You must rotate these TGAs in another photo editor and save them. You can use photopea.com

ft = flip horizontally and rotate 90 degrees counter-clockwise
bk = flip horizontally and rotate 90 degrees clockwise
rt = flip vertically
lf = flip horizontally
up = flip vertically
dn = flip horizontally

In VTFEdit click File -> Import File

Import the TGA files you just changed in this order:
"skyname_ft.tga" "skyname_bk.tga" "skyname_rt.tga" "skyname_lf.tga" "skyname_up.tga" "skyname_dn.tga"

I recommend you copy and paste this into notepad, replace "skyname", then copy and paste it back into the VTFEdit box. If you use shift click to select the files, the ordering will be randomly rearranged.

multiple_skybox_filelist.jpg


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

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.
 
Last edited:
Status
Not open for further replies.