Import USD materials that are not assigned to any object #97195
Labels
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
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#97195
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
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: macOS-12.3-x86_64-i386-64bit 64 Bits
Graphics card: AMD Radeon Pro 580 OpenGL Engine ATI Technologies Inc. 4.1 ATI-4.8.13
Blender Version
Broken: version: 3.1.2, branch: master, commit date: 2022-03-31 17:40, hash:
cc66d1020c
Worked: N/A
Short description of error
Failed to import a simple .usda and .usdc file with only 1 default prim defined (and it is a material).
Exact steps for others to reproduce the error
However, it is possible to use a third party importer such as: https://github.com/robmcrosby/BlenderUSDZ
I do not see why Blender cannot handle the .usda file natively.
Added subscriber: @Zhen-Dai
Blender was able to import material if the usda contains a dummy mesh, such as this one: https://ambientcg.com/view?id=PavingStones115A
But it also set
st
as uv map incorrectly on the material.(Since there is no vertices in the mesh, the uv map is also empty, setting
st
will never work anyway, not sure how this should be handled.)(In the meantime, BlenderUSDZ add-on will hang on this file if imported usdz, so fun time for everyone facing this.)
Additional point (but not strictly a bugfix): Blender usd importer could have supported
displacement
andocclusion
map, but it didn't for reasons?https://graphics.pixar.com/usd/release/spec_usdpreviewsurface.html#preview-surface
Added subscribers: @makowalski, @lichtwerk
Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'
This bugtracker will only handle the native importer, so please no reports about third party Addons.
Can confirm the behavior, no materials are created without dummy objects.
(This is a bit in line with other format importers though, not sure if there is any that just imports materials)
So this might be more like a feature request (a good one though), so maybe @makowalski has this on the TODO already? Or wants to keep this as TODO?
Blender 3.1 does not import USD materialto Blender 3.1 does not import USD material (without a dummy object)Thanks for reporting this, @zhendai. I agree that this is a good feature request and will investigate. We can probably add an option to import unassigned materials, or something similar.
I'm also investigating importing
displacement
andocclusion
, which can be addressed as a separate task.Thx, recently Node Wrangler add-on added similar support as well:
https://developer.blender.org/D14134
Blender 3.1 does not import USD material (without a dummy object)to Import USD materials that are not assigned to any objectAdded subscriber: @codeloadgame
Added subscriber: @Lennart-Demes
As the creator of ambientCG I would like to say Thanks! When I initially generated all the 1500+ USD files for the website Blender's USDPreviewSurface support was still very limited in general, so I assumed the feature would follow at some point. It's great to see this issue acknowledged.
To help with testing I have prepared some sample files with and without a dummy object on Google Drive .
I just tested these files in the latest 3.3.0-alpha(blender-3.3.0-alpha+master.dfb8c90324c0-windows.amd64-release) and can confirm that only the version with the dummy object gets the material imported, even when disabling the "visible objects only" checkbox while importing.
There is also a DevTalk thread about this, in case someone wants to discuss this situation and possible solutions there instead.
Thank you so much for the feedback, @struffel. Indeed, importing unassigned materials is a desirable feature, as I noted above, and I'm about to start work on this. Your files will serve as a good test case, so thank you for providing them!
Hi, it's been a while. Has there been any recent activity regarding this topic, maybe in one of the daily/bleeding edge builds?
Hi @Lennart-Demes This task was partly blocked by unrelated refactoring of the USD material import code, which is now done. I'll be working on the "unassigned materials" import topic next.
@Zhen-Dai @Lennart-Demes I've implemented this feature and it's available for you to test in the
tmp_usd_import_unbound_mtls
experimental build available from the experimental builds downloads page:https://builder.blender.org/download/experimental/
There is a new
Unbound Materials
toggle to enable importing unassigned materials, which is off by default. You will probably need to rename the mesh UV set to match what's expected by the material, usuallyst
.I will create an official patch for this later today. Please let me know if you have feedback or encounter issues.
Thx Michael! Downloading now, I will test it out this Friday.
Super exciting! I'll test it out tomorrow!
Okay, looks good to me! All the materials are getting imported.
The thing with the UV map name is a bit annoying of course but I don't see a way of dealing with that without creating issues elsewhere (I could rename my UV maps to Blender's 'UVMap' default name instead of 'st' but that would break stuff for other people).
Thanks so much for testing, @Lennart-Demes!
As for the UV map name issue, we could add an option to automatically rename the maps on import into Blender. E.g., a checkbox to rename
st
toUVMap
, or more generally, some sort of UI to specify how USD primvars should be renamed when converting to Blender attributes. But this will require some thought and discussion, so it should probably be handled in a separate patch.Hi again, this feature hasn't made the jump into the official 3.4 release, has it? Is it possible to say with which official release the new material import will be shipped?
Hi Lennart. Sorry for the late reply. I'm still addressing some issues raised in the patch review and I hope to have a revision for this some time next week. Therefore, this feature has not been merged into 3.4, but I believe it will ready for 3.5, barring any unexpected issues in subsequent reviews.
Hi @Lennart-Demes and @zhendai. Just FYI, I submitted a revision to the patch based on the reviews. I also created a patch build for this latest version. If you want to try it, please go to
https://builder.blender.org/download/patch/
and look for the D16172 build. Note that the USD import option for this feature is now called
Import All Materials
.Looks good to me! I tried the usda and usdc files of these materials:
ambientCG.com/a/PavingStones036 (base case)
ambientCG.com/a/ManholeCover004 (metalness and opacity)
ambientCG.com/a/Lava005 (emission)
and they all worked as expected.
Thanks for testing, @Lennart-Demes!
Added subscriber: @GregZaal
Changed status from 'Needs Developer To Reproduce' to: 'Resolved'
@Zhen-Dai @Lennart-Demes This change has landed in master and should be available in the next alpha build.
That's amazing! Thank you!