This article's documentation is for anything that uses the Source engine. Click here for more information.

Env terrainmorph: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (Created Env terrain morph description)
 
m (→‎Inputs: Substituted IO templates)
 
(41 intermediate revisions by 25 users not shown)
Line 1: Line 1:
Obsolete Entity
{{LanguageBar}}
{{obsolete|entity=1}}
[[File:terrainmorph.gif|right|frame|Animated example of several env_terrainmorphs in the E3 tech demo.]]
{{CD|CTerrainMorph|base=CPointEntity|file1=[https://github.com/Source-SDK-Archives/source-sdk-2006-ep1/blob/master/dlls/cterrainmorph.cpp cterrainmorph.cpp]}}
{{this is a|point entity|name=env_terrainmorph|before=Source 2007}} It dynamically morphs [[displacements]] by pulling vertices along a normal, similar to the [[Hammer_Face_Edit_Disps#Paint_Geometry|Paint Geometry]] tool in Hammer.
Place this entity the desired distance from a displacement surface and set ''Angles'' (manually, with SmartEdit turned off and three angle values in place, e.g. 90 0 0) to the normal along which you want to pull the vertices of the surface.
{{bug*|The collision hull will not be updated. See [[Morphing Terrain Issues]] to fix the problem.}}
{{AltNames|name1=tectonic}}
__NOTOC__
==Keyvalues==
{{KV Targetname}}
{{KV|Start Radius|intn=startradius|integer|Radius of the effect when morphing begins. Only this value is used}}
{{KV|Goal Radius|intn=goalradius|integer|Radius of the effect at the end of morphing. The radius of this effect will change from Start Radius to Goal Radius over the duration of this effect. Ignored if the ''Instant'' flag is set.}}
{{KV|Duration|intn=duration|integer|The morph will take place over this period of time (seconds). Ignored if the ''Instant'' flag is set.}}
{{KV|Displacement Fraction|intn=fraction|integer|If set to <code>1</code>, the terrain surface will be pulled exactly to this entity's position. If set to <code>0.5</code>, the surface will be pulled exactly half way to this entity's position. If set to <code>2</code>, the surface will be pulled to an imaginary point twice as far away as this entity. (Any ''fraction'' value greater than <code>1.0</code> will result in clipping. The surface cannot be pulled beyond this entity's position and any vertices attempting will clip to this entity's position. You may use this feature to create mesas.)}}


I think this entity was used to dynamically morph displacements as shown in early tech demos of HalfLife 2.
==Flags==
{{fl|1|Instant|If set, the morph will take place instantly instead of over time.}}
 
==Inputs==
{{I|BeginMorph|Begin terrain morph}}
 
==See also==
* [[Displacement]]
* [[Morphing Terrain Issues]]

Latest revision as of 10:54, 21 April 2025

English (en)Translate (Translate)
Obsolete-notext.png
This entity is obsolete. Its use is discouraged. It may only exist/function in older engine branches.
Animated example of several env_terrainmorphs in the E3 tech demo.
C++ Class hierarchy
CTerrainMorph
CPointEntity
CBaseEntity
C++ cterrainmorph.cpp

env_terrainmorph is a point entity available in all Source Source games before Source 2007 Source 2007. It dynamically morphs displacements by pulling vertices along a normal, similar to the Paint Geometry tool in Hammer. Place this entity the desired distance from a displacement surface and set Angles (manually, with SmartEdit turned off and three angle values in place, e.g. 90 0 0) to the normal along which you want to pull the vertices of the surface.

Icon-Bug.pngBug*:The collision hull will not be updated. See Morphing Terrain Issues to fix the problem.
AltNames.pngAltNames: This entity is also tied to tectonic.

Keyvalues

Name (targetname) <string>[ Edit ]
The name that other entities refer to this entity by, via Inputs/Outputs or other keyvalues (e.g. parentname or target).
Also displayed in Hammer's 2D views and Entity Report.
See also:  Generic Keyvalues, Inputs and Outputs available to all entities

Start Radius (startradius) <integer>
Radius of the effect when morphing begins. Only this value is used
Goal Radius (goalradius) <integer>
Radius of the effect at the end of morphing. The radius of this effect will change from Start Radius to Goal Radius over the duration of this effect. Ignored if the Instant flag is set.
Duration (duration) <integer>
The morph will take place over this period of time (seconds). Ignored if the Instant flag is set.
Displacement Fraction (fraction) <integer>
If set to 1, the terrain surface will be pulled exactly to this entity's position. If set to 0.5, the surface will be pulled exactly half way to this entity's position. If set to 2, the surface will be pulled to an imaginary point twice as far away as this entity. (Any fraction value greater than 1.0 will result in clipping. The surface cannot be pulled beyond this entity's position and any vertices attempting will clip to this entity's position. You may use this feature to create mesas.)

Flags

Instant : [1]
If set, the morph will take place instantly instead of over time.

Inputs

BeginMorph
Begin terrain morph

See also