Understanding Buildcubemaps

Discussion in 'Mapping Questions & Discussion' started by bob+M|M+, Jul 1, 2008.

  1. bob+M|M+

    bob+M|M+ L6: Sharp Member

    Messages:
    348
    Positive Ratings:
    185
    Is the proper way to build cubemaps? What do all these things mean? Thanks in advance!

    mat_specular 0
    buildcubemaps
    mat_hdr_level 0
    map "mapname"
    buildcubemaps
    mat_hdr_level 2
    map "mapname"
    mat_specular 1
     
  2. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,742
    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
     
    • Thanks Thanks x 39
  3. bob+M|M+

    bob+M|M+ L6: Sharp Member

    Messages:
    348
    Positive Ratings:
    185
  4. Open Blade

    Open Blade L7: Fancy Member

    Messages:
    439
    Positive Ratings:
    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: Jul 2, 2008
  5. Sgt Frag

    Sgt Frag L14: Epic Member

    Messages:
    1,443
    Positive Ratings:
    294
    Well, when I just did my cubemaps I got a console error saying
    "cannot save multiplayer games"
    But they still worked.
     
    • Thanks Thanks x 1
  6. bob+M|M+

    bob+M|M+ L6: Sharp Member

    Messages:
    348
    Positive Ratings:
    185
    I've heard some people suggest using sv_lan 1 and sv_cheats 1 preceding everything, but it doesn't make a difference for me.
     
  7. YM

    aa YM LVL100 YM

    Messages:
    7,099
    Positive Ratings:
    5,742
    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.
     
  8. eerieone

    aa eerieone

    Messages:
    1,009
    Positive Ratings:
    569
    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
     
  9. toutfou

    toutfou L3: Member

    Messages:
    136
    Positive Ratings:
    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.
     
    • Thanks Thanks x 1
  10. Cameron:D

    Cameron:D L6: Sharp Member

    Messages:
    363
    Positive Ratings:
    145
    You need to load a different map, then your map again. I've found.
     
  11. Apom

    Apom L6: Sharp Member

    Messages:
    366
    Positive Ratings:
    62
    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.
     
  12. eerieone

    aa eerieone

    Messages:
    1,009
    Positive Ratings:
    569
    doing that too, and everytime i enter mine, i re-type sv_cheats 1...
    the game definately writes to the bsp, filesize grows 100kb
     
  13. McFool

    McFool L1: Registered

    Messages:
    21
    Positive Ratings:
    0
    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?
     
  14. Open Blade

    Open Blade L7: Fancy Member

    Messages:
    439
    Positive Ratings:
    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: Jul 6, 2009
  15. McFool

    McFool L1: Registered

    Messages:
    21
    Positive Ratings:
    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.
     
  16. McFool

    McFool L1: Registered

    Messages:
    21
    Positive Ratings:
    0
    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.
     
  17. McFool

    McFool L1: Registered

    Messages:
    21
    Positive Ratings:
    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: Jul 8, 2009
  18. Open Blade

    Open Blade L7: Fancy Member

    Messages:
    439
    Positive Ratings:
    34
    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.