VISUAL EFFECTS SHARED SUB ELEMENTS

The following sub-elements are used by multiple different main elements within the XML for the effect. Each one contains links to the different potential parent XML elements in their description.

 

 

<ObjectReference />

This sub-element is used to define the reference object for a Block item, specifically the following main elements: <EmitterList>, <ParticleInit>, <ParticleUpdate>, and <ParticleOutput>. The reference object is an item that is considered a "child" or "linked" to the item being defined that contains this sub-element. The sub-element is self-closing and has the following attributes:

 

Attribute Description Type Required
InstanceId The GUID of the object being referenced, either an Edition, a Block or a Node item in the effect, as defined by the "id" value (below). Note that the GUID must be enclosed in {}. String Yes
id The general ID for the Block item type.

String:

  1. "Emitter"
  2. "StaticMesh"
  3. "BlockParticleInit"
  4. "BlockParticleUpdate"
  5. "Output"
Yes

 

 

<ParticleLifetime>

This <VisualEffect.BlockParticleInit> and <VisualEffect.BlockParticleUpdate> sub-element defines the lifetime of a single particle in the effect. The element takes no values or attributes, and is a "container" element for the <FloatIn> sub-element, which takes 2 values: A GUID to identify it, and a value to define the lifetime, in seconds. The GUID can be used in Node elements to target the particle lifetime value, in which case the value specified here will be ignored. If you don't use the GUID then it can be left as shown in the example below.

<ParticleLifetime>
    <FloatIn>{00000000-0000-0000-0000-000000000000}, 20.0</FloatIn>
</ParticleLifetime>

 

 

<ParticleSize>

This <VisualEffect.BlockParticleInit> and <VisualEffect.BlockParticleUpdate> sub-element defines the size (radius) of a single particle in the effect. The element takes no values or attributes, and is a "container" element for the <FloatIn> sub-element, which takes 2 values: A GUID to identify it, and a value to define the particle size, in meters. The GUID can be used in Node elements to target the particle size value, in which case the value specified here will be ignored. If you don't use the GUID then it can be left as shown in the example below.

<ParticleSize>
    <FloatIn>{00000000-0000-0000-0000-000000000000}, 1.0</FloatIn>
</ParticleSize>

 

 

<ParticleScale>

This <VisualEffect.BlockParticleInit> and <VisualEffect.BlockParticleUpdate> sub-element defines the scale to be applied to a single particle in the effect. This scale is applied after the size has been defined and is a multiplier, for example, an X-axis scale of 0.5 when the particle size is set to 3m will result in a particle scaled to 1.5m on the X-axis. The element takes no values or attributes, and is a "container" element for the <Float3In> sub-element, which takes 4 values: A GUID to identify it, and 3 scalar values for the X, Y and Z axis of the particle. The GUID can be used in Node elements to target the particle scale value, in which case the values specified here will be ignored. If you don't use the GUID then it can be left as shown in the example below.

<ParticleScale>
    <Float3In>{00000000-0000-0000-0000-000000000000}, 1.0, 1.0, 0.5</Float3In>
</ParticleScale>

 

 

<ParticlePosition>

This <VisualEffect.BlockParticleInit> and <VisualEffect.BlockParticleUpdate> sub-element defines the position of a single particle in the effect. The element takes no values or attributes, and is a "container" element for the <Float3In> sub-element, which takes 4 values: A GUID to identify it, an X position, a Y position, and Z position (all positions are relative to the emitter position). The GUID can be used in Node elements to target the particle position, in which case the values specified here will be ignored. If you don't use the GUID then it can be left as shown in the example below.

<ParticlePosition>
    <Float3In>{00000000-0000-0000-0000-000000000000}, 0.0, 0.0, 0.0</Float3In>
</ParticlePosition>

 

 

<ParticleRotation>

This <VisualEffect.BlockParticleInit> and <VisualEffect.BlockParticleUpdate> sub-element defines the rotation (orientation) of a single particle in the effect. The element takes no values or attributes, and is a "container" element for the <Float3In> sub-element, which takes 4 values: A GUID to identify it, an X-axis rotation, a Y-axis rotation, and Z-axis rotation (all values are in degrees and should be from -360° to +360°, although values outside these bounds can also be handled). The GUID can be used in Node elements to target the particle rotation, in which case the values specified here will be ignored. If you don't use the GUID then it can be left as shown in the example below.

<ParticleRotation>
    <Float3In>{00000000-0000-0000-0000-000000000000}, 10.0, 180.0, -90.0</Float3In>
