---
title: "Godot effect pool"
description: "Draw many copies of one compiled effect in one Godot 4 draw call. Each has its own start time, size and colour, with view blending and near detail options."
canonical: https://appliedmanifold.com/docs/pyrofx/godot-pool/
site: "Applied Manifold: The spatial compute cloud for 3D reality"
---

[Home](https://appliedmanifold.com/) / [Docs](https://appliedmanifold.com/docs/) / [pyrofx](https://appliedmanifold.com/docs/pyrofx/) / Godot effect pool

DOCS // pyrofx

# Godot effect pool

Draw many copies of one compiled effect in one draw call. Each copy has its own start time, size, colour, lean and mirror.

## Write the pool files

```
spatial-compiler wire effect --set node=pool
```

The compiler reads the layout and sheets, then writes `<name>_pool.gdshader` and `<name>_pool.gd` inside `godot/`. Run wire again after recompiling the effect.

## Light smoke in Godot

The pool and the single sheet read the same six directional light channels. A pool can play a sequence across several sheets. To soften the base of a plume, set the height in metres over which it fades in.

```
spatial-compiler wire effect --set node=pool --set foot_fade_m=0.5
```

For Godot scene captures, choose `light=high_sun`, `low_sun`, `moon` or `moon_blue`. The capture light can change between shots of the same compile.

## Pool settings

| Setting | Example | Meaning |
| --- | --- | --- |
| `node` | `--set node=pool` | Select the pool drawer. |
| `view` | `--set view=main,high` | Blend side and high views by camera pitch. Default: first view. |
| `near` | `--set near=smoke_near` | Draw a finer compile with matching pitch, life and loop near the camera. With then, use first,second folders. |
| `then` | `--set then=smoke` | Hand over to a second clip. A loop cannot come first; both clips need the same pitch and yaw. |
| `name` | `--set name=impact_pool` | File stem, up to 64 letters, digits or underscores. Default: first effect name. |
| `face` | `--set face=upright` | upright or camera. Default: upright within 20 degrees of level; otherwise camera. |
| `depth` | `--set depth=pixel` | pixel or board. Default: pixel at pitches of at least 20 degrees with depth; otherwise board. pixel requires a depth sheet. |
| `mipmaps` | `--set mipmaps=true` | true or false. Default: true. Auxiliary sheets never use mipmaps. |
| `soft_m` | `--set soft_m=0.5` | Fade into scenery over this distance in metres. Default: 4% of the longer board side; 0 gives a hard cut. |

`--scene preview.tscn` also writes a preview scene inside the Godot project.

```
spatial-compiler wire fireball --set node=pool --set then=smoke --set view=main,high --set near=fireball_near,smoke_near --set name=blast --set mipmaps=true
```

## Start and manage copies

The script extends `MultiMeshInstance3D`. Set its `sun`, then call `emit(ground_point, wind_top, size, colour, seed_01, start_s)`. Only the ground point is required. Points are in node space; move the node without scaling it.

The returned slot can be changed with `set_instance`, stopped with `clear` or faded with `fade_out`. Copies use absolute linear smoke colour; `dust_colour` controls dust separately. Pool `density` controls opacity.

With a depth sheet, pixel depth hides smoke behind scenery pixel by pixel, exact from the compiled pitch over level ground.

## BC7 sheets

Godot imports the 8-bit light, opacity, flame and dust sheets as BC7 on desktop. Auxiliary motion and depth sheets and EXR stay uncompressed.

## Questions

### What files does the pool drawer wiring command create for Godot?

The compiler reads the layout and sheets, then writes a pool shader and a pool script inside the godot folder.

### How do you spawn and control effect copies in a Godot pool?

The pool script extends MultiMeshInstance3D, where you set the sun and call emit with a ground point to place and manage instances.

### How does Godot import the texture sheets used by a pyrofx pool?

Godot imports 8 bit light, opacity, flame and dust sheets as BC7 on desktop while auxiliary motion, depth and EXR sheets stay uncompressed.
