godotengine / godot-proposals

Godot Improvement Proposals (GIPs)
MIT License
1.17k stars 98 forks source link

Add a way to separate multiple copies of a GPUParticles3D node each with an accompanying GPUParticlesAttractor3D or GPUParticlesCollider3D #10808

Open TheDarkSealOfChonk opened 2 months ago

TheDarkSealOfChonk commented 2 months ago

Describe the project you are working on

a game about insane bald wizardry

Describe the problem or limitation you are having in your project

it is impossible to separate more copies of a GPUParticles3D node each with an accompanying GPUParticlesAttractor3D or GPUParticlesCollider3D than there are cull mask toggles.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

make it so that particle attractors and colliders only affect sibling GPUParticles3D nodes.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

make it so that particle attractors and colliders only affect sibling GPUParticles3D nodes.

If this enhancement will not be used often, can it be worked around with a few lines of script?

it can not be worked around as far as i know.

Is there a reason why this should be core and not an add-on in the asset library?

it is a plain and simple lack that makes many simple things either very difficult or impossible.

Calinou commented 2 months ago

This can already be achieved using the visibility layer system. In the inspector, you can set a mask on each attractor and collision node so that it only affects certain particles according to their visibility layers. For instance, a collision node with its mask set to layers 1 and 2 will make it so only particles on visual layers 1 or 2 will collide with it.

However, there's a bug that makes these properties not work: https://github.com/godotengine/godot/issues/61014 It's being addressed by https://github.com/godotengine/godot/pull/93291.

Relying on the scene tree is not feasible as particle simulation occurs entirely on the GPU, and the GPU is not aware of the scene tree. (Besides, it's possible to set up particle simulations without using the scene tree in the first place.)

TheDarkSealOfChonk commented 1 month ago

using visibility layers would limit me to 32 spells active at once