</ParticleRotation>

 

 

<ParticleVelocity>

This <VisualEffect.BlockParticleInit> and <VisualEffect.BlockParticleUpdate> sub-element defines the velocity of a single particle in the effect. The element takes no values or attributes, and is a "container" element for the <Float3In> sub-element, which takes 4 values: A GUID to identify it, an X-axis velocity, a Y-axis velocity, and a Z-axis velocity, calculated in meters per second. The GUID can be used in Node elements to target the particle velocity, in which case the values specified here will be ignored. If you don't use the GUID then it can be left as shown in the example below.

<ParticleVelocity>
    <Float3In>{00000000-0000-0000-0000-000000000000}, 0.0, 5.0, 0.0</Float3In>
</ParticleVelocity>

 

 

<ParticleColor>

This sub-element defines the color of a single particle in the effect and can be used in one of the following block elements: <VisualEffect.BlockParticleInit>, <VisualEffect.BlockParticleUpdate>, <VisualEffect.Output>. The element takes no values or attributes, and is a "container" element for the <Float4In> sub-element, which takes 5 values: A GUID to identify it, a red value, a green value, a blue value and an alpha value. The RGBA values should all be between 0 and 1. The GUID can be used in Node elements to target the particle color, in which case the values specified here will be ignored. If you don't use the GUID then it can be left as shown in the example below.

<ParticleColor>
    <Float4In>{00000000-0000-0000-0000-000000000000}, 0.5, 0.78, 0.25, 1.0</Float4In>
</ParticleColor>

 

 

<ParticleTextureIndex>

This sub-element defines the color of a single particle in the effect and can be used in one of the following block elements: <VisualEffect.BlockParticleInit>, <VisualEffect.BlockParticleUpdate>, <VisualEffect.Output>. The element takes no values or attributes, and is a "container" element for the <Float4In> sub-element, which takes 5 values: A GUID to identify it, a red value, a green value, a blue value and an alpha value. The RGBA values should all be between 0 and 1. The GUID can be used in Node elements to target the particle color, in which case the values specified here will be ignored. If you don't use the GUID then it can be left as shown in the example below.

<ParticleTextureIndex>
    <Float4In>{00000000-0000-0000-0000-000000000000}, 0.5, 0.78, 0.25, 1.0</Float4In>
</ParticleTextureIndex>

 

 

<FloatIn>

This element is used to define a single value along with a GUID as part of the definition of <VisualEffect.BlockParticleInit> and <VisualEffect.BlockParticleUpdate> elements. For example:

<ParticleSize>
    <FloatIn>{05DF6082-36E1-474E-A1E9-AD37B222642D}, 0.0</FloatIn>
</ParticleSize>

 

 

<Float2In>

This element can be used to define a group of 2 values along with a GUID and is currently not used for any element.

 

 

<Float3In>

This element is used to define a group of three values along with a GUID as part of the definition of <VisualEffect.BlockParticleInit> and <VisualEffect.BlockParticleUpdate> elements. For example:

<ParticleRotation>
    <Float3In>{00000000-0000-0000-0000-000000000000}, 10.0, 180.0, -90.0</Float3In>
</ParticleRotation>

 

 

<Float4In>

This element is used to define a group of three values along with a GUID as part of the definition of <VisualEffect.BlockParticleInit> and <VisualEffect.BlockParticleUpdate> elements. For example:

<ParticleColor>
    <Float4In>{00000000-0000-0000-0000-000000000000}, 0.5, 0.5, 0.88, 1.0</Float4In>
</ParticleColor>

 

 

<OutputValue>

This sub-element is used by the majority of the different graph Node elements to output the value for the node, which can then be used in further nodes or blocks. The sub-element is required by the following node elements: <VisualEffect.GetParticleAttribute>, <VisualEffect.GetSimVar>, <VisualEffect.GravityVector>, <VisualEffect.EmitterDirection>, <VisualEffect.WindDirection>, <VisualEffect.Float>, <VisualEffect.Vector2>, <VisualEffect.Vector3>, <VisualEffect.Vector4>, <VisualEffect.Add>, <VisualEffect.Subtract>, <VisualEffect.Multiply>, <VisualEffect.Divide>, <VisualEffect.Pow>, <VisualEffect.Lerp>, <VisualEffect.BezierCurve>, <VisualEffect.RandomValue>, <VisualEffect.SampleNoise>, <VisualEffect.Clamp>, <VisualEffect.ColorSpaceConversion>, <VisualEffect.Color>, <VisualEffect.GraphParameter>, <VisualEffect.LocalDirection>, <VisualEffect.SetScale>, <VisualEffect.RandomDirectionInCone><VisualEffect.Abs>, <VisualEffect.Cos>, <VisualEffect.Sin>. The element requires a GUID so that it can be identified in the blocks or nodes that require the value for input. For example:

