Performance Questions

.GrinderRobot

L1: Registered
Aug 1, 2008
20
1
I've been trying to optimize my map for a week or so now, and I realized I have a bunch of questions I can't seem to find the answers to. If someone can help, I'd appreciate it.

1) Every performance tutorial I've read promotes adding hints at corners. I understand why this can help performance, but I checked a few of the decompiled Valve maps and I didn't see any corner hints at all (2fort in particular). Are corner hints the kind of thing you add if it helps FPS, otherwise skip them? Or is 2fort just designed in a way that it doesn't need them?

2) Static props don't seem to cut new visleafs. When you have large props do you just add hints around them?

3) I read that mitreing corners can improve performance by reducing visleafs, but I don't see many maps doing that. Is mitreing a common/recommended practice?

4) I made a func_detail that is a shipping container open at both ends. From some angles, entire brushes of the func_detail disappear, or blink in and out. How can I fix this?

5) After clipping a brush into two brushes, should I NODRAW the 2 faces along the edge of the cut? Or does the engine know not to draw those?

6) I've been trying to eliminate as many faces/solids to improve performance. In one area I went from 5200 faces to 3200 faces with a few small changes. I've sort of been playing whack-a-mole by selecting a bunch of geometry, pasting it into a new map, and then checking Map --> Show Information to get solid/face counts. Is there a way to get geometry counts for a selection of brushes? Or some other approach I should use?

I have to admit, optimization has been the most interesting part of making a map. Notice I said interesting, not "fun." But I mean it in a good way! ;)
 

bobby1211

L2: Junior Member
Jun 28, 2008
64
11
I will help where I can:

4) Sounds like you are using a model texture. To test change it to a flat texture and see if the issue continues. (Maybe you used the shipping container texture, if so this is indeed the problem)

5) The compiler knows to ignore any face that doesn't show in the map. It is not needed to nodraw these. Only if it makes it easier on you while mapping.

6) there is a tool that the name escapes me (Cordon, Thanks GarbageMan). The button is a square with yellow/black stripes in the hammer tool bar. You basically draw a cube around an area in your map and you can just work on/compile the enclosed portion. (This should eliminate you having to copy/paste into another test map as you work)

-Bobby
 
Last edited:

Gadget

aa
Mar 10, 2008
531
527
1) Adding hints at corners is only useful if you can hide a lot of big leafs in large areas. As you said in 2fort they aren't needed. Here's a really good example of where they used this technique in tc_hydro:
hintexample_hydro.jpg
If you're able to understand why they used it in this place you should have understood the hint brush concept.

2) Only world brushes cut leafs aswell as the brown grid in hammer (every 1024 units!). If you need to place hint brushes really depends on your environment around that prop.

3) I use this technique once in a while to save some polygons

4) Has been anwsered

5) Has been anwsered

6) It's the cordon tool you're looking for. I haven't used that yet.

If I find some time I'm going to do a video tutorial on using hints and optimisation because there are some really good examples in my current WIP for your points 1-3.
 

.GrinderRobot

L1: Registered
Aug 1, 2008
20
1
Great, thank you both for the help. I think I've been trying to use hints on a much smaller scale than I should be. And I'm not sure why using the cordon tool idea didn't dawn on me, I use it all the time already, just not for face counts.

A quick follow-up on the model texture thing... Will I have to change the container texture to some other texture entirely? Or can I use something like VTFTool to hijack a suitable (non-bump mapped?) version of the container texture?
 

bobby1211

L2: Junior Member
Jun 28, 2008
64
11
Great, thank you both for the help. I think I've been trying to use hints on a much smaller scale than I should be. And I'm not sure why using the cordon tool idea didn't dawn on me, I use it all the time already, just not for face counts.

A quick follow-up on the model texture thing... Will I have to change the container texture to some other texture entirely? Or can I use something like VTFTool to hijack a suitable (non-bump mapped?) version of the container texture?

I've not seen anyone try to get around this but the idea sounds like it would work. If you are familiar with the process, you could always try it and report back your findings.

-Bobby
 
Dec 25, 2007
566
439
3) I read that mitreing corners can improve performance by reducing visleafs, but I don't see many maps doing that. Is mitreing a common/recommended practice?

It can save a couple of polygons (literally 2 triangles!), but it won't affect visleaves as long as the end face of the one brush is coplanar with the side face of the other. It can save you a click or two when texturing the wall. Usually not worth the effort.


A quick follow-up on the model texture thing... Will I have to change the container texture to some other texture entirely? Or can I use something like VTFTool to hijack a suitable (non-bump mapped?) version of the container texture?

If you extract the .vmt from the appropriate .gcf, just copy it to a new name and change "VertexLitGeneric" to "LightmappedGeneric". It'll then work fine.