Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VRM Support #1137

Open
donmccurdy opened this issue Oct 25, 2023 · 6 comments
Open

VRM Support #1137

donmccurdy opened this issue Oct 25, 2023 · 6 comments
Labels
feature New enhancement or request package:extensions

Comments

@donmccurdy
Copy link
Owner

donmccurdy commented Oct 25, 2023

VRM is a file format focused on features relevant to humanoid character avatars. The format consists of extensions on top of the glTF file format, and could be implemented in glTF Transform as a set of extensions similar to @gltf-transform/extensions.

@donmccurdy donmccurdy added feature New enhancement or request package:extensions labels Oct 25, 2023
@donmccurdy donmccurdy added this to the Blocked or over budget milestone Oct 25, 2023
@hybridherbst
Copy link

One note here as we're also looking into this: v0 is widely used, v1 is "official" now but seems to still be beta/in testing and is comparatively complex. v0 has lots of typos in the spec, very fun to work with...

@miramocha
Copy link

Somewhat related to this. Is there a way to turn off byteStride on export? I was able to read and write VRM0 with this super rough code and it works fine in ThreeJS.

https://github.com/donmccurdy/glTF-Transform/pull/1180/files#diff-9a9aab68c9cd82e5d7eeae7f9fd766aaf20558c7c9c7644fb8d55296936b277a

But UniVRM plugin does not handle these byteStrides really well. For the context, UniVRM is a Unity extension/package that allows apps to load VRM on runtime. And every VRM Unity app I found seems to use it. (See below)

F_2UZbvW0AA5fw5

We can use typings from @pixiv. But in my code I'm not sure how do that so I serialize most of them and only keep track of texture and node reference.

@hybridherbst
Copy link

hybridherbst commented Nov 27, 2023

@miramocha can you attach an example file? If the byteStride is missing they may simply be incorrect glTF files that are parsed by some more loosely checking implementations (or the ones where extra care has to be taken to read, strictly speaking, broken data).

(btw I'm also looking at VRM import/export support for UnityGltf, UniVRM has many issues)

@donmccurdy
Copy link
Owner Author

donmccurdy commented Nov 27, 2023

Probably byteStride here means interleaved vertex data? If you're using an application that doesn't support interleaved data, you can disable that with --vertex-layout separate in the CLI, or with .setVertexLayout on the IO classes:

@miramocha
Copy link

That's the settings I'm looking for, thank you so much!!!!
image

@miramocha
Copy link

miramocha commented Nov 27, 2023

@miramocha can you attach an example file? If the byteStride is missing they may simply be incorrect glTF files that are parsed by some more loosely checking implementations (or the ones where extra care has to be taken to read, strictly speaking, broken data).

(btw I'm also looking at VRM import/export support for UnityGltf, UniVRM has many issues)

If you are interested, they weren't supporting interleaved vertex until relatively recently here: vrm-c/UniVRM#1949

and even that it's still bit buggy. ThreeVRM seems to support it perfectly fine though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New enhancement or request package:extensions
Projects
None yet
Development

No branches or pull requests

3 participants