Skip to content

Detailed machine models built in Blender, better viewer lighting, moving cylinders, replay renderer - #6

Merged
dtt-github merged 3 commits into
mainfrom
hd-machine-models
Nov 16, 2026
Merged

dtt-github merged 3 commits into
mainfrom
hd-machine-models

Conversation

@dtt-github

Copy link
Copy Markdown
Owner

What changed

The simulated machines were the PWRI OPERA robotics meshes (excavator, carrier, dozer, about 12–34k triangles, one flat texture each) and a box-built roller, lit by a single sky light and sun. This PR replaces all four with detailed models built procedurally in Blender, improves the browser lighting, makes the hydraulic cylinders follow the joints, and adds a Blender renderer for simulator replays.

Viewer (phase1/web)

  • site.js: physical sky as backdrop and image-based lighting, so metal and glass no longer render near black. Ground-truth ambient occlusion turns itself off below 50 fps (?quality=low|high overrides). MSAA, and shadows that follow the camera.
  • linkage.js (new): poses the ZX200 cylinders and bucket four-bar from the pins in phase2/hydraulics.py, and URDF-jointed cylinders (dozer lift and angle, carrier tip) from the parts they push.
  • showcase.js: a scripted dig cycle in place of random joint wobble.
  • soil.js: one loadModel() that prefers the detailed models and falls back to the OPERA files. Adds the roller model, with its drum and wheels turning by distance travelled.

Models (assets/blender, rebuild with blender -b --python …)

  • zx200_hd.glb, ic120_hd.glb, d37_hd.glb keep the node names, link frames, joint extras and free parts of the OPERA files they replace, so the simulator and soil view take them with no server changes.
  • roller_hd.glb replaces the box-built roller.
  • Details include individual track shoes and rubber belts, cylinders with chrome rods, the bucket with teeth, cabs with glazing, PWRI's retrofit antennas, hazard chevrons, and tileable procedural textures (worn paint, steel, rubber).
  • The carrier's vessel follows the server's vessel boxes, so the load sits on the floor the physics uses.
  • No manufacturer marks or livery. Registered as Apache-2.0 in assets/registry.json.

Replay renderer

  • render_replay.py and replay_io.py render a phase2/record_replay.py recording with EEVEE: terrain, soil surfaces, grains, and every machine posed as soil.js poses it.
  • Output (frames and MP4) goes to renders/, which is git-ignored.

Also on this branch: 007a19c ("Dozer finishes its push and waits clear of the dump instead of parking"). It is a simulator change from another session, committed on local main but never pushed, so it is part of this PR's diff. It touches phase2/ only.

How it was tested

  • Viewer stability test (phase1/test_site.py, local Chrome, GB10): 60 fps at 1600×900 before and after, no new console errors. The test reports drum_steel_a01 below ground both before and after; that bug predates this PR.
  • Checked in Chrome:
    • the showcase at rest and animated, including a tipped vessel and a raised, angled blade with their cylinders attached;
    • the soil-view replay (?replay), where the excavator, carriers (load in the vessel), dozer and roller are all posed correctly.
  • python3 assets/fetch_assets.py --check: registry ok.
  • Blender (Ubuntu 4.0.2, ARM, no Cycles): render_replay.py rendered the whole site recording, 2237 frames at 720p in about 37 minutes, into a 93-second video.
  • Not run: the live excavator server with these changes (the GPU was busy with other benchmarks). The server code is unchanged by this PR's own commits.

Checklist

  • Commits are signed off (git commit -s, Developer Certificate of Origin): not signed off
  • New or changed 3D assets have entries in assets/registry.json with an allowed license
  • Relevant RESULTS.md updated with measured numbers: not updated (no physics changes in this PR's own commits)

🤖 Generated with Claude Code

dtt-github and others added 3 commits November 16, 2026 19:41
When a loaded carrier leaves its spot, the dozer no longer drops the push and
drives to its park: it finishes the push and waits at the lane's end, blade up,
where its outline keeps 1 m from the dumping carrier's, until the carrier has
gone. In clay the carrier's wait at the dump falls from 108 to 63 s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ng cylinders, replay renderer

Viewer (phase1/web):
- site.js: physical sky as backdrop and image-based light (metal and glass no longer render black),
  ground-truth ambient occlusion that turns itself off below 50 fps (?quality=low|high), MSAA,
  shadows that follow the camera; test hooks __site.frame() and renderTiming()
- linkage.js (new): poses the ZX200's cylinders and bucket four-bar from the pins in
  phase2/hydraulics.py, and URDF-jointed cylinders (dozer blade, carrier tip) from the parts they push
- showcase.js: drives only the main joints, scripted dig cycle from site.json, pose()/step() hooks
- soil.js: loads zx200_hd.glb in place of the OPERA excavator (falls back to it), and the detailed
  roller with its drum and wheels turning by distance travelled

Models (assets/blender, Blender 4.0, rebuild with blender -b --python):
- zx200_hd.glb: 20 t excavator to the OPERA ZX200 dimensions and pins, same nodes, frames and free
  parts, so it replaces the OPERA model without code changes; individual track shoes, cylinders
  with chrome rods, bucket with teeth, cab glazing, PWRI retrofit (GNSS, signal tower)
- roller_hd.glb: 10.6 t single-drum roller to phase2/roller.py
- blendkit.py: modelling helpers, box UVs, tileable procedural textures (paint, worn paint, steel,
  track, rubber), glTF export
- render_replay.py + replay_io.py: render a recording (phase2/record_replay.py) with EEVEE to frames
  and MP4 in renders/ (git-ignored)

Both models are registered as Apache-2.0 in assets/registry.json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ERA models in the browser

- assets/blender/ic120_hd.py -> ic120_hd.glb: rubber-tracked crawler carrier on the joint frames of PWRI's
  OPERA IC120 (same node names and extras); rubber belt with lugs wrapped round the raised sprocket, idler
  and rollers; ribbed vessel whose floor, sides, headboard and tail lip follow the server's vessel boxes, so
  the load sits on the floor the physics uses; tip cylinder on the source's joints; cab, engine bay, rails,
  PWRI antennas
- assets/blender/d37_hd.py -> d37_hd.glb: crawler dozer with a power-angle-tilt blade on the joint frames
  of PWRI's OPERA D37PXi; steel track shoes, C-frame, lift cylinders whose rod eyes sit where soil.js's lift
  approximation puts them, angle cylinders, curved moldboard with cutting edge and end bits
- blendkit.py: belt_path/belt_frames (a track wrapped round wheels of any size and height), add_ring_y,
  frame_matrix, cylinder_meshes
- soil.js: one loadModel() for the excavator, carriers and dozer, preferring the detailed models
- render_replay.py: uses the detailed carrier and dozer; spread camera aimed at the spoil area
- site.json showcase, registry (Apache-2.0), README, screenshots

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dtt-github
dtt-github merged commit f77f490 into main Nov 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant