Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- First off, if you make the skybox for your own map, the skybox name compiled in the map properties should be "Skyboxname_hdr" the _hdr is important
- 1. Make skybox in blender. (use blend file provided, draw on the sphere texture, make your own terrain or import one you downloaded)
- 2. Render skybox on the sphere. This renders a "round" skybox, so you will not have a square looking skybox in the game.
- When rendering, the render proccess should show all six sides in the render window and then the camera view at the very end.
- To export the skybox render, go to the envbox texture tab, on the right side of the "Environment Map" category should be a drop down arrow
- Click it and select "Save Environment Map"
- 3. Seperate each piece into its own texture. Flip all pieces horizontally and rotate the top and bottom +90°
- 4. Use VTFedit to make LDR skybox textures (import as DXT5, apply Clamp S, Clamp T, Anisotropic, No Mipmap, No Level Of Detail, save as skyboxname_XY)
- XY are the suffixes:
- left = lf
- Front = ft
- Right = rt
- Back = bk
- top = up
- Bottom = dn
- 5. Use HDRShop to make hdr version of skybox texture (Shift +, Save as "portable Floatmap pfm", with suffix _hdr*side* )
- 6. Create txt files for every single pfm file containing the following:
- pfm 1 // Flag as HDR texture
- pfmscale 1 // brightness multiplier
- nonice 1 // prevent seams appearing at low texture detail
- //nocompress 1 // optional; removing halves filesize, but causes color banding under close inspection
- clamps 1 //adds Clamp S
- clampt 1 //adds Clamp T
- 7. use Vtex to compile pfm into hdr skybox textures.
- Drag and drop like vpk.exe will not work, instead make a bat file containing the following:
- "vtex.exe location" -game "gameinfo.txt location" -outdir "output location of finished vtf files" -nopause -mkdir "folder that contains the txt files" skyboxname_hdrside.txt here
- pause
- The "pause" line prevents the cmd window from closing so you can look for errors
- Do this for every single side, for example:
- "F:\programme\steam\steamapps\common\left 4 dead 2\bin\vtex.exe" -game "F:\programme\steam\steamapps\common\left 4 dead 2\left4dead2" -outdir "F:\programme\steam\steamapps\common\left 4 dead 2\PreviewMap\materials\skybox" -nopause -mkdir "F:\programme\steam\steamapps\common\left 4 dead 2\PreviewMap\materialsrc\skybox" Sky_TestVacant_hdrbk.txt
- "F:\programme\steam\steamapps\common\left 4 dead 2\bin\vtex.exe" -game "F:\programme\steam\steamapps\common\left 4 dead 2\left4dead2" -outdir "F:\programme\steam\steamapps\common\left 4 dead 2\PreviewMap\materials\skybox" -nopause -mkdir "F:\programme\steam\steamapps\common\left 4 dead 2\PreviewMap\materialsrc\skybox" Sky_TestVacant_hdrlf.txt
- "F:\programme\steam\steamapps\common\left 4 dead 2\bin\vtex.exe" -game "F:\programme\steam\steamapps\common\left 4 dead 2\left4dead2" -outdir "F:\programme\steam\steamapps\common\left 4 dead 2\PreviewMap\materials\skybox" -nopause -mkdir "F:\programme\steam\steamapps\common\left 4 dead 2\PreviewMap\materialsrc\skybox" Sky_TestVacant_hdrrt.txt
- "F:\programme\steam\steamapps\common\left 4 dead 2\bin\vtex.exe" -game "F:\programme\steam\steamapps\common\left 4 dead 2\left4dead2" -outdir "F:\programme\steam\steamapps\common\left 4 dead 2\PreviewMap\materials\skybox" -nopause -mkdir "F:\programme\steam\steamapps\common\left 4 dead 2\PreviewMap\materialsrc\skybox" Sky_TestVacant_hdrft.txt
- "F:\programme\steam\steamapps\common\left 4 dead 2\bin\vtex.exe" -game "F:\programme\steam\steamapps\common\left 4 dead 2\left4dead2" -outdir "F:\programme\steam\steamapps\common\left 4 dead 2\PreviewMap\materials\skybox" -nopause -mkdir "F:\programme\steam\steamapps\common\left 4 dead 2\PreviewMap\materialsrc\skybox" Sky_TestVacant_hdrup.txt
- "F:\programme\steam\steamapps\common\left 4 dead 2\bin\vtex.exe" -game "F:\programme\steam\steamapps\common\left 4 dead 2\left4dead2" -outdir "F:\programme\steam\steamapps\common\left 4 dead 2\PreviewMap\materials\skybox" -nopause -mkdir "F:\programme\steam\steamapps\common\left 4 dead 2\PreviewMap\materialsrc\skybox" Sky_TestVacant_hdrdn.txt
- pause
- 8. when the vtf textures are made, you need to set up the VMT file to use a LDR skybox when players don't have HDR enabled. Use this for all VMT files:
- "sky"
- {
- "$hdrcompressedtexture" "skybox/skyboxname_hdrXY" //HDR texture
- "$nofog" "1"
- "$ignorez" "1"
- "$basetexture" "skybox/Sky_TestVacant_dn" //LDR texture
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement