Terrain Generation
Use the Frontier model to generate large-scale Unity Terrain from AI-generated grayscale heightmaps, and automatically apply it to the current scene. Output a Unity Terrain GameObject + TerrainData asset + processed heightmap PNG, saved to Assets/TJGenerators/History/.
When to use terrain instead of 3D models: Valleys, mountain ranges, hills, plains, plateaus, islands, volcanoes, sand dunes, coastal cliffs and other large-scale landscapes use this feature; independent objects (rocks, trees, buildings) please use 3D Model Generation.
Getting Started
Start from GUI
Refer to the beginning section of Generate 3D Models (trigger by describing terrain through dialogue).
Start from CLI
Use generate_terrain to generate heightmaps, then use apply_terrain_heightmap to apply as Terrain. After generation is complete, the Terrain GameObject automatically appears in the scene.
Input Modes (provide at least one):
| Mode | Parameters | Description |
|---|---|---|
| Text-to-Terrain | prompt | Terrain description |
| Image-Guided Terrain | image_path | Reference image guides terrain shape |
Models
Frontier (Only Model)
- Only supported terrain model, no
generator_idparameter; aspect ratio fixed to1:1(square heightmap), not configurable generate_terrainKey Parameters:prompt: Terrain description (optional whenimage_pathis provided)image_path: Reference image path (Assets/...), guides terrain shaperesolution:"1K"/"2K"(default) /"4K"
Post-Processing Options (apply_terrain_heightmap)
use_default_options: true (default) will apply recommended post-processing (median filter + bilateral filter + thermal erosion + percentile normalization). Set to false to manually adjust parameters, common items:
| Parameter | Default | Description |
|---|---|---|
height_gamma | 1.0 | < 1.0 more mountainous; > 1.0 flatter |
remap_output_min | 0.02 | Raising can elevate "sea level"/base height |
remap_output_max | 0.98 | Lowering can flatten peak heights |
thermal_erosion | true | Simulate natural erosion |
thermal_erosion_iterations | 25 | More iterations = smoother |
bilateral_filter | true | Edge-preserving smoothing (preferred over Gaussian) |
terrain_go_name | "TJGenerators Terrain" | Generated GameObject name |
Optimization
Prompt Optimization
| Terrain Type | Recommended Prompts |
|---|---|
| Mountain Range | "rugged mountain range with steep peaks and deep valleys, gradual foothills" |
| Hills | "gently rolling grassy plains with subtle elevation changes" |
| Island | "tropical island with central mountain peak, flat coastal area" |
| Canyon | "deep canyon with layered rock formations, narrow river valley at bottom" |
| Volcano | "dormant volcano with central caldera, smooth sloped sides" |
| Sand Dunes | "sand dunes with smooth flowing curves, gradual ridges, no sharp edges" |
Tips:
- Avoid describing vegetation, buildings, trees—they will produce unexpected height protrusions
- Add "smooth", "gradual", "gentle" for more natural transitions
- You can add
"top-down orthographic view"to hint the model to output a heightmap style - Providing
image_pathcan significantly improve terrain shape precision
Post-Processing Selection
- General scenes:
use_default_options=true - More dramatic mountains:
height_gamma=0.8; flatter:height_gamma=1.2 - Preserve sharp ridges:
bilateral_filter=false+thermal_erosion=false
Parallel Generation
- Maximum 5 concurrent generation tasks
Notes
- ⚠️ Two-step process:
generate_terrain→apply_terrain_heightmap, automatically completed by default - ⚠️ Post-processing time: 2K post-processing requires 60–180 seconds, do not resubmit repeatedly
- ⚠️ Aspect ratio fixed to 1:1, no
generator_idparameter - ⚠️ Output path: Default
Assets/TJGenerators/History/; after generation, Terrain will be automatically selected, and will automatically add a directional light if none exists - ⚠️ Domain Reload: Do not write
.csfiles to disk during generation, useexecute_csharp_scriptinstead