When I introduced Harry yesterday, I said that the live physics Harry writes into an avatar (the tail wag, the hair bounce, the jiggle) would sit still in your own Babylon scene until something read it, and that I’d be glad to share a Babylon reader if there was interest. Here it is. It’s called harry-babylon, it’s MIT, and it’s the same code pOqpOq World runs.
- Live demo: increasinglyhuman.github.io/harry-babylon. A Tripo lemur warrior finished in Harry, with a wagging tail, bouncing ears, a walk, a hop and a deep squat that shows off the creases. Press Spawn crowd for 20 more under a physics budget.
- Try it in the Playground: playground.babylonjs.com/#6NLVHQ
- Install:
npm i @poqpoq/harry-babylon(Babylon 9.29 or later, as a peer dependency) - Repo: github.com/increasinglyHuman/harry-babylon
What it does. Harry writes an avatar’s runtime behaviour into the GLB itself, and harry-babylon reads it back:
- Spring bones for tails, hair and soft tissue, from the standard
VRMC_springBone1.0 extension, so any VRM-aware tool can read them too. - Tail moods (wag, lash, tuck, twitch, loose…) layered on top of the springs.
- Surface jiggle: modal bounce for chest, belly, glutes and hair that rides on the skinned mesh.
- Clip binding that keeps the clavicles anchored to the rest pose, plus hip-height compensation when a clip was authored on a different body.
- A VRoid fallback that synthesizes springs for VRoid bodies that carry none.
- Crowd-friendly: distance LOD, off-screen pausing and a shared per-scene budget.
One call wires it up:
import { ImportMeshAsync } from '@babylonjs/core'
import { attachHarryPhysics } from '@poqpoq/harry-babylon'
const result = await ImportMeshAsync('avatar.glb', scene)
const physics = attachHarryPhysics(result.meshes[0], scene, result.meshes)
physics.springs?.setMood('wag')
Everything apart from the springs is plain glTF: the armature, the skin weights, the corrective bones and the morph targets. That part works in any engine. The springs and the jiggle are what need a runtime, and harry-babylon is that runtime for Babylon.
Feedback, issues and pull requests are very welcome. And if you’d like to see these avatars in a live world, pOqpOq World is looking for alpha testers.
— Allen