Web exports use the Compatibility renderer. In it, four particle features we tested do nothing: sub-emitters, trails, SDF colliders and emit_particle(). Godot printed a warning for each and kept running. Each one has a replacement that works there, listed below, and the script on this page finds the first three in a running scene.
What does not work, and what to use
- Sub-emitters: the main particles showed, the sub-emitter's burst never did. Fly each rocket from a script and start a one-shot burst where it stops: fireworks without sub-emitters.
- Trails (Trail Enabled with a RibbonTrailMesh or TubeTrailMesh): Godot printed a warning as soon as we turned them on. Draw each particle as a thin quad that points along its velocity: particle trails in Compatibility.
- SDF colliders (GPUParticlesCollisionSDF3D): 180 points went under the ground in both runs. A height field collider works and takes the shape of the ground: particles on terrain. For a flat floor, a collision box works too: particles fall through the floor.
emit_particle(): 0 lit pixels after three calls. Keep a few one-shot emitters andrestart()the one used longest ago: hit sparks from an emitter pool.
2D particles in a web export
We ran the same checks on GPUParticles2D with the Compatibility renderer:
- Trails: worse than in 3D. With trails on, the GPUParticles2D drew nothing at all, not even the particles. Use streak textures turned along the velocity: GPUParticles2D trails in a web export.
- Sub-emitters: the rocket flew, but its burst never showed, 0 points of the burst color over 10 frames. Godot printed
Sub-emitter modes other than SUB_EMITTER_DISABLED are not supported in the Compatibility renderer.Start the burst from a script instead, as in fireworks without sub-emitters. emit_particle(): Godot printedThe Compatibility renderer does not support manually emitting particles.Keep a few one-shot emitters instead: hit sparks from an emitter pool.- Collision works, but only with a LightOccluder2D, and with collision on and no such occluder the particles did not show at all: GPUParticles2D collision.
The script below checks 3D particles only.
A script that finds them
Add this to your main scene as a Node. One frame after the scene starts, it goes through the whole tree and prints a warning for each emitter with a sub-emitter or trails, and for each SDF collider, then one line with the renderer it is running on. It cannot see emit_particle() calls in your scripts: search your project for those.
extends Node
## Lists the particles in the running scene that use features the Compatibility
## renderer (the one web exports use) skips. Add it to your main scene, run, read Output.
func _ready() -> void:
await get_tree().process_frame # let the rest of the scene finish _ready()
var problems := check(get_tree().root)
for line in problems:
push_warning(line)
print("Particle check, renderer %s: %d problem(s)" % [RenderingServer.get_current_rendering_method(), problems.size()])
func check(root: Node) -> Array[String]:
var out: Array[String] = []
for n in root.find_children("*", "", true, false):
if n is GPUParticles3D:
var m := n.process_material as ParticleProcessMaterial
if m and m.sub_emitter_mode != ParticleProcessMaterial.SUB_EMITTER_DISABLED:
out.append("%s: sub-emitter. Nothing bursts in Compatibility." % n.get_path())
if n.trail_enabled:
out.append("%s: trails. Not drawn in Compatibility." % n.get_path())
elif n is GPUParticlesCollisionSDF3D:
out.append("%s: SDF collider. Not available in Compatibility, use a height field." % n.get_path())
return out
What we measured
We built a scene with an emitter set to burst into a sub-emitter at the end, an emitter with trails on, an SDF collider, a plain emitter and a height field collider, and ran it with the Compatibility renderer.
- The script listed 3 problems: the rocket emitter (sub-emitter), the sparks emitter (trails) and the SDF collider.
- The plain emitter, the burst emitter the rocket points to and the height field were not listed.
RenderingServer.get_current_rendering_method()returned gl_compatibility.
What to change
- The text of each warning, to point at your own notes.
- More checks in the same loop, for example a limit on
amount.
Particles that do not show in any renderer: GPUParticles3D not showing. In 2D, turning on trails hid the particles completely: GPUParticles2D trails in a web export.
Tested in Godot 4.7 with the Compatibility renderer.
More how-tos: When particles do not show up
- GPUParticles3D not showing in Godot 4
- GPUParticles2D not showing in Godot 4
- GPUParticles2D collision: fall through or vanish
- Particles look black or dark
- Particles only fall down or fly sideways
- Particles fall through the floor
- Particles on terrain and uneven ground
- Flipbook animation on GPUParticles3D
- GPUParticles2D sprite sheet not animating
- Pixel art particles look blurry
- Particle trails in the Compatibility renderer
- GPUParticles2D trails not working
- Particle color over lifetime not working
- Particle texture shows a square box
- Custom particle shader ignores the color ramp
- Particle scale curve not working
- Additive particles invisible on a white background
- Scale a 3D particle effect evenly
- Particles the same size on screen at any distance