pixiv / three-vrm

Use VRM on Three.js
MIT License
1.31k stars 111 forks source link

Characters come out backwards - how to rotate and get all the bones right? #1295

Closed alankent closed 1 year ago

alankent commented 1 year ago

When I load a VRoid Studio character into a scene, they come out with their back to the camera (the opposite of other GLB characters I load, from say ReadyPlayerMe). I tried just rotating around Y by 180 degrees, but the bones still seem backwards. E.g. MediaPipe rotates the head Y-axis the opposite direction. It's basically like the mesh is backwards. I tried rotating all the meshes by 180 degrees, then tried flipping the X/Z (to -X/-Z) but there is always a problem.

I am probably missing something simple so I thought I would ask. How to have VRoid Studio characters (VRM files) load facing forwards, with all the bones working correctly (consistent with characters from other systems)?

Thanks!

yue4u commented 1 year ago

@alankent Hi, the facing direction of the model has been changed since VRM 1.0. For VRM 0 models you can use VRMUtils.rotateVRM0 to rotate the model. You can find other change details here.

Alternatively, You can also try exporting the model using VRM 1.0 format from VRoid Studio. image

If this does not fix your issue please provide a public reproduction so we can inspect the problem further.

alankent commented 1 year ago

Sorry for not responding sooner, but thank you. With VRM 1.0 rotating the models that simplifies everything. I will just re-export them from VRoid Studio using VRM1.0 then.