Tutorial: Glass Last edited 6 years ago2018-06-16 00:35:57 UTC

You are viewing an older revision of this wiki page. The current revision may be more detailed and up-to-date. Click here to see the current revision of this page.
✔️ Download example map

Glass is a pretty fundamental part of first-person shooters these days. It's taken for granted most of the time, but it adds greatly to the general realism. And it's fun to shoot, too.
Breakable glass and weapons... a match made in heaven!Breakable glass and weapons... a match made in heaven!

Making glass

There's nothing particularly special about Half-Life's glass, apart from its unique bullet marks. If you create a slab of glass in Hammer (i.e. any brush with one of the 'glass' textures covering it), it will just look like any other object. Only when it's an entity can it be translucent and breakable, and it's not difficult to set up.

First you need your brush. Click Browse on the texture panel in Hammer, and type 'glass' into the filter box. A group of glass textures should appear. I used glass_med for my example map. Double-click the texture you want, and create a simple cube somewhere.

Making it breakable

Once you've created your brush, right-click it and select Tie to Entity. Choose func_breakable from the entity list that pops up. Obviously if you'd prefer indestructible glass you'll have to use something different - try func_wall. If you are using the func_breakable, set Gibs Direction to Relative to Attack (looks a bit cooler this way). Material Type should be Glass, and everything else can stay as it is. Simple!

Making it transparent

You will find that almost all of the brush-based entities you can create in Hammer have these basic properties: To make your glass translucent, open your new brush's property sheet (right-click it), set Render Mode to Texture, and type some numerical value between 1 and 255 in FX Amount. 255 is fully opaque, and 1 is transparent. A value of about 100 generally works for glass, but you can experiment and choose something that suits you.

That's about all there is to it. Fire up the example map, pick up one of the weapons, and blow away some windows!

Comments

You must log in to post a comment. You can login or register a new account.