VISUAL EFFECTS DEFINITIONS

The <vfx_filename>.xml file goes in the VisualEffectsLib folder beside any other effects files and the *.vfxlib file (as explained here) and should be formatted as follows:

<?xml version="1.0" encoding="UTF-8"?>
<SimBase.Document Type="AceXML" version="1,0">
    <Descr>AceXML Document</Descr>
    <WorldBase.Flight>
    <Checklist.Checklist>
    <!-- BLOCK items here EG:-->
        <VisualEffect.VisualEffect InstanceId="{<GUID>}">
            <Name>Effect_Name</Name>
            <EmitterList>
                <!-- Linked Emitters Here -->
            </EmitterList>
        </VisualEffect.VisualEffect>
        <!-- Further block items here-->
    <!-- EDITION items here EG:-->
        <SimEdition.CommentNode InstanceId="{<GUID>}" id="Position">
            <NodeComment>Comments here</NodeComment>
        </SimEdition.CommentNode>
        <!-- Further edition items here-->
    <!-- NODE items here EG:-->
        <VisualEffect.AddOperation InstanceId="{<GUID>}">
            <OutputValue>{<GUID>}</OutputValue>
            <xVariant>{<GUID>}, 0.000000</xVariant>
            <yVariant>{<GUID>}, 0.000000</yVariant>
        </VisualEffect.AddOperation>
        <!-- Further node items here-->
    </WorldBase.Flight>
</SimBase.Document>

Here you must include the <SimBase.Document> element (where the Type attribute should be "AceXML"), as well as the <WorldBase.Flight> element, which acts as a container for the checklist itself. The rest of the XML is comprised of the elements listed on this page.

 

If you wish to see more in-depth examples of how the XML for visual effects should be formatted, please see the following page:

 

And if you wish to know how these effects should be used in your projects, please see this page:

 

Note that a large majority of the XML elements specified on this page requires GUID values to identify them. These will be generated automatically when you use The Visual Effects Editor to create the effects, but should you wish to edit the XML and require a GUID, you can find an explanation of how to generate one here:

 

 

<VisualEffect.VisualEffect>

This element is used to define a VisualEffect block. There can only be one of these elements in your XML for the effect, and it can contain <Name> and <EmitterList> sub-elements. The element has the following attribute:

 

Attribute Description Type Required
InstanceId The GUID of the VisualEffects block. This ID value is essentially the ID for the whole effect as it is what you would use in the <Behaviors> XML to to attach the effect to a node on a SimObject. Note that the GUID must be enclosed in {}. String Yes

 

<Name>

This is a sub-element of the <VisualEffect.VisualEffect> block and is used to give the block a common name to make it easy to identify what the effect is. This sub-element is not required, but it is recommended that you use it.

<Name>Geyser_Effect</Name>

 

<EmitterList>

This sub-element of the <VisualEffect.VisualEffect> block is a "container" element for one or more <ObjectReference /> elements. It is used to define the different Emitter and/or StaticMesh blocks that are involved in your effect and link them to the main VisualEffect block via a GUID in the <ObjectReference /> element. Note that all effects require at least one emitter or static mesh block, but you can define more than one if required. The emitter GUID is defined as an attribute of the <VisualEffect.Emitter> element and the static mesh GUID is defined as an attribute of the <VisualEffect.StaticMesh> element.

<EmitterList>
    <ObjectReference InstanceId="{05DF6082-36E1-474E-A1E9-AD37B222642D}" id="Emitter"/>
    <ObjectReference InstanceId="{05DF6082-36E1-474E-A1E9-AD37B222642D}" id="StaticMesh"/>
</EmitterList>

 

 

<VisualEffect.Emitter>

This element is used to define an Emitter block. There must be at least one of these elements in your XML for the effect, although you can define more than one if required. It can contain the following sub-elements: <Capacity>, <ParticleRate>, <ParticleRateType>, <EmitInLocalSpace>, <TimeEmission>, <Delay>, <MaxDistanceEmission>, and <ParticleInit>. The element itself has the following attribute:

 

Attribute Description Type Required
InstanceId The GUID of the Emitter block. This is supplied as an object reference to the <EmitterList> element within the <VisualEffect.VisualEffect> block that defines the whole effect. Note that the GUID must be enclosed in {}. String Yes

 

<Capacity>

This <VisualEffect.Emitter> sub-element defines the maximum number of particles that can exist in the emitter at any one time. When the number of particles in the emitter exceeds this value, the "oldest" will be automatically removed.

<Capacity>32.000</Capacity>

 

<ParticleRate>

This <VisualEffect.Emitter> sub-element defines the rate at which the particles will be emitted, depending on the <ParticleRateType>. When using this element, note that it takes two values:

  • a GUID which is the output from another node to be used as the rate
  • a float value to be used as the rate (the effect of this value will depend on the <ParticleRateType> setting)

If a GUID is supplied, then the float value specified here will be ignored, and if you don't use the GUID then it can be left as shown in the example below, and the float value will be used.

<ParticleRate>{00000000-0000-0000-0000-000000000000}, 8.000000</ParticleRate>

 

<ParticleRateType>

This <VisualEffect.Emitter> sub-element defines what dimension will be used along with the <ParticleRate> to spawn the particles from the emitter. It can be one of the following strings:

 

String Description
Time Particles will be emitted as "N particles per second", where N is the value set by the <ParticleRate>.
Distance Particles will be emitted as "N particles per meter moved", where N is the value set by the <ParticleRate>.

 

 

<EmitInLocalSpace>

This optional <VisualEffect.Emitter> sub-element can be used to tell the emitter to emit particles based on the local space or on the world space. With the element set to False, particle positions and velocities are expressed in world space. World space is considered as ECEF - "Earth-Centered, Earth-Fixed" where directions and orientations are calculated using the center of the earth as the base location. This means that particle/emitter positions are oriented by world space axes but are used as an offset from the position of the emitter, so [0, 0, 0] is still where your VFX is spawned, but directions are based on the vector from the center of the earth, where the Y vector would be from the center of the earth to the north pole. It is most likely you will always use helper nodes like LocalDirection when using positions with the EmitInLocalSpace parameter unchecked. Note that using world space in your nodes means that the rotation offset for your VFX will be ignored.


With the element set to True positions and velocities are expressed in a space local to the VFX instance (by convention [X = left/right, Y = up/down, Z = forward/back]). Local space takes into account the transformation of the object it is attached to and the potential position and rotation offsets you have defined when spawning your effect or attaching it in a model behavior file.

<EmitInLocalSpace>False</EmitInLocalSpace>

Note that position and rotation offsets are always expressed in the space of the object the VFX is attached to, and you need to be careful with some nodes as their output may not be what you expect if the emitter is set to emit in local space. Also note that the following nodes will change their output automatically to match this emitter setting:

 

<TimeEmission>