<VisualEffect.GetParticleAttribute InstanceId="{DE7C2592-F926-4D34-B9CC-2F548D4CD183}">
    <AttributeType>AgeOverLifetime</AttributeType>
    <OutputValue>{2E79B55B-E4B5-40B4-9951-16CE182CD6E7}</OutputValue>
</VisualEffect.GetParticleAttribute>

 

 

<x>

<y>

<z>

<w>

These sub-elements are used by the different graph Node elements to either:

  • hold a GUID (which is the output from another node) to be used as an input
  • define a float value to be used as an input

When defining the sub-element, you need to supply both of the above inputs, although only one of them will be used. If a valid GUID is supplied then the input value will be the output of the node being referenced, and if no valid GUID is present then the float value supplied will be used. The sub-element is required by the following node elements: <VisualEffect.Float>, <VisualEffect.Vector2>, <VisualEffect.Vector3>, <VisualEffect.Vector4>, <VisualEffect.Clamp>, <VisualEffect.Abs>, <VisualEffect.Cos>, <VisualEffect.Sin>, and <VisualEffect.LocalDirection>. The example below show's how all four sub-elements can be used:

<VisualEffect.Vector4 InstanceId="{893A1EF0-0B54-441B-BC5B-AF3BDA86DBA1}">
    <OutputValue>{550D636F-8374-4DA4-8A44-563C3B7B3205}</OutputValue>
    <x>{00000000-0000-0000-0000-000000000000}, 0.900000</x>
    <y>{00000000-0000-0000-0000-000000000000}, 0.900000</y>
    <z>{00000000-0000-0000-0000-000000000000}, 1.000000</z>
    <w>{026CDA3E-A571-4FD8-963F-23D1F16D2A80}, 0.000000</w>
</VisualEffect.Vector4>

 

 

<xVariant>

<yVariant>

These sub-elements are used by the different graph Node elements to either:

  • hold a GUID (which is the output from another node) to be used as an input (this can be either float or vector)
  • define a float value to be used as an input

When defining the sub-element, you need to supply both of the above inputs, although only one of them will be used. If a valid GUID is supplied then the input value will be the output of the node being referenced, and if no valid GUID is present then the float value supplied will be used. Note that the input can be a vector but only when using the input from a node that outputs a vector. The sub-element is required by the following node elements: <VisualEffect.Lerp>, <VisualEffect.Add>, <VisualEffect.Subtract>, <VisualEffect.Multiply>, <VisualEffect.Divide>, and <VisualEffect.Pow>. The example below show's how the sub-elements can be used:

<VisualEffect.MultiplyOperation InstanceId="{4208AF8A-2011-4AAA-8319-F0AFE3EC9CA9}">
    <xVariant>{8304D587-AC5C-4F30-93C3-E19399745ED6}, 0.000000</xVariant>
    <yVariant>{00000000-0000-0000-0000-000000000000}, 10.000000</yVariant>
    <OutputValue>{379C93ED-99CC-42E7-B54B-773635EEDE59}</OutputValue>
</VisualEffect.MultiplyOperation>

 

<FXTime>

This sub-element is used to define the "time" value that is to be used by either the <VisualEffect.Lerp> node in the interpolation calculation, or the <VisualEffect.BezierCurve> node for the curve position. It should be a value between 0 and 1.

 

 

<ColorIn>

This sub-element is used to define the input color for the <VisualEffect.ColorSpaceConversion> or the <VisualEffect.Color> elements. This sub-element requires the following values:

  • a GUID (which is the output from another node) to be used to set the coordinate.
  • four floats which are used to define the color using 3 color values and Alpha as the fourth component. By default, the input will be considered as RGB (however, for <VisualEffect.ColorSpaceConversion>, if the input color is anything other than RGB then the sub-element <FromColorSpace> should be defined to tell the parent node what the input color space is).

When defining the sub-element, you need to supply both of the above inputs, although only one of them will be used. If a valid GUID is supplied then the input value will be the output of the node being referenced (which must be a 4 value vector defining a color, either as RGB, HSV ot YUV, along with the Alpha), and if no valid GUID is present then the 4 float values supplied will be used.

 

 

