Repository navigation
Releases
Releases · krapnikkk/retarget
v0.13.0
Behavior changes
Upgrading changes output for existing inputs. Re-check these cases:
- FBX animation export now writes standard binary FBX. Blender 4.5 and 5.2 refused every FBX the SDK wrote, and three.js FBXLoader played the motions with both hands above the shoulders. The SDK's own importer applied the inverse of the same conventions, so its round trip passed. Every
exportFBXAnimationoutput changes:- Property records carry the FBX SDK type labels and flags (
"double", "Number", ""). - Object names use the binary
Name\0\x01Classencoding, notClass::Name. Code that looked up SDK-written FBX objects by the old form must use the new one. - Curve nodes connect to models by the plain
Lcl Translation/Lcl Rotationnames. Before, Blender imported no animation. - The hips are typed
LimbNode. Before, Blender turned the hips into the armature object. - Skeleton offsets are converted to the FBX frame like the curves, so the rest skeleton faces the declared +Z front.
- Rotations use eEulerXYZ (
RotationOrder0). Blender and the FBX SDK ignoreRotationOrderwithoutRotationActive, so the previous order was composed in opposite orders by different readers. - Re-export any FBX files produced by earlier versions.
- Property records carry the FBX SDK type labels and flags (
Fixes
- VRM 0.x avatars resolve through their humanoid bone table. VRM 0.x avatars whose node names match no alias, such as VRoid exports (
J_Bip_*), resolved zero bones. Files under 64 MiB failed inspection withVRM_MISSING_HUMANOID_BONE, and animated GLB, baked VRM, FBX avatar, PMX, and reload validation could not bind them. Larger files used the structural path, which already read the table, so the same avatar behaved differently by size.- VRM 0.x thumb
Proximal/Intermediateare now read as the VRM 1.0Metacarpal/Proximaljoints in all four VRM 0.x readers. Taking the 0.x names literally bound two bones to one node. - VRM 1.0 entries take precedence over VRM 0.x in every reader.
- Paired archives read their avatar with the VRM extensions, so the identity check sees the same bones as inspection.
- VRM 0.x thumb
New
retarget.vrm0HumanoidBoneName(name)maps a VRM 0.x humanoid bone name to theHumanoidBoneNameit denotes.
Evidence
pnpm verifypassed: 493 unit + slow tests and 16 certification tests, packed tarball install, declared/runtime export parity for 8 entries, consumer type check, and the packed browser Worker and Node tooling smoke tests.- New FBX conformance test: exports a real walk and checks it with readers that share no code with the SDK importer. A minimal binary record reader checks labels, names, and rotation order. FBXLoader checks the pose: hands below shoulders, feet below hips, forward travel along +Z, left on +X.
- Blender 4.5 and 5.2 were checked by hand on the same facts and agree with FBXLoader joint for joint. This check is not automated.
- New VRM 0.x coverage:
- A derived VRM 0.x variant whose node names match no alias joins the VRM pipeline matrix. Seven cases failed before the fix.
- Full-byte and structural inspection agree on bones and rest positions.
- The VRoid AvatarSample_A and AvatarSample_C files were checked by hand. They are not part of the suite.
- Ecosystem:
pnpm verify:ecosystemre-ran Blender 5.2.0 LTS and Godot 4.7.1-stable on the certified Golden artifact. It passed, and the artifact SHA-256 (171bd29b…3eec) matches the existing receipt. pnpm audit --prod: 0 known vulnerabilities. Production licenses: MIT, Apache-2.0.
v0.8.0
Behavior changes
Upgrading changes output for existing inputs. Re-check these cases:
- VRM 1.0 targets now face forward (#11). Motion bound to VRM 1.0 avatars (
VRMC_vrm) was mirrored front-to-back: legs swung reversed and the root moved backward. This affectedbaked-vrmand other avatar-bound outputs on VRM 1.0. VRM 1.0 avatars now use the newvrm1-humanoidrig profile (+Z forward); VRM 0.x keepsvrm-humanoid(−Z).- New public
RigProfileIdvalue:vrm1-humanoid. - Rig signatures of VRM 1.0 avatars change, because the signature includes the profile id. Re-inspect VRM 1.0 targets instead of reusing cached signatures or solved clips.
- New public
- VRMA root motion is written in target units (#9). VRMA export wrote hips translation in the source's units while declaring the target's rest hips height, so VMD (MMD units) or centimeter BVH sources slid roughly 10× to 100× too far. Root motion is now scaled by
targetRestHipsHeight / sourceRestHipsHeight, the same rule avatar outputs use. Source-unit clips without a source rest height now fail withROOT_MOTION_SCALE_UNRESOLVED. This also applies tovrm-external-vrmaand paired ZIPs with VRMA motion. - VRMA keeps the clip duration. Tracks that end before the clip duration now hold their last pose. Previously a mostly facial VMD with a 10 s range exported a 0.03 s VRMA.
Fixes
- Mixamo FBX downloaded With Skin (embedded textures) no longer fails with
FBX_PARSE_FAILEDin Workers or Node (#7). FBX files containing cameras no longer depend onwindowduring motion import.
New
- Pipelines
bvh,vmd, andgltf-animation→vrm→vrma(beta), andmixamo-fbx→vrm→vrma(experimental) (#8).getRetargetPipeline(source, "vrm", "vrma")returns them with their assurance level; the README lists all combinations. exportAnimatedGLBStreamon@krapnik/retarget/browser(experimental, humanoid only): appends a target-bound clip to a self-contained GLB and returns a range-backedBlobwithout reading the whole avatar (#3).exportPairedAvatarMotionZipis now explicitly documented as experimental (#4).
Evidence
pnpm verifypassed: 421 unit + slow tests and 17 certification tests, packed tarball install, consumer type check, and the browser Worker smoke test.- New coverage: VRM 1.0, a derived VRM 0.x, and a short-legged target for every
→ vrmpipeline, including a facing check independent of the solved motion. Independent MMD-unit VMDs come from the pinned research corpus. - Ecosystem: the certified Golden artifact regenerated byte-identical to the SHA-256 in the existing Blender 5.2.0 LTS / Godot 4.7.1 receipts. The runtimes were not re-run for this release.
pnpm audit --prod: 0 known vulnerabilities. Production licenses: MIT, Apache-2.0.
Still open: #10 (independent VMD walk and Mixamo-structured FBX fixtures).
v0.7.2
First public npm release, published as @krapnik/retarget.
npm install @krapnik/retargetESM-only. Node >= 24.11.0 is required for the /node and /io entries; browsers need module Workers.
Highlights
- Public npm distribution. The package is no longer private. It ships seven public entries: root,
/browser,/browser/input,/io,/node,/validation,/certification. - Expanded consumer runtime. The root, browser, IO, and validation entries now export more serializable contracts and export adapters. These include Animated GLB / baked VRM avatar export, FBX avatar animation export, paired avatar–motion archives, Rig Motion glTF / animated rig GLB export, reload validation, and the structured
RetargetErrorhelpers. - Lighter install.
@pixiv/three-vrmand@moeru/three-mmd-physics-ammoare no longer runtime dependencies, because no public entry imports them. The remaining runtime dependencies use caret ranges, so consumers can dedupe them. - Relaxed engine requirement.
engines.nodeis now>=24.11.0instead of the exact24.11.x.
Assurance
- Nine humanoid pipeline combinations are
beta. - The Golden
gltf-animation -> gltf-humanoid -> animated-glbcase iscertified, backed by the pinned Blender 5.2.0 LTS / Godot 4.7.1 ecosystem receipt committed in the repository. The ecosystem run was not repeated for this publish. - Non-humanoid rigged glTF retargeting (
runRiggedGLTFPipeline) isbetafor 36 pinned Mesh2Motion action/target pairs. - APIs may change between minor releases before 1.0.
Verification
pnpm verify passed on the published commit. This covers the architecture rules, type checks, fixture checks, unit, slow, and certification test projects, and correctness coverage. It also covers installing the packed tarball, running the packed browser Worker and Node tooling smoke tests, and a strict TypeScript consumer compile. publint reports no issues.
Maintenance
- Pre-commit now runs a fast
pnpm check; the fullpnpm verifygate runs before publishing viaprepublishOnly. - Tests are split into
unit,slow, andcertificationVitest projects. CPU-bound fixture suites have explicit timeouts. - Local
releases/*.jsonreceipts are removed. Releases are tracked with git tags and GitHub Releases; the npm registry records tarball integrity.