Map Optimization Problems

Any aspects of level design for the Source engine.

Map Optimization Problems

Postby smashballs on Wed May 29, 2013 2:59 am

Hello, I'm am trying to make a custom campaign for HL2 and i am in the middle of my first level when i started to experience some ingame lag and some strange errors that weren't there before till i started adding more like: some sound does not turn on at the start and when NPCs go to sequences they don't play animations and take forever to leave to the next sequence. I assume its optimization errors causing everything to lag and take forever, so I went to go look into it and found this issue in my compiling that won't let me view how many portals were made:

Valve Software - vvis.exe (Sep 15 2011)
4 threads
reading c:\program files (x86)\steam\steamapps\smashballs\sourcesdk_content\hl2\mapsrc\prisonescape.bsp
reading c:\program files (x86)\steam\steamapps\smashballs\sourcesdk_content\hl2\mapsrc\prisonescape.prt
LoadPortals: couldn't read c:\program files (x86)\steam\steamapps\smashballs\sourcesdk_content\hl2\mapsrc\prisonescape.prt

What could this possibly mean and how can I fix all the strange errors & lag? Is it even optimization errors?

Here are some pictures of the level i am making maybe this will help you spot the error. https://www.facebook.com/media/set/?set=a.334996763295137.1073741825.100003544480977&type=3
Last edited by smashballs on Wed May 29, 2013 3:50 am, edited 2 times in total.
smashballs
Member
Member
 
Joined: Wed May 29, 2013 2:39 am

Re: Map Optimization Problems

Postby Dives on Wed May 29, 2013 3:30 am

If its not generating a portal file that means you have a leak. Click toolbar Map > Load Point File and it'll place a red line running from an entity through the leak into the void.
User avatar
Dives
May Contain Skills
May Contain Skills
 
Joined: Sat Feb 28, 2009 9:54 pm
Location: Moorpark, CA

Re: Map Optimization Problems

Postby Stormy on Wed May 29, 2013 4:02 am

Unfortunately sometimes it doesn't generate a pointfile. I had this happen when I started using areaportals. I fixed it by deleting all of my areaportals and starting again. Oh god it was terrible.

Also the leak might not be just a crack in the bsp, when using areaportals it's important that they are sealed off. If the air behind the areaportal can flow around a wall or through your level and reach another face of your areaportal brush, the compiler will chuck a fit and say there's a leak. Read into it more, there is a few good tutorials on lopers about it and I think cra0kalo did one on his website.
User avatar
Stormy
May Contain Skills
May Contain Skills
 
Joined: Sun Nov 28, 2010 6:03 am
Location: Cairns, QLD, AUS

Re: Map Optimization Problems

Postby smashballs on Wed May 29, 2013 4:05 am

Dives wrote:If its not generating a portal file that means you have a leak. Click toolbar Map > Load Point File and it'll place a red line running from an entity through the leak into the void.


[SOLVED]
Ok I did that I found a hole in the map were to decoration doors were I got that fixed, but now i found a pipe that is a little through the level like just like the other copies of it but only this one pointed into the void but the ceiling it sits in is perfectly sealed off and it pointed through the ceiling and off into the void. Do you think that brush is errored and needs to be replaced or what?
Last edited by smashballs on Wed May 29, 2013 4:49 am, edited 1 time in total.
smashballs
Member
Member
 
Joined: Wed May 29, 2013 2:39 am

Re: Map Optimization Problems

Postby smashballs on Wed May 29, 2013 4:17 am

Black_Stormy wrote:Unfortunately sometimes it doesn't generate a pointfile. I had this happen when I started using areaportals. I fixed it by deleting all of my areaportals and starting again. Oh god it was terrible.

Also the leak might not be just a crack in the bsp, when using areaportals it's important that they are sealed off. If the air behind the areaportal can flow around a wall or through your level and reach another face of your areaportal brush, the compiler will chuck a fit and say there's a leak. Read into it more, there is a few good tutorials on lopers about it and I think cra0kalo did one on his website.


I am not using areaportals at all in the map as you can see in my photos but i will keep in mind what you have said about areaportals, and if i can't get this problem fixed would it be bad just to use areaportals and fast compile VIS & RAD instead of using normal compile to optimise?
smashballs
Member
Member
 
Joined: Wed May 29, 2013 2:39 am

Re: Map Optimization Problems

Postby smashballs on Wed May 29, 2013 4:35 am

