GPUTrail is a GPU-based trail plugin for Godot 4, offering an efficient alternative to CPU-based trails for creating ribbon trail effects in your games and applications.
- GPU-accelerated trail rendering for improved performance
- Customizable trail length, texture, and color
- Support for color ramps and width curves
- Options for texture orientation and alpha channel handling
- Billboard mode for camera-facing trails
- Dewiggle and clip overlaps features for improved trail appearance
- Clone or download this repository
- Copy the
addons/GPUTrail
folder into your Godot project'saddons
folder - Enable the plugin in your project settings: Project -> Project Settings -> Plugins -> GPUTrail
- Add a new
GPUTrail3D
node to your scene - Customize the trail properties in the Inspector panel
- Attach the
GPUTrail3D
node to the object you want to trail
length
: Number of steps in the trailtexture
: Main texture of the trailcolor_ramp
: Color gradient along the trail's lengthcurve
: Width modulation along the trail's lengthvertical_texture
: Adjust texture orientationuse_red_as_alpha
: Use the red channel of the texture as alphabillboard
: Make the trail face the camera (experimental)dewiggle
: Improve texture mapping to the trailclip_overlaps
: Prevent trail self-intersectionissnap_to_transform
: Snap the trail start to the node's position, and regardless of the particles own framerate
var trail = GPUTrail3D.new()
trail.length = 100
trail.texture = preload("res://trail_texture.png")
add_child(trail)
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- Tutorial by Le Lu: YouTube Video
- Add flipbook support
- Hide the actual GPUParticles3D node
- Restructure code, use enums for flags
- Add more polygons, make trail smoother
- Add an acceleration parameter
- Port to Godot 3.5
- Port to 2D
- Allow custom material