render sprite trail

From Valve Developer Community
Jump to navigation Jump to search
Wikipedia - Letter.png
This article has multiple issues. Please help improve it or discuss these issues on the talk page. (Learn how and when to remove these template messages)
Underlinked - Logo.png
This article needs more Wikipedia icon links to other articles to help Wikipedia icon integrate it into the encyclopedia. Please help improve this article by adding links Wikipedia icon that are relevant to the context within the existing text.
January 2024
Render sprite trail
This render type renders the sprites as a trail based on their velocity. The length of the trail can be altered by the particles "trail length" property. The easiest way to think about this is the trail length is a unit of time. So if it were set to 1, the trail would stretch from the particles current position to where it was one second ago. These sprites cannot have an arbitrary rotation, but can be flipped on yaw and/or pitch using normal rotation initializers/operators.

Generic Operator Options

Generic Render Operator Visibility Options

Animation Rate [float]
Determines the framerate of the animation sequence if the material has one. By default, 1.0 will map to playing the entire sequence length over 1 second.
Length Fade In Time [float]
The length of time over which the trail will fade in. Trails with a fast initial movement speed may appear to have a trail that goes past where they spawned, fade in time can compensate for this.
max length [float]
The maximum length in units for the trail
min length [float]
The minimum length in units for the trail
constrain radius to length [bool]
Don't allow the radius of the particle to exceed its length. If turned off, you can choose to have wide/short trails.
ignore delta time
This is used for treating trails not as normal trails. Normally, the velocity, and thereby the framerate/delta time is considered for rendering (at 2x framerate a particle moves half as far per frame and this must be taken into account when rendering the length of the trail). By ignoring the delta time, the trail is a raw distance between the current position and the previous position, regardless of framerate. This can be used to manually set the particles current and previous positions to create explosions, spikes, fur, grass, etc. Generally speaking this is authored by setting the trail length to 1 and placing the XYZ and Previous XYZ of the particle by hand, with no "movement basic" operator. Note that locking to control points, hitboxes, and offsetting movement will still function normally without a movement basic operator as they don't attempt to apply force to a particle, but rather just move it current and previous position without applying acceleration or force. The trail length can be ramped over time to create various effects.
tail color and alpha scale factor
This allows the trail to be faded over its length. The particle's color and alpha will be multiplied by these numbers over the length of the trail allowing it to change color and alpha from one end to the other.