Black_Stormy wrote:Unfortunately sometimes it doesn't generate a pointfile. I had this happen when I started using areaportals. I fixed it by deleting all of my areaportals and starting again. Oh god it was terrible.

Also the leak might not be just a crack in the bsp, when using areaportals it's important that they are sealed off. If the air behind the areaportal can flow around a wall or through your level and reach another face of your areaportal brush, the compiler will chuck a fit and say there's a leak. Read into it more, there is a few good tutorials on lopers about it and I think cra0kalo did one on his website.


Thank you for you information on areaportals! i will look into that :D

Dives wrote:If its not generating a portal file that means you have a leak. Click toolbar Map > Load Point File and it'll place a red line running from an entity through the leak into the void.


Thank you for telling me how to check for leaks. I figured out the problem and fixed it the problem was that entities are not allowed to stick out the level. :D

I might of not have fixed the lag so i will come back with an update on how well it went. :)
smashballs
Member
Member
 
Joined: Wed May 29, 2013 2:39 am

Re: Map Optimization Problems

Postby smashballs on Wed May 29, 2013 4:45 am

I still have the lag but this is what my vvis.exe says

Valve Software - vvis.exe (Sep 15 2011)
4 threads
reading c:\program files (x86)\steam\steamapps\smashballs\sourcesdk_content\hl2\mapsrc\prisonescape.bsp
reading c:\program files (x86)\steam\steamapps\smashballs\sourcesdk_content\hl2\mapsrc\prisonescape.prt
147 portalclusters
209 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 (0)
Optimized: 26 visible clusters (0.00%)
Total clusters visible: 7273
Average clusters visible: 49
Building PAS...
Average clusters audible: 97
visdatasize:5468 compressed from 7056
writing c:\program files (x86)\steam\steamapps\smashballs\sourcesdk_content\hl2\mapsrc\prisonescape.bsp
0 seconds elapsed

Is there a reason for all the lag with this data?
also see:

