Light Compile and TraceGrid


(DWM|Commando) #1

HEy guys I am compiling a very large (in overall size) map, that is about half built (has buildings made) and during a -light -faster compile it takes about 2 and a half hours. Ive noticed that it spends the most time on the section called TraceGrid. It spends almost 10 - 30 minutes counting each number, and that adds up.

So in order to possibly reduce compile time as to not have to do it at night, i need to know what TraceGrid is, and what Radiant is actually compiling or doing when its at the TraceGrid stage. Then figure out a way to lower it if possible, to cut down compile time.

Thanks,
Matt


(Shaderman) #2

I don’t know what the compiler does while being in “TraceGrid stage” and how to reduce compile time for this stage but if you only want to see a part of your map with light (a preview of the area you’re working on), you could use regions to reduce the compile time. http://splashdamage.com/index.php?name=pnPHPbb2&file=viewtopic&t=8191


(Schaffer) #3

Hmm, me thinks I know what that map might be. Saw some screenies and it look sweet as :slight_smile:


(damocles) #4

Tracegrid is when the compiler is calculating the light grid of the map - that’s the grid that is used to light player models, other dyanamic models, etc.

If there are large areas of your map that thje players can’t ever get into, try using the lightgrid texture on a brush volume to tell the compiler where to create the light grid. (check the tutorials sticky thread for more info).

Another thing you can do is to set the grid complexity in the worldspawn - it’s something like:

_gridzise
128 128 128

where the three numbers represent the detail in the three axes (x,y,z). The smaller the number, the more detailed the light grid will be and longer it will take to compile. This is a last resort though as quite often if you make a low resolution light grid, it’ll result in models being poorly lit or sometimes completely screwy lit.

Just how big is this map? 2 and half hours for trace grid is LONG - or do you just have a really slow computer?


(Loffy) #5

damocles,
if I understand you right, a mapper can increase to for example _gridzise 512 512 512 and toss in lightjunior entities where the mapper wants to be absolutely sure that there are no pitch dark areas, eg a corridor or an important room.
Lightjuniors are lights that only shine on players and moving models like trucks and tanks (I think).
Then running around in third-person-view will make sure that the player is well-lit in all significant areas.
I have a 3 year old DELL so I have to use many tricks to reduce test-compiles. (2,0 Ghz)
(Just to share: I’ve never gotten region compile to work. I suck at that.)
|Commando, keep up the motivation! Test it well, and release it! Want to see it! How about a teaser-screenshot?
//Loffy


(kamikazee) #6

I have seen those problems for region compiling as well, this is a bug or missing thing in Gtkradiant.
However I have a method that is slightly faster then the previous ones, I’ll post it in this thread.


(damocles) #7

damocles,
if I understand you right, a mapper can increase to for example _gridzise 512 512 512 and toss in lightjunior entities where the mapper wants to be absolutely sure that there are no pitch dark areas, eg a corridor or an important room.
Lightjuniors are lights that only shine on players and moving models like trucks and tanks (I think).
Then running around in third-person-view will make sure that the player is well-lit in all significant areas.

That’s about right yeah. Light juniors light dynamic models, so that’s players, misc_gamemodels, projectiles, ammo packs etc.

I’m not 100% sure how light juniors work though. I’m not sure if they light the lightgrid or if they work as light sources in-game. My guess would be that they only affect the lightgrid and are not calculated at all in game. So it would still require a lot of careful lightjunior placement if you used a 512x512x512 light grid. I would think you only need to use a light grid that large in extreme cases. Generally you would want to let the normal lights be the main sources for the light grid or else you end up with weird mismatches between the light in an area and how bright players are (unless you happen to be really good at matching light junior levels to the rest of the area lights - not an easy task)


(DWM|Commando) #8

ahh gridsize, i had to use that in my other map hamburg (sadly unreleased yet) to be able to compile at all, i didnt realize that would help,and i like the lightgrid texture idea, cause there are lots of places people can’t go in map so it will be very helpful. thanks for the help guys.
oh and it is “that map” shaffer, the screens u saw were without the _minlight though, so i had to re-compile last night.

/loffy, i am not sure if i can show you a screen shot right yet, (notice 2nd sig pic) :wink:


(DWM|Commando) #9

alright i will post one seeing as how it does not reveal anything otehr than a nice building. Note there is no dynamic lighting or lighting of anykind other than the radar sky (moon) and _minlight.


(Loffy) #10

Niiice!