Set emission_box_extents to half the building's size, because it is measured from the middle of the box. In our Godot 4.7 test, extents of 4 for a 4 m building spread the particles from -3.94 to 3.94 m, twice too wide; the script below, given the 4 m size, kept them between -1.96 and 1.96 m. It also sets amount from the floor area, so a 6 m building is as dense as a 2 m one instead of ten times thinner.

The code
Attach this script to your GPUParticles3D, keep its ParticleProcessMaterial, put the node at the middle of the building's base or roof and set size to the building's full width, a thin height band, and its depth. per_square_metre is how many particles are alive at once on each square metre.
extends GPUParticles3D
## Covers a building's footprint with fire, dust or smoke at the same density for any building size.
## Attach to your GPUParticles3D, put the node at the middle of the building's base and set "size".
@export var size := Vector3(4.0, 0.3, 4.0): ## full width, height and depth in metres
set(v):
size = v
fit()
@export var per_square_metre := 3.0: ## particles alive at once on each square metre
set(v):
per_square_metre = v
fit()
func _ready() -> void:
fit()
func fit() -> void:
var pm := process_material as ParticleProcessMaterial
if pm == null:
return
pm.emission_shape = ParticleProcessMaterial.EMISSION_SHAPE_BOX
pm.emission_box_extents = size * 0.5 # extents are half the size, measured from the middle
amount = maxi(1, roundi(per_square_metre * size.x * size.z))
What we measured
Particles that do not move, seen from straight above with an orthographic camera, so every one stays where it was emitted. We measured how far left and right they reached, and counted the lit pixels for the density. Two runs gave the same numbers.
emission_box_extents4 for a 4 m building: from -3.94 to 3.94 m, an 8 m wide patch.- The script with a size of 4: from -1.96 to 1.96 m.
amountleft at 12: 6.0 lit pixels per square metre on a 2 m footprint, 0.6 on a 6 m one.- The script with 3 per square metre: amount 12 on the 2 m footprint (6.0 per square metre) and 108 on the 6 m one (5.5 per square metre).
Why the density drops
amount is the number of particles alive at the same time, not a number per square metre. Spread the same 12 over a footprint 9 times bigger and each square metre gets about a ninth of them. The script multiplies per_square_metre by the width and the depth, so the fire looks the same on a hut and on a warehouse.
What to change
size: the y value is the height of the band the particles start in. Keep it thin for fire on a roof or dust at the base.per_square_metre: higher for thick smoke, lower for a few sparks.- The direction, speed and colors stay in your ParticleProcessMaterial. The script only touches the box and the amount.
Ready-made building effects to try it with: City Builder VFX Demo for Godot 4 has 3 presets, Scaffold Dust, Build Complete Gold and a retro PSX Building Fire, each a single scene you drop at the base of a building.
Tested in Godot 4.7 with the Compatibility renderer.
Ready-made: City Builder & Construction VFX has 31 presets, including foundation, upgrade, demolish, chimney smoke, coins, zones and 8 PSX versions.
More how-tos: Fire, smoke and explosions
- Fire that turns to smoke in a cone
- Bright fire with dark smoke
- Smoke particles leave a hard line on the ground
- Particles drawing in the wrong order
- Explosion effect in one burst
- 3D debris particles not rotating
- Particles all disappear at once
- Muzzle flash with a real light
- Glowing particles in Godot 4
- Glowing particles cast dark shadows
- Particles from the surface of a mesh, at runtime
- Fireworks without sub-emitters