This optional <VisualEffect.Emitter> sub-element can be used to set the duration for the emitter to function, in seconds. If this element is not included in the emitter definition, then it is considered to be set to -1, which means that there is no time limit on emission and the emitter will spawn particles indefinitely.

<TimeEmission>20</TimeEmission>

 

<Delay>

This optional <VisualEffect.Emitter> sub-element can be used to add a delay on the emission of particles from the emitter. You supply a value in seconds, and the emitter will not spawn particles until the given time has passed after the effect was initially created. If this element is not included in the emitter definition, then it is considered to be set to 0 (no delay).

<Delay>20</Delay>

 

<MaxDistanceEmission>

This optional <VisualEffect.Emitter> sub-element sets the maximum distance - in meters - from the camera at which particles will spawn from the effect emitter. Once the camera exceeds this distance from the emitter, particles will stop being created. If this element is not included in the definition of the emitter, then it will default to 2000m.

<MaxDistanceEmission>1000</MaxDistanceEmission>

 

<ParticleInit>

This sub-element of the <VisualEffect.Emitter> block is a "container" element for one or more <ObjectReference /> elements. It is used to define the an Init block that is involved in your effect and link it to the Emitter block via a GUID in the <ObjectReference /> element. Note that all effects require at least one Init block, and you're only permitted one Init block per emitter block. The init GUID is defined as an attribute of the <VisualEffect.BlockParticleInit> element.

<ParticleInit>
    <ObjectReference InstanceId="{6EA84586-C0F4-4665-BC76-41F4A0C44835}" id="BlockParticleInit"/>
</ParticleInit>

 

<VisualEffect.StaticMesh>

This container element is used to define a StaticMesh block. There must be at least one of these elements, or a <VisualEffect.Emitter> element, in your XML for the effect, although you can define more than one if required. The element has the following required sub-elements - <StaticMeshPosition>, <StaticMeshRotation>, <StaticMeshScale>, <Material>, and <Mesh> - and it also has ther following optional sub-elements that will be required only if you use either the Heat Deform or Afterburner Type materials: <HeatDeformDeformation>, <HeatDeformBlur>, <AfterburnerPower>, <MaterialDiffuseColor>, and <MaterialEmissiveColor>.

 

This element has the following attribute:

 

Attribute Description Type Required
InstanceId The GUID of the StaticMesh block. This is supplied as an object reference to the <EmitterList> element within the <VisualEffect.VisualEffect> block that defines the whole effect. Note that the GUID must be enclosed in {}. String Yes

 

To see how the full XML for this block looks when complete, see the StaticMesh Example.

 

<StaticMeshPosition>

This is a sub-element of the <VisualEffect.StaticMesh> block and is used to set the position of the static mesh being spawned by the visual effect, relative to the node or contact point that it has been spawned on. The element has no attributes and takes 4 values: A GUID to identify the input node, and three values to define the default X, Y and Z positions. The GUID is another Node element that defines the input values (must be a vec3 input), and if supplied the other values specified as defaults here will be ignored. If you don't use the GUID then it can be left as shown in the example below, and the other values will be the default ones returned.

<StaticMeshPosition>{00000000-0000-0000-0000-000000000000}, 0.0, 0.0, 0.0</StaticMeshPosition>

 

<StaticMeshRotation>

This is a sub-element of the <VisualEffect.StaticMesh> block and is used to set the rotation of the static mesh being spawned by the visual effect, relative to the node or contact point that it has been spawned on. The element has no attributes and takes 4 values: A GUID to identify the input node, and three default values to define the rotation around the X, Y or Z axis when a node is not supplied. The GUID is another Node element that defines the input values (must be a vec3 input), and if supplied the other values specified as defaults here will be ignored. If you don't use the GUID then it can be left as shown in the example below, and the other values will be the default ones returned.

<StaticMeshRotation>{00000000-0000-0000-0000-000000000000}, 0.0, 0.0, 0.0</StaticMeshRotation>

 

<StaticMeshScale>

This is a sub-element of the <VisualEffect.StaticMesh> block and is used to set a scale for the static mesh being spawned by the visual effect. The element has no attributes and takes 2 values: A GUID to identify the input node, and a value to define a default value. The GUID is another Node element that defines the input value, and if supplied the second value specified here will be ignored. If you don't use the GUID then it can be left as shown in the example below, and the second value will be the default that is returned.

<StaticMeshScale>{00000000-0000-0000-0000-000000000000}, 1.0</StaticMeshScale>

 

<Mesh>

This is a sub-element of the <VisualEffect.StaticMesh> block and is used to set a scale for the static mesh being spawned by the visual effect. The element has no attributes and takes 2 values: A GUID to identify the input node, and a value to define a default value. The GUID is another Node element that defines the input value, and if supplied the second value specified here will be ignored. If you don't use the GUID then it can be left as shown in the example below, and the second value will be the default that is returned.

<Mesh>{00000000-0000-0000-0000-000000000000}, 1.0</Mesh>

 

<HeatDeformDeformation>

This is a sub-element of the <VisualEffect.StaticMesh> block and is used to set the Deformation value when using the heat deform shader Type. The element has no attributes and takes 2 values: A GUID to identify the input node, and a value to set the default deformation value. The GUID is another Node element that defines the input value and - if supplied - the default value specified will be ignored.

<HeatDeformDeformation>{6EA84586-C0F4-4665-BC76-41F4A0C44835}, 1</HeatDeformDeformation>

 

<HeatDeformBlur>

This is a sub-element of the <VisualEffect.StaticMesh> block and is used to set the Blur value when using the heat deform shader Type. The element has no attributes and takes 2 values: A GUID to identify the input node, and a value to set the default blur value. The GUID is another Node element that defines the input value and - if supplied - the default value specified will be ignored.

<HeatDeformBlur>{6EA84586-C0F4-4665-BC76-41F4A0C44835}, 1</HeatDeformBlur>

 

<AfterburnerPower>

This is a sub-element of the <VisualEffect.StaticMesh> block and is used to set the Power value when using the afterburner shader Type. The element has no attributes and takes 2 values: A GUID to identify the input node, and a value to set the default power value. The GUID is another Node element that defines the input value and - if supplied - the default value specified will be ignored.

<AfterburnerPower>{6EA84586-C0F4-4665-BC76-41F4A0C44835}, 1</AfterburnerPower>

 

<MaterialDiffuseColor>

This is a sub-element of the <VisualEffect.StaticMesh> block and the <VisualEffect.Output> block. It is used to set a colour that corresponds to the Diffuse Colour used in the Material Editor, for example when using the afterburner shader Type. The element has no attributes and takes 5 values: A GUID to identify the input node, and 4 colour values (RGBA format) to define a default colour. The GUID is another Node element that defines the input values - which should be a vec4 or use the <VisualEffect.Color> node - and if supplied the RGBA values specified will be ignored. If you don't use a GUID input node, then the default RGBA values will be used and these should be expressed as integer values from 0 to 255 for each of the colour components.

