- Nov 30, 2007
- 439
- 34
I'm stumped on this one. Go to their site and it tells you that you must run a certain set of commands. Then it goes on to tell you that if you are using HDR, you need to run another set of commands. But it doesn't tell you that you need to run both or either or depending on how you set it up. It's very misleading. I've enabled HDR in my map so I'm not sure which set of commands to run. Further more, it says that if you have renamed your map and did not rebuild all your cubemaps, the map will default to the skybox cubemap. So does that (rebuild) mean in Hammer you need to delete all the cubemap entities and add them all over again or does that mean in the game, running the set of commands which "builds" your cubemaps.
Thanks for the help.
This is what's on the Valve site:
Building
Once a map has been compiled and lit by VBSP and VRAD (respectively), the cubemaps can be built. Run the map and allow the any node graphs or other pre-process activities to finish. Then use the buildcubemaps console command to begin building the cubemaps for the level. In the upper left-hand corner of the screen you’ll be able to see each facet of the cubemap (six per cubemap) render. Depending on your video card, driver and complexity of your scenes, this can take seconds or minutes to complete. Once finished, the map must be restarted for the cubemaps to properly be applied to all surfaces.
Note.png Note: Team Fortress 2 does not have a default cubemap applied to reflective surfaces. Everything shiny will shine with a pink and black checkered texture. If you were to build cubemaps now and one of your cubemap is able to see a large shiny surface; the cubemap will register that in its 6 images. That means some objects might shine as if there was something shining next to it with the pink and black texture. To solve this, you need to build the cubemaps with specular turned off. Go to the console and execute the following commands to build the cubemaps for your TF2 map:
mat_specular 0
buildcubemaps
mat_specular 1
changelevel mapname
mat_reloadallmaterials
Note.png Note: If the game crashes when you try to build cubemaps, this probably means your game resolution is set too low. Before you try to build cubemaps you must ensure your game width and height are over 512 pixels. This means that the minimal standard resolution to build is 800X600. The video resolution can be changed from the Video tab, found under the game Options menu.
Note.png Note: If the map bsp file is renamed after the cubemaps have been built the cubemaps will no longer work and default to the sky cubemap. You must rebuild cubemaps again each time a map is renamed. However each time a map is renamed and the cubemaps rebuilt they will not replace the old cubemaps but rather a new set of cubemaps will be added to the bsp. Each time you rename a map and build cubemaps the bsp size will increase. It is best that your final compile of the vmf have the release name of the map so that only 1 copy of the cubemaps will reside in the bsp.
Note.png Note: For multiplayer maps, you may need to enable cheats (sv_cheats 1) before running the buildcubemaps command.
Cubemaps and HDR
If the map has been compiled with the HDR lighting option enabled in VRAD, cubemaps must be built in both HDR and LDR (non-HDR) modes. Building cubemaps in only one mode will mean that cubemaps will not be present the other mode. For information on how to build cubemaps under HDR, see HDR Lighting Basics.
Cubemaps should be built for LDR and HDR maps. Presuming you are already in HDR mode and have your map loaded fresh from compilation (VRAD must have the '-both' parameter enabled). Go to the console and execute the following commands:
buildcubemaps
mat_hdr_level 0 (to go to LDR)
map mapname (to reload map)
buildcubemaps
mat_hdr_level 2 (to go back to HDR)
map mapname (to reload map)
Thanks for the help.
This is what's on the Valve site:
Building
Once a map has been compiled and lit by VBSP and VRAD (respectively), the cubemaps can be built. Run the map and allow the any node graphs or other pre-process activities to finish. Then use the buildcubemaps console command to begin building the cubemaps for the level. In the upper left-hand corner of the screen you’ll be able to see each facet of the cubemap (six per cubemap) render. Depending on your video card, driver and complexity of your scenes, this can take seconds or minutes to complete. Once finished, the map must be restarted for the cubemaps to properly be applied to all surfaces.
Note.png Note: Team Fortress 2 does not have a default cubemap applied to reflective surfaces. Everything shiny will shine with a pink and black checkered texture. If you were to build cubemaps now and one of your cubemap is able to see a large shiny surface; the cubemap will register that in its 6 images. That means some objects might shine as if there was something shining next to it with the pink and black texture. To solve this, you need to build the cubemaps with specular turned off. Go to the console and execute the following commands to build the cubemaps for your TF2 map:
mat_specular 0
buildcubemaps
mat_specular 1
changelevel mapname
mat_reloadallmaterials
Note.png Note: If the game crashes when you try to build cubemaps, this probably means your game resolution is set too low. Before you try to build cubemaps you must ensure your game width and height are over 512 pixels. This means that the minimal standard resolution to build is 800X600. The video resolution can be changed from the Video tab, found under the game Options menu.
Note.png Note: If the map bsp file is renamed after the cubemaps have been built the cubemaps will no longer work and default to the sky cubemap. You must rebuild cubemaps again each time a map is renamed. However each time a map is renamed and the cubemaps rebuilt they will not replace the old cubemaps but rather a new set of cubemaps will be added to the bsp. Each time you rename a map and build cubemaps the bsp size will increase. It is best that your final compile of the vmf have the release name of the map so that only 1 copy of the cubemaps will reside in the bsp.
Note.png Note: For multiplayer maps, you may need to enable cheats (sv_cheats 1) before running the buildcubemaps command.
Cubemaps and HDR
If the map has been compiled with the HDR lighting option enabled in VRAD, cubemaps must be built in both HDR and LDR (non-HDR) modes. Building cubemaps in only one mode will mean that cubemaps will not be present the other mode. For information on how to build cubemaps under HDR, see HDR Lighting Basics.
Cubemaps should be built for LDR and HDR maps. Presuming you are already in HDR mode and have your map loaded fresh from compilation (VRAD must have the '-both' parameter enabled). Go to the console and execute the following commands:
buildcubemaps
mat_hdr_level 0 (to go to LDR)
map mapname (to reload map)
buildcubemaps
mat_hdr_level 2 (to go back to HDR)
map mapname (to reload map)