---
title: "geofx in Godot 4"
description: "geofx wire writes a shader include, script and lossless import files for Godot 4. Inspect the hills output list, map sampling functions and wire settings."
canonical: https://appliedmanifold.com/docs/ground/godot/
site: "Applied Manifold: The spatial compute cloud for 3D reality"
---

[Home](https://appliedmanifold.com/) / [Docs](https://appliedmanifold.com/docs/) / [geofx](https://appliedmanifold.com/docs/ground/) / geofx in Godot 4

DOCS // geofx

# geofx in Godot 4 Available

geofx wire writes a shader include, a script and lossless import files for Godot 4. These are outputs from our compiled hills example.

geofx runs on the hosted API: try it in the [Playground](https://appliedmanifold.com/playground/).

## Generated Godot files

The hills compile folder sits inside the Godot project. The compiler reads that folder and writes only the features requested. With `--scene` it also writes a demo scene.

```
spatial-compiler wire hills --scene ground_demo.tscn
```

-   `godot/hills_ground.gdshaderinc`
-   `godot/hills_ground.gd`
-   `godot/hills_ground_demo.gdshader`
-   `../hills_demo.tscn`
-   `godot/hills_height.png.import`
-   `godot/hills_masks0.png.import`
-   `godot/hills_masks1.png.import`
-   `godot/hills_material_id.png.import`
-   `godot/hills_material_w0.png.import`
-   `godot/hills_material_w1.png.import`
-   `godot/hills_normal.png.import`

## Read the maps

`hills_ground.gdshaderinc` defines `geo_height`, `geo_normal`, `geo_weights` / `geo_material`, `geo_masks` and `geo_wetness` with `geo_rain`, for the features requested.

`hills_ground.gd` loads the 16-bit height and provides `apply_to`, `height_sample`, `height_at`, `material_at`, `wetness_at` and `set_rain`. Lossless import files preserve the maps.

## Wire settings

| Setting (`--set`) | Values | Default |
| --- | --- | --- |
| `target` | a target id | godot |
| `features` | list of height, normal, materials, masks, wetness, stamps | every one the bake has |
| `height` | vertex, fragment, none | vertex |
| `name` | letters, digits, \_ | the bake's name |
| `max_samples` | integer, 0 for none | 0 |
| `max_texture_mb` | number, 0 for none | 0 |

## Hills wire report

### The whole wire report of hills (0 warnings, 0 errors)

[Download the full JSON report](https://appliedmanifold.com/compiled/hills/wire-report.json), including every metric, warning and error. Local paths are reduced to file names.

## Questions

### Which files does the geofx Godot wire command generate?

The wire command writes a shader include, a GDScript helper, a demo shader, lossless PNG import files and an optional demo scene.

### What helper functions does hills\_ground.gd provide in Godot?

The script loads the 16 bit heightmap and exposes apply\_to, height\_sample, height\_at, material\_at, wetness\_at and set\_rain functions.

### How do you limit which geofx features are wired into Godot?

Pass a features list to wire settings choosing from height, normal, materials, masks, wetness and stamps instead of all baked outputs.