<MaterialDiffuseColor>{6EA84586-C0F4-4665-BC76-41F4A0C44835}, 1, 1, 1, 1</MaterialDiffuseColor>

 

<MaterialEmissiveColor>

This is a sub-element of the <VisualEffect.StaticMesh> block and the <VisualEffect.Output> block. It is used to set a colour that corresponds to the Emissive Colour used in the Material Editor, for example when using the afterburner shader Type. The element has no attributes and takes 5 values: A GUID to identify the input node, and 4 colour values (RGBA format) to define a default colour. The GUID is another Node element that defines the input values - which should be a vec4 or use the <VisualEffect.Color> node - and if supplied the RGBA values specified will be ignored. If you don't use a GUID input node, then the default RGBA values will be used and these should be expressed as integer values from 0 to 255 for each of the colour components.

<MaterialEmissiveColor>{00000000-0000-0000-0000-000000000000}, 255, 224, 0, 1</MaterialEmissiveColor>

 

 

<VisualEffect.BlockParticleInit>

This element is used to define an Init block, which initialises the particle information for the particle being created from a given emitter. There must be at least one of these elements in your XML for the effect, and you are limited to one Init block per emitter. It can contain the following sub-elements: <ParticleLifetime>, <ParticleSize>, <ParticleScale>, <ParticlePosition>, <ParticleRotation>, <ParticleVelocity>, <ParticleTextureIndex>, <ParticleColor>, <ParticleVelocityRotationAxis>, <ParticleVelocityRotationRate>, <ParticleFixedOrientationAxis>, and <ParticleUpdate>. The element itself has the following attribute:

 

Attribute Description Type Required
InstanceId The GUID of the Init block. This is supplied to the <VisualEffect.Emitter> block that identifies the emitter the particle is being spawned from. Note that the GUID must be enclosed in {}. String Yes

 

<ParticleUpdate>

This sub-element of the <VisualEffect.BlockParticleInit> block is a "container" element for one or more <ObjectReference /> elements. It is used to define the different Update blocks that are involved in your effect and link them to the Init block via a GUID in the <ObjectReference /> element. Note that all effects require at least one Update block, and you are limited to one update block per emitter. The update GUID is defined as an attribute of the <VisualEffect.BlockParticleUpdate> element.

<ParticleUpdate>
    <ObjectReference InstanceId="{05DF6082-36E1-474E-A1E9-AD37B222642D}" id="BlockParticleUpdate"/>
</ParticleUpdate>

 

 

<VisualEffect.BlockParticleUpdate>

This element is used to define an Update block, which will update the particle data each frame of the game over the particle lifetime. There must be at least one of these elements in your XML for the effect, and you are limited to one Update block per emitter. It can contain the following sub-elements: <ParticleLifetime>, <ParticleSize>, <ParticleScale>, <ParticlePosition>, <ParticleRotation>, <ParticleVelocity>, <ParticleTextureIndex>, <ParticleColor>, <ParticleVelocityRotationAxis>, <ParticleVelocityRotationRate>, <ParticleFixedOrientationAxis>, and <ParticleOutput>. The element itself has the following attribute:

 

Attribute Description Type Required
InstanceId The GUID of the Update block. This is supplied to the <VisualEffect.BlockParticleInit> block that initilised the particle data. Note that the GUID must be enclosed in {}. String Yes

 

<ParticleOutput>

This sub-element of the <VisualEffect.BlockParticleUpdate> block is a "container" element for one or more <ObjectReference /> elements. It is used to define the different Output blocks that are involved in your effect and link them to the Update block via a GUID in the <ObjectReference /> element. Note that all effects require at least one Output block, and you are limited to one Output block per emitter. The update GUID is defined as an attribute of the <VisualEffect.Output> element.

<ParticleOutput>
    <ObjectReference InstanceId="{05DF6082-36E1-474E-A1E9-AD37B222642D}" id="Output"/>
</ParticleOutput>

 

 

<VisualEffect.Output>

This element is used to define an Output block, which is the final stage in the effect process that will actually create the particle in the world. There must be at least one of these elements in your XML for the effect, and you are limited to one Output block per emitter. It can contain the following sub-elements: <Material>, <PrimitiveType>, <QuadOrientationType>, <UVMode>, <AtlasSize><ParticleColor>, <MaterialDiffuseColor>, and <MaterialEmissiveColor>. The element itself has the following attribute:

 

Attribute Description Type Required
InstanceId The GUID of the Output block. This is supplied to the <VisualEffect.BlockParticleUpdate> block that is outputting the particle. Note that the GUID must be enclosed in {}. String Yes

 

<PrimitiveType>

This element is used to set the primitive type that will be used to create the particles. This element has no attributes and can be set to either Quad, Ribbon, or GroundRibbon (see the section on Ground Ribbons for more information on this type).

<PrimitiveType>Quad</PrimitiveType>

 

<QuadOrientationType>

This element is used to set the orientation type that will be used by created particles that are of the Quad primitive type. This element has no attributes and can be set to either of the following strings:

  • FaceCamera: this is the default behavior, and forces the particles to always face the camera.
  • FixedAxis: this behaviour means that the orientation of the particle will depend on an axis that can be set for each particle using the Init or Update QuadOrientationAxis parameter.
<QuadOrientationType>FixedAxis</QuadOrientationType>

 

<UVMode>

This element is what defines the way that the material texture will be used when texturing the particles being output. It can be one of the following two options:

  • Default: The entire material texture will be used to texture the particles.
  • Atlas: The material texture will be sub-divided based on the <AtlasSize> values.

The Atlas value should only be used when the material texture is a "sprite" atlas, and the <VisualEffect.BlockParticleInit> or <VisualEffect.BlockParticleUpdate> is using the element. The element has no attributes and requires one of the above-mentioned strings.

<UVMode>Default</UVMode>

 

<AtlasSize>

This element is used to set the U/V sub-divisions for when the material being used is a texture atlas of sprite images. For example, if the material texture has 25 images evenly spread over the texture page, then you would set the U/V values to (5, 5) - 5 images wide and 5 images in height (This requires that the <UVMode> element is set to Atlas). The element has no attributes and requires a GUID, which would be the unique ID for the input (a Vec2), or two floats if no input element is defined. Note that the GUID must be enclosed in {}.

<AtlasSize>{737C9FB0-D3BB-48A4-AED3-46FFC6DB1DA2}, 6.0, 6.0</AtlasSize>

 

 

<SimEdition.CommentNode>

This element is used to define a CommentNode block, which is used to help organise your graph items in the Node Graph window, as well as add any comments or text that you want to help identify something or explain the workings of the effect. You may define multiple Comment nodes, but each one should have a unique ID and GUID. It can contain the following sub-elements: <NodeComment>. The element itself has the following attributes:

 

