webaverse / xrpackage

XR (VR+AR) web object packaging core API
https://xrpackage.org/
24 stars 10 forks source link

Initial FBX file support #99

Open shu8 opened 4 years ago

shu8 commented 4 years ago

This branch/PR is an attempt at investigating #76.

So far, it seems to work for packaging a single FBX file, but I'm not sure if this is going along the right lines? (I managed to upload it at /inspect.html, bake it, export the .wbn, and add the .wbn in a world at /edit.html(

I'm also not sure about:

Samba-Dancing.zip

avaer commented 4 years ago

This looks like the right direction to start, with the conversion to GLTF 👍 .

The biggest problem is most users of FBX expect to upload a disastrous collection of files including fbxs and their texture files, which rarely load correctly without mapping guesswork (OBJ has a similar property). One of the biggest usages of FBX is in fact unitypackage, which is a proprietary unity bundle (ZIP), which is an additional complex thing to decode (the avatars repo does make a reasonable attempt).

Both uploads in browser and xrpk CLI can handle multiple files at a time, but I think the hardest part of this is mapping things like textures and external dependencies in the proprietery FBX format for the typical types of files users want to upload.

shu8 commented 4 years ago

I see, thanks! I will try researching more into FBX formats then!

Would you say OBJ files would be simpler? They seem to just be simple 3D files like VRMs to me?

Also do you have any thoughts on how to approach maintaining animation from FBX files? Or would that be too much of a hassle to support in XRPackage?

avaer commented 4 years ago

OBJ is a lot simpler but much more rarely used. FBX is the thing people use other than GLTF.

Animation is probably equally as hard as FBX texturing. But I wouldn't manage it as FBX animations -- just convert it to GLTF as in this repo.