WiseLayeredGlass: Difference between revisions
(Created page with "{{DISPLAYTITLE:WiseLayeredGlass: HL2 Layered Glass}} {{wisemxport|~~~~}} File:Hl2 d2 coast 09 areaportalwindows.png|400px|thumb|right|An example of <code>func_areaportalwind...") |
(map link) |
||
Line 1: | Line 1: | ||
{{DISPLAYTITLE:WiseLayeredGlass: HL2 Layered Glass}} | {{DISPLAYTITLE:WiseLayeredGlass: HL2 Layered Glass}} | ||
{{wisemxport|[[User:Pinsplash|Pinsplash]] ([[User talk:Pinsplash|talk]]) 12:37, 11 July 2018 (UTC)}} | {{wisemxport|[[User:Pinsplash|Pinsplash]] ([[User talk:Pinsplash|talk]]) 12:37, 11 July 2018 (UTC)}} | ||
[[File:Hl2 d2 coast 09 areaportalwindows.png|400px|thumb|right|An example of <code>func_areaportalwindow</code> on | [[File:Hl2 d2 coast 09 areaportalwindows.png|400px|thumb|right|An example of <code>func_areaportalwindow</code> on {{ent|d2_coast_09}}{{hl2}}. When the player is close to the window, the entity is inactive and the player can see through the window. When the player backs up, the objects outside are culled from the [[PVS]] and replaced with a hazy low-res texture.]] | ||
{{Note|This is an advanced method; it is not required for typical windows. A few mappers have E-Mailed me about not being able to get this method to work for them. The [[Areaportal]] layer mentioned in this project isn't an actual Areaportal. It's textured properly only to illustrate which layer will become the {{ent|func_areaportalwindow}} in your map.}} | {{Note|This is an advanced method; it is not required for typical windows. A few mappers have E-Mailed me about not being able to get this method to work for them. The [[Areaportal]] layer mentioned in this project isn't an actual Areaportal. It's textured properly only to illustrate which layer will become the {{ent|func_areaportalwindow}} in your map.}} | ||
Revision as of 08:55, 18 July 2018
This tutorial was originally created by wisemx. It was originally posted on SDKnuts.net.

func_areaportalwindow
on d2_coast_09

Introduction
A common feature of the windows you see in HL2 along the coast levels are windows that seal the house (area portals) and also create illusionary effects:
- From a little further away the window blocks your view.
- A little closer and the view through the window is clear.
- Break the glass and part of the frame breaks with it.
Creation
There are 4 glass panels and two dynamic props involved.
Glass layers (From outside in)
func_illusionary
panel 0.5 units thick. Textured on outer side withglass\glasswindow026a
, inner side withdev\dev_windowportal
- func_illusionary panel 0.5 units thick. Textured on outer side with
tools\toolsnodraw
, inner side withlights\white002
. - Brush 0.5 units thick textured with
tools\toolsareaportal
. - func_breakable textured with
glass\glasswindow017a
.

The func_breakable
glass panel needs an Output to force the inner frame prop to change to its broken look:
My Output | Target Entity | Target Input | Parameter | Delay | Only Once | |
---|---|---|---|---|---|---|
OnBreakName | window_bars | SetBodyGroup | 1 | 0.00 | No |
Frame parts
- Outer frame is prop_dynamic.
- World model: models/props_wasteland/plasterwall029c_window01a.mdl
- Disable Shadows: Yes
- Inner frame is also
prop_dynamic
.- World model: models/props_wasteland/plasterwall029c_window01a_bars.mdl
- Disable Shadows: Yes
- Name: window_bars
- Collisions: Not Solid
- Randomly animate: No
- Body group: 0
- Start disabled: No
Notice when the inner frame spawns the Body group is set to 0
. Once the glass panels are layered they will appear to be one unit and because they are only 0.5 units thick the overall thickness is only 2.0 units. The Transform tool is very helpful in creating and moving super thin brushes.
In the sample project below I’ve created all of the panels and a frame for them. I’ve left the brushwork spaced outside of the window, so you can practice.