Understanding Buildcubemaps

  • If you're asking a question make sure to set the thread type to be a question!

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
mat_specular 0 turns off all reflections, so when you build the cubemaps you don;t get pink in them.
mat_hdr_level changes the HDR setting, 0 is off and 2 is on full.

Propper method:
-load the map
-mat_specular 0
-buildcubemaps
-disconnect
-mat_hdr_level 0
-map <mapname>
-buildcubemaps
-disconnect
-mat_specular 1
-mat_hdr_level 2
-relooad map and enjoy
 

Open Blade

L420: High Member
Nov 30, 2007
439
34
Wow, I have never done this before. Guess I should look into this more. So you're saying when you build the cubemaps while in game as you stated above, those settings are saved into the map file so when you upload it to server, it's ready to roll?

I saw this at the valve site. What is it and is this step necessary also?

Note: For multiplayer maps, you may need to enable cheats (sv_cheats 1) before running the buildcubemaps command.
 
Last edited:

YM

LVL100 YM
aa
Dec 5, 2007
7,135
6,056
I have sv_cheats 1 set by default when tf2 runs from the SDK but I've never had problems when I run it normally and run buildcubemaps.
 
Aug 19, 2008
1,011
1,158
okay, i´m going nuts here with my cubemaps:
tried several methods, none working for me
i enable sv_cheats as soon as the map starts up
the "mat_hdr_level" gives me the line "Can´t save multiplayer games"

nineaxis:
mat_specular 0
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)
mat_specular 1

juices:
mat_specular 0
sv_Cheats 1
buildcubemaps
map (yourmapname)
mat_specular 1

youme´s #1:
mat_specular 0,
buildcubemaps,
disconnect,
mat_hdr_level 0,
map <map_name>,
buildcubemaps,
disconnect,
mat_hdr_level 2,
mat_specular 1

youme´s #2:
-load the map
-mat_specular 0
-buildcubemaps
-disconnect
-mat_hdr_level 0
-map <mapname>
-buildcubemaps
-disconnect
-mat_specular 1
-mat_hdr_level 2
-reload map and enjoy
 

toutfou

L3: Member
Sep 8, 2008
136
16
sv_cheats 1 is meant to allow the game to overwrite the bsp (otherwise it's read only and the cubemaps wont save). But given reports of other people not having to do this, it sounds a bit strange.

The only things I can suggest are:

1) Go to the BSP file in explorer and check its properties, manually make sure that 'read only' isn't checked. Also do this in game if necessary.

2) Enable sv_cheats before loading the map - it may not be removing the read only flag if it's enabled after the map has loaded.
 

Apom

L6: Sharp Member
Sep 14, 2008
366
65
Without sv_cheats 1, reloading the map (with different HDR settings) may not reload the materials.

Actually, instead of reloading the map, it looks sufficient to reloadallmaterials.
 

McFool

L1: Registered
Jul 5, 2009
21
0
mat_specular 0 turns off all reflections, so when you build the cubemaps you don;t get pink in them.
mat_hdr_level changes the HDR setting, 0 is off and 2 is on full.

Propper method:
-load the map
-mat_specular 0
-buildcubemaps
-disconnect
-mat_hdr_level 0
-map <mapname>
-buildcubemaps
-disconnect
-mat_specular 1
-mat_hdr_level 2
-relooad map and enjoy

I see this topic is like a year old but I have the same issue as eerieone and no one ever resolved his issue. I tried this method and also got the "cant save multiplayer games" error. Using disconnect in console shut down the server as well so i have to recompile at that step to relaunch the map/server? This doesnt make sense. Can someone please re explain this?
 

Open Blade

L420: High Member
Nov 30, 2007
439
34
4 real. There should definitely be a standard way of doing this. There are so many opinions on this board of what that process should be, and then you have valves site, which is conflicting also. I wish this could be cleared up and a common established way to build cubemaps be adopted by all. is there anyway to contact valve to find out just exactly what precise steps should be taken? Maybe as individuals valve might be less interested to help, but if we ask as a community, it might help get us a definite answer.
 
Last edited:

McFool

