Jump to: navigation, search

A Vortex is a renderable object that can be used to generate various screen-space visual effects. The basic concept is that a Vortex Node is a quad (a flat square) that you can position in 3D space. The quad samples the image behind it and performs various image manipulations on it.

By adjusting the properties of the Vortex node, many different effects can be achieved. Primarily, it can be used to create a swirling vortex (black hole) type effect that "sucks" the visuals into it. But it can also be used for a variety of effects from heat signatures to flash-bang image burn effects. Combining a Vortex node with a particle system can also achieve very interesting effects.

Just as with a particle effect, a vortex can have many changes made to its appearance by modifying its properties.

Adding a vortex

To add a vortex to the game world, add it like a normal asset via the Asset Library, or through the Create menu.



General Properties

Animating (True, False)

When set to false, the VortexNode's animations are reset to the beginning. This includes all loops, rotations and movements. When set to true, the VortexNode starts animating from the beginning.

AlwaysOnTop (True, False)

The vortex node is visible even if behind something.

DoubleSided (True, False)

The VortexNode becomes visible on both sides.

Effect Type

At the time of this writing, there is only one effect type implemented: Vortex. When the Distortion property is increased, this effect type swirls the view. In the future, you will be able to select different effect types, like "Stretch" and "Blur".

OrientationAxis (XYZ, Y, None)

If XYZ, the VortexNode is always facing the camera. If Y, the vortex node faces the camera, but the top of it always points towards the sky. If None, the VortexNode has the orientation you assign it.

Distortion Properties

Distortion (Parameter)

Increases or decreases the strength of the effect type.

DistortionShape (Circle, Square)

Distorts the effect type into a circle or a square. It's best explained by toggling between the two and looking at the result.

DistortionTexture (Texture)

A normal map which distorts the view based on the direction of the normal. For example, if you choose a bumpy normal map, the view will become distorted as if you were looking through bumpy stained glass.

DistortionTextureRotationSpeed (Parameter)

How fast the DistortionTexture rotates, in revolutions per second. A positive value rotates clockwise.

DistortionTextureMovementSpeed (2D Parameter)

How fast the DistortionTexture moves, in wraps per second. A positive value moves right or up.

Note: The Z axis is ignored for this property.

DistortionTextureUVScaling (2D Parameter)

How many times the texture is tiled. An X or Y value of 2 tiles a texture twice along that axis.

Note: The Z axis is ignored for this property.

DistortionTextureWeight (Parameter)

How much the DistortionTexture distorts the view.

DistortionTexturePercentage (Parameter)

How much of the VortexNode the DistortionTexture covers.

Note: In the engine, percentages range from 0 to 1.

DistortionTextureFeatherPercentage (Parameter)

How much of the space left over from DistortionTexturePercentage is feathered. A value of 1 feathers the DistortionTexture all the way out to the edges; a value of 0 is a sharp, hard transition.

Note: In the engine, percentages range from 0 to 1.

Color Layer Properties

Enabled (True, False)

Whether or not the color layer is enabled.

Distort (True, False)

Whether or not the color layer is distorted by the Distortion properties.

Snapshot (True, False)

Take a snapshot of the backbuffer. If there is no MaskTexture, the snapshot becomes the MaskTexture. Otherwise, it's multiplied with the current MaskTexture. This can be used to implement a flashbang effect.

SnapshotInterval (Looping Timeline)

If snapshot is set to true, every time the value becomes 1 or greater a snapshot is taken of the backbuffer. This lets you take several snapshots in a row with a specific rhythm, probably timed with other effects like flashing.

Color (Color parameter)

The color of the color layer. If there is a MaskTexture, this value is multiplied with it.

Intensity (Parameter)

A multiplier for the color layer.

MaskTexture (Texture)

A texture for the color layer.

MaskRotationSpeed (Parameter)

How fast the MaskTexture rotates, in revolutions per second. A positive value rotates clockwise.

MaskMovementSpeed (2D Parameter)

How fast the MaskTexture moves, in wraps per second. A positive value moves right or up.

Note: The Z axis is ignored for this property.

MaskUVScaling (2D Parameter)

How many times the texture is tiled. An X or Y value of '2' tiles a texture twice along that axis.

Note: The Z axis is ignored for this property.

Percentage (Parameter)

