USDZ roundtrip breaks texture coordinate assignment #105368

Closed
opened 2023-03-02 11:18:53 +01:00 by Zhen Dai · 3 comments

System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 2070 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 527.56

Blender Version
Broken: version: 3.5.0 Beta, branch: blender-v3.5-release, commit date: 2023-03-01 10:15, hash: ff89dfd6d283
Worked: N/A

Short description of error

Importing a USDZ file, then export it as USDZ, then re-import the result USDZ, textures are no longer displayed due to incorrect uv map setup in shader.

This is problematic because things like https://www.usdz-viewer.net/ (based on three-usdz-loader) or Apple QuickLook preview relies on the correct UV Map to work. (I only tested the former, I assume it is also broken in QuickLook.)

I seem to recall reporting such a problem in much earlier Blender version, but couldn't find the report, USDZ support has just been merged recently, so I hope this is a good opportunity to fix this problem.

Exact steps for others to reproduce the error

  1. Download an USDZ example from Apple website, such as the Retro TV model:

https://developer.apple.com/augmented-reality/quick-look/models/retrotv/tv_retro.usdz

  1. Import it into Blender, observe the UV Map are not set, so the default UV Map (st) are used.

  2. Export it as USDZ, ensure To USD Preview Surface are enabled.

  3. Re-import the exported archive, notice textures are not displayed, because UV Map is now set to an non-exist _ UV name, resetting it restore the correct behaviour.

**System Information** Operating system: Windows-10-10.0.19044-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 2070 SUPER/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 527.56 **Blender Version** Broken: version: 3.5.0 Beta, branch: blender-v3.5-release, commit date: 2023-03-01 10:15, hash: `ff89dfd6d283` Worked: N/A **Short description of error** Importing a USDZ file, then export it as USDZ, then re-import the result USDZ, textures are no longer displayed due to incorrect uv map setup in shader. This is problematic because things like https://www.usdz-viewer.net/ (based on three-usdz-loader) or Apple QuickLook preview relies on the correct UV Map to work. (I only tested the former, I assume it is also broken in QuickLook.) I seem to recall reporting such a problem in much earlier Blender version, but couldn't find the report, USDZ support has just been merged recently, so I hope this is a good opportunity to fix this problem. **Exact steps for others to reproduce the error** 1. Download an USDZ example from Apple website, such as the Retro TV model: https://developer.apple.com/augmented-reality/quick-look/models/retrotv/tv_retro.usdz 2. Import it into Blender, observe the UV Map are not set, so the default UV Map (`st`) are used. 3. Export it as USDZ, ensure `To USD Preview Surface` are enabled. 4. Re-import the exported archive, notice textures are not displayed, because UV Map is now set to an non-exist `_` UV name, resetting it restore the correct behaviour.
Zhen Dai added the
Priority
Normal
Type
Report
Status
Needs Triage
labels 2023-03-02 11:18:54 +01:00
Bastien Montagne added
Status
Confirmed
Type
Bug
Interest
USD
and removed
Status
Needs Triage
Type
Report
labels 2023-03-02 13:06:23 +01:00
Bastien Montagne added this to the USD project 2023-03-02 13:06:27 +01:00
Philipp Oeser added the
Module
Pipeline, Assets & IO
label 2023-03-17 14:37:56 +01:00
Member

We fixed a very similar problem with #105508, but apparently we missed another case where this happens. I will have a look.

We fixed a very similar problem with https://projects.blender.org/blender/blender/pulls/105508, but apparently we missed another case where this happens. I will have a look.
Matt McLin self-assigned this 2023-04-14 17:28:41 +02:00
Member

@Zhen-Dai please have another look with the official Blender 3.5 release or 3.6 betas.
This problem is fixed now, but to test it you will need to re-import the USDZ asset. If you simply open your earlier test scene again, you will still see the problem because the missing UVmap names are stored into the Blender project, so a fresh import is necessary.

@Zhen-Dai please have another look with the official Blender 3.5 release or 3.6 betas. This problem is fixed now, but to test it you will need to re-import the USDZ asset. If you simply open your earlier test scene again, you will still see the problem because the missing UVmap names are stored into the Blender project, so a fresh import is necessary.
Matt McLin removed their assignment 2023-04-14 21:12:37 +02:00

Closing as this was fixed some months back. I've also re-confirmed that the scenario still works correctly in at least 3.6, 4.1 beta, and 4.2 alpha.

Closing as this was fixed some months back. I've also re-confirmed that the scenario still works correctly in at least 3.6, 4.1 beta, and 4.2 alpha.
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2024-03-01 04:25:41 +01:00
Jesse Yurkovich added
Status
Resolved
and removed
Status
Archived
labels 2024-03-01 04:25:52 +01:00
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset System
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
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
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
3 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#105368
No description provided.