Skip to content

v2.5.0 — Interaction Posing, IK Solver, and Body Measurement Fixes

Choose a tag to compare

@ghirpara ghirpara released this 12 Jun 03:45
· 77 commits to master since this release

What's New

🤝 Interaction Posing — Multi-Figure Poses and IK Alignment

The dazpy SDK now includes a full interaction posing system for placing two figures together in physically plausible poses and aligning individual limbs to world-space targets using an iterative IK solver.

Preset recipe builders generate a ready-to-apply InteractionRecipe from a pair of figure labels:

from dazpy import DazClient, DazScene
from dazpy._interaction import build_sit_recipe

client = DazClient()
scene  = DazScene(client)

recipe = build_sit_recipe("BobG8", "AliceG8")
scene.apply_interaction_recipe_to_scene(recipe)

Available presets: build_sit_recipe, build_touch_recipe, build_kiss_recipe, build_fight_recipe. All presets produce an InteractionRecipe that serialises to JSON and can be stored and replayed.

IK limb alignment moves a hand or foot end-effector to a world-space target using a Jacobian-based iterative solver running inside a single batched HTTP call sequence:

from dazpy._interaction import align_hand_target, align_foot_target

skel   = scene.find_skeleton("BobG8")
result = align_hand_target(skel, target_position=(12.0, 95.0, 8.0))
print(f"converged={result.converged}  final_error={result.final_error:.3f} cm")

Bulk scene snapshot fetches every skeleton's bone world positions in one HTTP call, avoiding per-bone round-trips when building rig data:

snapshot = scene.scene_snapshot()
profiles = build_rig_profiles_from_snapshot(snapshot)

📐 Body Measurement Accuracy Fixes (docs/examples/body_measurements.py)

  • Torso loop selection — Slices now score each cross-section loop by centroid distance from the body centerline and pick the most-centered loop, filtering out arm cross-sections that caused ~70 cm overestimates on A-pose figures.
  • Robust outlier rejection — the heuristic fallback for figures without a gender keyword in their scene label (e.g. "MadisonG9") now discards slices above 1.35× the median before selecting the bust peak.
  • --figure-type flag — pass G9F, G9M, G8F, G8M, G8.1F, or G8.1M to force a calibration entry when auto-detection cannot determine figure gender from the scene label.

🧪 Test Suite

  • All tests reorganised under tests/ package (test_dazpy.py, test_api.py, test_dazpy_integration.py, test_performance.py, harness_integration.py).
  • tests/README.md added — documents every test class and individual test across all five modules.
  • Integration harness (tests/harness_integration.py) covers the full interaction posing pipeline end-to-end; --auto flag for CI/smoke use.

Full Changelog

v2.4.0...v2.5.0