terrain

Builds heightmap and procedural terrains with chunked LOD, splat shading, and physics colliders in ignifx.

Updated Sep 5, 2026
One-click install
npx skills add https://github.com/astrum-forge/ignifx --skill terrain-astrum-forge
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: terrain
Source: https://github.com/astrum-forge/ignifx/tree/main/packages/terrain/skills/terrain
Command: npx skills add https://github.com/astrum-forge/ignifx --skill terrain-astrum-forge

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @ignifx/core, @ignifx/terrain, @ignifx/physics.

What problem does it solve? Creating outdoor ground in an ignifx game requires turning heightmaps or noise seeds into renderable, queryable terrain with level of detail, texture blending, physics collision, and foliage placement, which is complex to implement from scratch. ## Core Features & Use Cases - Terrain Generation: Load .terrain.json documents with 16-bit .r16 heightmaps or seeded noise into chunked, geomipmapped meshes with frustum culling and a splat surface shader on PBR. - Queries and Physics: Answer heightAt, normalAt, slopeAt, and raycast queries, generate HeightfieldCollider data for Havok physics, and sculpt terrain at runtime with setHeights. - Seeded Foliage Scatter: Place instanced foliage deterministically from a seed, filtered by splat layers, slope, and height bands, working identically in headless tests and on device. - Use Case: Build an island landscape for a 3D game by defining a 513-resolution noise terrain with grass, rock, and snow layers blended by slope, then attach a collider and scatter 20,000 grass instances on the grass layer. ## Quick Start Ask the AI to create a seeded noise terrain in an ignifx app with grass and rock layers, add a camera and directional light, and log the ground height at the origin.

Frequently Asked Questions about terrain

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a procedural terrain in ignifx?

Call terrainAssetFromDefinition with a size, resolution of 2^n+1, chunk settings, and a noise seed, then add a Terrain component with that definition to an entity. Register the terrain() extension when creating the app, and queries work after app.start() and one app.step().

How do I add physics collision to an ignifx terrain?

Call colliderInit() on the Terrain component and pass the result to a HeightfieldCollider from @ignifx/physics. After sculpting, reassign the collider fields and call rebuild() to push new heights into Havok.

Does ignifx terrain work in headless mode without a canvas?

Yes, everything except rendering works under createApp({ headless: true }), including the height field, splat weights, all queries, colliderInit(), and scatter placement. This makes terrain logic fully testable without a GPU.

Why does my 8-bit heightmap look terraced in ignifx?

8-bit heightmaps quantize heights into 256 steps, producing visible stairs on slopes, logged as warning IGX-1603. Convert to the 16-bit .r16 format using the ignifx import heightmap CLI command for smooth results.

What are the limitations of the ignifx terrain splat shader?

The splat shader supports at most eight layers across two control maps and requires the materialPlugins rendering feature on a PBR material. Per-layer roughness is unavailable, and terrain chunks receive shadows but do not cast them.

When should I not use @ignifx/terrain for ground?

Do not use it for interiors, a single flat plane where MeshAsset.ground from core suffices, or 2D tile maps which belong to @ignifx/2d. It is designed specifically for outdoor heightmap-based ground.