Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Trails module reference

Explore properties on the Trails module, to configure trails on particles.
Read time 3 minutesLast updated 20 days ago

Add trails to a percentage of your particles using this module.

Properties

For some properties in this section, you can use different modes to set their value. For information on the modes you can use, refer to Vary Particle System properties over time.

Property:

Function:

ModeChoose how trails are generated for the Particle System.
- Particle mode creates an effect where each particle leaves a stationary trail in its path.
- Ribbon mode create a ribbon of trails connecting each particle based on its age.
RatioA value between 0 and 1, describing the proportion of particles that have a Trail assigned to them. Unity assigns trails randomly, so this value represents a probability.
LifetimeThe lifetime of each vertex in the Trail, expressed as a multiplier of the lifetime of the particle it belongs to. When each new vertex is added to the Trail, it disappears after it has been in existence longer than its total lifetime.
Minimum Vertex DistanceDefine the distance a particle must travel before its Trail receives a new vertex.
World SpaceWhen enabled, Trail vertices do not move relative to the Particle System’s GameObject, even if using Local Simulation Space. Instead, the Trail vertices are dropped in the world, and ignore any movement of the Particle System.
Die With ParticlesIf this box is checked, Trails vanish instantly when their particles die. If this box is not checked, the remaining Trail expires naturally based on its own remaining lifetime.
Ribbon CountChoose how many ribbons to render throughout the Particle System. A value of 1 creates a single ribbon connecting each particle. However, a value higher than 1 creates ribbons that connect every Nth particle. For example, when using a value of 2, there will be one ribbon connecting particles 1, 3, 5, and another ribbon connecting particles 2, 4, 6, and so on. The ordering of the particles is decided based on their age.
Split Sub Emitter RibbonsWhen enabled on a system that is being used as a sub-emitter, particles that were spawned from the same parent system particle share a ribbon.
Texture ModeChoose how textures are applied to Particle Trails.
- Stretch mode stretches the texture along the entire length of the trail.
- Tile repeats the texture every N units of distance. The repeat rate is controlled based on the Tiling parameters in the Material.
- Repeat per Segment mode repeats the texture along the trail, repeating at a rate of once per trail segment. The repeat rate is controlled based on the Tiling parameters in the Material.
- Distribute per Segment mode maps the texture once along the entire length of the trail, and assumes that all vertices are evenly spaced.
Size affects WidthIf enabled (the box is checked), the Trail width is multiplied by the particle size.
Size affects LifetimeIf enabled (the box is checked), the Trail lifetime is multiplied by the particle size.
Inherit Particle ColorIf enabled (the box is checked), the Trail color is modulated by the particle color.
Color over LifetimeA curve to control the color of the entire Trail over the lifetime of the particle it is attached to.
Width over TrailA curve to control the width of the Trail over its length.
Color over TrailA curve to control the color of the Trail over its length.
Generate Lighting DataEnable this (check the box), to build the Trail geometry with Normals and Tangents included. This allows them to use Materials that use the scene lighting, for example via the Standard Shader, or by using a custom shader.
Shadow BiasMove the shadows along the direction of the light. This removes shadowing artifacts caused by approximating volumes with billboarded trail geometry.

Additional resources