vrm-c / UniVRM

UniVRM is a gltf-based VRM format implementation for Unity. English is here https://vrm.dev/en/ . 日本語 はこちら https://vrm.dev/

Home Page:https://vrm.dev/en

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A normalization bug on Unity2022.

Dragon-Perez opened this issue · comments

Environment

Unity: 2022.3.6f1
UniVRM: UniVRM-0.116.0_0f6c

Describe problem:

Hi, I'm trying to export my model into the vrm but when I import it, it looks mesh up or broken.

imagen_2023-12-14_220319788

Post-Note: It seems the unity version was the problem? Cuz I went to the other unity and it worked.

I encountered the same bug where the exported avatar appears incorrectly when "Pose Freeze" is turned on. It seems to be related to normalization. Avatars exported with "Pose Freeze" off display correctly.
Upon closer inspection, it appears that the bone transform of the bugged avatar is not normalized.
https://imgur.com/a/lPy8KNh
The first picture depicts an avatar exported on Unity 2021.3.4f1, while the second avatar was exported on Unity 2022.3.6f1.
If possible, I suggest changing the title of this issue to something like "A normalization bug on Unity2022."

Versions:
Unity: 2022.3.6f1
UniVRM-0.116.0_0f6c

We have run into the same issue in Unity 2021.3.16f1—ever since updating the VRM package to 0.116.0 the exports with pose freeze have been broken.

As a workaround, we have been able to freeze the mesh using the glTF Mesh Utility, but it would be great if this could be fixed in the VRM export, again!

Unity 2023.2.3f1でも同じ問題が起きます。
UniVRM-0.115.0へダウングレードすると正常にエクスポートできました。

I have also run into this issue with unity versions 2022.3.16f1, 2021.3.4f1, and 2021.3.0f1 while using the VRM Package 0.116.0. I have tried UniVRM 0.115.0 with unity 2021.3.0.f1 and the VRM export is not working either. I'm running into errors with the previous UniVRM versions such as the component "VRM Spring Bone" just not showing up or if it is visable It can't be edited. Also certain folders just aren't getting created with the VRM; such as the blendshapes folder.

I have tried multiple Unity Versions and multiple UniVRM versions, I can't get them to work correctly.

Confirmed reproduction with v0.116.
This is a regression bug in the normalization function.
I'll fix it right away.

vrm export 時に下記の処理が抜けている。

animator.avatar を代入するときに代入前の値を維持しようとする挙動があり、
代入前後で avatar の元のヒエラルキーが変化(例えば正規化)していると壊れる。
代入するのではなく、animator を destroy して作り直す。