Source SDK

Source SDK

WTF_CumEddy May 14, 2018 @ 9:15am
Hammer Editor Optimize My Map
Hey guys so I ran into a problem with my map (Taking 1hr to compile) and I was told to try optimize my map using hints and skip textures. I have been doing this with using YouTube tutorials but it seems to change nothing, it still takes up to 1hr to compile. If someone could help me out it would be so great thanks.
< >
Showing 1-7 of 7 comments
Misuune May 14, 2018 @ 10:29am 
Your map compile time will depend on your setup, optimization and brushwork that it uses.


1. Advanced brushes or too many spikes in one place for example = turn into func_detail

2. Dont be too optimization-hungry. It even hurts fps and compile time if you put too many
useless skips/hints/areaportals.

3. Hardware, a crappy Intel Atom wont compile instantly.

4. Messy brushwork, its just like a messy room you have to clean it aka just sort brushes into shaping them into blocks or any other shape not just to have your map's floor in void for NO
reason

5. Nodraw is your friend if you can use it anywhere player cant see. Save time and fps by using it

6. Tutorials. 3kliksphilip and TopHattWaffle have videos for you that go in much greater detail.
WTF_CumEddy May 14, 2018 @ 2:43pm 
Originally posted by Angry Mann:
Your map compile time will depend on your setup, optimization and brushwork that it uses.


1. Advanced brushes or too many spikes in one place for example = turn into func_detail

2. Dont be too optimization-hungry. It even hurts fps and compile time if you put too many
useless skips/hints/areaportals.

3. Hardware, a crappy Intel Atom wont compile instantly.

4. Messy brushwork, its just like a messy room you have to clean it aka just sort brushes into shaping them into blocks or any other shape not just to have your map's floor in void for NO
reason

5. Nodraw is your friend if you can use it anywhere player cant see. Save time and fps by using it

6. Tutorials. 3kliksphilip and TopHattWaffle have videos for you that go in much greater detail.
So I tried adding nodraw textures to unseen areas, added like 3 hints, changed nearly all my walls, flooring ect. and it has been cut down to 52 minutes to compile the map... I don't know what else I can do.

Here is my compiled log--->

** Executing...
** Command: "G:\Micks Files\home\Private\Games\steam games\steamapps\common\GarrysMod\bin\vbsp.exe"
** Parameters: -game "G:\Micks Files\home\Private\Games\steam games\steamapps\common\GarrysMod\garrysmod" "C:\Users\mickd\Desktop\The park\ph_the_park.vmf"

Valve Software - vbsp.exe (Feb 19 2018)
2 threads
materialPath: G:\Micks Files\home\Private\Games\steam games\steamapps\common\GarrysMod\garrysmod\materials
Loading C:\Users\mickd\Desktop\The park\ph_the_park.vmf
Could not locate 'GameData' key in g:\micks files\home\private\games\steam games\steamapps\common\garrysmod\garrysmod\gameinfo.txt
Patching WVT material: maps/ph_the_park/nature/blendrockdirt002a_wvt_patch
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 (0)
Processing areas...Wrote C:\Users\mickd\Desktop\The park\ph_the_park.lin
Areaportal leak ! File: C:\Users\mickd\Desktop\The park\ph_the_park.lin
Brush 68844: areaportal brush doesn't touch two areas

Brush 68820: areaportal brush doesn't touch two areas

Brush 68827: areaportal brush doesn't touch two areas

Brush 68834: areaportal brush doesn't touch two areas

Brush 68839: areaportal brush doesn't touch two areas
done (0)
Building Faces...done (0)
Chop Details...done (0)
Find Visible Detail Sides...
Merged 208 detail faces...done (0)
Merging details...done (1)
FixTjuncs...
PruneNodes...
WriteBSP...
done (0)
writing C:\Users\mickd\Desktop\The park\ph_the_park.prt...Building visibility clusters...
done (0)
Creating default LDR cubemaps for env_cubemap using skybox materials:
skybox/sky_day01_01*.vmt
! Run buildcubemaps in the engine to get the correct cube maps.
Creating default HDR cubemaps for env_cubemap using skybox materials:
skybox/sky_day01_01*.vmt
! Run buildcubemaps in the engine to get the correct cube maps.
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 (1) (109906 bytes)
Placing detail props : 0...1...2...3...4...5...6...7...8...9...10
Compacting texture/material tables...
Reduced 665 texinfos to 408
Reduced 48 texdatas to 44 (846 bytes to 696)
Writing C:\Users\mickd\Desktop\The park\ph_the_park.bsp
2 seconds elapsed

