← Pixel Dreamer Studio

Particles not working in a web export

Four particle features do nothing in the Compatibility renderer. Godot only prints a warning.

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

2D particles in a web export

We ran the same checks on GPUParticles2D with the Compatibility renderer:

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.

What to change

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