vrm-dance-viewer icon indicating copy to clipboard operation
vrm-dance-viewer copied to clipboard

The feet of the VRM model have some problems when doing some movements.

Open wangjiangs opened this issue 4 years ago • 4 comments

when i use a vmd animation file to any vrm model, there is some thing wrong with foot as follow picture. I found that this problem is related to this code。a const value IK_OFFSET_INIT.

` const IK_OFFSET_INIT = new Map<VMDBoneNames, IKOffsetInit>([

[VMDBoneNames.Center, { x: 0, y: 1, z: 0, s: 10 }],

[VMDBoneNames.LeftFootIK, { x: 1, y: 1, z: 0, s: 10, dx: true }],

[VMDBoneNames.RightFootIK, { x: -1, y: 1, z: 0, s: 10, dx: true }],

[VMDBoneNames.LeftToeIK, { x: 0, y: 0, z: 0, s: 10, o:4, dx: true, dz: true, dy: true }],

[VMDBoneNames.RightToeIK, { x: 0, y: 0, z: 0, s: 10, o: 4, dx: true, dz: true, dy: true }],

]); `

I tried a lot of values to try to solve this problem, but they are not ideal. I don’t know much about VRM models and VMD animation principles. so can you help me to fix this problem? thanks! this file is my dance animation file。 wavefile_v2.zip

image

wangjiangs avatar May 27 '21 08:05 wangjiangs

Unfortunately, I've tried lots of value to make it as flat as I can too, but it never success. So I gave up at this point, sorry.

JLChnToZ avatar May 28 '21 03:05 JLChnToZ

The reason why the toe IK is not mapped properly is because there is no consistant method to do so, the IK init values are just roughly deal with animation for default Miku MMD model.

JLChnToZ avatar May 28 '21 03:05 JLChnToZ

Hello @JLChnToZ

Can you help to? I would like to debug this: (Click on the youtube video)

IMAGE ALT TEXT HERE

Link: https://youtu.be/VMtRFTRFf6w

Where should I add console.log() and breakpoint ?

Best Regards

Seikida avatar Dec 20 '21 16:12 Seikida

The implementation is in the webworker side so if you want to debug it you may head into src/worker and have a look

JLChnToZ avatar Dec 23 '21 05:12 JLChnToZ