Particles
particlesCreate and edit GPU/CPU 2D/3D effects like fire, smoke, and sparks using tuned presets in Godot scenes.
Instructions
Particle effects (GPU/CPU, 2D/3D) from tuned presets — fire, smoke, sparks, explosion, dust, rain, snow, magic, hit, trail, confetti, bubbles — with color gradients, size curves, velocities and emission shapes already set, plus friendly editing of the process material. Undoable.
Actions:
presets: {} list presets with descriptions.
create: {preset?, parent?='.', name?, type?: gpu_2d|cpu_2d|gpu_3d|cpu_3d (default gpu, 2D/3D from the parent), position?, color? (tint the preset), size? (2D px / 3D meters), amount?, lifetime?, one_shot?, emitting?, explosiveness?, preprocess?, local_coords?, additive?, texture? (res:// image or soft|spark|square|streak|ring), process?: {ParticleProcessMaterial props}, props?: {node props}} add a particles node. Presets are tuned in 2D pixels and converted to meters for 3D. One-shot presets (explosion, hit, confetti) fire when the scene starts; call restart() in code to fire again.
set: {path, process?: {...}, props?: {...}, preset? (re-apply a preset), color?, amount?, lifetime?, one_shot?, emitting?, explosiveness?, preprocess?, local_coords?, speed_scale?} edit a particles node. Works for GPU (edits the process material) and CPU particles (same names; scale -> scale_amount mapped). Visibility bounds grow to fit faster/longer-lived particles.
get: {path} node settings and process values (gradients/curves as point lists).
restart: {path} restart emission (previews one-shot effects in the editor).
convert: {path, to: cpu|gpu} convert between GPUParticles and CPUParticles keeping settings (CPU has no turbulence/collision).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | convert: 'cpu' or 'gpu'. | |
| name | No | Node name (default '<Preset>Particles'). | |
| path | No | Particles node path (a parent with exactly one particles child also works). | |
| size | No | Particle size of the preset: pixels in 2D (process.scale is relative to the texture size), meters in 3D. | |
| type | No | gpu_2d | cpu_2d | gpu_3d | cpu_3d (also 'gpu'/'cpu'/'2d'/'3d'). | |
| color | No | Tint for the preset's color gradient, e.g. '#40ff80': every stop takes this hue, keeping its brightness, relative saturation and alpha. | |
| props | No | Property map. Values are coerced to the property type: numbers, [x,y], 'Vector2(1,2)', '#ff8800', 'res://file', {"type":"RectangleShape2D","size":[32,32]} for new resources, enum names as strings. | |
| scene | No | res:// scene to operate on; opened in the editor if needed. Defaults to the currently edited scene. | |
| action | Yes | What to do. See the tool description for each action's parameters. | |
| amount | No | Number of particles. | |
| parent | No | Parent node for create (default: scene root). | |
| preset | No | fire | smoke | sparks | explosion | dust | rain | snow | magic | hit | trail | confetti | bubbles | |
| process | No | ParticleProcessMaterial values: ranges as [min, max] (initial_velocity, scale, angle, angular_velocity, damping, hue_variation, orbit_velocity...), direction [x,y(,z)], gravity [x,y(,z)], spread, color '#hex', color_ramp: ['#fff', '#f000'] or [[offset, color], ...], scale_curve: [1, 0] or [[t, v], ...], emission: {shape: point|sphere|sphere_surface|box|ring, radius?, extents?, inner_radius?, height?}, turbulence_enabled... | |
| texture | No | res:// texture, or a generated one: soft | spark | square | streak | ring. | |
| additive | No | Additive blending (glow). Presets like fire/sparks/magic default to true. | |
| emitting | No | Whether it is emitting. | |
| lifetime | No | Seconds each particle lives. | |
| one_shot | No | Emit a single burst. | |
| position | No | [x, y] or [x, y, z]. | |
| preprocess | No | Seconds to pre-simulate (so rain/snow already fill the screen). | |
| speed_scale | No | Simulation speed multiplier. | |
| local_coords | No | Particles move with the node (true) or stay in world space (false, good for trails). | |
| explosiveness | No | 0 = steady stream, 1 = all at once. |