How much of the VortexNode the color layer covers.

Note: In the engine, percentages range from 0 to 1.

FeatherPercentage (Parameter)

How much of the space left over from Percentage is feathered. A value of 1 feathers the color layer all the way out to the edges; a value of 0 is a sharp, hard transition.

Note: In the engine, percentages range from 0 to 1.

Mode (Blend, Add, Subtract, Multiply)

Whether the color layer blends with, adds to, subtracts from, or multiplies with the background.

Shape (Circle, Square)

What shape the color layer is.

Screenspace Properties

FillScreen (True, False)

The vortex node fills the whole screen, no matter where you look. When true, the position of the node doesn't matter and it will effect the entire screen. The node still exists in 3D space, so that you can select it again.

Adding the Server Definitions

The following CLI commands were entered on the server to create the definitions required by this node type.

// MouseTargetable boolean#Collision
cfd AlwaysOnTop boolean; +reflect
// DoubleSided boolean#Visuals
// OrientationAxis enum:XYZ,Y,None#Visuals
cfd FillScreen boolean; +reflect
cfd Animating boolean; +reflect
cfd ScaleMultiplier string; +reflect

cfd Distortion string; +reflect
cfd DistortionShape enum ColorShape; +reflect
cfd DistortionTexture string; +reflect
cfd DistortionTextureRotationSpeed string; +reflect
cfd DistortionTextureMovementSpeed string; +reflect
cfd DistortionTextureUVScaling string; +reflect
cfd DistortionTextureWeight string; +reflect
cfd DistortionTexturePercentage string; +reflect
cfd DistortionTextureFeatherPercentage string; +reflect
ced ColorShape;Circle Square
cfd DistortionTextureShape enum ColorShape; +reflect

cfd InnerColorEnabled boolean; +reflect
cfd InnerColorDistort boolean; +reflect
cfd InnerColor string; +reflect
cfd InnerColorIntensity string; +reflect
cfd InnerColorMaskTexture string; +reflect
cfd InnerColorMaskRotationSpeed string; +reflect
cfd InnerColorMaskMovementSpeed string; +reflect
cfd InnerColorMaskUVScaling string; +reflect
cfd InnerColorPercentage string; +reflect
cfd InnerColorFeatherPercentage string; +reflect
ced ColorBlendMode;Blend Add Subtract Multiply
cfd InnerColorMode enum ColorBlendMode; +reflect
cfd InnerColorShape enum ColorShape; +reflect
cfd InnerColorSnapshot boolean; +reflect
cfd InnerColorSnapshotInterval string; +reflect

cfd OuterColorEnabled boolean; +reflect
cfd OuterColorDistort boolean; +reflect
cfd OuterColor string; +reflect
cfd OuterColorIntensity string; +reflect
cfd OuterColorMaskTexture string; +reflect
cfd OuterColorMaskRotationSpeed string; +reflect
cfd OuterColorMaskMovementSpeed string; +reflect
cfd OuterColorMaskUVScaling string; +reflect
cfd OuterColorPercentage string; +reflect
cfd OuterColorFeatherPercentage string; +reflect
cfd OuterColorMode enum ColorBlendMode; +reflect
cfd OuterColorShape enum ColorShape; +reflect
cfd OuterColorSnapshot boolean; +reflect;
cfd OuterColorSnapshotInterval string; +reflect

ccd VortexInstanceWritableInstanceProperties data; _SpecializedWritableInstanceProperties MouseTargetable AlwaysOnTop DoubleSided OrientationAxis Distortion DistortionTexture DistortionTextureRotationSpeed DistortionTextureMovementSpeed DistortionTextureWeight DistortionTexturePercentage DistortionTextureFeatherPercentage DistortionTextureShape InnerColorEnabled InnerColorDistort InnerColor InnerColorIntensity InnerColorMaskTexture InnerColorMaskRotationSpeed InnerColorMaskMovementSpeed InnerColorPercentage InnerColorFeatherPercentage InnerColorMode InnerColorShape OuterColorEnabled OuterColorDistort OuterColor OuterColorIntensity OuterColorMaskTexture OuterColorMaskRotationSpeed OuterColorMaskMovementSpeed OuterColorPercentage OuterColorFeatherPercentage OuterColorMode OuterColorShape Animating FillScreen InnerColorSnapshot OuterColorSnapshot InnerColorSnapshotInterval OuterColorSnapshotInterval DistortionTextureUVScaling InnerColorMaskUVScaling OuterColorMaskUVScaling ScaleMultiplier