Object names Objects/Maxobjs Memory / Maxmem Fullness
------------ --------------- --------------- --------
models 6/1024 288/49152 ( 0.6%)
brushes 292/8192 3504/98304 ( 3.6%)
brushsides 1768/65536 14144/524288 ( 2.7%)
planes 630/65536 12600/1310720 ( 1.0%)
vertexes 1666/65536 19992/786432 ( 2.5%)
nodes 432/65536 13824/2097152 ( 0.7%)
texinfos 109/12288 7848/884736 ( 0.9%)
texdata 10/2048 320/65536 ( 0.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 256/0 256/0 ( 0.0%)
faces 778/65536 43568/3670016 ( 1.2%)
hdr faces 0/65536 0/3670016 ( 0.0%)
origfaces 459/65536 25704/3670016 ( 0.7%)
leaves 439/65536 14048/2097152 ( 0.7%)
leaffaces 810/65536 1620/131072 ( 1.2%)
leafbrushes 408/65536 816/131072 ( 0.6%)
areas 2/256 16/2048 ( 0.8%)
surfedges 5538/512000 22152/2048000 ( 1.1%)
edges 3560/256000 14240/1024000 ( 1.4%)
LDR worldlights 79/8192 6952/720896 ( 1.0%)
HDR worldlights 0/8192 0/720896 ( 0.0%)
leafwaterdata 0/32768 0/393216 ( 0.0%)
waterstrips 43/32768 430/327680 ( 0.1%)
waterverts 0/65536 0/786432 ( 0.0%)
waterindices 759/65536 1518/131072 ( 1.2%)
cubemapsamples 0/1024 0/16384 ( 0.0%)
overlays 0/512 0/180224 ( 0.0%)
LDR lightdata [variable] 513272/0 ( 0.0%)
HDR lightdata [variable] 0/0 ( 0.0%)
visdata [variable] 5468/16777216 ( 0.0%)
entdata [variable] 142782/393216 (36.3%)
LDR ambient table 439/65536 1756/262144 ( 0.7%)
HDR ambient table 439/65536 1756/262144 ( 0.7%)
LDR leaf ambient 1572/65536 44016/1835008 ( 2.4%)
HDR leaf ambient 439/65536 12292/1835008 ( 0.7%)
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/10750 ( 0.0%)
pakfile [variable] 105679/0 ( 0.0%)
physics [variable] 105225/4194304 ( 2.5%)
physics terrain [variable] 642/1048576 ( 0.1%)
Last edited by smashballs on Wed May 29, 2013 4:55 am, edited 1 time in total.
smashballs
Member
Member
 
Joined: Wed May 29, 2013 2:39 am

Re: Map Optimization Problems

Postby Dives on Wed May 29, 2013 4:54 am

If by lag you mean low framerate, that just means you're rendering more at once than your computer can reasonably handle. You'll need to optimize.
Read though Interloper's Optimization guide..
User avatar
Dives
May Contain Skills
May Contain Skills
 
Joined: Sat Feb 28, 2009 9:54 pm
Location: Moorpark, CA

Re: Map Optimization Problems

Postby smashballs on Wed May 29, 2013 5:07 am

Dives wrote:If by lag you mean low framerate, that just means you're rendering more at once than your computer can reasonably handle. You'll need to optimize.
Read though Interloper's Optimization guide..


Some low frame rate it just pauses every time I look around or walk for like 3 milliseconds but if I don't do anything it just plays smoothly, like I said: animations don't load and when the level starts sound is not there. This problem did not happen before the last hallway, and my PC has 4 cores with a 1GB video memory and a 6GB ram so I doubt its any lag for my PC I think its just the engine.
smashballs
Member
Member
 
Joined: Wed May 29, 2013 2:39 am

Re: Map Optimization Problems

Postby Major Banter on Wed May 29, 2013 11:20 am

No, you've got a serious issue somewhere. You're compiling a tiny map from the looks of your entity report.

Do me three favours.

One, post your ENTIRE compile log. VBSP is what finds and reports key issues, not VVIS, which only reports minor ones.

Two, go in-map and check your console for critical errors. None of that vphysics_static shit, unusual and serious stuff like ***LEAKED*** or otherwise.

Three, compile with cordon around the entire map and report on results.
ImageImageImage
Major Banter
Veteran
Veteran
 
Joined: Tue Apr 01, 2008 10:52 pm
Location: UK

Re: Map Optimization Problems

Postby smashballs on Wed May 29, 2013 1:52 pm

My entire compile log:

** Executing...
** Command: "c:\program files (x86)\steam\steamapps\smashballs\sourcesdk\bin\source2009\bin\vbsp.exe"
** Parameters: -game "c:\program files (x86)\steam\steamapps\smashballs\half-life 2\hl2" "C:\Program Files (x86)\Steam\SteamApps\smashballs\sourcesdk_content\hl2\mapsrc\prisonescape.vmf"

Valve Software - vbsp.exe (Sep 15 2011)
4 threads
materialPath: c:\program files (x86)\steam\steamapps\smashballs\half-life 2\hl2\materials
Loading C:\Program Files (x86)\Steam\SteamApps\smashballs\sourcesdk_content\hl2\mapsrc\prisonescape.vmf
ConVarRef mat_reduceparticles doesn't point to an existing ConVar
Could not locate 'GameData' key in c:\program files (x86)\steam\steamapps\smashballs\half-life 2\hl2\gameinfo.txt
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...done (0)
Building Faces...done (0)
FixTjuncs...
PruneNodes...
WriteBSP...
done (0)
writing C:\Program Files (x86)\Steam\SteamApps\smashballs\sourcesdk_content\hl2\mapsrc\prisonescape.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 (0) (105225 bytes)
Placing detail props : 0...1...2...3...4...5...6...7...8...9...10
Compacting texture/material tables...
Reduced 230 texinfos to 109
Reduced 10 texdatas to 10 (220 bytes to 220)
Writing C:\Program Files (x86)\Steam\SteamApps\smashballs\sourcesdk_content\hl2\mapsrc\prisonescape.bsp
0 seconds elapsed

** Executing...
** Command: "c:\program files (x86)\steam\steamapps\smashballs\sourcesdk\bin\source2009\bin\vvis.exe"
** Parameters: -game "c:\program files (x86)\steam\steamapps\smashballs\half-life 2\hl2" "C:\Program Files (x86)\Steam\SteamApps\smashballs\sourcesdk_content\hl2\mapsrc\prisonescape"

Valve Software - vvis.exe (Sep 15 2011)
4 threads
reading c:\program files (x86)\steam\steamapps\smashballs\sourcesdk_content\hl2\mapsrc\prisonescape.bsp
reading c:\program files (x86)\steam\steamapps\smashballs\sourcesdk_content\hl2\mapsrc\prisonescape.prt
147 portalclusters
209 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 (0)
Optimized: 26 visible clusters (0.00%)
Total clusters visible: 7273
Average clusters visible: 49
Building PAS...
Average clusters audible: 97
visdatasize:5468 compressed from 7056
writing c:\program files (x86)\steam\steamapps\smashballs\sourcesdk_content\hl2\mapsrc\prisonescape.bsp
0 seconds elapsed

** Executing...
** Command: "c:\program files (x86)\steam\steamapps\smashballs\sourcesdk\bin\source2009\bin\vrad.exe"
** Parameters: -game "c:\program files (x86)\steam\steamapps\smashballs\half-life 2\hl2" "C:\Program Files (x86)\Steam\SteamApps\smashballs\sourcesdk_content\hl2\mapsrc\prisonescape"

Valve Software - vrad.exe SSE (Sep 15 2011)

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

Loading c:\program files (x86)\steam\steamapps\smashballs\sourcesdk_content\hl2\mapsrc\prisonescape.bsp
Setting up ray-trace acceleration structure... Done (0.71 seconds)
778 faces
78651 square feet [11325771.00 square inches]
6 Displacements
28 Square Feet [4147.97 Square Inches]
778 patches before subdivision
9392 patches after subdivision
79 direct lights
BuildFacelights: 0...1...2...3...4...5...6...7...8...9...10 (3)
BuildVisLeafs: 0...1...2...3...4...5...6...7...8...9...10 (1)
transfers 731856, max 333
transfer lists: 5.6 megs
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #1 added RGB(133958, 107385, 66012)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (1)
Bounce #2 added RGB(50013, 34998, 13589)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #3 added RGB(19152, 11639, 2845)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #4 added RGB(7341, 3886, 598)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (1)
Bounce #5 added RGB(2831, 1305, 126)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #6 added RGB(1095, 440, 27)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (1)
Bounce #7 added RGB(425, 149, 6)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #8 added RGB(165, 51, 1)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #9 added RGB(64, 17, 0)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (1)
Bounce #10 added RGB(25, 6, 0)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #11 added RGB(10, 2, 0)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (1)
Bounce #12 added RGB(4, 1, 0)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #13 added RGB(2, 0, 0)
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (1)
Bounce #14 added RGB(1, 0, 0)
Build Patch/Sample Hash Table(s).....Done<0.0053 sec>
FinalLightFace: 0...1...2...3...4...5...6...7...8...9...10 (1)
FinalLightFace Done
6 of 6 (100% of) surface lights went in leaf ambient cubes.
ThreadComputeLeafAmbient: 0...1...2...3...4...5...6...7...8...9...10 (1)
Writing leaf ambient...done
Ready to Finish

Object names Objects/Maxobjs Memory / Maxmem Fullness
------------ --------------- --------------- --------
models 6/1024 288/49152 ( 0.6%)
brushes 292/8192 3504/98304 ( 3.6%)
brushsides 1768/65536 14144/524288 ( 2.7%)
planes 630/65536 12600/1310720 ( 1.0%)
vertexes 1666/65536 19992/786432 ( 2.5%)
nodes 433/65536 13856/2097152 ( 0.7%)
texinfos 109/12288 7848/884736 ( 0.9%)
texdata 10/2048 320/65536 ( 0.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 256/0 256/0 ( 0.0%)
faces 778/65536 43568/3670016 ( 1.2%)
hdr faces 0/65536 0/3670016 ( 0.0%)
origfaces 459/65536 25704/3670016 ( 0.7%)
leaves 440/65536 14080/2097152 ( 0.7%)
leaffaces 810/65536 1620/131072 ( 1.2%)
leafbrushes 409/65536 818/131072 ( 0.6%)
areas 2/256 16/2048 ( 0.8%)
surfedges 5538/512000 22152/2048000 ( 1.1%)
edges 3560/256000 14240/1024000 ( 1.4%)
LDR worldlights 79/8192 6952/720896 ( 1.0%)
HDR worldlights 0/8192 0/720896 ( 0.0%)
leafwaterdata 0/32768 0/393216 ( 0.0%)
waterstrips 43/32768 430/327680 ( 0.1%)
waterverts 0/65536 0/786432 ( 0.0%)
waterindices 759/65536 1518/131072 ( 1.2%)
cubemapsamples 0/1024 0/16384 ( 0.0%)
overlays 0/512 0/180224 ( 0.0%)
LDR lightdata [variable] 513272/0 ( 0.0%)
HDR lightdata [variable] 0/0 ( 0.0%)
visdata [variable] 5468/16777216 ( 0.0%)
entdata [variable] 142782/393216 (36.3%)
LDR ambient table 440/65536 1760/262144 ( 0.7%)
HDR ambient table 440/65536 1760/262144 ( 0.7%)
LDR leaf ambient 1572/65536 44016/1835008 ( 2.4%)
HDR leaf ambient 440/65536 12320/1835008 ( 0.7%)
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/10750 ( 0.0%)
pakfile [variable] 105679/0 ( 0.0%)
physics [variable] 105225/4194304 ( 2.5%)
physics terrain [variable] 642/1048576 ( 0.1%)

Level flags = 0

Total triangle count: 2156
Writing c:\program files (x86)\steam\steamapps\smashballs\sourcesdk_content\hl2\mapsrc\prisonescape.bsp
12 seconds elapsed

** Executing...
** Command: Copy File
** Parameters: "C:\Program Files (x86)\Steam\SteamApps\smashballs\sourcesdk_content\hl2\mapsrc\prisonescape.bsp" "c:\program files (x86)\steam\steamapps\smashballs\half-life 2\hl2\maps\prisonescape.bsp"

I checked for any in game errors and alls I can find was a (could not find sequence "harassfront2") which was the animation that plays but now it doesn't? I did not modify it I assume the game doesn't load it because of the memory it takes for the engine to load my map.

I found that the cordon was at only the first hallway and stretched it around the entire level and the lag stop. Thank you for for fixing that!

But I still can't see why my scripted sequences are not finding animations like they use too, I only have five scripted sequences.
smashballs
Member
Member
 
Joined: Wed May 29, 2013 2:39 am

Re: Map Optimization Problems

Postby Major Banter on Wed May 29, 2013 2:12 pm

Lag was probably to do with cordon preventing certain input/output relationships not being able to load correctly. Bring those entities in via cordon and those issues will fix themselves, as you've seen.

I've had a quick look and you're using npc_metropolice to fire the harassfront2 sequence, yes? Rest assured, any and all engines can more than handle themselves - Source won't randomly stop loading animations. Have you actually booted up Half-Life 2 by itself lately? As in, booted, started a new game/loaded an old one and let it run for a few seconds to create key config files that Hammer draws on?

Also, have you opted into Steampipe? Gotta eliminate the main usual suspects n stuff.

I'm also fairly sure this isn't your map that you're working with, but I'll ask no questions. We all learn from somewhere.
ImageImageImage
Major Banter
Veteran
Veteran
 
Joined: Tue Apr 01, 2008 10:52 pm
Location: UK

Re: Map Optimization Problems

Postby smashballs on Wed May 29, 2013 3:17 pm

Major Banter wrote:Lag was probably to do with cordon preventing certain input/output relationships not being able to load correctly. Bring those entities in via cordon and those issues will fix themselves, as you've seen.

I've had a quick look and you're using npc_metropolice to fire the harassfront2 sequence, yes? Rest assured, any and all engines can more than handle themselves - Source won't randomly stop loading animations. Have you actually booted up Half-Life 2 by itself lately? As in, booted, started a new game/loaded an old one and let it run for a few seconds to create key config files that Hammer draws on?

Also, have you opted into Steampipe? Gotta eliminate the main usual suspects n stuff.

I'm also fairly sure this isn't your map that you're working with, but I'll ask no questions. We all learn from somewhere.


Ok well the lag is still kinda there.
Yes, I am using the metropolice to do (harassfront2) but he also does not do (pickup) like his sequence tells him to do and yes I have ran HL2 by itself and even loaded the first mission but still the same old can't find animation in my level, but it works in the main campaign. I don't think steampipe supports HL2 itself only HL2mp according to what I have read so I don't think opting in steam pipe will do much for me. I think its gotta be something to do with my map somehow, somewhere because like I said it only works in regular campaign.

Thanks for helping Major Banter, your solution was best! Thanks everyone for your time it was much appreciated! :D

My error with the animations is now fixed I am just going to finish the level and maybe post in this thread again to let you know if I experience more lag
smashballs
Member
Member
 
Joined: Wed May 29, 2013 2:39 am

Return to Hammer Editor Help

Who is online

Users browsing this forum: No registered users

cron