Procedural, photoreal trees, rocks, ground, props and scenes for RealityKit, generated from code at load time. No mesh or texture files ship in your app: geometry is built on the CPU in milliseconds and every PBR texture is synthesized on the GPU.
- Features
- Requirements
- Installation
- Quick start
- Photo to asset
- Demo app
- Usage
- Gallery
- Performance
- Command-line tool (3.0 agent loop)
- Interiors and articulated assets (4.0)
- Ballpark (4.1)
- Hospital (5.0)
- Kitchen and woodshop (5.1)
- Backyard landscape (5.2)
- Package structure
- Contributing
- License
- 21 assets and 3 composed scenes: oak, birch, spruce, shrub, boulder, pebbles, terrain, grass, and 12 street and park props. Every asset is parameterized and seeded.
- Trees with recursive branching, root flare, alpha-card foliage, crown-sphere normals, baked crown occlusion and three LODs built from one skeleton.
- 29 GPU-synthesized PBR materials (albedo, normal, roughness, AO, metallic), all tileable, with coverage-preserving alpha mips for foliage.
- ShaderGraph materials generated at runtime: vertex wind, leaf back-light translucency, aerial perspective fog, ground anti-tiling, triplanar rock projection, moss on upward faces.
- Physically based sky (Rayleigh, Mie, ozone) used for image-based lighting and the skybox, with a matching shadow-casting sun.
MeshInstancesComponentinstancing in spatial cells, distance LOD with hysteresis, head-tracked LOD on visionOS, quality presets.- Offscreen PNG rendering through
RealityRendererfor previews, thumbnails and automated checks.
| Platform | Minimum |
|---|---|
| visionOS | 26.0 |
| macOS | 26.0 |
| iOS | 26.0 |
| Xcode | 26.0 (Swift 6.2 tools) |
Metal is required for texture synthesis. ARKit world tracking (visionOS, ImmersiveSpace) is used only for head-tracked LOD.
File > Add Package Dependencies, enter the repository URL, and add the RealityHD product to your
app target.
https://github.com/hunterh37/RealityHD.git
dependencies: [
.package(url: "https://github.com/hunterh37/RealityHD.git", branch: "main"),
],
targets: [
.target(name: "MyApp", dependencies: [.product(name: "RealityHD", package: "RealityHD")]),
]A full forest in an immersive space:
import SwiftUI
import RealityKit
import RealKit
import RealLibrary
@main
struct ForestApp: App {
init() { RealityHD.setup(.balanced) }
var body: some Scene {
ImmersiveSpace(id: "forest") {
RealityView { content in
let env = try! RealityHD.environment(.afternoon, skybox: true)
let forest = try! await RealityHD.scene("forest-glade")
env.illuminate(forest)
content.add(env.root)
content.add(forest)
}
.task { await RealViewerTracker.shared.start() }
}
.immersionStyle(selection: .constant(.full), in: .full)
}
}A reference photo goes in, a procedural Swift asset comes out. Left: the photo. Right: the
halogen-siphon-bar prop that the agent loop built from it (no mesh or texture files).
Open Claude Code in this repo. The realityhd-prop skill runs brief, scaffold, build, lint, vision
gate, sign-off, thumbnail and catalog. Example prompts:
With your own photo (attach it or give a path):
Add a prop from this photo: ~/Desktop/espresso-grinder.jpg. Match the size and materials.
/realityhd-prop make this lamp photoreal [image attached]
Without a photo (the agent searches for a matching reference image first):
Add a vintage rotary telephone prop. Find a reference photo and match it.
Model a cast iron skillet, 30 cm, find a product photo for proportions.
Scenes and materials:
Build a scene "bakery-counter" with the kitchen props, interior lighting, camera at the register.
Add a material wood.walnut-oiled like wood.oak, darker and warmer.
Every asset in the catalog, including new ones, loads by id:
import RealKit; import RealLibrary
RealityHD.setup(.balanced)
let env = try RealityHD.environment(.afternoon, skybox: false)
let siphon = try await RealityHD.entity("halogen-siphon-bar", seed: 1)
env.illuminate(siphon)
content.add(env.root)
content.add(siphon)swift run -q realityhd brief my-prop --theme Kitchen --name "My prop" # fill briefs/my-prop.json
swift run -q realityhd new prop my-prop --brief briefs/my-prop.json # write build(seed:)
swift run -q realityhd gate my-prop --ref photo.jpg # side-by-side + scores
swift run -q realityhd thumbs my-prop && swift run -q realityhd catalogDemo/ is a visionOS app that opens forest-glade and park-path as full ImmersiveSpaces. The menu
window picks the scene, sky (morning, midday, afternoon, golden hour) and seed. The scene's camera
hint is placed at the viewer's feet, and LOD follows head pose through RealViewerTracker.
![]() |
![]() |
![]() |
![]() |
Captured in the visionOS 26 simulator. The forest scene has 140 instanced trees, 7,000 grass clumps and camp props (picnic table, crates on a pallet, barrels, drum) along the edge of the glade.
brew install xcodegen
cd Demo && xcodegen generate && open RealityHDDemo.xcodeprojLaunch arguments open a scene without input, for captures and checks:
-scene forest-glade|park-path, -sky morning|midday|afternoon|golden, -seed n, -yaw deg,
-hideMenu YES. Scripts/frame.py frames a simulator screenshot for this README.
let oak = try await RealityHD.entity("oak-tree", seed: 4)
let hydrant = try await RealityHD.entity("fire-hydrant")
content.add(oak)Assets are value types with stored parameters; edit them inline.
let drum = try await RealityHD.entity(OilDrum().with { $0.color = 0x8C1F1F })
let birch = try await RealityHD.entity(Tree(.birch).with { $0.species.height = 9 }, seed: 2)
let rock = try await RealityHD.entity(Boulder().with { $0.size = [3, 1.6, 2.4]; $0.facets = 12 })One draw per cell per LOD, however many instances.
let spots = Scatter.poisson(count: 400, outerRadius: 60, minSpacing: 4, seed: 1)
let transforms = spots.map { place($0.x, $0.y, yaw: .random(in: 0...360)).matrix }
let forest = try await RealityHD.field(SpruceTree(), transforms: transforms)let env = try RealityHD.environment(SunSky(elevation: 20, azimuth: 250, turbidity: 2.8), skybox: true)
env.illuminate(myContent) // image-based light for every model under it
content.add(env.root) // sun with cascaded shadows, IBL entity, optional skyboxPresets: .morning, .midday, .afternoon, .goldenHour. In mixed reality pass skybox: false, or
skip the environment and let system lighting apply (set RealAtmosphere.fogDensity = 0 indoors).
RealWind.direction = [1, 0, 0.3]; RealWind.strength = 1.5 // before materials are created
RealAtmosphere.fogDensity = 0.002
RealityHD.setup(.performance) // 512 px texturesvar m = Model(name: "plinth")
m.add(Prim.roundedBox([1, 0.4, 1], radius: 0.03, material: "concrete.smooth"))
let entity = try await m.modelEntityAsync()Material keys accept a hex tint: "metal.painted:1F4E8C". All keys are listed in
CATALOG.md.
forest-glade |
park-path |
|---|---|
![]() |
![]() |
park-path, golden hour |
prop-yard |
![]() |
![]() |
![]() wooden-crate |
![]() barrel |
![]() oil-drum |
![]() park-bench |
![]() picnic-table |
![]() street-lamp |
![]() traffic-cone |
![]() fire-hydrant |
![]() bollard |
![]() pallet |
![]() mailbox |
![]() trash-can |
Built and signed off through the vision gate (docs/V3.md).
Office scenes lit by the sun through real openings plus an indoor probe, with baked scene AO and
static batching. Doors, drawers, lids, chairs, lamps and screens have named states and animate live
(docs/V4.md, docs/guides/articulation.md).
open-office in the RealityHDDemo app, Apple Vision Pro simulator (visionOS 26.4): tilted window live,
monitors showing the screen.ui display material, sun through the ribbon windows.
![]() open-office |
![]() executive-office |
![]() office-lobby |
![]() conference-room |
![]() office-plaza |
![]() laptop state on |
Every state of every articulated asset, rendered through the live rig (realityhd states):
Static office props:
![]() office-desk |
![]() bookshelf |
![]() conference-table |
![]() lobby-sofa |
![]() reception-desk |
![]() whiteboard |
![]() water-cooler |
![]() snake-plant |
![]() keyboard-mouse |
![]() coffee-mug |
![]() paper-stack |
![]() office-block |
let cabinet = try await RealityHD.articulated("filing-cabinet")
cabinet.setArticulation("drawer2-open") // eased animation
// tap a part to toggle it
.gesture(SpatialTapGesture().targetedToAnyEntity().onEnded { $0.entity.realToggle() })Albedo channel of the GPU-generated texture sets.
A regulation baseball field built from code: 90 ft base paths, a 10 in mound with the rubber at
60 ft 6 in, a 95 ft infield arc, chalked boxes and foul lines, checkerboard-mowed turf, a red warning
track, padded walls, foul poles, a hooded backstop, block dugouts, aluminum bleachers and six light
towers. The ballpark camera, and the Demo app viewer, stand in the right-handed batter's box.
Structures: baseball-diamond, outfield-wall, foul-pole, backstop, dugout, bleachers, light-tower.
Props, gated and signed off: home-plate, base-bag, baseball-bat, baseball, ball-bucket, batting-helmet.
New texture programs turf (mowing stripes or checkerboard), infieldClay (drag lines, conditioner
granules, cleat prints) and chainLink (woven cutout mesh with a distance veil).
An emergency department built from code: a waiting and intake lobby, a treatment corridor, an ER
treatment room and an operating room, furnished with 50 articulated medical assets. Instruments and
handheld devices can be picked up by hand in the Demo app (ManipulationComponent), and every
door, drawer, rail, lid, screen and lamp has named states. See docs/V5.md.
All 50 medical assets (43 props, 7 structures), gated and signed off:
States through the live rig:
New texture programs sheetVinyl (chip sheet flooring with welded seams), nonwoven (SMS drapes and
crepe exam paper), wallTile, vitalsUI (ECG, pleth, arterial and respiration traces with numerics)
and medLabel (pharmacy and hazard labels with barcodes).
cooking-counter: a kitchen wall run with quartz tops, sink and faucet under a window, gas range with
knob-linked flames, range hood and shaker cabinets (CookingCounterLayout). Cooking engine: plane
slicing with capped cut faces, heat model (food, vessel, burner, oven), cook ShaderGraph layer,
RealFoodComponent, RealFood/RealVessel/RealBlade. Cookware (skillets, saucepan, stock pot, knives,
knife block, utensils, bowls, boards) and food (onion, garlic, tomato, pepper, carrot, potato, lemon, egg,
chicken breast, butter, chocolate, strawberry, pancake, fried egg, cookie dough). See docs/guides/cooking.md.
woodshop: WoodshopLayout with a stations knob and 30 gated woodworking props: table and miter saw
rigs, cordless drill, sander, jigsaw, circular saw, hand tools, workbench, lumber rack, pegboard, clamps,
PPE. Lumber and PlywoodSheet with grain-continuous crosscut and rip. Texture programs tapeRule, pegboard.
Also: hand anatomy (RealHandAnatomy, x-ray graph, realityhd anatomy), rooftop-plank scene.
![]() cooking-counter |
![]() woodshop |
backyard-landscape with 35 gated landscaping props: plants (boxwood, privet hedge, hydrangea, rose,
lavender, hosta, ornamental grass, arborvitae, azalea, daylily), hardscape (herringbone paver patio,
retaining wall, mulch and river rock beds, steel edging, fire pit, pergola, picket fence, raised bed,
fountain) and yard props (path light, spotlight and umbrella rigs, birdbath, adirondack chair, hose reel,
sprinkler, trellis, planters). Tag landscaping. Test props terracotta-pot, brass-candlestick.
lineman-yard and lineman-district scenes with 25 gated power-line props for overhead distribution
work: a framed distribution pole line, pole-top hardware, hot-line tools, PPE and an aerial bucket.
Tools such as hot-stick are articulated (sliding hook head). Material library Lineman.
![]() lineman-yard |
![]() lineman-district |
Tools and PPE:
![]() hot-stick |
![]() lineman-pliers |
![]() cable-cutter |
![]() hydraulic-crimper |
![]() wire-grip |
![]() wire-brush |
![]() voltage-detector |
![]() grounding-set |
![]() rubber-gloves |
![]() leather-protectors |
![]() insulating-blanket |
![]() hard-hat |
![]() fall-harness |
Pole hardware:
![]() distribution-pole |
![]() pole-transformer |
![]() fused-cutout |
![]() fuse-link |
![]() lightning-arrester |
![]() pin-insulator |
![]() polymer-deadend |
![]() hot-line-clamp |
![]() automatic-splice |
![]() conductor-coil |
Vehicle:
![]() aerial-bucket |
![]() truck-cab-interior |
city-block scene and a procedural building generator (BuildingGenerator, BuildingSpec,
FloorPlan) with eight styles: georgian, federal, brownstone, italianate, haussmann,
beaux-arts, art-deco, modernist. The generated-building asset wraps the generator.
68 gated pieces cover classical trim, facade openings and roofs, 12 m city grid tiles and street props.
Material libraries Architecture, Facade, City. Tags architecture, facade, trim, city.
![]() city-block |
![]() generated-building |
Trim and ornament:
Facade and roof:
City tiles:
![]() cobblestone-tile |
![]() plaza-paving |
![]() road-corner |
![]() road-intersection |
![]() road-straight |
![]() road-t-junction |
![]() sidewalk-curb |
Street props:
Insects:
Props:
![]() anthill |
![]() bark-slab |
![]() bug-net |
![]() capture-net-pod |
![]() field-journal |
![]() flower-bush |
![]() liftable-stone |
![]() milkweed |
![]() specimen-jar |
![]() wrist-launcher |
Release build on an M2 Pro (swift run -c release realityhd bench).
| Measure | Result |
|---|---|
| Oak / birch / spruce generation, 3 LODs | 12 / 17 / 13 ms |
| Prop generation | 0.2 to 2 ms |
| 1024² PBR texture set on the GPU | 7 to 20 ms |
forest-glade build + upload |
0.3 s + 0.9 s, 7,555 instances in 422 instanced draws |
park-path build + upload |
0.08 s + 0.16 s, 22,120 instances |
| Tree LOD0 / LOD1 / LOD2 | ~20k / ~8k / ~2.5k triangles |
Texture memory, .balanced |
~11 MB per material |
Instancing by spatial cell, LOD every 0.2 s with hysteresis, no shadow casting for grass and LOD2, foliage twigs implied by cards, shared per-key textures, RG8 normal maps and quality presets keep scenes at frame rate on Vision Pro.
swift run -q realityhd list # assets and scenes
swift run -q realityhd stats oak-tree # triangles per LOD, materials, generation time
swift run -q realityhd render park-bench # out/park-bench.png via RealityRenderer
swift run -q realityhd render forest-glade --sky golden --w 1920 --h 1080
swift run -q realityhd thumbs --missing # docs/assets/<id>.png, docs/scenes/<id>.png
swift run -q realityhd textures bark.oak # dump albedo/normal/roughness PNGs
swift run -q realityhd shaders # load every ShaderGraph variant
swift run -q realityhd catalog # regenerate CATALOG.md
swift run -q realityhd new prop wheelbarrow --theme Construction # scaffold + register
swift run -c release realityhd bench
# 3.0 agent loop
swift run -q realityhd context prop # API, materials, props, loop in one print
swift run -q realityhd brief copper-kettle --theme Kitchen --name "Hammered copper kettle"
swift run -q realityhd new prop copper-kettle --brief briefs/copper-kettle.json
swift run -q realityhd lint copper-kettle # budget, grounding, texel scale, size vs brief
swift run -q realityhd gate copper-kettle --ref photo.jpg # sheet, compare, report, verdict template
swift run -q realityhd gate copper-kettle --verdict out/gate/copper-kettle/verdict.json --signoff
python3 Scripts/vision_judge.py copper-kettle # headless verdict via the Claude APICoding agents: .claude/skills/realityhd-prop runs the loop end to end; realityhd-gate holds the
rubric and scoring.
| Target | Contents |
|---|---|
RealCore |
Surfaces, models, LODs, primitives, tree generator, noise, scatter. No RealityKit. |
RealMaterials |
MaterialSpec, material library by family (Library/), Metal texture programs (Shaders/), sky. |
RealKit |
LowLevelMesh upload, material cache, ShaderGraph emitter, environment, LOD, instancing, preview. |
RealLibrary |
RealAsset and registries (Core/), building helpers, Nature/, Props/<Theme>/, Structures/, Scenes/, RealityHD entry points. |
realityhd |
Command-line tool. |
One asset per file. The full tree and conventions are in AGENTS.md; design notes in DESIGN.md.
Assets, scenes and materials are welcome, one per pull request. Start with CONTRIBUTING.md, pick a theme pack from docs/IDEAS.md, and follow the guides for assets, scenes and materials.
swift run -q realityhd new prop wheelbarrow --theme Construction --author your-handle
# write build(seed:), then:
swift test && swift run -q realityhd render wheelbarrow
swift run -q realityhd thumbs wheelbarrow && swift run -q realityhd catalogCoding agents read AGENTS.md; IDEAS.md ends with prompts to paste into one.
RealityHD is available under the MIT license. See LICENSE.






























































































































































































































