How do I hook up Anim Trails?

Particles and Cascade New: Implemented Anim Trails type data for creating trails vfx.

Now that we have 4.2 can someone please show us how to hook up anim trails ? Do they not show up in cascade’s viewport, since there is not skeletal mesh in there ?

what are the requirements for this to be visible ?

I’ve looked at how it was done in, UE3, but there’s little to no information on that case as well.

Hi DCrosby,

Here is some information on Anim Trails that may be helpful!

Can you verify that this is part of 4.2 ? Because I can’t get it to work, or do I have to get the code and merge it in ?

Hi DCrosby,

According to our release notes: 4.2 Release Notes - Announcements - Epic Developer Community Forums , Anim Trails have been implemented into the engine and can be found in the cascade editor.

Hi DCrosby -

You cannot view Anim Trails directly in Cascade but you can view them in Persona after you setup an AnimNotify event connected to the particle system in one of your animations.

Thank You

Anim Trails

Anim Trail emitters allow you to leave trails behind moving objects in a scene.
They do this by sampling the positions of two sockets on a skeletal mesh each tick and stitching triangles between the sockets, down the length of the trail.

To use an anim trail emitter you must do the following;

  1.   Create a particle system that contains an emitter with AnimTrail Type data. This is described in further detail below.
    
  2.   In the animation editor, add an AnimNotifyState of type “Trail”. Setup for this is described below.
    

Setting up the particle system

Create a particle system as usual and add a new emitter with type data AnimTrail to it.
Several properties of the type data module will affect how the trail behaves.

Below is what you should see in cascade when setting up the system. Note, you will see nothing in the preview window as trails must be used in conjunction with a skeletal mesh component as explained later.

Dead Trails On Deactivate: If true, all trails are marked as dead when the system is deactivated as opposed to allowing the particles to expire naturally. This should generally be left as true.
Enable Previous Tangent Recalculation: If true, recalculates the previous tangent when a new particle is spawned. Makes the system more expensive but better looking as tangents more accurately match the trails curve.
Tangent Recalculation Every Frame: If true, recalculates tangents every frame. Slower but allows the trail particles to use velocity and acceleration etc.
Tiling Distance: The estimated distance in world units the trail has to travel before the 2nd UV set tiles. If 0.0, the 2nd UV set will not tile.

Tessellation Parameters
Tessellation is the process of subdividing geometry into smaller segments. The trails are approximating a curved surface with triangles so we tessellate the trails based on following options so that they fit the curve more accurately and thus are smoother and more aesthetically pleasing.
However, the more tessellated a trail is, the more expensive it is.
Distance Tessellation Step Size: The (approx.) distance in world units that the trail must be to warrant another tessellation point.
Tangent Tessellation Step Size: The (approx.) angle difference in degrees that the tangent must change from on particle to another to warrant another tessellation point. This allows you to ensure that any sharp turns in the trail are nice and smooth.
Width Tessellation Step Size: The (approx.) world unit change in the width of the trail that warrants an additional tessellation point.

For my example system I also removed the initial velocity module and set a simple, transparent red material.

Setting Up the AnimNotify

Now that we have a particle system, we must use it with an AnimNotify.
Open the animation editor, add new timeline under the Notifies section and right click to bring up the menu. The trails notify is under AnimNotifyState->Trail.

First Socket Name: This is the name of the first Bone/Socket defining the trail.
Second Socket Name: This is the name of the second Bone/Socket defining the trail.
PSTemplate: This is the particle system containing the anim trail that was described above.

The above properties are required but the below are optional. They allow you to alter the width of the trail during the animation. You could also attach the trail to sockets that move as you need but this may not be ideal.
This method is based on providing a width scale value. A width scale of 1.0 keep the trail the same width, 0.0 will cause a trail of zero width. The
Width Scale Curve: The width value comes from a curve sampled each tick. This property is the name of that Curve. See below for details on creating that curve.
Width Scale Mode: This alters the way width is applied. The pictures below show how this works. The examples shows a Sine like curve going from 0 to 1 in the middle and back to 0 again.

Sorry this took me so long to answer, I hope this helps you out!

Excellent comprehensive response, should make a copy-pasta in the documentation

How do I create and assign the Width Scale Curve ?

Finally figured it out. Curves can be created with the tool just below the notify tracks. Somehow I never noticed it.

Okay, so Zak’s tutorial on anim trails is completely inaccurate now which is why following that tutorial resulted in nothing. Would be nice if that could be removed from the official UE4 channel or updated. Thanks for the updated info Rye