mrdoob / three.js

JavaScript 3D Library.
https://threejs.org/
MIT License
102.06k stars 35.34k forks source link

USDZLoader: Invalid zip file when parsing usd file #26171

Open kashyapjain opened 1 year ago

kashyapjain commented 1 year ago

Description

Invalid zip file error when parsing usd file

Reproduction steps

1.tryi loading a usd file

Code

Loader.load(fileUrl, (usdz) => {
          console.log("usdz -----> ");
          console.log(usdz);
        }, (p) => {
        }, (e) => {
          console.log("error");
          console.log(e);
        });

Live example

image

Screenshots

No response

Version

0.133.0

Device

No response

Browser

No response

OS

No response

kashyapjain commented 1 year ago

How to convert usd file to usdz using the USDZLoader parse function as it also returns invalid zip

Mugen87 commented 1 year ago

Do you mind sharing the UDSZ file that produces the runtime error?

kashyapjain commented 1 year ago

The file is usd not usdz that is the problen itself i am using audio2face api which only returns usd and i want to load usd on three.js. I think the parse function in usdzLoader class is for the same pourpose but i am getting the same error from that too.

Below is the usd file https://drive.google.com/file/d/1QUNsc2JLPgsf4WH0ojg235TVGKwVRUIf/view?usp=sharing

mrdoob commented 1 year ago

This file is a usdc (USD Crate) which we still don't support. We only support usda (USD ASCII).

However, would be nice to clean this up a bit and have both a USDLoader and a USDZLoader.

Mugen87 commented 1 year ago

Related: #24574

kashyapjain commented 1 year ago

Yes that would be great