Extremely long compile times

beefwellington

L1: Registered
Mar 5, 2008
28
0
My map use to take 45-60 seconds to compile. I added 2 512x128x512 brushes and displaced 3 sides of it (top and two sides). Now my compile time for VIS is an hour and 5 mins while the rest of things are 15-45 seconds. RAD is pretty high too from wat i remember. Don't have the log to check. I know displacements increase compile time but maps like gravelpit would take DAYS to compile according to my situation.

what can/should i do to fix this?

Also, i compile everything on Normal, not fast.
 

drp

aa
Oct 25, 2007
2,273
2,628
theres not much we can do without a compile log :/
 

beefwellington

L1: Registered
Mar 5, 2008
28
0
theres not much we can do without a compile log :/

Yeah i'll try to get one in a few when i leave for class... assuming it finishes. Had it going for an hour and a half and it was only at 1...2...3...4 for the bottom VIS progress meter (i think its the portal flow one).
 

Narkissus

L5: Dapper Member
Jan 22, 2008
228
9
Sounds like you have a problem with the optimization of the map if it takes that long, have you func detailed anything? I dont think its the displacements that cause it. Have you added any other things since it went up?
 

Jazz

L5: Dapper Member
Mar 9, 2008
240
23
Try loading your portal file, and where there are ALOT of blue lines, turn those brushes into "func_detail"s. It really sped up my compile times.
 

Scotland Tom

L6: Sharp Member
Jan 19, 2008
332
64
Indeed, this sounds like an optimization issue. Using detail brushes (func_detail) is probably what's going to have the largest impact on your compile time. Also making sure your map is leak free is a big consideration. This guide is probably the best thing any mapper could read to assist with optimization.
 

beefwellington

L1: Registered
Mar 5, 2008
28
0
** Executing...
** Command: "c:\program files\valve\steam\steamapps\beef@rochester.rr.com\sourcesdk\bin\orangebox\bin\vbsp.exe"
** Parameters: -game "c:\program files\valve\steam\steamapps\beef@rochester.rr.com\team fortress 2\tf" "C:\Program Files\Valve\Steam\steamapps\beef@rochester.rr.com\sourcesdk_content\tf\mapsrc\cp_arena_v2a2"

Valve Software - vbsp.exe (Mar 11 2008)
2 threads
materialPath: c:\program files\valve\steam\steamapps\beef@rochester.rr.com\team fortress 2\tf\materials
Loading C:\Program Files\Valve\Steam\steamapps\beef@rochester.rr.com\sourcesdk_content\tf\mapsrc\cp_arena_v2a2.vmf
fixing up env_cubemap materials on brush sides...
ProcessBlock_Thread: 0...1...2...3...4...5...6...7...8...9...10 (0)
ProcessBlock_Thread: 0...1...2...3...4...5...6...7...8...9...10 (1)
Processing areas...done (0)
Building Faces...done (0)
Chop Details...done (0)
Find Visible Detail Sides...
Merged 60 detail faces...done (0)
Merging details...done (0)
FixTjuncs...
PruneNodes...
WriteBSP...
done (0)
writing C:\Program Files\Valve\Steam\steamapps\beef@rochester.rr.com\sourcesdk_content\tf\mapsrc\cp_arena_v2a2.prt...Building visibility clusters...
done (0)
*** Error: Skybox vtf files for skybox/sky_dustbowl_01 weren't compiled with the same size texture and/or same flags!
Can't load skybox file skybox/sky_dustbowl_01 to build the default cubemap!
*** Error: Skybox vtf files for skybox/sky_dustbowl_01 weren't compiled with the same size texture and/or same flags!
Can't load skybox file skybox/sky_dustbowl_01 to build the default cubemap!
Finding displacement neighbors...
Finding lightmap sample positions...
Displacement Alpha : 0...1...2...3...4...5...6...7...8...9...10
Building Physics collision data...
done (0) (160053 bytes)
Error loading studio model ""!
Placing detail props : 0...1...2...3...4...5...6...7...8...9...10
Compacting texture/material tables...
Reduced 1181 texinfos to 687
Reduced 31 texdatas to 30 (682 bytes to 660)
Writing C:\Program Files\Valve\Steam\steamapps\beef@rochester.rr.com\sourcesdk_content\tf\mapsrc\cp_arena_v2a2.bsp
15 seconds elapsed

** Executing...
** Command: "c:\program files\valve\steam\steamapps\beef@rochester.rr.com\sourcesdk\bin\orangebox\bin\vvis.exe"
** Parameters: -game "c:\program files\valve\steam\steamapps\beef@rochester.rr.com\team fortress 2\tf" "C:\Program Files\Valve\Steam\steamapps\beef@rochester.rr.com\sourcesdk_content\tf\mapsrc\cp_arena_v2a2"

