VERC: Glass and Transparency Last edited 15 years ago2003-03-07 07:07:00 UTC by Penguinboy Penguinboy

This article was recovered from an archive and needs to be reviewed

  1. The formatting may be incorrect as it was automatically converted to WikiCode from HTML, it needs to be revised and reformatted
  2. Some information may be out of date as it was written before Half-Life was available on Steam
  3. After the article is re-formatted and updated for Steam HL, remove this notice
  4. Please do not remove the archive notice from the bottom of the article.
  5. Some archive articles are no longer useful, or they duplicate information from other tutorials and entity guides. In this case, delete the page after merging any relevant information into other pages. Contact an admin to delete a page.

Introduction

Glass. Its everywhere. Windows... um... glass es ... um... well, it is a fairly common material, and it seems to be one of the first things people new to editing ask about.

Method

The method for making glass is applicable to the creation of any semi-transparent object. An obvious example would be a window. A less obvious example would be the hologram from the Half-Life hazard course.
window.jpgwindow.jpg
hologram.jpghologram.jpg
The results of both effects are quite different, but they both use the same basic method for the transparency.

Simple Glass

The first thing to do is start with an appropriate texture. Almost any texture could be used, depending on the application, but there are several textures made specifically for windows or other large sheets of glass. Below are 3 examples, though there are several others to choose from.
glass_textures.gifglass_textures.gif
standard glass textures from the halflife.wad WAD file
First, select the texture you'd like to use. Let's say we're using the first texture above, GLASS_BRIGHT . After this, switch to Block Mode and create the object that will be your window.

That is the obvious part, where most people stop, then wonder why it doesn't work. A common point of confusion among new mappers is that, once they use one of the above textures, they expect their object to be transparent, like glass. However, Half-Life textures don't have innate properties, so it's a little more complicated than that.

Now , select that glass object and press Ctrl+T to turn it into an entity. Windows are usually either a func_wall (Link: index.php?ent=func_wall) (for bulletproof glass) or a func_breakable (Link: index.php?ent=func_breakable) (for normal glass that shatters when shot or hit). In its properties, set the following properties. If you're using the func_breakable entity, you'll want to make sure the following additional property is set correctly: That's all there is too it. The object will now appear to be transparent glass, once you compile and run your map.

Transparent NPCs / Holograms

In the Half-Life hazard course, you are lead through your trials by a female hologram. At least, to anyone who's watched much science fiction, she's easily identifiable as a hologram.

Transparent NPCs are quite easy to make. Place any monster, friendly or not, and set the properties as you previously did for glass: With that, you'll have a ghost NPC or monster. One extra step is required to give them the hologram effect. Set this property: For a better hologram effect, set the Render Mode property to Additive (5) . This will cause the NPC to glow slightly. It gives a nice effect when the holographic character is located in a dark area, as seen in the example map.

Texture vs. Additive Transparency

Transparency can be accomplished using either Texture or Additive rendering modes. Texture transparency seemingly fades an object into the background, while Additive transparency adds the background and the object together and produces a brighter effect.

The two render modes can be expressed mathematically like this: The Render Amount parameter varies the brightness in the additive case, and the opacity in the texture case.

Masked Textures

There is one more form of transparency, which is when you use masked textures. You will recognize a masked texture by two things: The name of a masked texture always starts with a { character, and the portions of the texture that are supposed to be transparent are a solid color, generally blue. Below is an example, {FENCE3 .
fence3.giffence3.gif
To make the blue areas transparent, textures like these must be placed on a brush entity, most commonly on func_wall (Link: index.php?ent=) or func_illusionary (Link: index.php?ent=func_illusionary) entities. The following entity properties must be set: Note that, unlike other types of transparency, the Render Amount must be set to 255 for masked textures, otherwise their blue area will still be showing.

Notes

That's about it. Transparent effects are just like any other special effect: when used appropriately they will add to the atmosphere of your level. When abused, they will detract from it. It would definitely be a good idea to experiment with the different render modes and different render amounts to see what kind of effects you can produce.

For more information on the different rendering properties, check out the Rendering Properties (Link: index.php?doc=1015287068-71355600) article.

Example

For a more concrete illustration, check out the example map linked below.
This article was originally published on the Valve Editing Resource Collective (VERC).
TWHL only archives articles from defunct websites. For more information on TWHL's archiving efforts, please visit the TWHL Archiving Project page.

Comments

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