The emitter component is the main PopcornFX component. It is used to play and configure effects in O3DE levels.
- “Enable”: Checkbox to enable or disable the effect. When disabled the effect is not played.
- “Stop”: Stops the emission of new particles.
- “Restart”: Restarts the effect. It will kill all the particles emitted by this component and start the effect once again.
- “Kill”: Kills all particles emitted by this component and stops the emission of new particles.
- “Particle System”: Path to the .pkfx file.
- “Visible”: When disabled, the effect is still playing but is not rendered.
- “Time Scale”: Used to change the speed at which the effect is updated.
- “Prewarm Enable”: Enable or disable the effect prewarm.
- “Prewarm Time”: Prewarm time used for this effect instance.
- “Reset Prewarm”: Resets the “Prewarm Enable” and “Prewarm Time” to their default values.
- “Attributes” panel: Attributes exposed by the effect in the PopcornFX editor to manipulate / change the effect behavior.
- “Reset All”: Resets all the effect attributes to their default values.
The sampler components are used for effects that are exposing “samplers” as attributes.
You can have more details about how to expose and use samplers in your effects here.
All the sampler components in O3DE should be attached to separate entities: you cannot have a sampler and an emitter component on the same entity.
In the “Attributes” panel of your effect, for the attributes samplers you can select an entity on which the sampler component is attached.
The sampler AnimTrack component should be combined with a spline on the same entity. It is used to sample the spline in an effect.
The “UseRelativeTransform” toggle is used to specify if the effect should sample the spline relative to the world entity transform (if enabled) or relative to its local entity transform (if disabled).
This will have no influence whatsoever if the entity is not attached to a parent entity.
The sampler image is used to sample a texture in an effect. The transform of the entity are ignored.
The “Texture” property specifies the texture asset to use.
The sampler shape is used to sample a parametric shape or a mesh in an effect. This component handles the same shape types as the PopcornFX editor:
Each one of these type has its own properties (size, radius, inner radius, etc…).
The component also has the same “UseRelativeTransform” toggle as the AnimTrack sampler to specify how the mesh should be transformed when sampled.
To use the “Mesh” sampler, you need to add a Mesh component to the same entity:
- “SubMesh Index”: Used to specifiy which submesh to sample if the mesh is composed of multiple submeshes.
- “Sample Normals”: If you are using the normals from the mesh in your effect you should toggle this property.
- “Sample Tangents”: If you are using the tangents from the mesh in your effect you should toggle this property.
- “Sample UVs”: If you are using the UVs from the mesh in your effect you should toggle this property.
- “Sample Colors”: If you are using the vertex colors from the mesh in your effect you should toggle this property.
- “Build KD Tree”: You should toggle this property if you are using one of the “shape.project”, “shape.contains” or “ShapeDistanceField” nodes in your effect.
- “Build Sampling Info”: Toggled by default, should be toggled if you are using the “ShapeSample” node in your effect.
To use the “Skinned Mesh” sampler, you need to add an “Actor” and a “Simple Motion” component to the same entity:
The only difference in the “PopcornFX Sampler Shape” properties is the “Sample Velocities” toggle that should be enabled if you are sampling the “Velocity” of the animation in your effect graph.
For example, the following PopcornFX graph samples the positions, the normals and the velocities of the “ExposedShapeSampler” mesh:
So we need to configure the O3DE component accordingly to get the proper result:
The sampler text is used to sample some text in an effect. This component is pretty straightforward and just has one field in which you can type the text to sample.