Contents5 sections
geofx runs on the hosted API: try it in the 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.tscngodot/hills_ground.gdshaderincgodot/hills_ground.gdgodot/hills_ground_demo.gdshader../hills_demo.tscngodot/hills_height.png.importgodot/hills_masks0.png.importgodot/hills_masks1.png.importgodot/hills_material_id.png.importgodot/hills_material_w0.png.importgodot/hills_material_w1.png.importgodot/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, 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.