Skip to Content
Procedural Slash TrailTrail Properties

Trail Properties

VFX Graph Overview

VFX Graph Overview As shown above, the VFX Graph is divided into two main parts:

  • Head: This section is responsible for triggering update events as your weapon’s position moves during the attack animation. It does not spawn any particles.
  • Trail: This part is responsible for spawning the trail using particle strips.

The Head

In the Head section, you can control key properties:

  • DoubleTrail: Enabling this will spawn two trails simultaneously, which can be adjusted to create a cone-like shape, adding depth and thickness to the effect.
  • TotalTrailTime: This property should generally match the duration of your animation, from the start to the end of the swing.
  • LifetimeModifier: Use this to adjust the trail duration based on the animation speed, ensuring the effect aligns with timing changes.

The Trail Phase and the Final Shape

In the Trail section, understanding the concept of Phase is crucial. When an animation event is triggered, particles start spawning along the weapon’s path until the swing completes. At this point, the entire trail is fully formed — this is referred to as the Final Shape. However, the effect doesn’t end immediately; you can control how the trail fades out over time.

Understanding Phase

The Phase represents the particle’s progression from creation to disappearance, with values ranging from 0 to 1.

  • Phase Blend Ratio:

    • Setting this value to 1 makes the phase progression dependent on the distance to the weapon’s tip (the Head position). The closer the particle is to the tip, the closer its phase value is to 0. When the trail reaches its final shape, phase progression will switch to being controlled by the particle’s lifetime.

    • Setting this value to 0 makes the phase progression entirely dependent on the particle’s lifetime.

    • You can blend between these two behaviors by setting a value between 0 and 1.

  • Length Property:

    • If the phase is distance-based, this property defines the effective range. A smaller value will cause the phase to progress faster along the trail’s path.

We’ll explore how these values interact with curves in the next section to refine your trail’s appearance and behavior. Trail Phase

Trail Properties Operator

Trail Properties Here you can see a custom Get Trail Properties Operator that provides detailed control over the trail’s appearance and behavior.

Property Descriptions

  • Radius Offset: Increases the radius of the trail. A larger value results in a longer-reaching trail.

  • Base Radius Offset: Acts as an additional radius offset for individual trails within the same graph. This is useful when combining multiple trails, such as in the FireSlashTrail Prefab, where the flame trail appears outside the base fire trail. This property provides per-trail variation, while the general Radius Offset controls the overall graph.

  • Curvature Trail Curve: Defines the curvature of the Final Shape, controlling the bend of the trail along its path.

  • Trail Width: Sets the base width of the trail.

  • Base Width Scale: Similar to Base Radius Offset, this property introduces variance for individual trails by multiplying the base width.

  • Scale Trail Curve: Defines the Final Shape, controlling the width multiplier along the trail.

  • Scale Phase Curve: Controls how the width evolves during the phase transition.

  • Color Multi Phase Curve: Modifies color intensity and variation at different phases of the trail.

  • Alpha Phase Curve: Controls the transparency of the trail during the phase transition.

  • Alpha Trail Curve: Defines the Final Shape, controlling the opacity along the trail’s path.

Example Configurations

  • Default Positioning: By default, the weapon’s edge position matches the outer edge of the trail. Trail Position

  • Sharp and Transparent Ends: Using a mountain-like curve for Scale Trail Curve and Alpha Trail Curve creates sharp ends that gradually become transparent. Trail Scale Mountain Curve

  • Expanding Width with Animation: Setting a slope curve from 1-0 in Scale Phase Curve makes the trail grow in width throughout the animation and begin to fade after the swing ends. You can also notice that the Width Scale is made to not affect the radius. Trail Scale Phase

Feel free to experiment with these properties to discover unique visual effects. Adjusting curves, tweaking offsets, and blending different settings can lead to creative and unexpected results.

Next, we will explore the shader and its customization options.

Last updated on