Attribute Description Type Required
InstanceId The GUID of the NodeComment block. This can be used to identify the comment block if required. Note that the GUID must be enclosed in {}. String Yes
id This is the ID string for the block, essentially the title that is used to identify the block in a more user-friendly way than the GUID. String Yes

 

<NodeComment>

This element is used to add some text comments to the block.

<NodeComment>Here we update the particle velocity.</NodeComment>

 

 

<VisualEffect.GetParticleAttribute>

This node element is used to retrieve a specific attribute from the particle system (for an example of use see GetParticleAttribute on the Examples page). It can contain the following sub-elements: <AttributeType>, <OutputValue>. The element itself has the following attribute:

 

Attribute Description Type Required
InstanceId The GUID used to identify the GetAttribute block. Note that the GUID must be enclosed in {}. String Yes

 

<AttributeType>

This sub-element is used to define the type of attribute to be output by the <VisualEffect.GetParticleAttribute> node. It can be any one of the following strings:

 

String Description
Age Returns a float value that goes from 0 to [particle lifetime].
AgeOverLifeTime Returns a float value that is between 0 and 1, representing the [age] normalised.
Lifetime Returns a Float value representing the total [particle lifetime].
Position Returns a 3 value vector of the particle position.
Rotation Returns a 3 value vector of angles (in degrees) of the particle rotation along the x axis, y axis, and z axis.
Velocity Returns a non-normalised 3 value vector for the direction for the particle (to be applied after the update pass).
Size Returns a float value that represents the size (radius) of the particle.
Scale Returns a float value that represents the scale factor for the particle.
TextureIndex Returns the current texture index value for the particle. Note that this value is only relevant when the Output block has the UVMode set to "Atlas". For more information see the Texture Index section of the Update block.
id Returns a float value that represents the unique ID of the particle.
Color Returns a 4 value vector representing the RGBA color components for the particle.
VelocityRotationAxis Returns a 3 value vector representing the particle axis in the coordinate space of the effect (world or local depending on the <EmitInLocalSpace> parameter on the emitter block).
VelocityRotationRate Returns a float which is the velocity rotation rate in degrees per second.

 

 

<VisualEffect.GetInstanceAttribute>

This node element is used to retrieve a specific attribute from the instance of the SimObject that is emitting the particle (for an example of use see GetInstanceAttribute on the Examples page). It can contain the following sub-elements: <InstanceAttributeType>, <OutputValue>. The element itself has the following attribute:

 

Attribute Description Type Required
InstanceId The GUID used to identify the GetInstanceAttribute block. Note that the GUID must be enclosed in {}. String Yes

 

<InstanceAttributeType>

This sub-element is used to define the type of attribute to be output by the <VisualEffect.GetInstanceAttribute> node. It can be any one of the following strings:

 

String Description
ContactPoint Returns the integer value that defines the contact point index for the current instance of the VFX. This is the value set using the <FX_CONTACT_POINT_ID> setting in the aircraft model behaviours <component>. See here for more information: Using Visual Effects.
Age Returns a floating point value representing the time that has passed since the emitter that emitted the particle was created.

 

 

<VisualEffect.GetGroundAttribute>

This node element is used to retrieve a specific attribute from the ground under a particle (for an example of use see GetGroundAttribute on the Examples page). Essentially a ray is cast from the particle to the center of the world, and the information retrieved from the point of intersection between this ray and the terrain beneath it. It can contain the following sub-elements: <GroundAttributeType>, <OutputValue>. The element itself has the following attribute:

 

Attribute Description Type Required
InstanceId The GUID used to identify the GetGroundAttribute block. Note that the GUID must be enclosed in {}. String Yes

 

<GroundAttributeType>

This sub-element is used to define the type of attribute to be output by the <VisualEffect.GetGroundAttribute> node. It can be any one of the following strings:

 

String Description
Position Returns the position on the ground for the particle as a Vec3 with the format (x, y, z). This position is relative to the emitter position.
Colour Returns the color of the ground at the relative particle position as a vec4 corresponding to the (R, G, B, A) values of the terrain texture.

 

 

<VisualEffect.GetSimVar>

This node element is used to retrieve the value of a specific SimVar to be used as an input to another node or block in the particle system (for an example of use see SimVar on the Examples page). It can contain the following sub-elements: <SimvarType>, <SimvarIndex>, <Unit>, <OutputValue>. The element itself has the following attribute:

 

Attribute Description Type Required
InstanceId The GUID used to identify the GetAttribute block. Note that the GUID must be enclosed in {}. String Yes

 

<SimvarType>

This sub-element is used to define the SimVar being retrieved by the <VisualEffect.GetSimVar> node. It can be any one of the available Simulation Variables.

IMPORTANT! Only the following SimVars are currently implemented to return anything other than a float (in all cases, a three value vector is returned):

SIMVAR_STRUCT_LATLONALT
SIMVAR_STRUCT_LATLONALTPBH
SIMVAR_STRUCT_PBH32
SIMVAR_STRUCT_WORLDVELOCITY
SIMVAR_STRUCT_WORLD_ROTATION_VELOCITY
SIMVAR_STRUCT_BODY_VELOCITY
SIMVAR_STRUCT_BODY_ROTATION_VELOCITY
SIMVAR_STRUCT_BODY_ROTATION_ACCELERATION
SIMVAR_STRUCT_SURFACE_RELATIVE_VELOCITY


Other sim vars can still be used, and the majority will return a floating point (scalar) value. If the value being returned should be a boolean value, then 0.0 is considered "false" and anything greater than 0.0 would be "true".

 

<SimvarIndex>

This sub-element is used to define the index into the SimVar being retrieved by the <VisualEffect.GetSimVar> node. What index value you use will depend on the SimVar itself, and if the variable doesn't require an index then this would be 0.

 

<Unit>

This sub-element is used to define the type of units that the SimVar being retrieved by the <VisualEffect.GetSimVar> node uses. It can be any one of the units listed here: Simulation Variable Units

 

 

<VisualEffect.GravityVector>

This node element is used to retrieve the world gravity unit vector which will be output as a 3 value X, Y, Z component vector where each value is between 0 and 1 when <GravityScale> is 1 (for an example of use see GravityVector on the Examples page). It can contain the following sub-elements: <GravityScale>, <OutputValue>. The element itself has the following attribute:

 

Attribute Description Type Required
InstanceId

The GUID used to identify the GravityVector block. Note that the GUID must be enclosed in {}.

String Yes

 

<GravityScale>

This sub-element is used to define a scalar value for the gravity unit vector output from the <VisualEffect.GravityVector> node. The value given here is a float representing meters per second squared, and it will be multiplied with the gravity vector unit values before they are output. If the scale value is negative, instead of having a direction to earth, it will give a direction from the earth. Essentially it works as follows:

Positive Scale : Abs(Scale) * Vector.Down
Negative Scale : Abs(Scale) * Vector.Up

If you want an approximation of the effect of gravity then the gravity scale should be 9.807.

 

 

