USD import breaks even the simplest hierarchy #124102
Labels
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Code Documentation
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
FBX
Interest
Freestyle
Interest
Geometry Nodes
Interest
glTF
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 & 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
Viewport & EEVEE
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Asset Browser Project
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
Asset System
Module
Core
Module
Development Management
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Module
Viewport & EEVEE
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Severity
High
Severity
Low
Severity
Normal
Severity
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
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#124102
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Linux-6.9.4-200.fc40.x86_64-x86_64-with-glibc2.39 64 Bits, X11 UI
Graphics card: NVIDIA GeForce RTX 3080 Laptop GPU/PCIe/SSE2 NVIDIA Corporation 4.6.0 NVIDIA 550.90.07
Blender Version
Broken: version: 4.2.0 Beta, branch: blender-v4.2-release, commit date: 2024-06-24 20:57, hash:
2cc6de8f7eef
Worked: (newest version of Blender that worked as expected)
Short description of error
USD import breaks even the simplest hierarchy
Exact steps for others to reproduce the error
Cube.001
is parented toCube
export as .usda
check the hierarchy is still present in the exported file
import the resulting .usda
note
Cube.001
is not parented toCube
anymore... (next to the naming issues that !124041 aims to solve)Spotted while working on !124041 (but the behavior here probably needs fixing first... or can go hand-in-hand with !124041)
CC @deadpin
CC @makowalski
Thanks for pointing this out. I'll take a look today.
@deadpin for visibility.
I have an idea of what is going on and will look more into this on Friday, as I will be out Thursday.
However, in my humble opinion, the fix started in !124041, which specifically addresses the problem where the object name is changed on re-import from USD, can and should proceed independently, as it's addressing a separate issue.
I.e., in !124041 the problem is how do we name objects which we know represent a merged USD Xform and its child. The issue noted here has to do with how we decide which which USD Xforms and their children can be merged in the first place. This gets complicated when an Xform has multiple children, because we have to decide which child gets merged with its parent and then must appropriately reparent the merged child's siblings.
I have some thoughts on how to improve this. Probably the best way would be to include additional metadata in the USD to specify how the source Blender objects were parented. We could also improve the heuristics currently used for merging even without using such metadata. In any case, such changes aren't trivial and are probably not good candidates for the 4.2 release.
BTW, for what it's worth, I believe the actual transformations are still correct even with this behavior, it's just that the hierarchy is different.
@mont29 for visibility.
This is probably the way to go (since mentioned metadata wont be available on exports from other software)
Was experimenting with this a bit, and current logic turns out to be hairy... (at least for me)
Since Alembic is very similar in concept (and the hierarchy is flawless on the importer side) I am now looking at
static std::pair<bool, AbcObjectReader *> visit_object
in comparison toUSDPrimReader *USDStageReader::collect_readers
to see what is done better there.Arm also taking a quick look into making a tweak to
collect_readers
to handle this case. I will report what I find.@lichtwerk I have WIP progress for a proposed fix: #124153
However, I personally would not recommend making this change for the 4.2 release at this late stage, but am open to discussing it.