Tyrann has released some lovely new compiler tools recently. One of the fantastic enhancements that they offer is support for detail brushes – brushes which are excluded from the vis process. Although their intended use is to shorten vis time, today we’re going to see how to use them to make windows. Before anyone gets too excited, a window here is an entirely transparent thing which is solid to all entities. There’s nothing semi-transparent going on!
The trick also relies on use of skip textures. Imagine we have a rectangular window frame cut in a wall between two rooms. We might naïvely try just using a skip textured brush to fill the space through the frame, but two problems arise. The first one is that the BSP stage of things clips away the inside surfaces of the frame because they’re covered by the skip brushes. The second is that the VIS process will determine that the two rooms cannot see each other through the skip brush, so you get a hall of mirrors effect.
We’ll fix these problems in order. To avoid the clipped-away surfaces we need to make sure that the skip brush doesn’t intersect the frame anywhere. We can do this by carefully shaping the brush, and building the front and back faces of the window panes separately. In the diagram to the right the pink brushes are our skip brushes, sitting inside the frame. The brushes are actually pyramid-shaped, so the view from the top is the same as this side view.
This design gets us a window that behaves properly when you run BSP on it, and until recently that’s the best you could do. As you might have guessed from the intro, the fix is to make the skip brushes a func_detail “entity” and use the Tyrann tools to compile it, making the whole volume see-through in VIS terms. This is something that you could do with a func_wall, but this gets us the same without using an entity.
This is all there is to the trick. You can download an example map here. As we said at the top this only creates a solid transparent pane, there’s nothing visible here. Is there a way to illustrate the window which follows progressive enhancement? I think there is, so watch this space…