Brushwork Etiquette


(Nathan Havok) #1

I’m curious as to how I should be going about doing my brushwork in a manner that is good to both the compile times as well as the end user’s FPS.

Here’s three examples of a floor for an oddly shaped room:

  1. 6 brushes, 2 4-sided, 4 3-sided.

  1. 4 brushes, 2 4-sided, 2 3-sided

  1. 1 6-sided brush

I’m also wondering if you decide how to go about brushwork based on the situation, or just use the same style the whole way through.

Thanks =)


(chavo_one) #2

This is a good question. My answer to you is based on what I understand of how q3map2 deals with t-junctions. (If my examples aren’t right, someone correct me!)

First off, you should read this thread, and notice the diagrams:
http://www.splashdamage.com/forums/viewtopic.php?t=1303

In the examples you have provided, the case where you made no splits in the brush would give you the lowest triangle count. In the other examples, you have actually made more work for yourself, the compiler, and the game engine. Take a look at what q3map2 would do in each of your cases:


So the lowest triangle count you could get in those cases would be 9, and that’s without any work. However, if you understand what the compiler is doing, you can make intelligent cuts into the brush to reduce the triangle count.

With the following cuts, the triangle count would be 7. If you do this over the course of an entire map, it starts to add up. There is no magical formula for making the cuts though. You have to analyze each situation, and decide how to best optimize it. If that sounds like too much work, then I suggest you just leave it as one brush, and let q3map2 do it’s job.


(Nathan Havok) #3

Wow.

Between the above and the link you posted, I now fully understand how q3map2 generates the triangles.

I was under the impression that any square brush would consist of two triangle brushes regardless how it looked/what was around it.

Was I ever wrong.

I have another question now:

When you make intelligent cuts are you replacing the original brush with triangle brushes that work better?


(chavo_one) #4

Yes, in most cases, you would be making triangle brushes so that surrounding brushes share vertices. In some cases, cutting 4 or 5-sided polygons might be enough. It depends on the case.

The reason you would want to cut a brush into pieces like this is to guide q3map2 in the processing of your geometry. If you can make good suggestions, you’ll have a faster map. If you make bad suggestions, you’ll be hurting the map’s performance.


(Nathan Havok) #5

Thank you very much Chavo =)
I really appreciate you effort.
That was an awesome explanation.


(chavo_one) #6

Your welcome! :smiley: