WiseOneWayGlass: Creating One-way Glass
This tutorial was originally created by wisemx. It was originally posted on SDKnuts.net.
Creating glass for HL2/HL2DM or CS:S is a really a simple matter of texturing brushes properly. In this sample room I’ve created there are three windows. There is also an illusionary wall with layered textures.
The first window is a typical one-way glass.
- On one face it’s textured with
- On the opposite face it’s textured with the same brick texture I used on the walls:
To browse for these textures:
- Click the Toggle Texture tool, or press +.
- Now click the Browse button.
- In the lower Filter area enter filter words like “glass”, “wall”, etc.
- Double-click on the texture you want to use.
- Now with the Face Edit tool still open, right-click on any brush face to texture it. (left-click selects faces)
All other faces of these Glass brushes will be textured with
To illustrate what you can achieve I’ve created 4 different types of see-thru areas.
Starting from the left:
- Typical one-way glass.
- Breakable Glass made with
func_breakable_surf(more on that soon).
- Normal brush with nodraw on one face and a glass texture on the opposite face.
- Layered textures created with
The one-way glass is created with a normal brush that has any opaque textured face opposite a glass textured face. In this example I’ve used a brick texture and opposite that a glass texture. The Breakable glass is created by turning a normal brush into
func_breakable_surf. Do that by selecting the brush and pressing +, choose
func_breakable_surf, and finally click Apply.
The properties for our breakable window are:
- Prop Data: Glass.Window
- Health: 80
- Material Type: Glass
- Fragility: 50
- Surface Type: Glass
- This Breakable glass is 1.0 units thick.
- Don’t make them thinner than 0.5 units thick and don’t make them too thick.
- Breakable glass gets textured on only one face, all other faces will be textured with nodraw, the easiest way to do that is create them entirely with nodraw and then use the Face Edit tool to apply the breakable glass texture.
The texture to use on that face is:
glass\glasswindowbreak070a (Don’t use the b version.)
Notice the normal world brush with nodraw on the face opposite the glass face. When you compile this type of glass it will look like normal unbreakable glass on one side but on the other side it will be clear, however it will block objects.
The last example is our layered texture, created with
func_illusionary entities. The first brush is only textured on the outside face;
metal\metalfence004a The next brush is textured on two faces;
brick\brickwall003a. All other faces are textured with nodraw.
To create brushes that are 0.5 units thick use the Transform tool
With the methods illustrated here you can create any type of one-way glass you need.
Keep in mind that while the nodraw texture doesn’t show it was invaluable in creating these effects.