/pixelstrata:terrain3dfrom pixelstrata
Build large 3D landscapes in Godot 4 with Terrain3D (MIT GDExtension by TokisanGames): install and set up the Terrain3D node and its data directory, sculpt and paint in the editor, import EXR/R16 heightmaps, prepare packed texture sets, scatter foliage with the instancer, configure collision and navigation, and generate, query or edit terrain from GDScript (get_height, import_images, set_height, update_maps). Use when a Godot project needs open-world terrain, heightmaps, landscape sculpting, terrain texturing or foliage, or mentions Terrain3D, Terrain3DData, Terrain3DAssets, Terrain3DInstancer, region files or clipmap terrain.
Ships in pixelstrata. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Terrain3D (MIT) is a C++ GDExtension clipmap terrain for Godot. Latest release v1.1.0 supports Godot 4.5–4.8+ (v1.0.2: 4.4–4.7). It allows up to 32 textures and terrains from 64 m to 65.5 km across. Usable from GDScript, C# (bindings since 1.1) and other languages through ClassDB. Docs: https://terrain3d.readthedocs.io
Not this skill: caves and overhangs (Terrain3D is a heightfield; use meshes or Zylann's
godot_voxel); small hand-built arenas (use meshes + godot-3d-essentials); 2D tilemaps →
godot-tilemap. Materials for the texture layers → material-maker. Physics engine settings →
jolt-physics / godot-physics.
project.godot → config/features).
Godot 4.4 needs Terrain3D 1.0.x. Read the release notes before upgrading a project, because
1.0 → 1.1 changed APIs.addons/ (and demo/ to learn) → Project Settings → Plugins → enable Terrain3D.
Or copy addons/ from the GitHub release zip. Run Godot's console build to see errors. Open
demo/Demo.tscn (F6) to check it works. To upgrade, close Godot before replacing the folder.Terrain3D node, set Data Directory to an empty folder (one
folder per terrain), and save material and assets as .tres. Region data is saved as
terrain3d±XX±YY.res files (terrain3d_00_00.res, terrain3d-01_02.res; _ means +).region_size (64–2048, default 256), vertex_spacing
(1.0 = one vertex per meter; raise it for bigger, lower-poly worlds).DYNAMIC_GAME is fastest. Use FULL_* only if a plugin needs the whole
shape. Collision exists only inside regions.Terrain3DMeshAssets, paint with the Instances tool (I) or place
from code. Instances have no collision. Put trees you can bump into in real scenes.Each texture set is two images: albedo RGB + height in A, and normal RGB + roughness in A
(1.1 can pack AO too). Every albedo shares one size/format, and every normal shares one
size/format. Normals must be OpenGL (+Y). Use Terrain3D menu → Pack Textures to build them from
separate maps (for example a material-maker export at matching sizes). Import PNGs as VRAM
Compressed, mipmaps on, Normal Map disabled. DDS (BC3 with mipmaps) is desktop only. Missing
mipmaps or uncompressed textures are the number-one performance problem.
E region · R raise/lower · H height · S slope · B paint base texture · V spray overlay · A
autoshader · C colour · W wetness · N navigation · X holes · I instances. Ctrl/Cmd+click inverts,
Shift+click smooths, Alt+click is the alternate mode. [ ] change brush size, - = change
strength. Overlays: 1 region grid, 3 contour lines, 4 slope colours, 5 vertex grid. Ctrl+S saves
the scene and terrain data.
Use addons/terrain_3d/tools/importer.tscn: select the Importer node, set options in the
Inspector, then Run Import. EXR (32/16-bit float with real heights) is best. R16/RAW needs
the height range and size entered by hand. 8-bit PNG terraces, so convert 16-bit PNGs to EXR.
A flat result usually needs import_scale around 300–500. Region size must exceed image width /
32. Export maps from the same tool; the file extension picks the format.
@onready var terrain: Terrain3D = $Terrain3D
# Height and normal at a world position (NaN at holes and outside regions)
func ground_at(pos: Vector3) -> float:
var h := terrain.data.get_height(pos) # get_surface_height(pos) = visible height
return pos.y if is_nan(h) else h
# Keep an actor on the ground
func _physics_process(_d: float) -> void:
global_position.y = maxf(global_position.y, terrain.data.get_height(global_position))
# Ray against the terrain without physics
var hit := terrain.get_intersection(cam.global_position, -cam.global_basis.z)
Procedural generation (from the official CodeGenerated demo):
var terrain := Terrain3D.new()
add_child(terrain, true)
terrain.material.world_background = Terrain3DMaterial.NONE
terrain.material.auto_shader_enabled = true
terrain.assets.set_texture_asset(0, grass_ta) # Terrain3DTextureAsset
terrain.assets.set_texture_asset(1, rock_ta)
var noise := FastNoiseLite.new()
noise.frequency = 0.0005
var img := Image.create_empty(2048, 2048, false, Image.FORMAT_RF)
for x in 2048:
for y in 2048:
img.set_pixel(x, y, Color(noise.get_noise_2d(x, y), 0, 0, 1))
terrain.region_size = Terrain3D.SIZE_1024
terrain.data.import_images([img, null, null], Vector3(-1024, 0, -1024), 0.0, 150.0)
# Foliage on the surface
var xforms: Array[Transform3D] = []
for i in 500:
var p := Vector3(randf_range(-1000, 1000), 0, randf_range(-1000, 1000))
p.y = terrain.data.get_height(p)
if not is_nan(p.y):
xforms.append(Transform3D(Basis().rotated(Vector3.UP, randf() * TAU), p))
terrain.instancer.add_transforms(0, xforms)
Runtime edit (dig, raise):
terrain.data.set_height(pos, terrain.data.get_height(pos) - 2.0)
var region := terrain.data.get_regionp(pos)
region.set_edited(true)
terrain.data.update_maps(Terrain3DRegion.TYPE_HEIGHT, false)
region.set_edited(false)
# if collision doesn't follow: Full modes update one region
# terrain.collision.update(terrain.data.get_region_location(pos))
# Dynamic modes (default) recalculate the shapes around the target
# terrain.collision.update(Vector2i.MAX, true)
For bulk edits, write to region.get_map(Terrain3DRegion.TYPE_HEIGHT) at
terrain.data.world_to_pixelv(pos), then calc_height_range(), set_modified(true),
set_edited(true) and one update_maps. For many instances, call add_transforms(..., update = false) and then one instancer.update_mmis().
is_nan and add regions.import_scale (300–500).collision_target/camera.mesh_lods/tessellation_level → fix textures first.material.max_regions 64–256 (128 is common), PNG + ETC2/ASTC.Forward+ (Vulkan; D3D12 since Godot 4.6) and Mobile: full support. Compatibility renderer: supported since 1.0 with Godot 4.4. Windows and Linux full; macOS works; Android and iOS experimental; Web very experimental. No lightmaps, no built-in streaming yet (in progress upstream, PR #675), sculpting runs on the CPU.
godot-3d-essentials, material-maker, jolt-physics, procedural-gen,
level-design, performance-optimization.Code examples are adapted from Terrain3D's documentation and its CodeGenerated demo (MIT, © 2023-2026 Cory Petkovsek, Roope Palmroos, and Contributors).
What SKILL.md sets; muted values are Claude Code's defaults
7 skills in this plugin
/godot-mcpDrive the Godot engine from the agent through the godot-mcp server (Coding-Solo, MIT): run a project and read its debug output and errors, launch the editor, create scenes, add nodes with properties, load textures into Sprite2D nodes, save scene variants, export MeshLibrary for GridMap, and fix UIDs. Use when verifying a Godot change by running it, importing generated sprites into scenes, reading runtime errors, or when the user mentions godot-mcp or the mcp__godot__ tools.
/jolt-physicsUse Jolt Physics, the MIT-licensed multi-core 3D rigid-body engine, in Godot (built in since 4.4, default for new 3D projects since 4.6) or as a standalone C++ library: switch a Godot project to Jolt, explain behaviour differences from GodotPhysics3D (joints, margins, kinematic contacts, ray face_index, soft bodies), migrate from the godot-jolt extension, and set up PhysicsSystem, layers, bodies, CharacterVirtual, vehicles, ragdolls and determinism in C++. Use when the user mentions Jolt, JoltPhysics, physics/3d/physics_engine, jolt_physics_3d settings, godot-jolt, JPH_ defines, BodyInterface, or physics that changed after switching engine.
Other plugins' skills for the same job
/material-makerCreate procedural PBR, stylized and pixel-art 3D materials with Material Maker (MIT, built on Godot 4.7): author or edit .ptex node graphs as JSON, export them from the command line with --export-material to Godot 4 (ORMMaterial3D/StandardMaterial3D .tres), Unity, Unreal, Blender or glTF, write custom GLSL nodes (.mmg), paint 3D models, and import the maps into the engine. Use when the user wants a procedural texture or material (bricks, rock, wood, metal, sci-fi panels, terrain textures), mentions Material Maker, .ptex, .mmg, ORM maps, tileable textures, or needs albedo/normal/roughness/height maps for a 3D game.
npx claudepluginhub jasonmello/pixelstrata --plugin pixelstrata