** Executing...
** Command: "G:\Micks Files\home\Private\Games\steam games\steamapps\common\GarrysMod\bin\vvis.exe"
** Parameters: -game "G:\Micks Files\home\Private\Games\steam games\steamapps\common\GarrysMod\garrysmod" "C:\Users\mickd\Desktop\The park\ph_the_park"

Valve Software - vvis.exe (Feb 19 2018)
2 threads
reading c:\users\mickd\desktop\the park\ph_the_park.bsp
reading c:\users\mickd\desktop\the park\ph_the_park.prt
385 portalclusters
1370 numportals
BasePortalVis: 0...1...2...3...4...5...6...7...8...9...10 (0)
PortalFlow: 0...1...2...3...4...5...6...7...8...9...10 (3130)
Optimized: 77 visible clusters (0.05%)
Total clusters visible: 143422
Average clusters visible: 372
Building PAS...
Average clusters audible: 373
visdatasize:41031 compressed from 43120
writing c:\users\mickd\desktop\the park\ph_the_park.bsp
52 minutes, 11 seconds elapsed

** Executing...
** Command: "G:\Micks Files\home\Private\Games\steam games\steamapps\common\GarrysMod\bin\vrad.exe"
** Parameters: -game "G:\Micks Files\home\Private\Games\steam games\steamapps\common\GarrysMod\garrysmod" "C:\Users\mickd\Desktop\The park\ph_the_park"

Valve Software - vrad.exe SSE (Feb 19 2018)

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

Loading c:\users\mickd\desktop\the park\ph_the_park.bsp
Setting up ray-trace acceleration structure... Done (0.12 seconds)
2293 faces
3 degenerate faces
3000660 square feet [432095072.00 square inches]
0 Displacements
0 Square Feet [0.00 Square Inches]
2290 patches before subdivision
70532 patches after subdivision
sun extent from map=0.087156
18 direct lights
BuildFacelights: 0...1...2...3...4...5...6...7...8...9...10 (27)
BuildVisLeafs: 0...1...2...3...4...5...6...7...8...9...10 (19)
transfers 10956765, max 915
transfer lists: 83.6 megs
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #1 added RGB(97559, 151795, 65051)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #2 added RGB(48534, 92810, 32249)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (1)
Bounce #3 added RGB(14150, 13699, 5513)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #4 added RGB(7918, 7162, 2382)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #5 added RGB(4738, 3003, 1036)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (1)
Bounce #6 added RGB(2984, 1701, 492)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #7 added RGB(1905, 961, 235)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #8 added RGB(1223, 561, 113)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #9 added RGB(787, 329, 55)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (1)
Bounce #10 added RGB(508, 193, 26)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #11 added RGB(328, 114, 13)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #12 added RGB(211, 67, 6)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (1)
Bounce #13 added RGB(137, 39, 3)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #14 added RGB(88, 23, 1)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #15 added RGB(57, 14, 1)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (1)
Bounce #16 added RGB(37, 8, 0)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #17 added RGB(24, 5, 0)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #18 added RGB(15, 3, 0)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (1)
Bounce #19 added RGB(10, 2, 0)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #20 added RGB(6, 1, 0)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #21 added RGB(4, 1, 0)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #22 added RGB(3, 0, 0)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #23 added RGB(2, 0, 0)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #24 added RGB(1, 0, 0)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #25 added RGB(1, 0, 0)
Build Patch/Sample Hash Table(s).....Done<0.0684 sec>
FinalLightFace: 0...1...2...3...4...5...6...7...8...9...10 (6)
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 (7)
Writing leaf ambient...done
Ready to Finish

