Open MadMax888 opened 1 week ago
I can reproduce with all files. They render a bit differently with the current dev
version of USDZLoader
since a few fixes were applied lately. However, the loader is still unable to load the files correctly.
USDZLoader
only supports a very specific structure of USDA files right now. Other spec-conform structures like the ones from your assets are not supported. To me more precise, your USDZ assets define the materials outside of a XForm
instance. Besides, they use additional Scope
definitions insides Material
definitions which is also something the loader does not expect.
The loader needs a different implementation regarding how to resolve paths and ids like the values assigned to connect
and binding
properties. Otherwise it will be unable to find the correct definitions like in your assets.
I would like to contribute to this issue, but it's beyond my capabilities. However, it touches on a fundamental question about USD and three.js, which I have been asking myself.
A few years ago, Autodesk demo'ed USD in the browser. There is also a USD web visualization project ran by the Academy Software Foundation. What is the current status of these projects? Can these efforts help three.js avoid having to create a custom parser which has to be kept in sync with a living standard?
I've mentioned this topic in https://github.com/mrdoob/three.js/pull/28639#issuecomment-2169260117.
It would be a help if USDZLoader
could internally use a USDA parser that returns a JSON representation of the asset with object types representing the different USD classes. In this way, it would be easier and cleaner to traverse through the hierarchy and identify/process nodes. Right now, we have to do a lot of string testing to identify nodes (like name.startsWith( 'def Material' + id )
which is far from ideal.
However, after working at the latest issues, I have realized this is not the actual major issue. It's the fact that USD is an incredible complex format that will be hard to implement and support. Reminds me a bit at Collada and FBX^^. It seems the goal is to provide a format so teams with different authoring software can work on common scenes. Such a focus means respective 3D assets tend to be expensive to deliver and parse on the client side, though.
I'm not sure what to kind of goal we should have with USD in three.js
, tbh.
Description
Can't open normally other usda files by usdzloader. I've used the same showcase example configuration but had broken preview. Normally works only original file from threejs models/usdz/saeukkang.usdz
Reproduction steps
1. 2. 3.
Code
Live example
Screenshots
Version
165
Device
No response
Browser
Chrome
OS
MacOS