Skip to content

Reduce BVH export joint jitter by preserving local rotations#43

Open
ola31 wants to merge 2 commits into
nv-tlabs:mainfrom
ROBOTIS-GIT:fix/bvh-export-rotation-fidelity
Open

Reduce BVH export joint jitter by preserving local rotations#43
ola31 wants to merge 2 commits into
nv-tlabs:mainfrom
ROBOTIS-GIT:fix/bvh-export-rotation-fidelity

Conversation

@ola31

@ola31 ola31 commented Jul 1, 2026

Copy link
Copy Markdown

Summary

This PR updates BVH export to preserve Kimodo's local joint rotations more directly.

Previously, motion_to_bvh exported rotations through an intermediate path:

local rotation matrices -> quaternions -> bvhio / PyGLM / SpatialTransform -> BVH Euler channels

The new exporter writes BVH text directly from local rotation matrices:

local rotation matrices -> scipy Rotation.as_euler("ZYX") -> BVH Euler channels

This also removes the now-unused bvhio runtime dependency.

Motivation

While testing exported SOMA BVH files in the soma-retargeter viewer, some motions showed visible
joint jitter even though the same motions appeared smooth in Kimodo Visor before export.

The issue was most noticeable around upper-body joints in motions such as boxing, boxcarry, and
squat. The exported BVH appeared to contain small frame-to-frame rotation artifacts that were
not present in the original Kimodo motion.

Root Cause

The likely cause was the previous intermediate conversion path. Although Kimodo stores local
joint rotations as rotation matrices, the previous exporter converted them through quaternions
and bvhio / PyGLM / SpatialTransform before writing BVH Euler channels. The resulting
Euler channels did not always faithfully preserve the original local rotation matrices, leading
to small frame-to-frame rotation differences that appeared as jitter in the soma-retargeter
viewer.

Before / After Comparison

Each video shows the previous BVH export on the left and the new BVH export on the right.

boxing

bvh_boxing_prev_vs_new.mp4

boxcarry

bvh_boxcarry_prev_vs_new.mp4

squat

bvh_squat_prev_vs_new.mp4

The Kimodo examples used for comparison are attached below.

Validation

  • Checked that the comparison examples (boxing, boxcarry, squat) load and play correctly
    in the soma-retargeter viewer with the new BVH exporter.
  • Exported the existing Kimodo SOMA RP examples with the new BVH exporter and confirmed that the
    resulting BVH motions load and play correctly in the soma-retargeter viewer:
    • 01_single_text_prompt
    • 02_multi_text_prompt
    • 03_full_body_keyframes
    • 04_ee_constraint
    • 05_root_path
    • 06_root_waypoints
    • 07_mixed_constraints
    • 08_stylized_text

ola31 added 2 commits July 1, 2026 16:48
Signed-off-by: Kiwoong Park <abrahamola80@gmail.com>
Signed-off-by: Kiwoong Park <abrahamola80@gmail.com>
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