<VisualEffect.GroundDirection>

This node element is used to generate a 3 value vector representing the direction the aircraft is facing when projected on the ground, along with any additional vector offset that you define. It can contain the following sub-elements: <x>, <y>, <z>, <OutputValue>. The element itself has the following attribute:

 

Attribute Description Type Required
InstanceId

The GUID used to identify the GroundDirection block. Note that the GUID must be enclosed in {}.

String Yes

 

The way this node works is that it takes the facing direction (orientation) of the aircraft, then projects this on the ground along the lione of the gravity vector. This projection is a 2D vector used to generate the X and Z components of the ground vector, and the Y component is considered as the "up" direction from the ground into the sky along the same vector as gravity. If you define additional X, Y, Z components for this node, then the resulting vector will be added onto the ground direction vector before the ground vector is output.

 

 

<VisualEffect.EmitterDirection>

This node element is used to retrieve a 3 value vector from the particle emitter direction based on the direction axis (for an example of use see EmitterDirection on the Examples page). It can contain the following sub-elements: <EmitterDirectionType>, <OutputValue>. The element itself has the following attribute:

 

Attribute Description Type Required
InstanceId

The GUID used to identify the EmitterDirection block. Note that the GUID must be enclosed in {}.

String Yes

 

<EmitterDirectionType>

This sub-element is used to define which of the emitter axis that you wish to retrieve the direction vector from and be output by the <VisualEffect.EmitterDirection> node. It can be any one of the following strings: X+, X-, Y+, Y-, Z+, Z-.

 

 

<VisualEffect.WindDirection>

This node element is used to retrieve the current wind vector (for an example of use see WindDirection on the Examples page). It can contain the following sub-elements: <WindDirOptions>, <OutputValue>. The element itself has the following attribute:

 

Attribute Description Type Required
InstanceId

The GUID used to identify the WindDirection block. Note that the GUID must be enclosed in {}.

String Yes

 

<WindDirOptions>

This sub-element is used to define the type of output that the <VisualEffect.WindDirection> node will generate. It can be one of the following strings:

 

String Description
Raw Returns a vector that represents the wind direction scaled by the speed of the wind in ft per second. This can be used to not only get the direction, but the strength of the wind, where larger values indicate a stronger windforce.
Normalized Returns a normalised vector where each of the 3 values represents the wind direction on that axis between a value of -1 and 1.

 

 

<VisualEffect.AtlasPlayer>

This node element can be used to set the framerate for playing sprites from a texture atlas. Using this element requires that the <VisualEffect.Output> has the <UVMode> element and it's set to to "Atlas". The element will generate a value based on the texture index being automatically incremented based on the given framerate, and would usually be connected to a <ParticleTextureIndex> input of an <VisualEffect.BlockParticleUpdate> block (for example). It can contain the following sub-elements: <FrameRate>, <OutputValue>. The element itself has the following attribute:

 

Attribute Description Type Required
InstanceId

The GUID used to identify the AtlasPlayer block. Note that the GUID must be enclosed in {}.

String Yes

 

<FrameRate>

This sub-element is used to define the framerate modifier that the <VisualEffect.WindDirection> node will use to set the texture index. It has no attributes and requires a float value.

 

 

<VisualEffect.Float>

This node element is used to generate a single float value (for an example of use see Float on the Examples page). It can contain the following sub-elements: <x> (the float value to output), <OutputValue>. The element itself has the following attribute:

 

Attribute Description Type Required
InstanceId

The GUID used to identify the Float block. Note that the GUID must be enclosed in {}.

String Yes

 

 

<VisualEffect.Vector2>

This node element is used to generate a 2 value vector (for an example of use see Vector2, Vector3, Vector4 on the Examples page). It can contain the following sub-elements: <x>, <y>, <OutputValue>. The element itself has the following attribute:

 

Attribute Description Type Required
InstanceId

The GUID used to identify the Vector2 block. Note that the GUID must be enclosed in {}.

String Yes

 

 

<VisualEffect.Vector3>

This node element is used to generate a 3 value vector (for an example of use see Vector2, Vector3, Vector4 on the Examples page). It can contain the following sub-elements: <x>, <y>, <z>, <OutputValue>. The element itself has the following attribute:

 

Attribute Description Type Required
InstanceId

The GUID used to identify the Vector3 block. Note that the GUID must be enclosed in {}.

String Yes

 

 

<VisualEffect.Vector4>

This node element is used to generate a 4 value vector (for an example of use see Vector2, Vector3, Vector4 on the Examples page). It can contain the following sub-elements: <x>, <y>, <z>, <w>, <OutputValue>. The element itself has the following attribute:

 

Attribute Description Type Required
InstanceId

The GUID used to identify the Vector4 block. Note that the GUID must be enclosed in {}.

String Yes

 

 

<VisualEffect.Add>

This node element is used to add two floats or vectors together (for an example of use see Add on the Examples page). It can contain the following sub-elements: <xVariant>, <yVariant>, <OutputValue>. The element itself has the following attribute:

 

Attribute Description Type Required
InstanceId

The GUID used to identify the Add block. Note that the GUID must be enclosed in {}.

String Yes

 

Note that when using this element, the operation is commutative and only the following types should be added:

Float + Float
Float + Vec2
Float + Vec3
Float + Vec4
Vec2 + Vec2
Vec3 + Vec3
Vec4 + Vec4

Trying to add together anything other than these types in the permutations shown will cause an error.

 

 

<VisualEffect.Subtract>

This node element is used to subtract one value from another, where the values can be either a float or a vector (for an example of use see Subtract on the Examples page). It can contain the following sub-elements: <xVariant>, <yVariant>, <OutputValue>. The element itself has the following attribute:

 

Attribute Description Type Required
InstanceId

The GUID used to identify the Subtract block. Note that the GUID must be enclosed in {}.

String Yes

 

Note that when using this node, the following rules will be applied depending on the input values:

Float - Float   = Float
Float - Vec2    = Vec2 (the float is converted to a Vec2 with 0 as the second component)
Float - Vec3    = Vec3 (the float is converted to a Vec3 with 0 as the second and third components)
Float - Vec4    = Vec4 (the float is converted to a Vec4 with 0 as the second and third and fourth components)
Vec2 - Vec2     = Vec2
Vec3 - Vec3     = Vec3
Vec4 - Vec4     = Vec4
Vec2 - Float    = Vec2 (the float is converted to a vec2 with 0 as the second component)
Vec3 - Vec2     = Vec3 (the vec2 is converted to a vec3 with 0 as the third component)
Vec4 - Vec2     = Vec4 (the vec2 is converted to a vec4 with 0 as the third and fourth components)
Vec3 - Float    = Vec3 (the float is converted to a vec3 with 0 as the second and third components)
Vec4 - Vec3     = Vec4 (the vec3 is converted to a vec4 with 0 as the fourth component)
Vec4 - Float    = Vec4 (the float is converted to a vec4 with 0 as the second and third and fourth components)

 

 

