Quick optimization tips...

Noggin

L5: Dapper Member
Nov 17, 2007
226
48
I had emailed Valve for optimization help and got this reply...

Hints
Adding hints to improve vis doesn't necessarily decrease compile time. It depends on the construction of the level. If you have a large open level with lots of leaves visible, vvis will take awhile to compile. Hints will just increase that time because more leaves are created. The best measurement of performance is running a comparison before and after in the engine, using +showbudget.


Using SmokeVolumes
If your smokevolumes are very large, it's possible they are intersecting too many leaves and are drawing all the time. You could try splitting them into smaller volumes.

Func_viscluster
Func_viscluster is used to merge leaves together. It is usually used in large open areas where multiple leaves are unnecessary, or in areas where's there's too many leaf cuts due to complicated geometry and you want to merge them together. It is not something that should be used a lot, as it is basically bypassing the BSP tree.


Hammer & Portal Files
You can see what leaves are generated inside Hammer, first run vbsp on your map, then choose Map > Load Portal File. This can be helpful to see how vbsp has cut up your level into leaves, and is equivalent to using "mat_leavis 1" in the engine. Adjust your hints or func_visclusters, run vbsp only again, then Load Portal File again to see the results.
 

DJive

Cake or Death?
aa
Dec 20, 2007
1,465
741
This is great because its from the Sources mouth *no pun*

I didn't know about Hinting large area's can hurt more then help =)
 

Armadillo of Doom

Group Founder, Lover of Pie
aa
Oct 25, 2007
949
1,228
This is really cool. Where's our letter to Valve? We need to get that thing sent. Anyways, nice find.
 

Noggin

L5: Dapper Member
Nov 17, 2007
226
48
Yeah that letter should be sent asap... itd take some time to implement those requests.