Submitted by
Andy on Tue, 2004-11-30 04:53.
Hammer 3.4
Glass and Moving Doors - by Andy
Most of the door textures available in Half-Life have areas that are just dying to be filled with glass and the problem for most new mappers seems to be getting the glass to move with the door.
To get the most out of this tutorial, you should have an understanding of Glass Rendering and the basics of Doors.
I have added a list of RUST tutorials below to help you on your way.
To get started, let's look at the humble triggered sliding door on the left of the picture below.
A sliding door with moving glass:
I started off with a brush textured C1A0B_DR4b as the basis for a simple sliding steel door. It isn't as well defined as some HL textures as to where the glass fits, but it does provide a good base for testing.
Create a brush approximately the size you want your 'see through' glass panel to be. Size it against the door and position it so that it passes through the door.
Things to consider are that the look ahead height is about 50 units, so you want your glass to be positioned in the door with the center around that height.
I have positioned it just above the texture's buttons, and fitted it so that it looks as though it should be there. When you have your brush positioned correctly, create it (Enter) and select the Carve (Shift+X) tool to create a hole for the glass. When you Carve, remember never to Carve entities.
Remove your newly created brush from the hole, as we are going to use that as the door glass later. Select all the parts of your door (NOT the glass piece) and assign them to the func_door entity. Open the door properties and adjust them to suit the direction and speed of the door and make sure that the FLAG "Use Only" is NOT checked. (If you want your door to be "Use Only" then the properties of the glass and the door must be exactly the same.)
The Glass:
The piece you used to carve the hole in the door only needs a few modifications. First, assign it to a func_door entity and give it exactly the same attributes as your sliding door. Don't forget the angle, so that it moves in the same direction as the door. To make the glass see-through set the Render Mode to "Texture" and the Render FX to about 90 (a setting of 0 is totally transparent and 255 is solid).
An important part of setting up the glass is the "lip" value. For sliding doors, the lip value of the glass should be equal to the size of the opening edge frame of the door. When you place the glass in the door, make sure that you stretch it to match up with the outer edge of the door that will move into the wall.
Another way to acheive the same effect is to make the glass the same size as the hole and set the lip value to equal the right-hand frame thickness added to to the left-hand frame thickness.
Making it Work:
To get everything going, add a simple button and set it to trigger the door. That's about all there is too it. You can set the FLAG properties of the door and button to "toggle" if that's the effect you want to achieve. Just don't forget that whatever you use as door properties must be set for the glass as well.
On a final note, adjusting the texture inside the hole you cut for the glass is a good idea, as the area is now visible.
Wooden swinging (rotating) door with glass
Based on the idea above, we need to add two glass panels with two "origin" brushes.
Create a new wooden door (I used the FIFTIES_DR6A2 texture) with an Origin brush and assign it to the func_door_rotating entity. Create two new glass panels to fit so that they are thinner than the door but extend to the hinged side of the door. Add an Origin brush to each of the glass panels and assign the each panel to the func_door_rotating entity.
The glass panels should have the same settings as the door, with the exception of the Render Mode and RenderFx for the glass.
In the Top View make sure all the Origin brushes are all in line and reasonably centered on the edge of the panels. To trigger the door open I have used a simple trigger_multiple that runs through the door. Just set its Target to the name of the door and glass.
That is about it, but just a few things to consider, if you are going to assign locked or moving sounds to this door it is a good idea to make sure the doorframe and the large glass panel have the same properties selected.
As for setting the Flag properties of the door and the glass panels, well it depends on what you want your door to look like and how you want it to behave. Just remember to set the flags for all three items and to make sure they all have the same Name(targetname).
The front shot of the door shows the two glass panels (white) grouped with their Origin brushes. It also shows the position of the original door and Origin brush (red).
I have included a small zip file containing an .rmf and .map file called
Glassdoors.zip
Other Door and Glass related tutorials:
Creating Proximity Doors
Simple Doors
How to make respawable glass
Creating a dark environment.
Day of Defeat Tutorials