L1: Registered
Jul 5, 2009
21
0
With all the wisdom around here I'm sure someone can post the exact means of building cube maps. If people try these methods word for word and fail, then there is missing steps in your method's instructions. I can not rid this "you should really build a hdr cubemap" error. Can some one please address this? I'm sure someone actually knows how to do this properly, but that ain't me. I cannot accept that every single tf2 map ever released contains this error, so logic concludes that someone knows how to do this.
 

McFool

L1: Registered
Jul 5, 2009
21
0
mat_specular 0 turns off all reflections, so when you build the cubemaps you don;t get pink in them.
mat_hdr_level changes the HDR setting, 0 is off and 2 is on full.

Propper method:
-load the map
-mat_specular 0
-buildcubemaps
-disconnect
-mat_hdr_level 0
-map <mapname>
-buildcubemaps
-disconnect
-mat_specular 1
-mat_hdr_level 2
-relooad map and enjoy

What I did:
open tf2
sv_cheats 1
load the map
mat specular 0
buildcubemaps
disconnect
mat hdr level 0 (out of game this errors "not playing a local game" in game this says "cannot save multiplayer game")
map tf_redoctober
buildcubemaps
disconnect
mat_specular 1
mat_hdr_level 2 (out of game this errors "not playing a local game" in game it says "cannot save multiplayer game")
reload map and enjoy (at this step it reminds me that "
A custom HDR cubemap "materials/models/player/shared/eye-reflection-cubemap-.hdr.vtf": cannot be found on disk.
This really should have a HDR version, trying a fall back to a non-HDR version."

I can't believe absolutely no one who has seen this post knows how to do this. Or perhaps every single map ever made has improper cubemaps? With out an explanation these are the only conclusions I can draw. I was gonna edit this into my last post but then people who had already read that wouldn't be aware of a new post here in case they wanted to help troubleshoot.
 

McFool

L1: Registered
Jul 5, 2009
21
0
I hope triple posts aren't ban worthy :(

I just successfully built all cubemaps without any errors. These are the steps I took:

  1. Compile as final and hdr and all that, but don't launch tf2 from hammer
  2. Open TF2, open console
  3. sv_cheats 1
  4. map <mapname>
  5. mat_specular 0
  6. mat_hdr_enabled
  7. buildcubemaps
  8. disconnect
  9. map <mapname>
  10. mat_specular 1
  11. buildcubemaps
  12. mat_savechanges
  13. mat_reloadallmaterials

I don't know if it will work for everyone or if all those steps are necessary, but I had no issues and now everything is totally badass at different angles. I'd really love for someone having issues with cubemaps to try this out, assuming your cubemap stuff in hammer is done properly, to confirm this method.

Edit: Had to change some items, call it optimization if you will. If you're interested in the first try look at the quote below. Further testing on my end has confirmed this method to work for my map :) No errors and much sex. Someone else try and post results.

Also, http://developer.valvesoftware.com/wiki/HDR_Lighting_Basics shows mat_hdr_enabled using a 1 and 0, however it seems like its just a command with no number. To be honest I should have tested once more without even using mat_hdr_enabled to see if its necessary but I'm just glad I got my crap working almost.
 
Last edited:

Open Blade

L420: High Member
Nov 30, 2007
439
34
I hope triple posts aren't ban worthy :(

I just successfully built all cubemaps without any errors. These are the steps I took:

  1. Compile as final and hdr and all that
  2. Open TF2, open console
  3. map <mapname>
  4. sv_cheats 1
  5. mat_specular 0
  6. mat_hdr_enabled 1
  7. buildcubemaps
  8. disconnect
  9. map <mapname>
  10. sv_cheats 1
  11. mat_specular 1
  12. buildcubemaps
  13. mat_reloadallmaterials

I don't know if it will work for everyone or if all those steps are necessary, but I had no issues and now everything is totally badass at different angles. I'd really love for someone having issues with cubemaps to try this out, assuming your cubemap stuff in hammer is done properly, to confirm this method.

I'll give that a try tomorrow when I do a test compile. Maybe some others can test this method also on some maps they are making just to see if this can be the set standard. Yeah, I don't understand why some of the top guys are not posting in this topic anymore. They should try your method to see if it is indeed the exact way this should be done.