Shattering Glass

Tutorial collection, comprehensive listings on main site.

Shattering Glass

Postby Tutorial on Mon Mar 07, 2005 10:12 pm

Around the editing forums, there have been lots of questions about how to make glass shatter like in cs_office. This tutorial will show you how it’s done.

First off we need an area for the glass to go. Below is a hole in a wall where I am going to put a window.

Image

We must now add a brush in this gap. Texture one of the faces that you’ll be looking through on the glass with "glass/offwndwb" then add the texture "tools/toolsnodraw" to all the other faces on this brush. Below is an image of either side of the window, viewed in Hammer.

Image Image

Now select the window and press ctrl+t. Select func_breakable_surf from the dropdown menu, then fill out the following "Keyvalues":

Prop Data : Glass.Small
Material Type: Glass
Fragility: 200 (Can be changed but I suggest this)
Surface Type: Glass
Now just compile and test your map.

Image

Related:
Example Map

Cr4ig
- Don't send PM's to this user -
Tutorial
Not A Real User
 
Joined: Sun Mar 06, 2005 11:00 pm

Postby RabidGoat on Mon Mar 21, 2005 6:02 pm

I believe I am missing something here.

Can the brush be of any depth?

I carved a whole in the side of a building to test this tutorial. Created the brush and did all the instructions in the tutorial. Compiled the map. When I saw the window it had a yellow tint to it, and when I shot it I saw big squares. Anyone else have this problem?

Your friendly neiborhood Hammer n00b

-Rabid Goat :?
RabidGoat
Regular
Regular
 
Joined: Sun Mar 20, 2005 4:52 am
Location: Florida (It's just as hot as you think it is) =P

Postby Cr4ig on Mon Mar 21, 2005 6:04 pm

If the texture is scaled too high it will look bad. Make sure it is at .5
Image
Cr4ig
Senior Member
Senior Member
 
Joined: Mon Nov 08, 2004 10:55 pm

Postby BaRRaKID on Mon Mar 21, 2005 6:06 pm

the yellow part could be due to not having a cubemap i think
BaRRaKID
Veteran
Veteran
 
Joined: Sun Oct 10, 2004 1:46 pm
Location: PORTUGAL!!!

Postby somerandomnerd on Wed Mar 23, 2005 9:55 am

I think the yellow thing is to do with not having the right texture.

I'm not 100% sure of the names of the files (at work computer now), but I put the filter "glass" into the texture browser, and found that "glassbreak70" (I think) worked, but some of the other glass textures had the yellow box thing.

The only problem I've got now is that the only glass texture that I've found that seems to work is a pretty dirty glass (ie. covered in smears etc.) I'm after something cleaner, so if someone could point out a way to get a nice clean looking glass that breaks properly, it would be very helpful! (Haven't quite wrapped my head around basic custom textures just yet, so I don't think I'll be attempting it!)
somerandomnerd
Been Here A While
Been Here A While
 
Joined: Thu Mar 17, 2005 7:16 pm

Postby Spartan on Sun Apr 03, 2005 10:25 pm

I noticed something weird happening with a pane of shattering glass that I made.

The glass was set at an angle and when I shot it, it would flip 90 degrees.
I'm not yet sure why its doing this but I think it might be because the glass can't be set at an angle other than 0, 90, 180, or 270 on any axis. In other words it basically has to be a block.
Spartan
Veteran
Veteran
 
Joined: Sat Oct 09, 2004 2:58 pm

Postby YokaI on Mon Apr 04, 2005 12:54 am

beacause it always needs to be a square because valve team is so lazy that they just put a shatter decal thing on it...
YokaI
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Fri Dec 03, 2004 12:38 am

Postby smeerkat on Sun Apr 17, 2005 3:43 am

somerandomnerd wrote:The only problem I've got now is that the only glass texture that I've found that seems to work is a pretty dirty glass (ie. covered in smears etc.)


same here, I'm using windowbreak070a and it's quite a dirty texture. Is that the same one used in office?
über dumpling.
User avatar
smeerkat
Regular
Regular
 
Joined: Sun Apr 03, 2005 5:36 pm
Location: Babylon 4

Postby somerandomnerd on Sun Apr 17, 2005 8:12 pm

No- I've since found that the office one is actually much better- it's got a little bit of dirt around the edges, but is on the whole very clean.

It's called "glass/offwndwb"
somerandomnerd
Been Here A While
Been Here A While
 
Joined: Thu Mar 17, 2005 7:16 pm

Postby smeerkat on Sun Apr 17, 2005 8:20 pm

Cool, thanks. 8)
über dumpling.
User avatar
smeerkat
Regular
Regular
 
Joined: Sun Apr 03, 2005 5:36 pm
Location: Babylon 4

Postby Kjinxx2 on Mon Apr 25, 2005 2:09 pm

Hmm. for some reason when I put in the filter for glass/offwndwb it doesnt show up got any clue?


.. and also, is it possible to make the window visible on both sides? because when I textured it on both sides, the object totally disappeared in game :smt022 Thanks!
Kjinxx2
Just Joined
Just Joined
 
Joined: Mon Apr 25, 2005 2:07 pm

Postby somerandomnerd on Mon Apr 25, 2005 2:41 pm

You only need to put the texture on 1 face- leave all the other faces as nodraw and it should work.

I don't know why the office window texture isn't showing up- it might be that you're set up for half life 2- I don't think Counter Strike textures show up if you're set up for HL2.
somerandomnerd
Been Here A While
Been Here A While
 
Joined: Thu Mar 17, 2005 7:16 pm

Postby davey on Wed May 04, 2005 8:25 pm

A: Couldn't find glass/offwndwb texture. I'm using HL2 DM
B: Replaced with another glass texture but when shot the glass rotates and resizes the texture on the surface even though I have the brush same size as texture. It does break though.
C: Another tutorial that doesn't do as it says on the tin despite what should be a very simple tutorial.
davey
Member
Member
 
Joined: Mon Apr 25, 2005 4:57 pm

Postby BaRRaKID on Wed May 04, 2005 10:17 pm

the tutorial is for cs:s so some sutff may be diferent. And before bitching about the tut make sure you dind't do any step wrong ;)
I've no sign
BaRRaKID
Veteran
Veteran
 
Joined: Sun Oct 10, 2004 1:46 pm
Location: PORTUGAL!!!

Postby somerandomnerd on Wed May 04, 2005 11:13 pm

Yeah, you do need to have the right material setting for the glass breaking to work, and you can't use CS strikes in HL2 (although you can use HL2 textures in CS, it seems.) Only certain materials are set with the different material for when it's broken.

Also, I think that there are some HL1 textures that you can use in CS, but not HL2.

If you follow the tutorial with hammer set to CS, it all works fine. If you're in HL2, glassbreak70 works- don't know of any other materials that do though.
somerandomnerd
Been Here A While
Been Here A While
 
Joined: Thu Mar 17, 2005 7:16 pm
Next

Return to Tutorials

Who is online

Users browsing this forum: No registered users