0 votes

I need to gain access to all the particles of a Particles3D system so as to change their transform (translation, rotation, scale) and their material properties (colour, texture, animation frame etc.) via code. Is this possible in Godot? What methods do I have to use? Any info or tutorials are greatly appreciated.

asked Dec 15, 2019 in Engine by johnygames (1,532 points)

1 Answer

+1 vote
Best answer

I think you can do that with CPUParticles due to them be simulated on the CPU. That makes them slower to render though.
If you use Particles, those run entirely on the GPU so you have to use a particles shader to control their simulation.

There is a tutorial about controlling particles in the doc: https://docs.godotengine.org/en/3.1/tutorials/3d/vertex_animation/controlling_thousands_of_fish.html

answered Dec 16, 2019 by Zylann (22,045 points)
selected Dec 16, 2019 by johnygames

I was hoping I could avoid using shaders. Are you sure there is no other way to access Particles programmatically?

Shaders are programs. They just run on the graphics card, so some communication via graphics primitives are being used.

But if you mean to set particles position from a script, I believe CPUParticles is meant for that.

Thank you, I'll give it a try. It's just that I can't wrap my head around the shader language.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.