-
-
Notifications
You must be signed in to change notification settings - Fork 103
Description
See also #2744 which is for light nodes and #2784 for reflection probes.
Describe the project you are working on
The Godot editor 🙂
Describe the problem or limitation you are having in your project
Particles currently don't feature a built-in LOD system.
When you use many particles nodes (e.g. for torches in a room), you don't want those to emit particles if the player is too far away to see the torches. This is especially true with small particles like sparks.
For the record, the Decal node (new in 4.0) features a built-in LOD system with configurable distance and fade distance.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Add emission range and fade distance properties to GPUParticles3D and CPUParticles3D.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
If we find out a way to allow changing the number of particles emitted without resetting emission, this would likely be the ideal way to do LOD for particles as it will likely look the most seamless in action.
Alterntively, we can:
- Reduce the opacity of distant particles progressively. This can be more suited for particle systems that only emit a few large particles, but it's arguably less suited for particle systems that emit hundreds of particles or more.
- Disable emission for distant particles entirely (without affecting the public
emittingproperty, so that it doesn't interfere with toggling it from a script). This is better than toggling the visibility (which causes visible pop-ins), but due to the "all or nothing" nature of toggling emission, it's still worse than the proposed alternatives.
If this enhancement will not be used often, can it be worked around with a few lines of script?
Kind of. It's possible to toggle particle emission in a script. The Godot LOD add-on I wrote provides such a feature.
Is there a reason why this should be core and not an add-on in the asset library?
Implementing this LOD system in C++ would lead to better performance when using large amounts of particle nodes (hundreds or more).