<VisualEffect.Multiply>

This node element is used to multiply two floats or vectors together (for an example of use see Multiply on the Examples page). It can contain the following sub-elements: <xVariant>, <yVariant>, <OutputValue>. The element itself has the following attribute:

 

Attribute Description Type Required
InstanceId

The GUID used to identify the Multiply block. Note that the GUID must be enclosed in {}.

String Yes

 

Note that when using this element, the operation is commutative and only the following types should be multiplied:

Float * Float
Float * Vec2
Float * Vec3
Float * Vec4
Vec2 * Vec2
Vec3 * Vec3
Vec4 * Vec4

Trying to multiply together anything other than these types in the permutations shown will cause an error.

 

 

<VisualEffect.Divide>

This node element is used to divide one value by another, where the values can be either a float or a vector (for an example of use see Divide on the Examples page). It can contain the following sub-elements: <xVariant>, <yVariant>, <OutputValue>. The element itself has the following attribute:

 

Attribute Description Type Required
InstanceId

The GUID used to identify the Divide block. Note that the GUID must be enclosed in {}.

String Yes

 

Note that when using this node, the following rules will be applied depending on the input values:

Float / Float = Float
Float / Vec2  = Vec2 (the float is converted to a Vec2 with 1 as the second component)
Float / Vec3  = Vec3 (the float is converted to a Vec3 with 1 as the second and third components)
Float / Vec4  = Vec4 (the float is converted to a Vec4 with 1 as the second and third and fourth components)
Vec2 / Vec2   = Vec2
Vec3 / Vec3   = Vec3
Vec4 / Vec4   = Vec4
Vec2 / Float  = Vec2 (the float is converted to a vec2 with 1 as the second component)
Vec3 / Vec2   = Vec3 (the vec2 is converted to a vec3 with 1 as the third component)
Vec4 / Vec2   = Vec4 (the vec2 is converted to a vec4 with 1 as the third and fourth components)
Vec3 / Float  = Vec3 (the float is converted to a vec3 with 1 as the second and third components)
Vec4 / Vec3   = Vec4 (the vec3 is converted to a vec4 with 1 as the fourth component)
Vec4 / Float  = Vec4 (the float is converted to a vec4 with 1 as the second and third and fourth components)

It should also be noted that if any division is by zero, this will not error, but will instead return 0.

 

 

<VisualEffect.Pow>

This node element is used to output an input value(<x>) raised to the nth power (where n is the <y> input value), and note that the input value and the power to raise it by may be floats or vectors. For an example of use see Pow on the Examples page. It can contain the following sub-elements: <xVariant>, <yVariant>, <OutputValue>. The element itself has the following attribute:

 

Attribute Description Type Required
InstanceId

The GUID used to identify the Pow block. Note that the GUID must be enclosed in {}.

String Yes

 

Note that when using this element you may use floats or vectors for either input parameter. If you supply a float and a vector - in either order for the value or the power - then the float will be treated as if it was the same type as the supplied vector, eg:

pow(1.0, vec2(2.0, 3.0))

would be treated as

pow(vec2(1.0, 1.0), vec2(2.0, 3.0))

Also note that if you are using two vectors for the inputs, then they both must be the same type. You cannot, for example, use a vec2 as the value and then a vec3 as the power.

 

 

<VisualEffect.Lerp>

This node element is used to return an interpolated value (or values, since they can be either floats or vectors) between two inputs - a minimum and a maximum - based on a third input for time. The element also permits you to choose between two different types of interpolation, linear or smoothstep (for an example of use see Lerp on the Examples page). It can contain the following sub-elements: <xVariant>, <yVariant>, <LerpType>, <FXTime>, <OutputValue>. The element itself has the following attribute:

 

Attribute Description Type Required
InstanceId

The GUID used to identify the Lerp block. Note that the GUID must be enclosed in {}.

String Yes

 

Note that when using this element you may use floats or vectors for either of the min/max values. If you supply a float and a vector - in either order for the min or the max - then the float will be treated as if it was the same type as the supplied vector, eg:

(x)min = 1.0
(y)max = vec2(2.0, 3.0)

would be treated as

(x)min = vec2(1.0, 1.0)
(y)max = vec2(2.0, 3.0)

Also note that if you are using two vectors for the inputs, then they both must be the same type. You cannot, for example, use a vec2 as the min and then a vec3 as the max.

 

<LerpType>

This sub-element is used to define the type of interpolation that the <VisualEffect.Lerp> node will use to generate the output. It can be one of the following strings:

 

String Description
Lerp

This is the basic linear interpolation where the return value will be the interpolation of the input between the min and max values given and clamped to those values if it is outside of them. The formula uses is:

output = x + (y - x) * t

SmoothStep

This is a smoother version of the linear interpolation where the interpolation will be slower the nearer the value is to the min or max values, with the output still being clamped to those values. The formula it uses is the same as the one for Lerp, only t is pre-calculated before being used:

t = t * t * (3 - 2 * t)

 

 

<VisualEffect.BezierCurve>

This node element is used to retrieve a single value along a normalised curve based on a time input which should be between 0 and 1 (for an example of use see BezierCurve on the Examples page). It can contain the following sub-elements: <Curve>, <CurveLoop><FXTime>, <OutputValue>. The element itself has the following attribute:

 

Attribute Description Type Required
InstanceId

The GUID used to identify the BezierCurve block. Note that the GUID must be enclosed in {}.

String Yes

 

Note that if the time input value (t) is outside of the bounds of 0 - 1, the output value will be clamped between the first and last curve points, eg: if t < 0 the first curve point value will be output, and if t > 1 then the last curve point will value be output. Also note that when defining a curve it must have at least two points to be considered valid.

 

<Curve>

This sub-element is used to define a curve for use with the <VisualEffect.BezierCurve> element. Curves are defined as a series of points in a continuous comma separated list, where each group of 4 values represents a single point in the following order:

x, y, TangentBefore.y, TangentAfter.y

  • x: The position along the curve for the point (between 0 and 1)
  • y: The value for the point at the given position
  • TangentBefore.y: This value defines the tangent of the curve before the point. Use NAN if not required.
  • TangentAfter.y: This value defines the tangent of the curve after the point. Use NAN if not required.

Below is an example of this element being used to define 4 points:

<Curve>-0.000,0.006,NAN,NAN,0.300,0.200,NAN,NAN,0.500,1.000,NAN,NAN,1.00,0.006,NAN,NAN</Curve>

 

<CurveLoop>

This sub-element is used with the <VisualEffect.BezierCurve> element to define whether the Bezier curve should be looped over time or not. This element simply requires either True or False, and - when True - the value used to sample the curve is calculated as follows:

tFinal = fmod(t - xMin, xMax - xMin) + xMin

