# Infinigen nature trial

An isolated, actual procedural-generation test for Augustinus Vox. This is an offline visual sample, not a replacement for the live multiplayer world.

The sample uses Infinigen's **Ground**, **TreeFactory**, and **BoulderFactory** generators. `compose.py` arranges those assets into a 128 × 128 metre lakeside grove with an intentionally placed lake and simple rolling distant ridge silhouettes. One tree genome is reused with rotation and scale variations. It demonstrates a possible asset pipeline, not the full variety of Infinigen or a finished biome-streaming system. No Minecraft landscape reconstruction is claimed. The trial seed `7379093` is a local procedural seed; matching part of the Minecraft seed does not reproduce Minecraft's generator.

## Reproduce

Upstream: https://github.com/princeton-vl/infinigen

- Infinigen v1.19.0, commit `01c39c7f7adcf7363ccbcc57c64410c69f4a4e7c`.
- GPL submodule `10c1d76f5c35003e919be7265185c9c355e3b70c`.
- OcMesher submodule `bb895a01b8f574da10be1df470210df7463a75c7`.
- Python 3.11.16; bpy/Blender 4.2.0; separate `.venv`.
- Standalone Blender 4.5.13 LTS for the final GLB export. The embedded bpy export completed but its process crashed during shutdown; repeating the export in standalone Blender exited successfully. Independent readers validate the exported file.
- Minimal installation; scikit-image 0.20.0 overrides the older upstream pin because a Python 3.11 wheel is available. This is a tested local variation, not a validation of every upstream pipeline.
- Only the CPU ground element kernel was compiled. Full native terrain meshing and the 16 GB full nature demo were not attempted on this machine.

From this workspace root:

```bash
INFINIGEN_MINIMAL_INSTALL=True uv pip install --python infinigen-trial/.venv/bin/python --override infinigen-trial/trial-overrides.txt -e infinigen-trial/infinigen
g++ -O2 -shared -fPIC -fopenmp -o infinigen-trial/infinigen/infinigen/terrain/lib/cpu/elements/ground.so infinigen-trial/infinigen/infinigen/terrain/source/cpu/elements/ground.cpp
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 infinigen-trial/.venv/bin/python infinigen-trial/probe.py
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 /home/kyle/.local/bin/blender --background --threads 2 --python infinigen-trial/compose.py
OPENBLAS_NUM_THREADS=1 OMP_NUM_THREADS=1 /home/kyle/.local/bin/blender --background --threads 1 --python infinigen-trial/export_terrain.py
```

`run-trial.sh` provides the same stages with the resource limits below. It assumes the repository, dependencies, and ground kernel are already installed.

The `probe.py` tree uses the standard placeholder mode; the optional coarse-mesh placeholder path hit an upstream `BarkRandom.apply` argument error. No upstream files were patched.

Generation and rendering were run in separate user systemd units with 1.8–1.9 GB memory limits, 128 MB swap limits, and 150% CPU quotas. Probe: 58.5 seconds, 961 MB peak memory. The final three-view render completed in 5 minutes 32 seconds, with 1.3 GB peak memory and zero swap. Render timings and memory are recorded in `render.log`. Final renders use standalone Blender 4.5.13 LTS: Cycles CPU, two threads, eight samples, denoising, and 960 × 600 images.

## Outputs

- `heightfield.npy`: actual generated 129 × 129 terrain heights.
- `probe.blend`: generated asset prototypes.
- `landscape.blend`: arranged landscape and camera (editable Blender source).
- `preview/`: three actual rendered views and a phone-friendly gallery.
- `terrain-low.glb`: simplified ground only, for an engine import test.
- `sample.json`: bounded scene statistics.
- `requirements.freeze.txt`: installed Python dependency versions.

## Browser and Quest assessment

The unoptimized asset file is about 118 MB. The generated twig prototype alone contains 812,688 polygons, and each leaf prototype has 5,993 polygons. Instancing keeps the offline scene manageable, but these are far beyond sensible individual foliage assets for this browser project.

Infinigen is useful for generating natural silhouettes and source assets. Integration requires low-detail versions, simplified or baked materials, instancing, and distance-based detail. Procedural Blender materials do not automatically transfer to Godot/glTF. The 153,528-byte simplified terrain GLB loads and instantiates in Godot 4.7.2 with 8,192 triangles; trimesh independently confirms finite geometry. This checks asset compatibility only. No phone or headset rendering performance has been measured for these assets. Keep Infinigen offline; do not run it in the visitor's browser or make users download the `.blend` file.

License: retain upstream LICENSE and dependency notices if redistributing the generator code; the repository includes a separately licensed GPL subtree. The trial scripts are local project code and remain separate from upstream.