Object names Objects/Maxobjs Memory / Maxmem Fullness
------------ --------------- --------------- --------
models 72/1024 3456/49152 ( 7.0%)
brushes 268/8192 3216/98304 ( 3.3%)
brushsides 1880/65536 15040/524288 ( 2.9%)
planes 2168/65536 43360/1310720 ( 3.3%)
vertexes 3457/65536 41484/786432 ( 5.3%)
nodes 1164/65536 37248/2097152 ( 1.8%)
texinfos 408/12288 29376/884736 ( 3.3%)
texdata 44/2048 1408/65536 ( 2.1%)
dispinfos 0/0 0/0 ( 0.0%)
disp_verts 0/0 0/0 ( 0.0%)
disp_tris 0/0 0/0 ( 0.0%)
disp_lmsamples 0/0 0/0 ( 0.0%)
faces 2293/65536 128408/3670016 ( 3.5%)
hdr faces 0/65536 0/3670016 ( 0.0%)
origfaces 952/65536 53312/3670016 ( 1.5%)
leaves 1237/65536 39584/2097152 ( 1.9%)
leaffaces 3091/65536 6182/131072 ( 4.7%)
leafbrushes 947/65536 1894/131072 ( 1.4%)
areas 3/256 24/2048 ( 1.2%)
surfedges 14206/512000 56824/2048000 ( 2.8%)
edges 8308/256000 33232/1024000 ( 3.2%)
LDR worldlights 18/8192 1584/720896 ( 0.2%)
HDR worldlights 0/8192 0/720896 ( 0.0%)
leafwaterdata 2/32768 24/393216 ( 0.0%)
waterstrips 164/32768 1640/327680 ( 0.5%)
waterverts 0/65536 0/786432 ( 0.0%)
waterindices 2991/65536 5982/131072 ( 4.6%)
cubemapsamples 0/1024 0/16384 ( 0.0%)
overlays 0/512 0/180224 ( 0.0%)
LDR lightdata [variable] 3710616/0 ( 0.0%)
HDR lightdata [variable] 0/0 ( 0.0%)
visdata [variable] 41031/16777216 ( 0.2%)
entdata [variable] 223833/393216 (56.9%)
LDR ambient table 1237/65536 4948/262144 ( 1.9%)
HDR ambient table 1237/65536 4948/262144 ( 1.9%)
LDR leaf ambient 3748/65536 104944/1835008 ( 5.7%)
HDR leaf ambient 1237/65536 34636/1835008 ( 1.9%)
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/12 ( 8.3%)
pakfile [variable] 212572/0 ( 0.0%)
physics [variable] 109906/4194304 ( 2.6%)
physics terrain [variable] 2/1048576 ( 0.0%)

Level flags = 0

Total triangle count: 5816
Writing c:\users\mickd\desktop\the park\ph_the_park.bsp
1 minute, 6 seconds elapsed

** Executing...
** Command: Copy File
** Parameters: "C:\Users\mickd\Desktop\The park\ph_the_park.bsp" "G:\Micks Files\home\Private\Games\steam games\steamapps\common\GarrysMod\garrysmod\maps\ph_the_park.bsp"

WTF_CumEddy May 14, 2018 @ 2:44pm 
okay, I have noticed the Areaportal leak so I will look into that
Chippoka May 14, 2018 @ 3:34pm 
If it is a large map, then try making a yellow tool trigger box and set it to "func_viscluster." Box a large area of the map; experiment with it in different spots to see where there are troublesome areas (it will complile faster over areas included within the "func_viscluster" region. Lighting and reflections are sometime affected, so for special lighting or reflection areas, don't have a func_viscluster located there.
Moltard May 14, 2018 @ 3:36pm 
You are optimising in the wrong order:
1. Func_detail until the Portal Flow take less than 1 minute.
What you need to func_detail are brushes that dont block the player view (like small debris), but also cylinder, and other complex shape.
Anything with more than 6 face can give the compiler a hard time unless func_detailled.

Use the Visgroup to disable Entities, func_detail, Props, Displacement, Water, and Playerclip if you have any. That way, you only see what the compiler see, so you can func_detail the needed brushes.

Func_detail (like any entity) dont seal a map, so dont turn the brush that close your map into func_detail or it will leak

2. Only after that, start improving fps with hint
3. Use areaportal where the hint cant do much
Last edited by Moltard; May 14, 2018 @ 3:37pm
Please May 14, 2018 @ 6:22pm 
You can also remove Unecessary displacment faces by selecting and deleting them. In addition, if you have a large map, you can set a fade distance in the map options, this way, large brushes and models far far away beyond the value you put in will start to fade at whatever value you put in.

You can also change the lightmap scale on surfaces that don't need proper lighting, this will tell the compiler to give affected brushes less attention and therefor reduce compile time.

Portalflow compile seems to take a lot of time, make sure your map doesn't have sticking out brushes, your bare bone map with just brushes should be looking like a doom map. Make sure brushes aren't all over the place, keep the map organised. To look into this, load portal file. https://youtu.be/qrKjmqD8NlA The fewer portals and the more organised these lines are the better.
< >
Showing 1-7 of 7 comments
Per page: 1530 50

Date Posted: May 14, 2018 @ 9:15am
Posts: 7