where

  • t is the input on the node
  • xMin is the abscissa of the first point (leftmost) of the curve
  • xMax is the abscissa of the last point (rightmost) of the curve

Therefore the sampling value is kept inside the abscissa bounds of the curve. For an input t that grows continuously (typically time, for example using the "Age" from a <VisualEffect.GetParticleAttribute> node), the sampling value will start again at the beginning of the curve every time it reaches the end. If you use loop with an input value that diminishes, then it will sample the curve backward.

 

 

<VisualEffect.RandomValue>

This node element is used to generate a single random value between two defined values using a seed and index (for an example of use see RandomValue on the Examples page). It can contain the following sub-elements: <MinRandValue>, <MaxRandValue>, <RandSeed>, <RandIndex>, <OutputValue>. The element itself has the following attribute:

 

Attribute Description Type Required
InstanceId The GUID used to identify the RandomValue block. Note that the GUID must be enclosed in {}. String Yes

 

<MinRandValue>

This sub-element is used to set the minimum value for the random number generated by the <VisualEffect.RandomValue> element. This sub-element requires two values:

  • a GUID (which is the output from another node) to be used to set the minimum value.
  • a float which is the minimum 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.

 

<MaxRandValue>

This sub-element is used to set the maximum value for the random number generated by the <VisualEffect.RandomValue> element. This sub-element requires two values:

  • a GUID (which is the output from another node) to be used to set the maximum value.
  • a float which is the maximum 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.

 

 

<VisualEffect.SampleNoise>

This node element is used to retrieve a previously computed and cached random value within a cubed space using the supplied coordinate vector (for an example of use see SampleNoise on the Examples page). The cubed space is 64x64x64 in size, but note that input coordinates are "wrapped" so it is impossible to sample outside of this pre-computed sample space. The output value will be a float between 0 and 1.

 

The element can contain the following sub-elements: <NoiseType>, <Coordinate3D>, <OutputValue>. The element itself has the following attribute:

 

Attribute Description Type Required
InstanceId

The GUID used to identify the SampleNoise block. Note that the GUID must be enclosed in {}.

String Yes

 

<NoiseType>

This sub-element is used to define the noise type being used for the sampling. Can be one of the following strings:

Noise Type Description
Perlin

See here for more information.

Simplex

See here for more information.

IMPORTANT! This noise type is currently not implemented and will be included in a future update.

 

<Coordinate3D>

This sub-element is used to define the sampling coordinate for the <VisualEffect.SampleNoise> element. This sub-element requires the following values:

  • a GUID (which is the output from another node) to be used to set the coordinate.
  • three floats which are used to define the coordinate.

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 3 value vector), and if no valid GUID is present then the 3 float values supplied will be used. Note that the input values are floats, but they will be floored internally to the nearest integer to compute the output value within the cubed space.

 

 

<VisualEffect.Clamp>

This node element is used to clamp an input value between minimum(y) and maximum(z) values (for an example of use see Clamp on the Examples page). The element can contain the following sub-elements: <y>, <z>, <OutputValue>. The element itself has the following attribute:

 

Attribute Description Type Required
InstanceId

The GUID used to identify the Clamp block. Note that the GUID must be enclosed in {}.

String Yes

 

 

<VisualEffect.Split>

This node element is used to take an input value (which can be a float, a vec2, a vec3 or a vec4) and split it into it's components, which will then be output using the <outX>, <outY>, <outZ> and <outW> elements (for an example of use see Split on the Examples page). The element has a single input value, <x>, and has the following attribute:

 

Attribute Description Type Required
InstanceId

The GUID used to identify the Split block. Note that the GUID must be enclosed in {}.

String Yes

 

The input element can accept a single float, a vec2, a vec3 or a vec4. If anything less than a vec4 is supplied, then it will be cast into a vec4 and the missing parameters will be set to 0. For example a vec2 input (30.0, 23.5) would be cast into the vec4 (30.0, 23.5, 0, 0) and then each component will be output through the <outX>, <outY>, <outZ> and <outW> elements.

 

<outX>

<outY>

<outZ>

<outW>

These sub-elements are used by the <VisualEffect.Split> node to output a value that has been split from the input. The node requires at least the <outX> element, and each output element requires a GUID so that it can be identified in the blocks or nodes that will use the value for input.

 

 

<VisualEffect.Color>

This node can be used to define a color value, either as a default color, or using the vec4 input from another node (for an example of use see Color on the Examples page). The element requires the following sub-elements: <ColorIn>, and <OutputValue>, where the output value will be a vec4 with the values corresponding to the components of a color and its alpha. It has the following attribute:

 

Attribute Description Type Required
InstanceId

The GUID used to identify the Color block. Note that the GUID must be enclosed in {}.

String Yes

 

 

<VisualEffect.ColorSpaceConversion>

This node can be used to covert a color input value from one space to another, for example RGB to HSV (for an example of use see ColorSpaceConversion on the Examples page). The element requires the following sub-elements: <ColorIn>, <FromColorSpace>, <ToColorSpace> and <OutputValue>, where the output value will be a vec4 with the values corresponding to the components of a color in a specific color space and its alpha. It has the following attribute:

 

Attribute Description Type Required
InstanceId

The GUID used to identify the ColorSpaceConversion block. Note that the GUID must be enclosed in {}.

String Yes

 

<FromColorSpace>

This sub-element is used to define the color space of the <ColorIn> values for the <VisualEffect.ColorSpaceConversion> element. This sub-element can be omitted if the input color is in the RGB space, although you can include it to explicitly cast the color as being RGB. The color space is defined using one of the following strings:

  • RGB - The input color is in the Red, Green, and Blue color space.
  • HSV - The input color is in the Hue, Saturation, and Value (brightness) color space.
  • YUV - The input color is in the Luma, Blue minus Luma, and Red minus Luma color space.

 

<ToColorSpace>

This sub-element is used to define the color space of the <OutputValue> for the <VisualEffect.ColorSpaceConversion> element, using the following strings:

  • RGB - The output color is in the Red, Green, and Blue color space.
  • HSV - The output color is in the Hue, Saturation, and Value (brightness) color space.
  • YUV - The output color is in the Luma (Y), Blue minus Luma (U), and Red minus Luma (V) color space.

 

 

<VisualEffect.GraphParameter>

This node can be used to target a previously defined Model Behavior parameter and retrieve it's value to output, or a default value if there is an issue retrieving the given parameter value. The element requires the following sub-elements: <GraphParamName>, <GraphParamDefaultValue> and - and you can find a simple example of use here: GraphParameter. It has the following attribute:

 

Attribute Description Type Required
InstanceId

The GUID used to identify the GraphParameter block. Note that the GUID must be enclosed in {}.

String Yes

 

You can also find an example of how the model behaviors should be set up to correctly define a parameter for use in this node in the following section:

 

<GraphParamName>

This sub-element of the <VisualEffect.GraphParameter> node is used to define the Model Behavior parameter that will be used as the return value for the node. The element has no attributes and takes a string that is the parameter being targeted.

