godotengine / godotengine/godot
GPUParticles with trails enabled have inconsistent rendering for particles at high speed and big lifetime
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
- Reproducible in 4.2.2 stable mono
### System information
Godot v4.2.2.stable.mono - Windows 10.0.22621 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4070 SUPER (NVIDIA; 31.0.15.5212) - AMD Ryzen 7 3800X 8-Core Processor (16 Threads)
### Issue description
https://github.com/godotengine/godot/assets/28916549/0eab1d86-fc5a-44a5-955c-72bfece537eb
When using GPUParticles with trails enabled, if a particle has a high initial velocity, particles starting position does not stay in place, and flickers between frames, causing the effect from the above
I expect particles starting position to remain still unless trail's lifetime ends.
I also experimented with speed scale and got very weird flickering like in the example below:
https://github.com/godotengine/godot/assets/28916549/06a81aac-4a68-44c2-87fd-bf3720301d1f
### Steps to reproduce
- Create a GPUParticle3D
- Add new ParticleProcessMaterial
- Enable Trails
- In ParticleProcessMaterial->Spawn->Velocity set initial velocity min to something like 150
- In Draw Passes add new RibbonTrailMesh or TubeTrailMesh
- In Pass settings create a new Material
- In Material->Transform enable Use Particle Trails
### Minimal reproduction project (MRP)
[effects_bug.zip](https://github.com/user-attachments/files/16145952/effects_bug.zip)
Contributor guide
Research direction
Start with the attached effects_bug.zip minimal reproduction project and follow the listed GPUParticles3D trail setup using a high initial velocity. Compare the particle start position and speed-scale behavior across frames; the issue is complete when the trail rendering remains stable without flickering or moving its starting position unexpectedly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics, game-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100