[ad_1]
There are some major changes coming to particle systems in Godot 4.x starting with the Godot 4.2 beta. There has been a complete refactor of the GPUParticle3D class, with new features added and a clean up of the entire system enabling future updates. At the same time, it has become time to retire the fallback CPUParticle3D class.
Details from the Godot Engine blog:
New GPUParticle features:
amount_ratio
: from 0 to 1, a percentage of particles compared to the amount that will be emitted.interp_to_end
: from 0 to 1, allows to interpolate all particles from the same node simultaneously towards the end of their lifetime.
New Particle Process Material features:
Damping changes include:
damping_as_friction
: flag that changes the behavior of damping from a constant deceleration to a deceleration based on speed.Emission changes include:
emission_shape_offset
: an offset for the emission shape, in the node’s local space.emission_shape_scale
: the scale of the emission shape, in the node’s local space.inherit_velocity_ratio
: a percentage of the emitter’s velocity to inherit on spawn.Velocity changes include:
velocity_pivot
: a pivot point used for calculating radial and orbital velocity.directional_velocity
: velocity along an axis; requires an XYZ curve.orbit_velocity
: orbit velocity can now be used without togglingdisable_z
; requires an XYZ curve; axes are in the node’s local space.radial_velocity
: velocity away or towards the velocity pivot.velocity_limit
: a curve defining a hard limit for the particles’ velocity following their lifetime.scale_over_velocity
: a curve that allows to scale particles on a given axis.On top of that, an optional separation between alpha over lifetime and emission over lifetime was added. Note that emission over lifetime just multiplies the
COLOR
value of the particle by a given value. This needs to be properly read in the display shader.
And finally, the future of CPU Particles:
CPU particles have been maintained alongside GPU particles for a long time, but it’s becoming harder and harder to keep feature parity, especially after big changes such as the ones described above. CPU particles were added at the time of the GLES2 renderer in Godot 3, which did not have the capability to support GPU particles. Godot 4 has Vulkan and GLES3 renderers, both of which support GPU particles. This makes it hard to justify maintaining four separate nodes in two different languages (GLSL and C++).
Because of that, we now see the
CPUParticles
as a lower-end, simpler alternative to GPU particles, instead of a CPU-based, 1-to-1 fallback option. It’s likely that no more features will be added toCPUParticles
, though we still welcome PRs that bring them to parity with the GPU ones. We recommend migrating your effects toGPUParticles
. To help you with the migration, a converter from CPU particles to a GPU equivalent was added.From Godot 4.2 onwards, new features for
CPUParticles
will not be accepted unless they have a counterpart inGPUParticles
. However, contributions to bring CPU particles to feature parity are welcome.
Key Links
State of particles and future updates [Godot Blog]
Godot VFX and Tech Art Wishlist
onetupthree VFX YouTube Tutorial
You can learn more about using particle systems in Godot 4.x in our tutorial in the video below, as well as details of the new features in Godot 4.2 beta and in the future releases of Godot.
[ad_2]