Skip to content

VRM support #856

@Moebytes

Description

@Moebytes

Hello, I am still interested in VRM support, which is an extension of glb commonly used for vtubers.

Based on the specification available here, I think it is just the extensions "VRM" or "VRMC_vrm" added to the json:
https://github.com/vrm-c/vrm-specification

I made some changes to preserve this in the output json, but I experienced some issues where it works for some vrm files and not for others. My code changes are here:
https://github.com/Moebits/meshoptimizer/tree/vrm

Another thing of note is that I had to disable quantization -noq and enable all the keep options for it to work -kn -km -ke -kv.

Here is a VRM viewer where you can quickly test the vrm:
https://pixiv.github.io/three-vrm/packages/three-vrm/examples/dnd.html

This was one of the models that worked:
./gltfpack -i sung.vrm -noq -kn -km -ke -kv -si 0.7 -o sung2.vrm
This model didn't work:
./gltfpack -i miku.vrm -noq -kn -km -ke -kv -si 0.7 -o miku2.vrm
This is the error when loading it in that viewer (with three.js and pixiv vrm extension):

Image

sung.vrm: https://files.catbox.moe/xz3p5l.vrm
sung2.vrm: https://files.catbox.moe/p47ntm.vrm
miku.vrm: https://files.catbox.moe/kdguiv.vrm
miku2.vrm: https://files.catbox.moe/ypqn8h.vrm

I would appreciate some help in resolving this issue as I don't know enough about glTF to fix it. It seems like the textures aren't being saved correctly. Thanks!

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions