Is there a definitive way to build Cubemaps or is it trial and error?

Discussion in 'Mapping Questions & Discussion' started by Robot3x, Nov 19, 2011.

  1. Robot3x

    Robot3x L2: Junior Member

    Messages:
    51
    Positive Ratings:
    3
    When I build cubemaps, it all works fine until I quit the game and reload the map. Then my map goes full bright and sometimes the CTF game hud goes missing. mat_reloadallmaterials seems to fix it. I don't know if the cubemaps got baked correctly and it's my game that's the problem or the other way around.

    Everything I've read on the cubemap building process is conflicting.
    http://forums.tf2maps.net/showpost.php?p=233147&postcount=12
    http://developer.valvesoftware.com/wiki/Cubemaps#Team_Fortress_2
    http://forums.tf2maps.net/showthread.php?t=4530
    http://developer.valvesoftware.com/wiki/HDR_Lighting_Basics#Building_HDR_and_LDR_cubemaps

    I was using the Valve method for LDR during testing and then did the Grazr method today for HDR. I thought both worked until I reloaded my map after quitting the session in which I built the cubemaps.

    Also, is there a way to reset all console commands to defaults? I've been using the mat_hdr_level command and the console says that it can't save a multiplayer game in response. I read in an archived thread that this was completely normal... maybe. I don't know if it's set correctly anymore.
     
  2. English Mobster

    English Mobster L6: Sharp Member

    Messages:
    355
    Positive Ratings:
    225
    It's a million times easier not to build with HDR.
    That being said:

    First without HDR:
    Begin a new game.
    Enter the console:
    "mat_specular 0"
    "buildcubemaps"
    "mat_specular 1"
    "disconnect"
    "sv_cheats 1"
    "mat_reloadallmaterials"
    Then go into the actual options menu and enable HDR. I've had issues with doing it via the console, so I always use the actual options menu now.

    HDR on:
    Enter a new game.
    Console:
    "mat_specular 0"
    "buildcubemaps"
    "mat_specular 1"
    "disconnect"
    "sv_cheats 1"
    "mat_reloadallmaterials"

    It should bake them to the .bsp automatically whenever you do the mat_reloadallmaterials. Just make sure you don't quit the game inbetween cubemap compiles.
    I don't know if there's an easier way, but that's mine.

    Again, HDR is MUCH more trouble than it's worth, and not just cubemap-wise. The difference makes your map marginally more pretty, and, unless you're in late beta/release candidate, it's not worth the hassle. All the lighting has to be redone to get the right effect, the only skybox that supports HDR is Gravel Pit (the others will run on it, but won't look as pretty), you have to be more careful about optimizing, all sorts of stuff.

    E: In fact, the tutorials you posted from TF2M are much more efficient than my method. That being said, I still wouldn't bother with HDR. Most of the stock maps aren't even set up for it, IIRC.
     
    • Thanks Thanks x 2
    Last edited: Nov 19, 2011
  3. grazr

    aa grazr Old Man Mutant Ninja Turtle

    Messages:
    5,436
    Positive Ratings:
    3,570
    You can ignore the "can't save multiplayer" console report. It is normal.

    I'm not sure why your map would be "going fullbright" when you reload it. Is it actual fullbright or pseudo fullbright because you havn't capped HDR levels with a env_tonemap_controller and your map looks like it lives 10ft from the surface of the sun?

    I've heard of people having HDR issues where cubemaps break the lighting, although only once or twice in 4 years. I can only imagine it's either because you're running low system specs or there's a vrad issue or something. But i can't say for certain, that's only speculation. Try google?

    The only thing you have to concern yourself with HDR is that it causes your compile to take twice as long as it runs vrad twice, and that you have to run cubemaps twice as well. The only time i'd recommend not doing HDR is if your computer cannot handle it. 2 years ago last month before i was running my current, "new" computer i had a similar issue in that my computer couldn't handle HDR and requently people would say my lighting was missing something, so HDR was noticed to be missing, although they couldn't tell it was HDR until i told them i had it turned off.

    EDIT: Also i'd not recommend doing it Mobster's way. Turning off specular after loading the map breaks overlays on displacement surfaces and mat_reloadallmaterials is a temporamental command that only works for a minority of people.
     
    • Thanks Thanks x 2
    Last edited: Nov 19, 2011
  4. Xi.Cynx

    aa Xi.Cynx Former Alias: †Blade†

    Messages:
    772
    Positive Ratings:
    734
    http://forums.tf2maps.net/showthread.php?t=16452

    Yes the way English Mobster posted was correct, this is also a tutorial I made to both build cubemaps for LDR and HDR(most people use HDR). Your HUD should never disappear when making cubemaps that's kind of odd.

    EDIT: I just realized that you posted a link to grazr's post in my tutorial guide. Really both his method and mine get the same thing accomplished, sure there may be some loading time difference but the way I have been doing it and posted it up is the way Youme taught me when I first started making maps and needing ti build cubemaps for my levels. Everyone has their own opinion on which way is best so you may never fully satisfy anyone with the way you post up a tutorial, I always say try different ones out and see which one works best for you, mine obviously works for me everytime no hitch.
     
    • Thanks Thanks x 1
    Last edited: Nov 19, 2011
  5. tyler

    aa tyler snail prince, master of a ruined tower

    Messages:
    5,035
    Positive Ratings:
    3,990
    If you build cubemaps and then recompile your map, the cubemaps break. I'm not sure, but it is possible that's the issue here.
     
    • Thanks Thanks x 1
  6. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,535
    I will forever be mystified as to why cubemaps are apparently such a magical process and everyone and their dog has trouble with them...
     
    • Thanks Thanks x 2
  7. Robot3x

    Robot3x L2: Junior Member

    Messages:
    51
    Positive Ratings:
    3
    One theory I have is that I am re-running my map after compiling a tiny test map that I use for building things which has no lighting. That might be causing problems. I don't know how to set up a server outside of Hammer without the whole Internet being able to enter my computer.

    How do you load the game and then load your map? Do you type map mymapname +sv_lan 1 in the console?

    Edit:

    The test map seems to be what was causing the problem. I stuck a light in it, ran it, and then ran my main map and it looked fine. The tiny test map I guess was turning on fullbright. It's just terrifying because releasing a map without cubemaps seems like showing up to a party without pants on. "But I had pants on when I left the house. I don't know what happened."
     
    • Thanks Thanks x 1
    Last edited: Nov 19, 2011
  8. tyler

    aa tyler snail prince, master of a ruined tower

    Messages:
    5,035
    Positive Ratings:
    3,990
    Oh, yeah, if you run a fullbright map and then switch to another, you'll be in fullbright. Just do mat_fullbright 0 to end it.
     
  9. Terwonick

    Terwonick L6: Sharp Member

    Messages:
    278
    Positive Ratings:
    89
    I've always found that it's harder to do something if it's instructions read from the internet, I suggest to make things easier on yourself you should print off the cubemap building process (that's what I did at least). It really does help.