saturday06 / VRM-Addon-for-Blender

VRM Importer, Exporter and Utilities for Blender 2.93 to 4.2
https://vrm-addon-for-blender.info
MIT License
1.3k stars 142 forks source link

Bug report: Wrong eye bone rotation axis on export #227

Open Lix3nn53 opened 1 year ago

Lix3nn53 commented 1 year ago

Describe the bug

When I import vrm directly from vroid studio to unity, eye rotation is correct. But when I import same vrm model to blender, then from blender, then import it to unity: eye rotation axises are wrong. When exported from blender: image When exported from vroid studio: image

As you can see in the images, horizontal axises are mixed up. This breaks left/right looking of eye tracking.

To Reproduce

Steps to reproduce the behavior:

  1. Export vrm from vroid studio
  2. Import vrm to blender
  3. Export vrm from blender
  4. Import vrm to unity
  5. Try eye tracking

Expected behavior

Eye rotation horizontal axises must be correct.

Desktop (please complete the following information)

Lix3nn53 commented 1 year ago

Found a manual solution: image Like in the image above, go to edit mode and change the eye bones to point straight up (increase the Z of the tail and set X and Y of the Tail to match the Head) and set each eye bone's roll to 0. After this you can export from blender to unity and eye tracking works as normal. I didnt find this solution so i dont know whats going on but here is an explanation from the user suggested this solution: image

saturday06 commented 1 year ago

Currently, your manual solution is the correct solution.

In the VRM 1.0 specification, there are no restrictions as to the eye bone rotation value. If your eye tracking system requires a specific value for the eye bone rotation value, it is better for you to set the value directly.

VRM provides a function called "VRM Look At" for eye tracking and other eye movements. With that function, it does not matter what the initial rotation of the eye bone is. Since the eye tracking system you are using does not seem to support it, it would be a good idea to request the manufacturer of the eye tracking system to support it.

saturday06 commented 1 year ago

The VRM Add-on performs the conversion of the bone axes when importing VRM. This is because VRM does not determine the correct direction of the bone axes, so in order to import them cleanly in Blender, the correct axis direction should be determined on its own.

However, there are situations where it is better not to perform such axis transformations, such as when using Blender in the middle of an automated workflow. Therefore, I am considering adding a setting that does not perform axis transformations.

Alternatively, once the newly developed Blender axes are introduced, we will discontinue axis transformations. https://twitter.com/sastuvel/status/1632413407528865798?s=20

saturday06 commented 11 months ago

increase the Z of the tail and set X and Y of the Tail to match the Head) and set each eye bone's roll to 0

A bug was found in an application using UniVRM that causes eye control to fail if the manual solution is not applied. Most VRM 1.0-compliant desktop applications are affected.

Please check https://github.com/vrm-c/UniVRM/issues/2159 for the latest status.