newxog_volume

From Valve Developer Community
Jump to navigation Jump to search
English (en)Translate (Translate)

newxog_volume is a point entity available in Black Mesa Black Mesa. This is xog (Xen Fog) volume, brush entity that creates a fog transition, making spaces appear deeper than they are.

Xog volume example.
The texture that use level designers to mark this entity.
Note.pngNote:This entity have trigger_once functions but they are not in FGD and never work.
Tip.pngTip:Use tools/tools_xogvolume texture for your xog volumes to quickly distinguish them from triggers while level creation.
Tip.pngTip:In addition to using this entity as a fog in certain areas, it is also great for use for func_water_analog, since func_water_analog haven't itown fog in it's volume.
Icon-Important.pngImportant:This entity doesn't affects optimization, this entity for visual effects only.
Icon-Important.pngImportant:This brush entity uses bbox brush volume to render and not brush volume itself.
An example.


Warning.pngWarning:Xog use expensive gbuffer, that means that with this entity your scene rendering at least 5 times, which makes your level very expensive, considering that XenEngine uses 32-bit architecture and DirectX 9 rendering. In large quantities, xog entities can greatly heat up your computer and also cause large FPS drops (depending on difficulty of your map and how your area open). Use wisely.

Black Mesa Represented by class CNewXogVolume.

Black Mesa Level Creation

Keyvalues

Name (targetname) <string>
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

Enabled (Enabled) <choices>
Determines is this entity enabled or disabled on spawn.
  • 0: Enabled
  • 1: Disabled
Shape Type (xogtype) <choices>
Shape type to use. You can use BBOX or Ellipsoid.
  • 0:0: LocalVolume BBOX
  • 1:1: LocalVolume Ellipsoid
Examples


colorMode (colormode) <choices>
This is FGD leftover from newxog_global. This feature doesn't work for this entity.
Texture name Grad Texture (texname) <string>
This is FGD leftover from newxog_global. This feature doesn't work for this entity.
colorTop (colortop) <color255>
Xog top color. This is the main color of xog that uses if Enable Height Blend property is disabled.
Examples


Note.pngNote:Top and bottom colors blending in xog center, for example with red and green colors the center of xog will be yellow.
colorBottom (colorbottom) <color255>
Xog bottom color. Requires enabled Enable Height Blend to be working.
Examples


distStart (diststart) <float>
distStart

Xog start draw distance.

Examples


Icon-Bug.pngBug:Numbers lower than 1 cause xog graphics issues.
Bug examples


distEnd (distend) <float>
distEnd

Xog end draw distance.

Examples


Icon-Bug.pngBug:Numbers lower than 1 cause xog graphics issues.
Bug examples


Note.pngNote:The difference in values of distStart and distEnd should be not too big, otherwise the fog will be unsmooth.
distDensity (distdensity) <float>
Density of xog entity, only values from 0 to 1 works.
Examples


opacityOffsetTop (opacityoffsettop) <float>
Offsets top color of xog.
Examples


opacityOffsetBottom (opacityoffsetbottom) <float>
Offsets bottom color of xog.
Examples


htZStart (htzstart) <float>
Height that xog starts rendering at.
Examples


htZEnd (htzend) <float>
Height that xog stops rendering at.
Examples


htZColStart (htzcolstart) <float>
Height that xog color starts rendering at. Results depend on htZColEnd value.
Examples


htZColEnd (htzcolend) <float>
Height that xog color stops rendering at. Results depend on htZColStart value.
Examples


noise1ScrollSpeed (noise1scrollspeed) <vector>
Layer one, speed at which noise moves through xog volume (X Y Z).
Examples


noise1Tiling (noise1tiling) <vector>
Layer one, tiling speed at which noise moves through xog volume (X Y Z).
Examples


noise2ScrollSpeed (noise2scrollspeed) <vector>
Layer two, speed at which noise moves through xog volume (X Y Z).
Examples


noise2Tiling (noise2tiling) <vector>
Layer two, tiling speed at which noise moves trough xog volume (X Y Z).
Examples


noiseContrast (noisecontrast) <float>
Contrast of xog.
Examples


noiseMultiplier (noisemultiplier) <float>
Multiplier of xog.
Examples


Enable Height Blend (enablevol_height) <choices>
Determines bottom color and blending is disabled or enabled.
  • 0: Disabled
  • 1: Enabled
Examples


Inputs

TurnOn <void>
Turn xog on.
TurnOff <void>
Turn xog off.
Toggle <void>
Toggle the xog between on and off stages.

Bugs/Limitations

Xog incorrect work with $translucent

Xog all time fully rendering through everything with material shader parameter $translucent. This happen because of game can't tell the depth of scene because of the transparency.

Similar issue happen if use $alphatestreference incorrectly.
This problem also applies to brushes which not have $translucent, but which parented to brushes that have this parameter. Similar will happen if brush with $translucent is part of your brush entity. Same will happen if you use overlays/decals on brushes with $translucent.

This issues does not happen if replace LightmappedGeneric to ShatteredGlass or UnlitGeneric, so, you can use one of them for glass or transparency surfaces when it's needed.

In some cases use $alphatest if it'll give similar to $translucent resualts.


Xog incorrect work with $alphatestreference and $allowalphatocoverage

$alphatestreference is a material shader parameter that specifies the threshold alpha channel value at which the surface should be transparent instead of opaque, default "0.5". $allowalphatocoverage creates translucent steps based on alpha values. Both have one and same problems with gbuffer. For examples used this texture with this alpha channel.

Here xog placed behind wall with the texture. We can see the circle part of that have alpha channel part which is invisible due to $alphatest, with enabled xog we see that the invisible part doesn't show through itself xog.

If use very low numbers you will see resualts like in the pictures.


You can't escape this problem, only minimize effect with $alphatestreference 0.1 or if paint alpha correct channel.


Motion blur blurring viewmodel xog layer

For some reason Motion blur blurring viewmodel xog layer, you can notice this when you just rotate camera. This issue happen even if xog behind other objects.


Xog incorrect work with -tools

If you don't use Full Screen - xog will incorrectly applying to screen.


Xog volume doesn't work with 3D Skybox

Don't use xog volumes in your 3D skyboxes, none of them will work at all.


Xog doesn't refract by refract shader and fully draw through

Unlike deferred lighting, xog doesn't refract by refract shader, also fully draw through.

If model with refraction behind wall with refraction - this cause issues like this.

Similar issue with cloak material shader parameter.


See also