godotengine / godotengine/godot
GPUParticles3D - changing the mesh from a non-trail-mesh to a trail-mesh makes particles disappear
- Dominant language
- C++
- Stars
- 117k
- Forks
- 26.8k
- PR merge metrics
- PR metrics pending
Description
### Tested versions
v4.2.2.stable.mono.official [15073afe3]
### System information
Godot v4.2.2.stable.mono - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4080 (NVIDIA; 32.0.15.5599) - AMD Ryzen 9 7950X3D 16-Core Processor (32 Threads)
### Issue description
For a GPUParticles3D if you have trails enabled and change the mesh in a draw pass from a non-trail mesh (e.g. Sphere) to a trail mesh, the particles stop rendering. To fix this you need to either change the trail length or disable and re-enable trails. This can be very confusing for someone new to particle systems as the particle system seems to suddenly stop working.
https://github.com/user-attachments/assets/3ab9711e-b9c4-4d29-965d-99c038924cc2
### Steps to reproduce
- Create a simple GPUParticles3D, set up some spawning pattern (I used ring, but it doesn't really matter).
- Set a sphere as the only draw pass.
- Enable trails
- Change the sphere to some trail mesh
The particles now disappear but instead the particle system should render using the new trail mesh.
### Minimal reproduction project (MRP)
N/A
Contributor guide
Research direction
Start at the GPUParticles3D trail and draw-pass setup, then reproduce the steps using a sphere followed by a trail mesh with trails enabled. Trace why changing the mesh leaves particles invisible without changing trail length or toggling trails. Done means the new trail mesh renders immediately after the draw-pass change.
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
- 38/100