Use one GPUParticles3D with the emission shape set to Points and a texture that holds every spot, and set its visibility_aabb to cover all of them. In our Godot 4.7 test, 100 emitters of 8 particles took 100 draw calls. One emitter of 800 particles from the same 100 spots took 1 and drew about as many lit pixels. Without its visibility box it drew nothing: the default box is 8 m around the node, and the node was off screen.
The code
Add a GPUParticles3D, give it a ParticleProcessMaterial and a draw pass as usual, and attach this script. Then add Marker3D children wherever the effect should be: in sunbeams, over a swamp, along a path. The script reads them once in _ready().
extends GPUParticles3D
## One emitter for ambient particles in many places at once: dust in sunbeams, pollen, embers, fireflies.
## Give it your process_material (a ParticleProcessMaterial) and draw pass as usual, then add Marker3D children where the effect should be.
## It emits from every marker, and it is one draw call however many markers there are.
@export var margin := 2.0 ## how far particles drift from their marker, in metres
func _ready() -> void:
var pts: Array[Vector3] = []
for c in get_children():
if c is Marker3D:
pts.append(c.position)
if pts.is_empty():
return
var img := Image.create(pts.size(), 1, false, Image.FORMAT_RGBF)
for i in pts.size():
img.set_pixel(i, 0, Color(pts[i].x, pts[i].y, pts[i].z)) # one pixel per marker = its position
var m := (process_material as ParticleProcessMaterial).duplicate() as ParticleProcessMaterial
m.emission_shape = ParticleProcessMaterial.EMISSION_SHAPE_POINTS
m.emission_point_texture = ImageTexture.create_from_image(img)
m.emission_point_count = pts.size()
process_material = m
# the default box is 8 m around this node: without this, looking away from the node hides every particle
var box := AABB(pts[0], Vector3.ZERO)
for p in pts:
box = box.expand(p)
visibility_aabb = box.grow(margin)
What we measured
100 spots on a grid, 2 m apart, 20 to 38 m from the node. The camera looked at the spots, not at the node. Draw calls from the renderer's monitor, lit pixels averaged over 10 frames, two runs.
- Nothing in the scene: 0 draw calls.
- 100 GPUParticles3D of 8 particles each, sharing one material and mesh: 100 draw calls, 1018 and 1040 lit pixels.
- One emitter of 800 particles with emission points and the default
visibility_aabb(from -4, -4, -4, size 8): 0 draw calls, 0 lit pixels. With the camera pulled back so that the node was on screen as well, 66 and 70 lit pixels from much further away: the particles were there, the emitter was only culled. - The script: 1 draw call, 1006 and 1037 lit pixels. Its box ran from 18, -1.5, -20 with a size of 22 x 4 x 22.
Why the single emitter disappears
Godot decides whether to draw an emitter from its visibility_aabb, a box around the node, not from where the particles really are. Emission points far from the node put the particles outside that box, and when the box is off screen the whole emitter is skipped. Setting the box from the spots, plus a margin for how far the particles drift, fixes it.
What to change
margin: raise it for particles that travel far from their spot, such as falling leaves.amountis shared by all the spots, so 800 particles over 100 markers is about 8 at each.- Every spot uses the same material, so use one emitter per kind of effect: one for dust, one for fireflies.
Painting the spots instead of placing markers: VFX Painter Kit for Godot 4 lets you brush ambient particles onto your level in the editor (click and drag, Shift to erase, Undo). Each layer is one GPUParticles3D, one draw call. 12 presets: fireflies, dust motes, ground mist, falling leaves, magic sparkles, embers, snowfall, bubbles, pollen, steam vents, holy motes and drips.
Tested in Godot 4.7 with the Compatibility renderer.
Ready-made: VFX Painter Kit for Godot 4 lets you paint ambient particles onto your level in the editor, with each layer as one emitter and one draw call, and 12 presets from fireflies to ground mist.
More how-tos for VFX Painter Kit for Godot 4: Place brush dots at the same spacing however fast the mouse moves · Nodes your editor tool adds that stay in the scene
More how-tos: Auras, rings, beams and weather
- Light shaft cards without the bright edge-on line
- Stretch a bolt sprite from the caster to the target
- Space lights, posts or coins evenly along a Path3D
- Stop a big spinning texture from looking grainy when it is drawn small
- God rays without volumetric fog
- Dark horror fog that works in Compatibility
- Magic aura particles that circle a character
- Charge-up particles that fly in to the middle
- Particle ring standing up instead of flat
- 2D particles from a sprite's shape
- A glowing circle on the ground
- A loot beam that never goes flat
- Chain lightning between enemies
- A tower's attack range ring
- Enemy vision cone with a "!" when it spots you
- Rain that follows the camera
- Rain falling through the roof
- Snow particles not falling
- orbit_velocity not working in 3D: use tangential_accel
- Rain falls through the player
- Snow that stays on roofs
- Emit particles along a Path3D
- Keep a buff aura on until the last buff really runs out
- Spin a magic circle forever at the same speed
- Space flying swords, shields or orbs evenly around a character for any count
- Text around a circle with even gaps