RSS Feed

How to fully compile Cube Maps!

#  Jan 19, 2009 at 7:59 AM
Join Date:
Oct 09, 2007
Post Count:
3571
 
Big Lou 78077
Loading...
Specialty: Demoman
Steam ID: {TF2F} Big Lou
GamerTag: Real Big Lou
Clan: {TF2F} Community
Best MapFortcast ContributorSquigMember
 
This is something I rarely see new mappers do, but it should be done in ALL maps.  Cubemaps are entities which tell the game engine how reflections should be mapped to world textures and props.  Without them, you will see pink checkerboard overlays over all reflective materials and the lighting may seem a bit "off".  However, simply placing cubemaps in your level won't always do the trick.  To get high-quality reflective surfaces, you must compile them into your .bsp.  This is quite simple, really, but may take some time if you have a lot of cubemaps and/or a slower machine.

Just follow these steps:

1) Create a server and open your map in TF2.
2) Go into the console and type: mat_specular 0
3) Console: buildcubemaps
4) End the server to disconnect, and in the console, type: mat_hdr_level 0
5) Recreate the server and open your map.
6) Console: buildcubemaps
7) Disconnect again.
8) Console: mat_hdr_level 2
9) Console: mat_specular 1

When you see "Console: xxxxx" that means type what follows the semi-colon in the console.  After you complete all these steps, you will notice a lot of differences in your map in terms of texture and lighting.  Chrome textures will now kick off a high-gloss reflection and some textures/props will have improved lighting.  Visually, everything will look better!

I suggest doing this before all released versions, even if they are alpha or beta maps.
#  Jan 21, 2009 at 9:14 AM
Join Date:
Oct 25, 2007
Post Count:
200
 
wowbaggin 79261
Loading...
Steam ID: wowbaggin
 
ooh, thanks for the info! I'll be sure to do that.
#  Jan 21, 2009 at 10:03 AM
Join Date:
Oct 16, 2007
Post Count:
3531
 
trainRiderJ 78536
Loading...
Steam ID: trainRiderJ
Clan: {TF2F}
SquigMember
 
FYI, if you build cubemaps in your .bsp and then make changes in your map, it's a pain to remove the cubemaps. Better to just change the name of the map to the next version (b2 to b3, etc).
#  Jan 23, 2009 at 8:54 AM
Join Date:
Oct 25, 2007
Post Count:
200
 
wowbaggin 79261
Loading...
Steam ID: wowbaggin
 
I tried to follow the step-by-step, but I (maybe) ran into some problems.

When you say "end the server to disconnect" I assume this means I should be at the opening TF2 screen where I have options to join a server, create a server, etc? If that's the case, when I put mat_hdr_level 0 into the consol it returns "Not playing a local game". Maybe that's supposed to happen, but it caught me off guard. That being said, I'm not entirely sure what all I did, but eventually I got it to work. Though at one point I ended up with this:




Anyway, I did manage to stumble through though, and now my floors are nice and shiny! Thanks!
#  Jan 23, 2009 at 9:20 AM
Join Date:
Oct 09, 2007
Post Count:
3571
 
Big Lou 78077
Loading...
Specialty: Demoman
Steam ID: {TF2F} Big Lou
GamerTag: Real Big Lou
Clan: {TF2F} Community
Best MapFortcast ContributorSquigMember
 
Ha, yeah, you probably took that screenshot when you had the settings changed.  You need to change them back to normal which is what the last 2 steps are for.  And yes, it will alert you that you aren't in a game... that's normal.

Glad to hear you got it working!
#  Jan 23, 2009 at 1:31 PM
Join Date:
Jun 27, 2008
Post Count:
17
 
Sgt Frag 86126
Loading...
 
Just a few more things that might help, I've stumbled on them before.

After step (9) it is good to load a new map

console
 map arena_lumberyard

then reload your map. I didn't do this last time and my hdr cubes didn't save.
------------

Also, even though the map you are working on is in the sdk source folder, the map is saved in the team fortress/tf/maps folder when cubemaps are built. So if you grab the wrong one to zip up it will be smaller file size and won't have cubemaps.
#  Jan 25, 2009 at 4:26 AM
Join Date:
Oct 25, 2007
Post Count:
200
 
wowbaggin 79261
Loading...
Steam ID: wowbaggin
 
hey,

so i've compiled maybe 3 iterations of my map tonight i can't seem to get the cubemaps to work with those directions. usually i get to step nine and everything's still blue, then i mess around some more (i forget what i do to get it to work, but i keep turning hdr off and on and rebuilding maps, usually turning hdr with the server open). So, just throwing that out there, that maybe there's a missing step?
#  Jan 25, 2009 at 5:23 AM
Join Date:
Oct 09, 2007
Post Count:
3571
 
