USD: preserve bone lengths on skeleton IO #116615

Open
opened 2023-12-29 00:08:03 +01:00 by Michael Kowalski · 0 comments

This issue was raised during the review for USD skeleton export pull request: #111931 (comment)

The underlying problem is that exporting bones from Blender to USD does not preserve the original bone lengths. This is because USD skeletons are composed of joints, not bones, and the joints don't encode length. When importing the skeleton back into Blender, the bone lengths often appear incorrect.

Currently, the skeleton import code tries to guess what the bone length should be based on distance from parent bone to child bone. For leaf joints, the guess is based on additional heuristics, such as the average of the estimated lengths for non-leaf bones computed for the entire skeleton. In the case where there is a single bone in the skeleton, the bone is assigned a default length of 1.0.

This goal of this design task is to provide a way to preserve the original bone lengths in the USD skeleton. The following two approaches have been suggested so far:

@mont29 suggested adding leaf bones on export:

This is similar to the FBX handling of skeletons... In FBX exporter there is the Add Leaf Bones option (enabled by default), which adds an extra joint at the tip of each Blender leaf bone. The importer has a matching Ignore Leaf Bones (although disabled by default), to remove these on import. These extra leaves are always fully non-deforming joints. Could this be considered as an USD-valid solution as well? Or would that go against USD standard and/or common expectations from other DCCs?

Alternatively, on export we could record the original bone lengths as a custom property on the USD skeleton, and these lengths could be restored when importing the skeleton back into Blender.

This issue was raised during the review for USD skeleton export pull request: https://projects.blender.org/blender/blender/pulls/111931#issuecomment-1088602 The underlying problem is that exporting bones from Blender to USD does not preserve the original bone lengths. This is because USD skeletons are composed of joints, not bones, and the joints don't encode length. When importing the skeleton back into Blender, the bone lengths often appear incorrect. Currently, the skeleton import code tries to guess what the bone length should be based on distance from parent bone to child bone. For leaf joints, the guess is based on additional heuristics, such as the average of the estimated lengths for non-leaf bones computed for the entire skeleton. In the case where there is a single bone in the skeleton, the bone is assigned a default length of 1.0. This goal of this design task is to provide a way to preserve the original bone lengths in the USD skeleton. The following two approaches have been suggested so far: @mont29 suggested adding **leaf bones** on export: > This is similar to the FBX handling of skeletons... In FBX exporter there is the Add Leaf Bones option (enabled by default), which adds an extra joint at the tip of each Blender leaf bone. The importer has a matching Ignore Leaf Bones (although disabled by default), to remove these on import. These extra leaves are always fully non-deforming joints. Could this be considered as an USD-valid solution as well? Or would that go against USD standard and/or common expectations from other DCCs? Alternatively, on export we could record the original bone lengths as a **custom property** on the USD skeleton, and these lengths could be restored when importing the skeleton back into Blender.
Michael Kowalski added the
Interest
USD
Interest
Pipeline, Assets & IO
Type
Design
labels 2023-12-29 00:08:03 +01:00
Michael Kowalski self-assigned this 2023-12-29 00:08:03 +01:00
Michael Kowalski added this to the USD project 2023-12-29 00:08:06 +01:00
Jesse Yurkovich added
Module
Pipeline, Assets & IO
and removed
Interest
Pipeline, Assets & IO
labels 2023-12-30 07:10:00 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#116615
No description provided.