Func areaportalwindow: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(map link)
(updates)
Line 1: Line 1:
{{lang|Func areaportalwindow}}
[[File:Hl2 d2 coast 09 areaportalwindows.png|250px|thumb|right|An example of its use 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.]]
[[File:Hl2 d2 coast 09 areaportalwindows.png|250px|thumb|right|An example of its use 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.]]
{{base brush|func_areaportalwindow}}  
[[File:Toolsareaportal.gif|link=Areaportal|left]]{{base brush|func_areaportalwindow}} It creates an [[areaportal]] that automatically closes as the camera moves away, fading a second, opaque brush in to fill the gap.
[[File:Areaportalwindow coast12.jpg|180px|thumb|right|caption|A <code>func_areaportal_window</code> that hides interior geometry by turning black at a distance.]]


==Entity description==
{{bug|(Known to affect Half Life 2) The <code>dev/dev_window</code> texture has to be on both sides of the brush, combining it with any other texture (except nodraw) will result in rendering glitches (objects popping in and out of the PVS depending on player position and view angle).}}
[[File:Toolsareaportal.gif|link=Areaportal|left]][[Image:Areaportalwindow coast12.jpg|180px|thumb|right|caption|A func_areaportal_window that hides interior geometry by turning black at a distance.]]It creates an [[areaportal]] that automatically closes as the camera moves away, fading a second, opaque brush in to fill the gap.


{{bug|This is a bug known to affect Half Life 2: The dev/dev_window texture has to be on both sides of the brush, combining it with any other texture (except nodraw) will result in rendering glitches (objects popping in and out of existance depending on player position and viewangle).}}
{{code class|CFuncAreaPortalWindow|func_areaportalwindow.cpp}}


== Keyvalues ==
==Keyvalues==
{{KV|Rendered Window (target)|targetname|The brush entity that fills the gap left by the portal when closed.}}
{{KV|Fade Start Distance (FadeStartDist)|int|Distance that the fade into the '''Rendered Window''' brush entity begins. The further back the player views, the more visible the brush entity will be.}}
{{KV|Fade End Distance (FadeDist)|int|Distance at which the '''Rendered Window''' is fully visible, and the portal closes.}}
{{KV|Translucency limit (TranslucencyLimit)|normal|Prevents the ''Rendered Window'' brush from ever going completely transparent. Useful if your rendered window uses an opaque glass material.}}
{{KV|Foreground bmodel (BackgroundBModel)|targetname|Optional brush entity that is drawn after the fading brush model. This model should have alpha in its textures so you can see through it.}}
{{KV BaseEntity}}


; Rendered Window <code><[[targetname]]></code>
==Inputs==
: The [[brush entity]] that fills the gap left by the portal when closed.
{{IO|SetFadeStartDistance|param=int|Sets '''Fade Start Distance'''.}}
; Fade Start Distance <code><int></code>
{{IO|SetFadeEndDistance|param=int|Sets '''Fade End Distance'''.}}
; Fade End Distance <code><int></code>
{{I BaseEntity}}
: [[Unit]] boundaries of the fadeout.
; Translucency limit <code><[[normal]]></code>
: Prevents the ''Rendered Window'' brush from ever going completely transparent. Useful if your rendered window uses an opaque glass material.
; Foreground bmodel <code><targetname></code>
: Optional brush entity that is drawn after the fading brush model. This model should have alpha in its textures so you can see through it.
{{KV Targetname}}


== Inputs ==
==Outputs==
{{O BaseEntity|l4d=1}}


; <code>SetFadeStartDistance <[[int]]></code>
==See Also==
; <code>SetFadeEndDistance <int></code>
*{{ent|func_areaportal}}
: The [[unit]] boundaries of the fadeout.
{{I Targetname}}
 
== Outputs ==
{{O Targetname}}
 
== See also ==
 
* [[Areaportal]] - Main article about Areaportals.
* [[func_areaportal]]


[[Category:Optimization Brush Entities]]
[[Category:Optimization Brush Entities]]

Revision as of 21:33, 4 October 2018

English (en)Translate (Translate)
An example of its use on d2_coast_09Half-Life 2. 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.
Toolsareaportal.gif

Template:Base brush It creates an areaportal that automatically closes as the camera moves away, fading a second, opaque brush in to fill the gap.

A func_areaportal_window that hides interior geometry by turning black at a distance.
Icon-Bug.pngBug:(Known to affect Half Life 2) The dev/dev_window texture has to be on both sides of the brush, combining it with any other texture (except nodraw) will result in rendering glitches (objects popping in and out of the PVS depending on player position and view angle).  [todo tested in ?]
C++ In code, it is represented by theCFuncAreaPortalWindowclass, defined in thefunc_areaportalwindow.cppfile.

Keyvalues

Rendered Window (target) ([todo internal name (i)]) <targetname>
The brush entity that fills the gap left by the portal when closed.
Fade Start Distance (FadeStartDist) ([todo internal name (i)]) <integer>
Distance that the fade into the Rendered Window brush entity begins. The further back the player views, the more visible the brush entity will be.
Fade End Distance (FadeDist) ([todo internal name (i)]) <integer>
Distance at which the Rendered Window is fully visible, and the portal closes.
Translucency limit (TranslucencyLimit) ([todo internal name (i)]) <normal>
Prevents the Rendered Window brush from ever going completely transparent. Useful if your rendered window uses an opaque glass material.
Foreground bmodel (BackgroundBModel) ([todo internal name (i)]) <targetname>
Optional brush entity that is drawn after the fading brush model. This model should have alpha in its textures so you can see through it.


Inputs

SetFadeStartDistance <integerRedirectInput/integer>
Sets Fade Start Distance.
SetFadeEndDistance <integerRedirectInput/integer>
Sets Fade End Distance.


Outputs

See Also