<Material>

This element is used to set the material that is to be used by a <VisualEffect.StaticMesh> block or by the particle <VisualEffect.Output> block. The element has no attributes and requires a GUID, which would be the unique ID for the material being used. Note that the GUID must be enclosed in {}.

<Material>{737C9FB0-D3BB-48A4-AED3-46FFC6DB1DA2}</Material>

 

 

<RandSeed>

This sub-element is used to set the random seed value and is used by the <VisualEffect.RandomValue> element and the <VisualEffect.RandomDirectionInCone> element. This sub-element requires two values:

  • a GUID (which is the output from another node) to be used to set the seed value.
  • a float which is the seed value when no GUID is used.

When defining the sub-element, you need to supply both of the above inputs, although only one of them will be used. If a valid GUID is supplied then the input value will be the output of the node being referenced, and if no valid GUID is present then the float value supplied will be used.

<RandSeed>{00000000-0000-0000-0000-000000000000}, 5000000.000000</RandSeed>

 

 

<RandIndex>

This sub-element is used to set the random seed index for the <VisualEffect.RandomValue> element and the <VisualEffect.RandomDirectionInCone> element. The index value is an "offset" for the seed which can be used to get different results when two nodes share the same seed. This sub-element requires two values:

  • a GUID (which is the output from another node) to be used to set the index value.
  • a float which is the index value when no GUID is used.

When defining the sub-element, you need to supply both of the above inputs, although only one of them will be used. If a valid GUID is supplied then the input value will be the output of the node being referenced, and if no valid GUID is present then the float value supplied will be used.

<RandIndex>{1DE5D7A0-C5E1-4599-B74F-158A74A59C6E}, 0.000000</RandIndex>

 

 

<AngleInputUnit>

This sub-element is used to set the type of input for the <VisualEffect.Cos> element and the <VisualEffect.Sin> element. This sub-element requires one values:

  • a string which is either DEGREES or RADIANS.
<AngleInputUnit>DEGREES</AngleInputUnit>

 

 

<ParticleVelocityRotationAxis>

This sub-element defines the axis of rotation for each particle in the effect and can be used in one of the following block elements:

  1. <VisualEffect.BlockParticleInit>
  2. <VisualEffect.BlockParticleUpdate>

 

The element takes no values or attributes, and is a "container" element for the <Float3In> sub-element, which takes 4 values: A GUID to identify it and X, Y and Z values that define the axis of rotation, where the values are in degrees. The GUID can be used in Node elements to target rotation axis, in which case the values specified here will be ignored. If you don't use the GUID then it can be left as shown in the example below.

<ParticleVelocityRotationAxis>
    <Float3In>{00000000-0000-0000-0000-000000000000}, 15.000000, 0.000000, 25.000000</Float3In>
</ParticleVelocityRotationAxis>

 

 

<ParticleVelocityRotationRate>

This sub-element defines the rate of rotation for a single particle in the effect and can be used in one of the following block elements:

  1. <VisualEffect.BlockParticleInit>
  2. <VisualEffect.BlockParticleUpdate>

 

The element takes no values or attributes, and is a "container" element for the <FloatIn> sub-element, which takes 2 values: A GUID to identify it, and a value to define the rate of rotation, expressed in degrees per second. The GUID can be used in Node elements to target the rotation rate, in which case the values specified here will be ignored. If you don't use the GUID then it can be left as shown in the example below.

<ParticleVelocityRotationRate>
    <Float1In>{00000000-0000-0000-0000-000000000000}, 1.500000</Float1In>
</ParticleVelocityRotationRate>

 

 

<ParticleFixedOrientationAxis>

This sub-element defines the fixed axis orientation for every particle in the effect and can be used in one of the following block elements:

  1. <VisualEffect.BlockParticleInit>
  2. <VisualEffect.BlockParticleUpdate>

 

The element takes no values or attributes, and is a "container" element for the <Float3In> sub-element, which takes 4 values: A GUID to identify it and X, Y and Z values that define the axis of rotation, where the values are in degrees. The GUID can be used in Node elements to target the orientation, in which case the values specified here will be ignored. If you don't use the GUID then it can be left as shown in the example below.

<ParticleFixedOrientationAxis>
    <Float3In>{00000000-0000-0000-0000-000000000000}, 0.000000, 85.000000, 0.000000</Float3In>
</ParticleFixedOrientationAxis>