[GUIDE] A lazy-ish method for fake wall openings with depth

Idolon

they/them
aa
Feb 7, 2008
2,131
6,150
If you've spent some time with TF2's prop library, you've probably noticed that some window props allow you to place them directly on a flat wall with no visual bugs, while other window props have interiors deeper than their frame, requiring you to carve a hole in the wall to inset the window. For example, these two windows on Dustbowl require the wall they're on to be cut around them:

1748192764555.png


In some ways, this may be considered an outdated approach. When deeper windows appear on walls that are world brushes, either you need to do some additional work with hinting and playerclipping, or you end up with a sort of func_detailed veneer on your world brush that gets messy and annoying to work with. Surface-applied windows are much easier to work with and keep your brushwork cleaner.

However, I think there is still merit to the older style of windows, as they have one thing the others don't: Depth. Since the surface of the windowpane is inset further than the face of the building wall, it creates a more interesting and realistic sense of depth and parallax than a surface-applied window does. This effect is pretty subtle and ultimately I think its up to you whether or not you think it is worth the effort.

Personally, I really like deep windows. I think they are also essential to certain building types that have windows with a lot of depth. However, I often find myself avoiding the work of actually implementing them the standard way, especially on maps that have lots of windows. As such, I've come up with a method that still requires a decent amount of setup, but effectively allows a type of surface-applied window that still has depth, requiring no hinting or clipping.

This is the setup:

1748193473177.png
1748193483395.png


The setup is:
  • Apply nodraw to the world brush
  • Replace the face of the world brush with displacements with a hole cut out for each window
  • Insert the window into the hole
  • Use info_lighting to keep correct lighting on the window
I put all my windows in instances so that I don't have to keep track of info_lighting entity names. These windows must be models to use info_lighting. This method also works for doors, vents, whatever fake openings you want.

1748193750817.png

1748193876396.png


This method probably does not result in a net savings of brushwork in most cases, as the brushwork for displacements around these openings is likely to require more brushes than world brushes or func_details. However, I think the brushwork overall is neater and nicer to work with, and this method makes a lot of sense on maps where you were already going to use displacements on walls for blend textures.