StaticMesh
The StaticMesh block is used to spawn a mesh through the Visual Effects editor that is then attached to a given model node or a contact point. This block must be a child of a VisualEffect block and requires no other blocks to be used. Note that once a VisualEffect block has been linked to the static mesh, the Referenced From section of the Inspector will show a button: Emitter And Static Mesh List
. Clicking this will pan the Node Graph to the VisualEffect block that is the parent of the StaticMesh.
When you add a StaticMesh block item to the VFX Node Graph, the Inspector window will change to show a list properties that can be edited (these properties can also be edited directly within the block itself):
The StaticMesh block has the following properties that can be edited:
-
Material
This is the material that should be used by the static mesh. By default this will be populated by one of the existing visual effects materials, and clicking this material button will open The Material Editor where you will see a list of the available materials. You can then select the one you want from this list, click on it then drag it onto the material button to apply it to the StaticMesh. The button name will then change to name of the material that you have just applied.
IMPORTANT! Materials used for effects are instanced, which means that it's actually a copy of the material that is used when an effect is spawned. The consequence of this is that if you change the properties of a material, any effects that use it will not show any changes, and will require that you cancel the current spawn and then re-spawn them again. The re-spawned particles will use now use instances of the updated material.
-
Mesh
This is the mesh that will be spawned by the Block. Clicking on theNone
button will open up the Object Explorer where you can choose a SceneryObject mesh to use for the effect.
IMPORTANT! The StaticMesh block will not show anything unless an object mesh is defined here.
-
StaticMeshPosition:
This 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. Values are ordered X, Y, Z.
-
StaticMeshRotation:
This is used to set the rotation of the static mesh being spawned by the visual effect, relative to the rotation of the node or contact point that it has been spawned on. Values are ordered X-axis, Y-axis, Z-axis.
-
StaticMeshScale:
Here you can set the scale of the static mesh, where 1 is the scale at which the object mesh was created.
Material Specific Properties
The StaticMesh block has additional properties that are only useful when you select a specific material Type:
NOTE: These properties override the values set for them in the material itself, and will themselves be overridden if any Additional Block Inputs are supplied.
-
Deformation
This is a property that is used to deform the heat distortion material along the X and/or Y axis. This property is only used when the material type isCODE_HEATDEFORM
and corresponds with the Deformation parameter in the material editor.
-
Blur
This is a property that is used to blur the heat distortion material. This property is only used when the material type isCODE_HEATDEFORM
, and corresponds with the Blur parameter in the material editor.
-
Power
This is a property that is used to set the Power value for the afterburner material, which controls the length and scale of the afterburner effect. This property is only used when the material type isCODE_AFTERBURNER
.
-
Material Diffuse
This is an optional property that is used to set the Diffuse Colour value for the material. This property must be explicitly added to the node by clicking on theMaterial Diffuse (+)
button. This button will take the inspector to the parameters for this property and here you can modify the RGBA components of the colour to use. Note that this parameter can be used by multiple material types, but is required if using an Afterburner material.
-
Material Emissive
This is an optional property that is used to set the Emissive Colour value for the material. This property must be explicitly added to the node by clicking on theMaterial Emissive (+)
button. This button will take the inspector to the parameters for this property and here you can modify the RGBA components of the colour to use. Note that this parameter can be used by multiple material types, but is required if using an Afterburner material.
Block Input
The block will accept the following inputs:
-
StaticMeshPosition:
This input requires a vec3 that defines the X, Y, and Z offset for the static mesh, relative to the node or contact point where the mesh was spawned.
-
StaticMeshRotation:
This input requires a vec3 that defines the rotation along the X, Y and Z axis, relative to the node or contact point where the mesh was spawned.
-
StaticMeshScale:
This input requires a single floating point value that will define the scale of the mesh when spawned. The default value is 1.0, which is the scale at which the object mesh was created.
Additional Block Inputs
The StaticMesh block has additional inputs that will only be used for the appropriate material Type and will be ignored for all other materials:
NOTE: Adding input nodes to these parameters will override any values input in the Block/Inspector properties, and will also override any value set in the material itself.
-
Deformation
This is an optional input that is used to deform the heat distortion material along the X and/or Y axis. This property is only useful when the material type isCODE_HEATDEFORM
, and requires a Vec2 input.
-
Blur
This is an optional input that is used to blur the heat distortion material. This property is only useful when the material type isCODE_HEATDEFORM
, and requires a float input.
-
Power
This is an optional input that is used to set the "power" value for the afterburner material, which controls the length and scale of the afterburner effect. This property is only useful when the material type isCODE_AFTERBURNER
, and requires a Float input.
-
Material Diffuse
This is an optional input that is used to set the Diffuse Colour value for the material. This property requires a Vec4 input formatted as (R, G, B, A). Each component of the vector should be between 0.1. Note that this input won't appear unless you have added the child property through the inspector and can be used by multiple material types, but is required if using an Afterburner material.
-
Material Emissive
This is an optional input that is used to set the Emissive Colour value for the material. This property requires a Vec4 input formatted as (R, G, B, A). Each component of the vector should be between 0.1. Note that this input won't appear unless you have added the child property through the inspector and can be used by multiple material types, but is required if using an Afterburner material.