Skip to content

USDLoader: Performance improvements and external texture support.#32790

Merged
mrdoob merged 7 commits intodevfrom
usd
Jan 19, 2026
Merged

USDLoader: Performance improvements and external texture support.#32790
mrdoob merged 7 commits intodevfrom
usd

Conversation

@mrdoob
Copy link
Owner

@mrdoob mrdoob commented Jan 19, 2026

Related issue: #32730 (comment)

Description

Improves USDLoader performance by building O(1) lookup indexes for hierarchy traversal, attribute access, material resolution, shaders, and GeomSubsets. Optimizes USDCParser's half-float conversion and buffer reuse.

Adds support for triple-quoted strings in USDAParser to handle embedded OSL shader code from Maya exports.

Fixes material binding for meshes with GeomSubsets by falling back to mesh-level bindings when subsets don't specify their own materials.

Adds LoadingManager support to USDComposer, allowing external textures to be resolved through the manager's URL modifier. The editor now passes its LoadingManager to USDLoader, enabling users to load USD files alongside their external texture files.

Screen.Recording.2026-01-19.at.12.59.26.mov

mrdoob and others added 7 commits January 18, 2026 20:31
When a mesh has GeomSubsets without their own material bindings, fall back to the mesh-level material binding instead of leaving materials empty.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Handles multi-line string values delimited by ''' or """ (used for embedded OSL shader code in Maya exports).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Build childrenByPath index for O(1) hierarchy traversal
- Build attributesByPrimPath index for O(1) attribute lookups
- Build materialsByRoot index for faster material resolution
- Pre-compile regex patterns as module constants
- Extract shared _applyTextureOrValue helper for material application

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@mrdoob mrdoob added this to the r183 milestone Jan 19, 2026
@mrdoob mrdoob merged commit 3b39ab8 into dev Jan 19, 2026
9 checks passed
@mrdoob mrdoob deleted the usd branch January 19, 2026 04:53
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