Valve Software - vvis.exe (Mar 11 2008)
2 threads
reading c:\program files\valve\steam\steamapps\beef@rochester.rr.com\sourcesdk_content\tf\mapsrc\cp_arena_v2a2.bsp
reading c:\program files\valve\steam\steamapps\beef@rochester.rr.com\sourcesdk_content\tf\mapsrc\cp_arena_v2a2.prt
1004 portalclusters
3995 numportals
BasePortalVis: 0...1...2...3...4...5...6...7...8...9...10 (2)
PortalFlow: 0...1...2...3...4
** Executing...
** Command: "c:\program files\valve\steam\steamapps\beef@rochester.rr.com\sourcesdk\bin\orangebox\bin\vrad.exe"
** Parameters: -game "c:\program files\valve\steam\steamapps\beef@rochester.rr.com\team fortress 2\tf" "C:\Program Files\Valve\Steam\steamapps\beef@rochester.rr.com\sourcesdk_content\tf\mapsrc\cp_arena_v2a2"

Valve Software - vrad.exe SSE (Mar 11 2008)

Valve Radiosity Simulator
2 threads
[Reading texlights from 'lights.rad']
[34 texlights parsed from 'lights.rad']

Loading c:\program files\valve\steam\steamapps\beef@rochester.rr.com\sourcesdk_content\tf\mapsrc\cp_arena_v2a2.bsp
No vis information, direct lighting only.
Setting up ray-trace acceleration structure... Done (2.64 seconds)
2490 faces
1 degenerate faces
323662 square feet [46607388.00 square inches]
6 Displacements
6231 Square Feet [897276.31 Square Inches]
214 direct lights
BuildFacelights: 0...1...2...3...4...5...6...7...8...9...10 (12)
Build Patch/Sample Hash Table(s).....Done<0.0234 sec>
FinalLightFace: 0...1...2...3...4...5...6...7...8...9...10 (3)
FinalLightFace Done
0 of 0 (0% of) surface lights went in leaf ambient cubes.
ThreadComputeLeafAmbient: 0...1...2...3...4...5...6...7...8...9...10 (16)
Writing leaf ambient...done
Ready to Finish

Object names Objects/Maxobjs Memory / Maxmem Fullness
------------ --------------- --------------- --------
models 37/1024 1776/49152 ( 3.6%)
brushes 405/8192 4860/98304 ( 4.9%)
brushsides 3056/65536 24448/524288 ( 4.7%)
planes 2502/65536 50040/1310720 ( 3.8%)
vertexes 4743/65536 56916/786432 ( 7.2%)
nodes 2013/65536 64416/2097152 ( 3.1%)
texinfos 687/12288 49464/884736 ( 5.6%)
texdata 30/2048 960/65536 ( 1.5%)
dispinfos 6/0 1056/0 ( 0.0%)
disp_verts 150/0 3000/0 ( 0.0%)
disp_tris 192/0 384/0 ( 0.0%)
disp_lmsamples 16696/0 16696/0 ( 0.0%)
faces 2490/65536 139440/3670016 ( 3.8%)
hdr faces 0/65536 0/3670016 ( 0.0%)
origfaces 1266/65536 70896/3670016 ( 1.9%)
leaves 2051/65536 65632/2097152 ( 3.1%)
leaffaces 3976/65536 7952/131072 ( 6.1%)
leafbrushes 1585/65536 3170/131072 ( 2.4%)
areas 2/256 16/2048 ( 0.8%)
surfedges 17304/512000 69216/2048000 ( 3.4%)
edges 10563/256000 42252/1024000 ( 4.1%)
LDR worldlights 214/8192 18832/720896 ( 2.6%)
HDR worldlights 0/8192 0/720896 ( 0.0%)
leafwaterdata 0/32768 0/393216 ( 0.0%)
waterstrips 349/32768 3490/327680 ( 1.1%)
waterverts 0/65536 0/786432 ( 0.0%)
waterindices 5841/65536 11682/131072 ( 8.9%)
cubemapsamples 1/1024 16/16384 ( 0.1%)
overlays 4/512 1408/180224 ( 0.8%)
LDR lightdata [variable] 1780792/0 ( 0.0%)
HDR lightdata [variable] 0/0 ( 0.0%)
visdata [variable] 0/16777216 ( 0.0%)
entdata [variable] 147626/393216 (37.5%)
LDR ambient table 2051/65536 8204/262144 ( 3.1%)
HDR ambient table 2051/65536 8204/262144 ( 3.1%)
LDR leaf ambient 8560/65536 239680/1835008 (13.1%)
HDR leaf ambient 2051/65536 57428/1835008 ( 3.1%)
occluders 0/0 0/0 ( 0.0%)
occluder polygons 0/0 0/0 ( 0.0%)
occluder vert ind 0/0 0/0 ( 0.0%)
detail props [variable] 1/12 ( 8.3%)
static props [variable] 1/39926 ( 0.0%)
pakfile [variable] 54/0 ( 0.0%)
physics [variable] 160053/4194304 ( 3.8%)
physics terrain [variable] 1090/1048576 ( 0.1%)

Level flags = 0

Total triangle count: 7256
Writing c:\program files\valve\steam\steamapps\beef@rochester.rr.com\sourcesdk_content\tf\mapsrc\cp_arena_v2a2.bsp
35 seconds elapsed

