PDA

View Full Version : The Right Way to Compile a Map


MeatsOfEvil
05-15-2011, 09:48 PM
I don't know it. And it makes me sad. I'm working on a campaign right now and my level is taking 15+ minutes to compile with lights and fog (about a minute without), and without hdr enabled. With everything set to fast instead of normal as well. I've just learned that when my friends test my map on their better computers, the fog doesn't show up, probably because they are using high settings and I'm not compiling hdr. I've caught glimpses of the "right way", but could not get the whole picture. I downloaded a compiler a while ago that was set up for source but not l4d2, and couldn't figure out how to make it work for me (don't remember the name). But now the appeal of a faster compiler that doesn't make my poor computer cry is starting to call to me again, as every time I release a version to my friends they come up with great new ideas for the level.

Short version - I know that Hammer's compiler isn't the best way to be compiling my maps. What should I be using instead, and how do I set it up?

shotgunefx
05-16-2011, 12:35 AM
I don't know it. And it makes me sad. I'm working on a campaign right now and my level is taking 15+ minutes to compile with lights and fog (about a minute without), and without hdr enabled. With everything set to fast instead of normal as well. I've just learned that when my friends test my map on their better computers, the fog doesn't show up, probably because they are using high settings and I'm not compiling hdr. I've caught glimpses of the "right way", but could not get the whole picture. I downloaded a compiler a while ago that was set up for source but not l4d2, and couldn't figure out how to make it work for me (don't remember the name). But now the appeal of a faster compiler that doesn't make my poor computer cry is starting to call to me again, as every time I release a version to my friends they come up with great new ideas for the level.

Short version - I know that Hammer's compiler isn't the best way to be compiling my maps. What should I be using instead, and how do I set it up?

L4D2 ONLY uses hdr, so -both is a waste of half your time, change your compile options and only compile -hdr. It's so stupid it's the default.

As far as your fog, if you want help, details details details.

Depending on your light options, it can take a very long time, with everything turned on, my map is getting near an hour now

ObamaYoMomma
05-16-2011, 04:09 AM
Okay here are some tips, go to map and click load portal file. This will show you the main problems in your map. Anywhere where you see large amounts of blue blocks use func_Detail on that block that is causing the problem. Another thing to do is use hint/skip brushes in your map here is some info on the hint brushes: http://developer.valvesoftware.com/wiki/Hint_brush
Func_detail is your friend when it comes to compiling func_detailing 5 or 10 things can easily speed up compile time. Also when you are on final compile use -final and -staticproplighting with a space between both. When doing a regular test compile just compile with vvis on fast.

MeatsOfEvil
05-16-2011, 12:25 PM
@ObamaYoMomma - I believe I am utilizing detail brushes properly. Like I said, if I don't do light or fog (but vis still runs) it only takes about a minute (for a full sized map, I don't think that's bad). I run vis on fast, and rad on fast if I run it at all. I have not tried hint/skip brushes yet, (some areaportals though) as I'm not convinced I can do it better than the game can.

@shotgunefx - Well...up until today, I've been using normal compile mode. I'm going to assume you are talking about using expert compile mode (although I remember a discussion about an external compiler, but using valve's properly would still be a step up). I don't really know my way around expert mode, but I'm guessing that you're talking about the HDR full compile config. Should I use that for play-testing builds, and fast for see-if-stuff-works builds? As of now the only difference between those builds for me is enabling/disabling rad, plus turning the fog on and off. Also, I'm not going to pretend I know what HDR/LDR are, but if I'm running the game at bare minimum settings with everything set to low, that's still HDR?

Thanks for the help :D

shotgunefx
05-16-2011, 12:31 PM
@ObamaYoMomma - I believe I am utilizing detail brushes properly. Like I said, if I don't do light or fog (but vis still runs) it only takes about a minute (for a full sized map, I don't think that's bad). I run vis on fast, and rad on fast if I run it at all. I have not tried hint/skip brushes yet, (some areaportals though) as I'm not convinced I can do it better than the game can.

@shotgunefx - Well...up until today, I've been using normal compile mode. I'm going to assume you are talking about using expert compile mode (although I remember a discussion about an external compiler, but using valve's properly would still be a step up). I don't really know my way around expert mode, but I'm guessing that you're talking about the HDR full compile config. Should I use that for play-testing builds, and fast for see-if-stuff-works builds? As of now the only difference between those builds for me is enabling/disabling rad, plus turning the fog on and off. Also, I'm not going to pretend I know what HDR/LDR are, but if I'm running the game at bare minimum settings with everything set to low, that's still HDR? Thanks for the help :D

I believe vrad by default has "-both" specified, this means vrad runs twice, once for regular lighting (ldr) and once for HDR, but the thing is, there is no ldr in l4d2, so basically it's useless data and makes your files twice as big and vrad twice as long, so turn it off in all configurations by switching to "-hdr".

What do you have your max fog density set to? 1 or less? What's farz set to? Large view distances means more light bounces which means more time.

Also brighter lights cast farther, lights that are near horizontal as well as they touch more areas.

A "fast" compile on my map now has vrad taking like 25 mins, on -full -final, yadda yadda, an hour

MeatsOfEvil
05-16-2011, 12:44 PM
Fog max density is 1, far z is 3000. I think I'm happy with the far z distance, although I don't actually know what happens with lower fog density. Wouldn't that let the players easily see that I'm cutting off the draw distance...? Would it let the skybox be visible?

And for thoroughness sake (I tried googling this already and didn't find an exact answer), I should be using expert compile mode from now on and whenever I compile lighting I should change "-both" to "-hdr", right? Also, some configurations don't mention "-both" or "-hdr". The default config's light parameters are "-game $gamedir $path\$file". Is that going to be LDR lighting, and should I add "-hdr" to it?

shotgunefx
05-16-2011, 12:50 PM
I believe vrad by default has "-both" specified, this means vrad runs twice, once for regular lighting (ldr) and once for HDR, but the thing is, there is no ldr in l4d2, so basically it's useless data and makes your files twice as big and vrad twice as long, so turn it off in all configurations by switching to "-hdr".

What do you have your max fog density set to? 1 or less? What's farz set to? Large view distances means more light bounces which means more time.

Also brighter lights cast farther, lights that are near horizontal as well as they touch more areas.

A "fast" compile on my map now has vrad taking like 25 mins, on -full -final, yadda yadda, an hour

Well your fog settings seem fine, and yeah, if you have less than 1, they'll see it clip out to the skybox (which may or may not be a problem).

You know, i haven't used simple mode in ages, I'm guessing it defaults to -both or -ldr (though I think it's both), I would just use expert and remove that and add -hdr from vrad, but more info here
http://developer.valvesoftware.com/wiki/VRAD

MeatsOfEvil
05-16-2011, 12:55 PM
Alright, from now on whenever I compile light I'm gonna use hdr. Thankfully I haven't wasted any time so far double-compiling my lighting, but instead of screwing over my friends with ldr lighting on their high-end machines, we all should have proper lighting now. Thanks for the help! :D