<GraphParamName>MyParamName</GraphParamName>

 

<GraphParamDefaultValue>

This sub-element of the <VisualEffect.GraphParameter> node is used to define a default value that will be returned should there be any issue with the given parameter. The element has no attributes and takes 2 values: A GUID to identify it, and a value to define a default value. The GUID is another Node element that defines the default value, and if supplied the second value specified here will be ignored. If you don't use the GUID then it can be left as shown in the example below, and the second value will be the default that is returned.

<GraphParamDefaultValue>{00000000-0000-0000-0000-000000000000}, 0.0</GraphParamDefaultValue>

 

 

<VisualEffect.SetScale>

This node can be used to scale a value by a given magnitude. The input value is defined using the <xVariant> sub-element, while the scale magnitude uses the <FXScale> sub-element. Both the input value and the magnitude to scale it by can be fixed values or they can use the input from another node type, and the result will be given through the <OutputValue> element. Note that the output will be the same format as the input, so if you use a Vec3 for input, each value in the vector will be scaled by the given magnitude and then output as a Vec3 too. You can see an example of this node here: SetScale

 

This node has the following attribute:

 

Attribute Description Type Required
InstanceId

The GUID used to identify the SetScale block. Note that the GUID must be enclosed in {}.

String Yes

 

 

<FXScale>

This sub-element of the <VisualEffect.SetScale> node is used to define the magnitude to scale the input value for the node.

This sub-element has no attributes and requires two values:

  • a GUID (which is the output from another node) to be used to set the magnitude of the scale to be applied.
  • a float which is the magnitude of scale that is used when no GUID is supplied.

The example below has no input node - so the GUID is set to 0 - and a default value:

<FXScale>{00000000-0000-0000-0000-000000000000}, 2.5</FXScale>

 

 

<VisualEffect.LocalDirection>

This node can be used to covert a world space vector (or vector component) into local space. The element requires the following sub-elements: <x>, <y>, <z>, and <OutputValue>, where the output value will be a vec3 with the values corresponding to the direction components in local space, and the input values will be the world space direction vector components. It has the following attribute:

 

Attribute Description Type Required
InstanceId

The GUID used to identify the LocalDirection conversion block. Note that the GUID must be enclosed in {}.

String Yes

 

World space is considered as ECEF - "Earth-Centered, Earth-Fixed" where directions and orientations are calculated using the center of the earth as the base location. This means that directions/velocities are based on the vector from the center of the earth, where the Y vector would be from the center of the earth to the north pole. Local space is considered as being relative to the emitter and based on the orientation of the aircraft, where the Y vector would be "up" from the base of the aircraft through the roof.

 

You can see an example of this node here: LocalDirection

 

 

<VisualEffect.RandomDirectionInCone>

This node can be used to randomly generate particles within a segment of a sphere centered on the emitter position. With this node you have the following sub-elements that are required as input parameters: <InputPitch>, <InputHeading>, <InnerAngle>, <OuterAngle>, <RandSeed>, <RandIndex>, and <OutputValue>. The output value will be a Vec3 which would then (usually) be used as the input for the <VisualEffect.BlockParticleInit> position.

 

The idea with this node is that you generate a direction vector by setting the pitch and heading, and then you use the two angle elements to define the cross section of a sphere with the center line around the pitch/heading vector. Particles will then be generated only within this cross section based on the random seed and index. For more information and image, please see the section on the RandomDirectionInCone node, and for examples see RandomDirectionInCone.

 

This node has the following attribute:

 

Attribute Description Type Required
InstanceId

The GUID used to identify the LocalDirection conversion block. Note that the GUID must be enclosed in {}.

String Yes

 

 

<InputPitch>

This sub-element of the <VisualEffect.RandomDirectionInCone> node is used to define the pitch that will be used - along with the heading value - to generate the center-line vector around which the cone of particles will be generated. This sub-element has no attributes and requires two values:

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

If you don't use the GUID then it can be left as shown in the example below, and the second value will be the pitch that is used.

<InputPitch>{00000000-0000-0000-0000-000000000000}, 180</InputPitch>

 

<InputHeading>

This sub-element of the <VisualEffect.RandomDirectionInCone> node is used to define the heading that will be used - along with the pitch value - to generate the center-line vector around which the cone of particles will be generated. This sub-element has no attributes and requires two values:

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

If you don't use the GUID then it can be left as shown in the example below, and the second value will be the heading that is used.

<InputHeading>{00000000-0000-0000-0000-000000000000}, 180</InputHeading>

 

<InnerAngle>

This sub-element of the <VisualEffect.RandomDirectionInCone> node is used to define the first (inner) angle that will be used to generate the segement of the sphere where the particles will be randomly spawned. This sub-element has no attributes and requires two values:

  • a GUID (which is the output from another node) to be used to set the inner angle.
  • a float which is the angle that is used when no GUID is supplied.

If you don't use the GUID then it can be left as shown in the example below, and the second value will be the default angle that is used. The input/default value should be between 0° and 180°.

<InnerAngle>{00000000-0000-0000-0000-000000000000}, 45</InnerAngle>

 

<OuterAngle>

This sub-element of the <VisualEffect.RandomDirectionInCone> node is used to define the second (outer) angle that will be used to generate the segement of the sphere where the particles will be randomly spawned. This sub-element has no attributes and requires two values:

  • a GUID (which is the output from another node) to be used to set the outer angle.
  • a float which is the angle that is used when no GUID is supplied.

If you don't use the GUID then it can be left as shown in the example below, and the second value will be the default angle that is used. The input/default value should be between 0° and 180°.

<OuterAngle>{00000000-0000-0000-0000-000000000000}, 90</OuterAngle>

 

<VisualEffect.Abs>

This node element is used to get the absolute value for a given input, ie: the non-negative value of the input without regard to its sign (for an example of use see Abs on the Examples page). It can contain the following sub-elements: <x><OutputValue>. The element itself has the following attribute:

 

Attribute Description Type Required
InstanceId

The GUID used to identify the Abs block. Note that the GUID must be enclosed in {}.

String Yes

 

 

<VisualEffect.Cos>

This node element is used to get the cosine of an input value (for an example of use see Cos on the Examples page). It can contain the following sub-elements: <x> <AngleInputUnit>, <OutputValue>. The element itself has the following attribute:

 

Attribute Description Type Required
InstanceId

The GUID used to identify the Cos block. Note that the GUID must be enclosed in {}.

String Yes

 

 

<VisualEffect.Sin>

This node element is used to get the sine of an input value (for an example of use see Sin on the Examples page). It can contain the following sub-elements: <x> <AngleInputUnit>, <OutputValue>. The element itself has the following attribute:

 

Attribute Description Type Required
InstanceId

The GUID used to identify the Sin block. Note that the GUID must be enclosed in {}.

String Yes