** Executing...
** Command: Copy File
** Parameters: "C:\Program Files\Valve\Steam\steamapps\beef@rochester.rr.com\sourcesdk_content\tf\mapsrc\cp_arena_v2a2.bsp" "c:\program files\valve\steam\steamapps\beef@rochester.rr.com\team fortress 2\tf\maps\cp_arena_v2a2.bsp"



I had to stop my VVIS cuz I believe it got stuck at "1...2...3...4" again. Left it on for 2 hours and it didn't go anywhere, just like earlier with its 1.5 hour compile. The only thing i did after the displacements was add about 10 light_spots. 4 of which are near each displacement.

I've got a lot of my brushes as func_detail at the moment. I was having leak problems a couple versions ago (versions change every 3-4 days). Somehow they were caused by models, not brushes and my map is completely sealed off. So i added a "nodraw" box around my map to catch any leaks. That increased my compile time a bit too but only by 30 seconds.


Here's a pic of my portal file and something tells me, its not right lol
wtf%20%28Large%29.jpg
 

Scotland Tom

L6: Sharp Member
Jan 19, 2008
332
64
Well, you don't have any leaks, so that's good. After checking your compile log HERE (very good resource) it seems you've got an error with your skybox texture, a missing model, and a degenerate face. The skybox texture I'm not sure how to fix and the degenerate face is such a minor issue you shouldn't bother with it. The missing model you'll want to find and change. Run your compile log through the error checker at the link I gave you and it'll give you a suggestion how to fix that.

You mentioned you put a box around your level in order to solve leaks. Don't. That means everything within that box will be rendered during compile times and has the potential to be rendered during gameplay. Even if players won't ever see it, anything inside that box is fair game for Source to render. Fix your leaks one by one until they're gone. The quick and dirty box fix is a poor one at best.

As for your overall compile issues, look at the guide I linked to in my previous post. It is an ENORMOUSLY helpful resource in helping you understand how the compile process works and what increases the time it takes. It's also extremely helpful for making sure your map not only compiles well, but plays well even in the most graphically intense circumstances. Read it once, then read it again. Then do some mapping and read it again after some time has passed. It's really that important a resource.
 

BurninWater

L1: Registered
Mar 11, 2008
27
0
You mentioned you put a box around your level in order to solve leaks. Don't. That means everything within that box will be rendered during compile times and has the potential to be rendered during gameplay. Even if players won't ever see it, anything inside that box is fair game for Source to render. Fix your leaks one by one until they're gone. The quick and dirty box fix is a poor one at best.


jackpot :), the box is to blame, most likely, and its easily solved just put tools/toolskybox texture on it should fix the compile time together with func_detailing if ya didnt do that already
 

Koei

L4: Comfortable Member
Feb 23, 2008
186
4
I still use a giant box because I haven't figured out where 3 doorways will lead (well I did sortoff, it's in my head). Ofc I could seal 'm with a brush, but I want the light. I don't compile with vvis for internal tests, I haven't reached optimization stages yet.
 

Scotland Tom

L6: Sharp Member
Jan 19, 2008
332
64
You could indeed seal them with a brush... with a skybox texture. You could literally create a floating cube with the skybox on it if you wanted to. Go ahead and get rid of the box and just block your small holes with individual brushes. If you want the light, use the skybox texture on those smaller brushes and you'll have it.
 

Spike

L10: Glamorous Member
Feb 13, 2008
716
82
When I mapped for Goldsource I remember I made a beach that took 2 hours to compile. After some optimization it took 3 minutes. Optimization is the key.
 

beefwellington

L1: Registered
Mar 5, 2008
28
0
So i got rid of the no draw box and it compiles in a few seconds now... but it seems like EVERY model is leaked somehow. I loaded the pointfile and it doesn't make sense to me. Like, the red line goes from a light source straight through the middle of a square brush. No holes or openings anywhere.
 

Scotland Tom

L6: Sharp Member
Jan 19, 2008
332
64
The red pointfile line will begin at an entity (in this case the light) and it will eventually exit the map. If it's going straight through a solid brush then the brush most likely isn't a world brush capable of sealing your map. If it's a func_detail select it and click the "To World" button to change it back to a world brush. If that's not the issue you likely have a very small gap that will take some tricky camera maneuvering to find. A leak can be a fraction of a unit wide and still be a leak.

If you really have what seems to be a lot of leaks you probably have two options. 1) Spend a lot of time fixing every single one. 2) Start from scratch, constantly making sure to seal possible leaks before you move on and creating func_detail brushes as needed along the way.
 

beefwellington

L1: Registered
Mar 5, 2008
28
0
Yeah i did have my all my interior walls, floor, and ceiling set to func_detail. took that off and got rid of some leaks but now i've got one like this that goes from a model of a wall/barrier to nothing

wtf2%20%28Large%29.jpg
 

Scotland Tom

L6: Sharp Member
Jan 19, 2008
332
64
It's because the model is essentially "puncturing" your map. You don't want any props or other entities on the outside. Everything that's not a world brush (with few exceptions) needs to remain fully contained. So you can either move the prop inside or you can extend the map to contain it.