Big Lou 78077
Loading...
Specialty: Demoman
Steam ID: {TF2F} Big Lou
GamerTag: Real Big Lou
Clan: {TF2F} Community
Best MapFortcast ContributorSquigMember
 
You need to turn back on hdr when the server is closed.
#  Feb 17, 2009 at 6:28 PM
Join Date:
Oct 25, 2007
Post Count:
200
 
wowbaggin 79261
Loading...
Steam ID: wowbaggin
 
Okay, more cubemap woes.

I'm trying to compile them for my beta 2, but with little avail. I can see it going through and creating all the maps, but it doesn't seem to be saving them (they don't appear to be there and the filesize isn't increasing).

Also, I'm getting this error in the console:


*** Error: Skybox vtf files for sky_hydro_01 weren't compiled with the same size texture and/or same flags!
Can't load skybox file sky_hydro_01 to build the default cubemap!


Any suggestions?
#  Feb 20, 2009 at 5:00 PM
Join Date:
Oct 25, 2007
Post Count:
200
 
wowbaggin 79261
Loading...
Steam ID: wowbaggin
 
hey, so apparently that error had nothing to do with it. I did a new compile (without changing anything) and it's fine now. Go fig.

Still have a question though. During normal play, what are the correct settings? I assume mat_specular 1, but what about mat_hdr_level?

Should this be set to 2 or 1? I ask because when I set it to 2, as suggested by all tutorials, everything's all "negaverse" (see picture up above). But when I set mat_hdr_level 1 everything is fine with cubemaps working correctly. Is this proper or am I still screwing something up?

Copyright 2007-2008 All Rights Reserved

Team Fortress 2


2 Guys 1 Kill: {TF2F} FlyingPenguin - (102 kill assists)
Captures Blocked: Nimbli Bimbli - (26 captures blocked)
Dominator: {TF2F} Bitch Nasty - (25 dominations)
Flags Captured: Corporal Clegg - (11 flags captured)
Flags Defended: MechaEdd - (12 flags defended)
Physician Assisted Homicide: {TF2F}SME®BUI©K - (271 medic kill assists)
Points Captured: {TF2F}SME®BUI©K - (30 points captured)
Revenger: Count_Flakula - (10 revenges)
Spy Power: Chro - (19 objects killed as spy)
Ubercharger: {TF2F}SME®BUI©K - (89 ubercharges)
Axe Man: {TF2F} Ninja Dude - (18 kills with fireaxe)
Axtinguished: {TF2F} BOOSH Rizzilio - (81 kills with axtinguisher)
Batter Up!: soup! - (16 kills with bat)
Biggest Prick: Sam - ClutchKill.com - (8 kills with syringegun)
Blood Sucker: {TF2F}SME®BUI©K - (30 kills with blutsauger)
Broke Backburner: {TF2F} FlyingPenguin - (223 kills with backburner)
Can You Dig It?: {TF2F}.TüRb!NE. - (3 kills with shovel)
Doctor's Certificate: Maero - (16 kills with bonesaw)
Drunken Brawler: [???] Deviruchi - (4 kills with bottle)
Epic Defender: {TF2F} Spy - (9 kills with wrench)
Fire Spitter: {TF2F}blistering - (100 kills with flamethrower)
Flare Gunner: {TF2F} FlyingPenguin - (12 kills with flare gun)
Grenade Spammer: GeneralSheep - (47 kills with pipe)
Grey Matter: STar - (168 snipings as sniper)
Hadouken Master: Xandier - (1 kills with pyro taunt)
Hot Potato: {TF2F} BOOSH Rizzilio - (4 kills with rocket deflection)
I <3 Sasha: {TF2F} Bitch Nasty - (181 kills with minigun)
Knife Maniac: {TF2F} Dartagnan - (109 knifings)
Last Resort: [Ba-El] BoC - (26 kills with smg)
Manslayer: [FRGT] Klare - (10 kills with machete)
Master Fister: Maero - (3 kills with fists)
Peashooter Marksman: Corporal Clegg - (48 kills with scout pistol)
Pickle Squad Award: [NH]Pitt - (18 pickles man handled)
Rocket Scientist: [TF2F]Lancer - (217 kills with rocket)
Scatter Shot: Corporal Clegg - (147 kills with scattergun)
Sentrygun Master: Numenor - (142 kills with sentrygun)
Spam Blocker: {TF2F} BOOSH Rizzilio - (1 kills with pipe deflection)
Spy Checker: {TF2F} Fanlaen - (5 kills with pistol)
Sticky Explosion: {TF2F}Album - (105 kills with pipe remote)
Ubersawer: Psycholord - (27 kills with ubersaw)
Stats Refreshed 6/24/2008 5:00:03 AM CST
AddThis Social Bookmark Button
Fortcast Podcast
Donate
Welcome, you are not logged in.
Login or Register
Team Fortress 2 Fort Team Fortress 2 Fort