Compile time keeps increasing

  • Site Migration: See bugs? Report them here. Want something changed or have an idea? Suggest it here.
Mar 23, 2013
1,015
No, this is not about vvis, it compiles in 1 second.

It's vrad that got really long to compile, though I mostly added logic entities and triggers since the last version. Only very few surfaces that will have light maps have been added, yet my compile times increased from 3 minutes to 7 minutes. (hdr only)

Any way to reduce it to reasonable length or idea what may cause this?
 

henke37

aa
Sep 23, 2011
2,075
Try lightmap scale optimization.
 

Billo

aa
Feb 8, 2016
888
i had the same problem before. try keeping your map clean and try func_details wherever you can have them. for example if you have some details for instance turn them into func detail or in general brushes that dont block your vision or something like steps.
but be careful cause func_details dont act like normal brushes and they can't seal your map. use them wherever you can.
 
Mar 23, 2013
1,015
i had the same problem before.

That can't be it. Like I said, my vvis compiles in 1 second. It's vrad that is taking its time and how is func_detail supposed to improve it? In fact, wouldn't func_details extend the vrad compile time as they don't remove half-covered brush faces unlike world brushes?? So with more func_detail you end up with some bigger faces for lightmap informations, so higher compile times, right?
And of course I was already increasing lightmap scales where it's useful.

Anyway, I figured it out. I have a custom lights.rad file (called lamps.rad, hah) which I use to make a few textures emit light. I expected them to add so much data to compile as a regular light entity and I'm even using those textures only at a few places, yet without compiling them it only took 2 minutes to compile!

They take far longer to compile than I expected. I appologize to all logic entities for suspecting them.
 

Pocket

Naylte ven, naylte yen.
aa
Nov 14, 2009
4,652
Yeah, light brushes produce new light entities every X units, or something, in order to ensure that there aren't visible gaps. I don't know if anyone's ever done a thorough investigation into the specifics, but they're pretty close together.
 

henke37

aa
Sep 23, 2011
2,075
I bet it's similar to how skybrushes work: they also spawn rays every so often.
 

Freyja

aa
Jul 31, 2009
2,942
Light brushes spawn a 'light entity' every intersection on the lightmap grid of the face. Lowering/raising the lightmap grid increases/decreases the number of rays cast
 

henke37

aa
Sep 23, 2011
2,075
Don't forget the vrad commandline, that lets you control how many rays are cast from each point. That's the main difference between a rush compile and a final compile.
 

Pocket

Naylte ven, naylte yen.
aa
Nov 14, 2009
4,652
Light brushes spawn a 'light entity' every intersection on the lightmap grid of the face. Lowering/raising the lightmap grid increases/decreases the number of rays cast
Not light_spot?