setstats
View Cart
Category Tutorial TopicsLevel DesignUnreal Engine 4UDKCryEngine 3 SDKGame Modeling: MayaCounter-Strike: Global OffensiveLeft4Dead 1 and 2Time Management and ProductivityGame Environment Art+DesignGetting StartedBrowse Full Tutorial List

CS:GO SDK In-Depth Guide to Creating Breakable and Non-Breakable Glass Windows

Category: Source: CS:GO SDK
September 22, 2016
Full Text Tutorial and Notes:

There are 4 ways to create glass windows in Hammer Source for CS:GO SDK. First three methods will use BSP brushes and fourth will use a prop entity.

In the following tutorial we'll cover how to create:

  • Fully breakable glass windows
  • Partially breakable glass windows
  • Non-breakable glass windows
  • Using props for glass windows

1. Fully Breakable Glass Window and Essential Steps to Any BSP Glass Window

Let's create a fully breakable glass window that completely shatters when shot:

The following steps are recommended for any glass you create inside Hammer Source. These initial setup steps will be kept the same for first three methods mentioned above - with some variations for troubleshooting.

Anytime you create BSP glass window, here is what you have to do.

Create a BSP brush that will be your glass. Make this BSP brush 2-4 units thick and position it within a window frame:

Using "Face Edit Sheet" (Shift+A):

Click on Browse:

Filter for "nodraw" texture:

Apply "nodraw" texture onto every single face of the brush:

Using "Face Edit Sheet" (Shift+A) again, filter for "glass" texture:

Use one of the available glass/window textures. In this case I used "urban_glass_03":

Apply "glass" texture on one face of the brush. This can be the front or back of the brush - it doesn't matter, as long as all other faces have "nodraw" texture:

With "Face Edit Sheet" (Shift+A) still open, left-click on the glass texture to select it and click on "Fit" to make the glass texture fit and aligned:

Important: any glass you create should be 2-4 units thick and textured with "nodraw" on every face except for front or back brush face.

Select the BSP glass brush and press Ctrl+T (Tie to Entity). Choose "func_breakable":

Compile and test. This glass window will now completely shatter when shot.

Additional Settings for Fully Breakable Glass

You can set additional parameter for the glass to break when player touches it.

Double click on the glass brush to open "Object Properties". Switch to "Flags" tab and set it to "Break on Touch":

You can also set "Strength" and "Material Type" for the glass under "Class Info" tab:

Important About Glass Textures

The recommended way to create glass windows is to have "nodraw" texture on all faces of the BSP brush except one (front or back):

When compiled and tested inside the map, the glass texture will be visible from both sides:

However, not all glass textures are created equal. Some glass textures will not display from both sides. Here is an example of "hotel_glass_001" texture which can only be seen from one side:

This is due to the way that texture material is set up. In cases where glass texture is not seen from both sides of the brush, you may need to apply it to front and back faces of that brush:

Make sure to use "Face Edit Sheet" (Shift+A) and "Fit" both sides of the glass texture:

If you experience any issues, and then use a different texture while maintaining "nodraw" texture on all but front or back brush face.

2. Partially Breakable Glass Window

Let's create partially breakable glass which will break depending on where you shoot it. Similar to glass windows in cs_office map:

Create a BSP brush 2-4 units thick, positioned inside a window frame with glass texture on one face of the brush and "nodraw" texture on the rest:

For glass texture use "prodwndwa":

Using "Face Edit Sheet" (Shift+A) still open, left-click on the glass texture to select it and left-click on "Fit" to make the glass texture fit and aligned:

Select the glass BSP brush and press Ctrl+T (Tie to Entity). Choose "func_breakable_surf":

Compile and test. You will now have partially breakable glass window:

Important: As of right now "prodwndwa" is the only glass texture that will work for partially breakable glass. If you try any other texture you will have an error where the texture surface becomes black when shot:

If you must have a different glass texture then either use "func_breakable" or create your own custom glass texture that allows for "func_breakable_surf" to work.

This is all you need to do for partially breakable glass.

3. Non-Breakable Glass Window

Non-breakable windows are often used for exterior boundaries of the map where you do not want the player to enter.

Example of this is cs_office:

And de_nuke

Create a BSP brush 2-4 units thick, positioned inside a window frame with glass texture on one face of the brush and "nodraw" texture on the rest:

Find glass texture you like and texture front, back or both faces of the brush. Here are two examples of glass texture I am using for non-breakable glass. One is see-through, the other one is solid:

For non-breakable glass, you do not need to tie this brush to an entity. Leave it as a BSP brush.

But, as mentioned earlier not all glass textures are created equal and some will not show from both sides. In such cases you might have to apply the glass texture to both side of the brush, while maintaining all other faces as "nodraw". Make sure to use "Face Edit Sheet" (Shift+A) and "Fit" both sides of the glass texture.

Usually non-breakable glass will only be seen from one side due to being used to block the player to enter beyond a given area. So the glass not being seen from both sides is often not a problem.

There is a set of textures that are not see-through but behave like glass and are great to be used for buildings and exterior boundaries:

These textures will appear to look like glass surfaces and act like glass when shot. They just won't be breakable:

Not all glass textures will produce the appropriate sound and display correct decals. If you are using a glass texture that doesn't behave correctly, change to a different glass texture.

Using Props for Glass Windows

Last method for creating glass windows is to use props (3d models). Switch to Entity Tool (Shift+E):

Use "prop_static" and "prop_physics" entity. This will vary depending on how that prop is defined inside Hammer Source:

Prop Static - stationary, non-movable prop:

Prop Physics - movable and breakable:

Prop_Static:

Lets use "prop_static" first. Use the Entity Tool set to prop_static and left-click in the perspective viewport to insert that prop entity type:

Double click on the red entity box to open "Object Properties". Select "World Model" and click on "Browse":

Filter for "window" or "glass":

If you select the prop and click over to "Info" tab, you will see which prop entity type it is set up for:

Double click to choose the glass window and then click Apply:

Prop_Physics:

Follow the same steps for inserting prop_physics. In this case we are going to use exact same model.

Use the Entity Tool set to prop_physics and left-click in the perspective viewport to insert that prop entity type:

Double click on the red entity box to open "Object Properties". Select "World Model" and click on "Browse":

Filter for "window" or "glass":

Make sure to check "Info" tab to see if you can use that prop as physics:

Double click to choose the glass window and then click Apply:

Important: if you are going to use prop_physics entity type, then make sure to enable "Start Asleep" under "Object Properties":

Here is a prop_static with non-breakable glass (left) and prop_physics that will break on force (right):

You can now have breakable and non-breakable glass windows in your map.

Env_Cubemap

Env_Cubemap is required to calculate correct reflections within your environment.

Ideally, you'll want to place as many of these as needed to reflect the environment around it, but one env_cubemap will do for now.

Enable Entity Tool (Shift+E):

Scroll down and select "env_cubemap":

Left-click in the perspective viewport to place "env_cubemap" into your map:

 

Read Next: CS:GO SDK How to Create Functional, Climbable Ladders

Updated & Revised - Preproduction Blueprint: How to Plan Your Game Environments and Level Designs

© 2008-2016. All articles on World of Level Design™ are copyrighted.
Not to be reproduced without prior written consent.