ccd VortexInstance INSTANCE; Instance VortexInstanceWritableInstanceProperties

cpfc VortexInstance ProtoVortexInstance

mp ProtoVortexInstance; Scale=(1,1,1) Selectable=true Distortion=1 +InnerColorEnabled +InnerColorDistort InnerColor="#0,0,0,1" InnerColorIntensity="1" InnerColorPercentage="0.2" InnerColorFeatherPercentage="1" InnerColorMode=Blend InnerColorShape=Circle +OuterColorEnabled +OuterColorDistort OuterColor="#1,1,1,1" OuterColorIntensity="1" OuterColorPercentage="0.5" OuterColorFeatherPercentage="1" OuterColorMode=Blend OuterColorShape=Circle DistortionTextureRotationSpeed="0.5" DistortionTextureWeight="20" DistortionTexturePercentage="1" DistortionTextureFeatherPercentage="1" DistortionTextureShape=Square DistortionTexture="\Render\ShaderTextures\vortex_05_n.dds" InnerColorMaskRotationSpeed="0" InnerColorMaskMovementSpeed="(0,0,0)" OuterColorMaskRotationSpeed="0" OuterColorMaskMovementSpeed="(0,0,0)" DistortionTextureMovementSpeed="(0,0,0)" Animating=true FillScreen=false InnerColorSnapshot=false OuterColorSnapshot=false DistortionTextureUVScaling="(1,1,0)" InnerColorMaskUVScaling="(1,1,0)" OuterColorMaskUVScaling="(1,1,0)" ScaleMultiplier="(1,1,1)"

Then the script _EditCommandHandler was edited to add handling for the new vortex node type.

This line was added to the _processCommandAddHeroEngineAssets() function

  _processAddHeroEngineAssetType( "vortexasset", "vortexinstance", "protovortexinstance", ".vor", "\engine\vortex.vor", true )

After testing, we moved all of the definitions into the required Distribution package with the following CLI commands.

med ColorShape; package=required
med ColorBlendMode; package=required

mfd Distortion; package=required
mfd DistortionShape; package=required
mfd DistortionTexture; package=required
mfd DistortionTextureShape; package=required
mfd DistortionTextureRotationSpeed; package=required
mfd DistortionTextureMovementSpeed; package=required
mfd DistortionTextureUVScaling; package=required
mfd DistortionTextureWeight; package=required
mfd DistortionTexturePercentage; package=required
mfd DistortionTextureFeatherPercentage; package=required

mfd InnerColorEnabled; package=required
mfd InnerColorDistort; package=required
mfd InnerColorSnapshot; package=required
mfd InnerColorSnapshotInterval; package=required
mfd InnerColor; package=required
mfd InnerColorIntensity; package=required
mfd InnerColorMaskTexture; package=required
mfd InnerColorMaskRotationSpeed; package=required
mfd InnerColorMaskMovementSpeed; package=required
mfd InnerColorMaskUVScaling; package=required
mfd InnerColorPercentage; package=required
mfd InnerColorFeatherPercentage; package=required
mfd InnerColorMode; package=required
mfd InnerColorShape; package=required

mfd OuterColorEnabled; package=required
mfd OuterColorDistort; package=required
mfd OuterColorSnapshot; package=required
mfd OuterColorSnapshotInterval; package=required
mfd OuterColor; package=required
mfd OuterColorIntensity; package=required
mfd OuterColorMaskTexture; package=required
mfd OuterColorMaskRotationSpeed; package=required
mfd OuterColorMaskMovementSpeed; package=required
mfd OuterColorMaskUVScaling; package=required
mfd OuterColorPercentage; package=required
mfd OuterColorFeatherPercentage; package=required
mfd OuterColorMode; package=required
mfd OuterColorShape; package=required

mfd AlwaysOnTop; package=required
mfd Animating; package=required
mfd FillScreen; package=required
mfd ScaleMultiplier; package=required

mcd VortexInstanceWritableInstanceProperties; package=required
mcd VortexInstance; package=required
mpp ProtoVortexInstance required
Personal tools