# Visual Effects XML Properties The `.xml` file goes in the `VisualEffectsLib` folder beside any other effects files and the `*.vfxlib` file (as explained [here](visual-effects/)) and should be formatted as follows: ``` xml AceXML Document Effect_Name Comments here {} {}, 0.000000 {}, 0.000000 ``` Here you *must* include the `` element (where the `Type` attribute should be "AceXML"), as well as the `` element, which acts as a container for the VFX themselves. 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: - [Visual Effects XML Examples](visual-effects-xml-examples/)   And if you wish to know how these effects should be used in your projects, please see this page: - [Adding Aircraft VFX](../models/modelbehaviors/usingbehaviours/vfx/adding-aircraft-vfx/)   Note that a large majority of the XML elements specified on this page requires {{< glossterm >}}guid{{< /glossterm >}} values to identify them. These will be generated automatically when you use [The Visual Effects Editor](../../devmode/editors/vfx-editor/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: - [GUIDs](../../introduction/using-the-sdk/#GUIDs)     ### <VisualEffect.VisualEffect> This element is used to define a [VisualEffect](../../devmode/editors/vfx-editor/nodes/visualeffect/) block. There can only be *one* of these elements in your XML for the effect, and it can contain the following sub-elements: 1. `` 2. ``   The element has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} of the VisualEffects block. This ID value is essentially the ID for the whole effect as it is what you would use in the `` XML to to attach the effect to a node on a SimObject. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}     #### <Name> This is a sub-element of the `` 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. ``` xml Geyser_Effect ```     #### <EmitterList> This sub-element of the `` block is a "container" element for one or more `` elements. It is used to define the different [Emitter](../../devmode/editors/vfx-editor/nodes/emitter/) and/or [StaticMesh](../../devmode/editors/vfx-editor/nodes/staticmesh/) blocks that are involved in your effect and link them to the main VisualEffect block via a GUID in the `` 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 `` element and the static mesh GUID is defined as an attribute of the `` element. ``` xml ```     ### <VisualEffect.Emitter> This element is used to define an [Emitter](../../devmode/editors/vfx-editor/nodes/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: 1. `` 2. `` 3. `` 4. `` 5. `` 6. `` 7. `` 8. ``   The element itself has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} of the Emitter block. This is supplied as an object reference to the `` element within the `` block that defines the whole effect. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}     #### <Capacity> This `` 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. ``` xml 32.000 ```     #### <ParticleRate> This `` sub-element defines the rate at which the particles will be emitted, depending on the ``. When using this element, note that it takes *two* values: - a {{< glossterm >}}guid{{< /glossterm >}} 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 `` 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. ``` xml {00000000-0000-0000-0000-000000000000}, 8.000000 ```     #### <ParticleRateType> This `` sub-element defines what dimension will be used along with the `` to spawn the particles from the emitter. It can be one of the following strings:   {{< table-wrapper >}} | String | Description | |------------|-------------------------------------------------------------------------------------------------------------------| | `Time` | Particles will be emitted as "*N* particles per second", where *N* is the value set by the ``. | | `Distance` | Particles will be emitted as "*N* particles per meter moved", where *N* is the value set by the ``. | {{< /table-wrapper >}}     #### <EmitInLocalSpace> This optional `` 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](../../devmode/editors/vfx-editor/nodes/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. ``` xml False ``` 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: - [WindDirection](../../devmode/editors/vfx-editor/nodes/winddirection/) - [GravityVector](../../devmode/editors/vfx-editor/nodes/gravityvector/) - [GroundDirection](../../devmode/editors/vfx-editor/nodes/grounddirection/) - [GetGroundAttribute](../../devmode/editors/vfx-editor/nodes/getgroundattribute/) (the position parameter)     #### <TimeEmission> This optional `` 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. ``` xml 20 ```     #### <Delay> This optional `` 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). ``` xml 20 ```     #### <MaxDistanceEmission> This optional `` 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. ``` xml 1000 ```     #### <ParticleInit> This sub-element of the `` block is a "container" element for one or more `` elements. It is used to define the an [Init](../../devmode/editors/vfx-editor/nodes/init/) block that is involved in your effect and link it to the Emitter block via a GUID in the `` 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 `` element. ``` xml ```     ### <VisualEffect.StaticMesh> This container element is used to define a [StaticMesh](../../devmode/editors/vfx-editor/nodes/staticmesh/) block. There *must* be at least one of these elements, or a `` element, in your XML for the effect, although you can define more than one if required. The element has the following required sub-elements: 1. `` 2. `` 3. `` 4. `` 5. ``   The element also has the following optional sub-elements that will be required only if you use either the **Heat Deform** or **Afterburner** [Type (VFX Context only)](../../devmode/editors/material-editor/the-material-inspector/#Type) materials: 1. `` 2. `` 3. `` 4. `` 5. ``   This element has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} of the StaticMesh block. This is supplied as an object reference to the `` element within the `` block that defines the whole effect. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}   To see how the full XML for this block looks when complete, see the [StaticMesh Example](visual-effects-xml-examples/#staticmesh).     #### <StaticMeshPosition> This is a sub-element of the `` 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 {{< glossterm >}}guid{{< /glossterm >}} 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. ``` xml {00000000-0000-0000-0000-000000000000}, 0.0, 0.0, 0.0 ```     #### <StaticMeshRotation> This is a sub-element of the `` 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 {{< glossterm >}}guid{{< /glossterm >}} 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. ``` xml {00000000-0000-0000-0000-000000000000}, 0.0, 0.0, 0.0 ```     #### <StaticMeshScale> This is a sub-element of the `` 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 {{< glossterm >}}guid{{< /glossterm >}} 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. ``` xml {00000000-0000-0000-0000-000000000000}, 1.0 ```     #### <Mesh> This is a sub-element of the `` 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 {{< glossterm >}}guid{{< /glossterm >}} 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. ``` xml {00000000-0000-0000-0000-000000000000}, 1.0 ```     #### <HeatDeformDeformation> This is a sub-element of the `` block and is used to set the [Deformation](../../devmode/editors/material-editor/the-material-inspector/#deformation) value when using the **heat deform** shader [Type (VFX Context only)](../../devmode/editors/material-editor/the-material-inspector/#Type). The element has no attributes and takes 2 values: A {{< glossterm >}}guid{{< /glossterm >}} 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. ``` xml {6EA84586-C0F4-4665-BC76-41F4A0C44835}, 1 ```     #### <HeatDeformBlur> This is a sub-element of the `` block and is used to set the [Blur](../../devmode/editors/material-editor/the-material-inspector/#blur) value when using the **heat deform** shader [Type (VFX Context only)](../../devmode/editors/material-editor/the-material-inspector/#Type). The element has no attributes and takes 2 values: A {{< glossterm >}}guid{{< /glossterm >}} 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. ``` xml {6EA84586-C0F4-4665-BC76-41F4A0C44835}, 1 ```     #### <AfterburnerPower> This is a sub-element of the `` block and is used to set the [Power](../../devmode/editors/material-editor/the-material-inspector/#power) value when using the **afterburner** shader [Type (VFX Context only)](../../devmode/editors/material-editor/the-material-inspector/#Type). The element has no attributes and takes 2 values: A {{< glossterm >}}guid{{< /glossterm >}} 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. ``` xml {6EA84586-C0F4-4665-BC76-41F4A0C44835}, 1 ```     #### <MaterialDiffuseColor> This is a sub-element of the `` block and the `` block. It is used to set a colour that corresponds to the [Diffuse Colour](../../devmode/editors/material-editor/the-material-inspector/#diffuse_colour) used in the Material Editor, for example when using the **afterburner** shader [Type (VFX Context only)](../../devmode/editors/material-editor/the-material-inspector/#Type). The element has no attributes and takes 5 values: A {{< glossterm >}}guid{{< /glossterm >}} 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 `` 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. ``` xml {6EA84586-C0F4-4665-BC76-41F4A0C44835}, 1, 1, 1, 1 ```     #### <MaterialEmissiveColor> This is a sub-element of the `` block and the `` block. It is used to set a colour that corresponds to the [Emissive Colour](../../devmode/editors/material-editor/the-material-inspector/#emissive_colour) used in the Material Editor, for example when using the **afterburner** shader [Type (VFX Context only)](../../devmode/editors/material-editor/the-material-inspector/#Type). The element has no attributes and takes 5 values: A {{< glossterm >}}guid{{< /glossterm >}} 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 `` 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. ``` xml {00000000-0000-0000-0000-000000000000}, 255, 224, 0, 1 ```     ### <VisualEffect.BlockParticleInit> This element is used to define an [Init](../../devmode/editors/vfx-editor/nodes/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: 1. `` 2. `` 3. `` 4. `` 5. `` 6. `` 7. `` 8. `` 9. `` 10. `` 11. `` 12. ``   The element itself has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} of the Init block. This is supplied to the `` block that identifies the emitter the particle is being spawned from. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}     #### <ParticleUpdate> This sub-element of the `` block is a "container" element for one or more `` elements. It is used to define the different [Update](../../devmode/editors/vfx-editor/nodes/update/) blocks that are involved in your effect and link them to the Init block via a {{< glossterm >}}guid{{< /glossterm >}} in the `` 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 `` element. ``` xml ```     ### <VisualEffect.BlockParticleUpdate> This element is used to define an [Update](../../devmode/editors/vfx-editor/nodes/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: 1. `` 2. `` 3. `` 4. `` 5. `` 6. `` 7. `` 8. `` 9. `` 10. `` 11. `` 12. ``   The element itself has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} of the Update block. This is supplied to the `` block that initilised the particle data. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}     #### <ParticleOutput> This sub-element of the `` block is a "container" element for one or more `` elements. It is used to define the different [Output](../../devmode/editors/vfx-editor/nodes/output/) blocks that are involved in your effect and link them to the Update block via a {{< glossterm >}}guid{{< /glossterm >}} in the `` 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 `` element. ``` xml ```     ### <VisualEffect.Output> This element is used to define an [Output](../../devmode/editors/vfx-editor/nodes/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: 1. `` 2. `` 3. `` 4. `` 5. `` 6. `` 7. `` 8. ``   The element itself has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} of the Output block. This is supplied to the `` block that is outputting the particle. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}     #### <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](../../devmode/editors/vfx-editor/nodes/output/#groundribbon) for more information on this type). ``` xml Quad ```     #### <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](../../devmode/editors/vfx-editor/nodes/init/) or [Update](../../devmode/editors/vfx-editor/nodes/update/) **QuadOrientationAxis** parameter. ``` xml FixedAxis ```     #### <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 `` values. The **Atlas** value should only be used when the material texture is a "sprite" atlas, and the `` or `` is using the element. The element has no attributes and requires one of the above-mentioned strings. ``` xml Default ```     #### <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 `` 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 `{}`. ``` xml {737C9FB0-D3BB-48A4-AED3-46FFC6DB1DA2}, 6.0, 6.0 ```     ### <SimEdition.CommentNode> This element is used to define a [CommentNode](../../devmode/editors/vfx-editor/nodes/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: ``.   The element itself has the following attributes:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} 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 | {{< /table-wrapper >}}     #### <NodeComment> This element is used to add some text comments to the block. ``` xml Here we update the particle velocity. ```     ### <VisualEffect.GetParticleAttribute> This **node** element is used to retrieve a specific attribute from the particle system (for an example of use see [GetParticleAttribute](visual-effects-xml-examples/#GetParticleAttribute) on the Examples page). It can contain the following sub-elements: 1. `` 2. ``   The element itself has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|----------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the GetAttribute block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}     #### <AttributeType> This sub-element is used to define the type of attribute to be output by the `` node. It can be any one of the following strings:   {{< table-wrapper >}} | 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](../../devmode/editors/vfx-editor/nodes/output/) block has the **UVMode** set to "*Atlas*". For more information see the [TextureIndex](../../devmode/editors/vfx-editor/nodes/update/#h1) section of the [Update](../../devmode/editors/vfx-editor/nodes/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>](visual-effects-xml-properties/#EmitInLocalSpace) parameter on the emitter block). | | `VelocityRotationRate` | Returns a float which is the velocity rotation rate in degrees per second. | {{< /table-wrapper >}}     ### <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](visual-effects-xml-examples/#GetInstanceAttribute) on the Examples page). It can contain the following sub-elements: 1. `` 2. ``   The element itself has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|--------------------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `GetInstanceAttribute` block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}     #### <InstanceAttributeType> This sub-element is used to define the type of attribute to be output by the `` node. It can be any one of the following strings:   {{< table-wrapper >}} | 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 `` setting in the aircraft model behaviours ``. See here for more information: [Using Visual Effects](visual-effects/#UsingVFX). | | `Age` | Returns a floating point value representing the time that has passed since the *emitter* that emitted the particle was created. | {{< /table-wrapper >}}     ### <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](visual-effects-xml-examples/#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: 1. `` 2. ``   The element itself has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|------------------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `GetGroundAttribute` block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}     #### <GroundAttributeType> This sub-element is used to define the type of attribute to be output by the `` node. It can be any one of the following strings:   {{< table-wrapper >}} | 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. | {{< /table-wrapper >}}     ### <VisualEffect.GetSimVar> This **node** element is used to retrieve the value of a specific [SimVar](../../programming-apis/simvars/simulation-variables/) to be used as an input to another node or block in the particle system (for an example of use see [SimVar](visual-effects-xml-examples/#SimVar) on the Examples page). It can contain the following sub-elements: 1. `` 2. `` 3. `` 4. ``   The element itself has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|------------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `GetAttribute` block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}     #### <SimvarType> This sub-element is used to define the SimVar being retrieved by the `` node. It can be any one of the available [Simulation Variables](../../programming-apis/simvars/simulation-variables/). {{< callout context="caution" title="IMPORTANT!" icon="outline/alert-triangle" >}} Only the following SimVars are currently implemented to return anything other than a float (in all cases, a three value vector is returned): {{< /callout >}} `SIMVAR_STRUCT_LATLONALTSIMVAR_STRUCT_LATLONALTPBHSIMVAR_STRUCT_WORLDVELOCITYSIMVAR_STRUCT_WORLD_ROTATION_VELOCITYSIMVAR_STRUCT_BODY_VELOCITYSIMVAR_STRUCT_BODY_ROTATION_VELOCITYSIMVAR_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 `` 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 `` node uses. It can be any one of the units listed here: [Simulation Variable Units](../../programming-apis/simvars/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 `` is 1 (for an example of use see [GravityVector](visual-effects-xml-examples/#GravityVector) on the Examples page). It can contain the following sub-elements: 1. `` 2. ``   The element itself has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|-------------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `GravityVector` block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}     #### <GravityScale> This sub-element is used to define a scalar value for the gravity unit vector output from the `` 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: ``` codeblock 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: ``, ``, ``, ``. The element itself has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|---------------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `GroundDirection` block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}   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](visual-effects-xml-examples/#EmitterDirection) on the Examples page). It can contain the following sub-elements: 1. `` 2. ``   The element itself has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|----------------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `EmitterDirection` block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}     #### <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 `` 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](visual-effects-xml-examples/#WindDirection) on the Examples page). It can contain the following sub-elements: 1. `` 2. ``   The element itself has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|-------------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `WindDirection` block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}     #### <WindDirOptions> This sub-element is used to define the type of output that the `` node will generate. It can be one of the following strings:   {{< table-wrapper >}} | String | Description | |--------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | `Raw` | Returns a vector that represents the wind direction scaled by the speed of the wind in {{< glossterm >}}ft{{< /glossterm >}} 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. | {{< /table-wrapper >}}     ### <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 `` has the `` 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 `` input of an `` block (for example). It can contain the following sub-elements: ``, ``. The element itself has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|-----------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `AtlasPlayer` block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}     #### <FrameRate> This sub-element is used to define the framerate modifier that the `` 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](visual-effects-xml-examples/#Float) on the Examples page). It can contain the following sub-elements: `` (the float value to output), ``. The element itself has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|-----------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `Float` block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}     ### <VisualEffect.Vector2> This **node** element is used to generate a 2 value vector (for an example of use see [Vector2, Vector3, Vector4](visual-effects-xml-examples/#Vec2Vec3Vec4) on the Examples page). It can contain the following sub-elements: 1. `` 2. `` 3. ``   The element itself has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|-------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `Vector2` block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}     ### <VisualEffect.Vector3> This **node** element is used to generate a 3 value vector (for an example of use see [Vector2, Vector3, Vector4](visual-effects-xml-examples/#Vec2Vec3Vec4) on the Examples page). It can contain the following sub-elements: 1. `` 2. `` 3. `` 4. ``   The element itself has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|-------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `Vector3` block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}     ### <VisualEffect.Vector4> This **node** element is used to generate a 4 value vector (for an example of use see [Vector2, Vector3, Vector4](visual-effects-xml-examples/#Vec2Vec3Vec4) on the Examples page). It can contain the following sub-elements: 1. `` 2. `` 3. `` 4. `` 5. ``   The element itself has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|-------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `Vector4` block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}     ### <VisualEffect.Add> This **node** element is used to add two floats or vectors together (for an example of use see [Add](visual-effects-xml-examples/#Add) on the Examples page). It can contain the following sub-elements: 1. `` 2. `` 3. ``   The element itself has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|---------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the {{< button "Add" />}} block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}   Note that when using this element, the operation is commutative and *only* the following types should be added: ``` codeblock 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](visual-effects-xml-examples/#Subtract) on the Examples page). It can contain the following sub-elements: 1. `` 2. `` 3. ``   The element itself has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|--------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `Subtract` block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}   Note that when using this node, the following rules will be applied depending on the input values: ``` codeblock 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](visual-effects-xml-examples/#Multiply) on the Examples page). It can contain the following sub-elements: 1. `` 2. `` 3. ``   The element itself has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|--------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `Multiply` block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}   Note that when using this element, the operation is commutative and *only* the following types should be multiplied: ``` codeblock 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](visual-effects-xml-examples/#Divide) on the Examples page). It can contain the following sub-elements: 1. `` 2. `` 3. ``   The element itself has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `Divide` block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}   Note that when using this node, the following rules will be applied depending on the input values: ``` codeblock 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(``) raised to the *n*th power (where *n* is the `` 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](visual-effects-xml-examples/#Pow) on the Examples page. It can contain the following sub-elements: 1. `` 2. `` 3. ``   The element itself has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|---------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `Pow` block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}   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: ``` codeblock pow(1.0, vec2(2.0, 3.0)) ``` would be treated as ``` codeblock 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](visual-effects-xml-examples/#Lerp) on the Examples page). It can contain the following sub-elements: 1. `` 2. `` 3. `` 4. `` 5. ``   The element itself has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|----------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `Lerp` block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}   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: ``` codeblock (x)min = 1.0 (y)max = vec2(2.0, 3.0) ``` would be treated as ``` codeblock (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 `` node will use to generate the output. It can be one of the following strings:  
StringDescription
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](visual-effects-xml-examples/#BezierCurve) on the Examples page). It can contain the following sub-elements: 1. `` 2. `` 3. `` 4. ``   The element itself has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|-----------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `BezierCurve` block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}   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 `` 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 - {{< button "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: ``` xml -0.000,0.006,NAN,NAN,0.300,0.200,NAN,NAN,0.500,1.000,NAN,NAN,1.00,0.006,NAN,NAN ```     #### <CurveLoop> This sub-element is used with the `` 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: ``` codeblock 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 `` 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](visual-effects-xml-examples/#RandomValue) on the Examples page). It can contain the following sub-elements: 1. `` 2. `` 3. `` 4. `` 5. ``   The element itself has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|-----------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `RandomValue` block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}     #### <MinRandValue> This sub-element is used to set the minimum value for the random number generated by the `` element. This sub-element requires two values: - a {{< glossterm >}}guid{{< /glossterm >}} (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 `` element. This sub-element requires two values: - a {{< glossterm >}}guid{{< /glossterm >}} (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](visual-effects-xml-examples/#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: 1. `` 2. `` 3. ``   The element itself has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|-----------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `SampleNoise` block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}     #### <NoiseType> This sub-element is used to define the noise type being used for the sampling. Can be one of the following strings:
Noise TypeDescription
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 `` element. This sub-element requires the following values: - a {{< glossterm >}}guid{{< /glossterm >}} (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](visual-effects-xml-examples/#Clamp) on the Examples page). The element can contain the following sub-elements: 1. `` 2. `` 3. ``   The element itself has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|-----------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `Clamp` block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}     ### <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 the following elements: 1. `` 2. `` 3. `` 4. `` (for an example of use see [Split](visual-effects-xml-examples/#Split) on the Examples page).   The element has a single input value, ``, and has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|-----------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `Split` block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}   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 ``, ``, `` and `` elements.     #### <outX> #### <outY> #### <outZ> #### <outW> These sub-elements are used by the `` node to output a value that has been split from the input. The node requires at least the `` element, and each output element requires a {{< glossterm >}}guid{{< /glossterm >}} 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](visual-effects-xml-examples/#Color) on the Examples page). The element requires the following sub-elements: 1. `` 2. `` 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:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|-----------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `Color` block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}     ### <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](visual-effects-xml-examples/#ColorSpaceConversion) on the Examples page). The element requires the following sub-elements: 1. `` 2. `` 3. `` 4. `` 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:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|--------------------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `ColorSpaceConversion` block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}     #### <FromColorSpace> This sub-element is used to define the color space of the `` values for the `` 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 `` for the `` 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](../models/modelbehaviors/model-behaviors/) 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: 1. `` 2. `` You can find a simple example of use here: [GraphParameter](visual-effects-xml-examples/#GraphParameter).   It has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|--------------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `GraphParameter` block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}   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: - [Example Using Graph Parameters](visual-effects-xml-examples/#graph_params)     #### <GraphParamName> This sub-element of the `` node is used to define the [Model Behavior](../models/modelbehaviors/model-behaviors/) 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. ``` xml MyParamName ```     #### <GraphParamDefaultValue> This sub-element of the `` 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 {{< glossterm >}}guid{{< /glossterm >}} 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. ``` xml {00000000-0000-0000-0000-000000000000}, 0.0 ```     ### <VisualEffect.SetScale> This node can be used to scale a value by a given magnitude. The input value is defined using the `` sub-element, while the scale magnitude uses the `` 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 `` 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](visual-effects-xml-examples/#SetScale)   This node has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|--------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `SetScale` block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}     #### <FXScale> This sub-element of the `` 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 {{< glossterm >}}guid{{< /glossterm >}} (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: ``` xml {00000000-0000-0000-0000-000000000000}, 2.5 ```     ### <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: 1. `` 2. `` 3. `` 4. `` 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:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|-------------------------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `LocalDirection` conversion block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}   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](visual-effects-xml-examples/#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: 1. `` 2. `` 3. `` 4. `` 5. `` 6. `` 7. `` The output value will be a Vec3 which would then (usually) be used as the input for the `` 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](../../devmode/editors/vfx-editor/nodes/randomdirectionincone/) node, and for examples see [RandomDirectionInCone](visual-effects-xml-examples/#RandomCone).   This node has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|-------------------------------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `LocalDirection` conversion block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}     #### <InputPitch> This sub-element of the `` 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 {{< glossterm >}}guid{{< /glossterm >}} (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. ``` xml {00000000-0000-0000-0000-000000000000}, 180 ```     #### <InputHeading> This sub-element of the `` 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 {{< glossterm >}}guid{{< /glossterm >}} (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. ``` xml {00000000-0000-0000-0000-000000000000}, 180 ```     #### <InnerAngle> This sub-element of the `` node is used to define the first (inner) angle that will be used to generate the segment of the sphere where the particles will be randomly spawned. This sub-element has no attributes and requires two values: - a {{< glossterm >}}guid{{< /glossterm >}} (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°. ``` xml {00000000-0000-0000-0000-000000000000}, 45 ```     #### <OuterAngle> This sub-element of the `` node is used to define the second (outer) angle that will be used to generate the segment of the sphere where the particles will be randomly spawned. This sub-element has no attributes and requires two values: - a {{< glossterm >}}guid{{< /glossterm >}} (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°. ``` xml {00000000-0000-0000-0000-000000000000}, 90 ```     ### <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](visual-effects-xml-examples/#Abs) on the Examples page). It can contain the following sub-elements: 1. `` 2. ``   The element itself has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|---------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `Abs` block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}     ### <VisualEffect.Cos> This **node** element is used to get the cosine of an input value (for an example of use see [Cos](visual-effects-xml-examples/#Cos) on the Examples page). It can contain the following sub-elements: 1. `` 2. `` 3. ``   The element itself has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|---------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `Cos` block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}     ### <VisualEffect.Sin> This **node** element is used to get the sine of an input value (for an example of use see [Sin](visual-effects-xml-examples/#Sin) on the Examples page). It can contain the following sub-elements: 1. `` 2. `` 3. ``   The element itself has the following attribute:   {{< table-wrapper >}} | Attribute | Description | Type | Required | |--------------|---------------------------------------------------------------------------------------------------------------------------|--------|:--------:| | `InstanceId` | The {{< glossterm >}}guid{{< /glossterm >}} used to identify the `Sin` block. Note that the GUID must be enclosed in `{}`. | String | Yes | {{< /table-wrapper >}}