Inverse kinematic animation

六眼飞鱼酱① 提交于 2019-12-31 00:52:10

问题


I'm trying to find or create a working example of inverse kinematic posing in three.js. Ideally I would like to export human models from Makehuman via their Collada exporter, load them with THREE.ColladaLoader and set them into different poses in three.js programmatically or through some dat.GUI interface. A bit like an artist doll implementation - I don't need animation, but real-time feedback when tweaking the pose would be nice, and inverse kinematic style posing would be highly preferred.

I've been studying and searching information for days. This http://www.youtube.com/watch?v=6om9xy6rnc0 is very close, but I was unable to find any example code or downloads. The closest working example I've found is this: http://mrdoob.github.com/three.js/examples/webgl_animation_skinning.html However that appears to use predefined animation frames, which in turn appears to manipulate the bones in forward kinematics manner so that was not much help either.

I couldn't even find a model for testing, as I don't know what to look for when searching something with IK rigs/skinning/bones compatible with Three.js. Makehuman does seem to have plenty of rigging export options, I don't know if any of those are usable.

Is there a usable IK system in Three.js, and if so, are there any working examples, working human models, or any hints on which exact rigging system/workflow should study to accomplish this? If direct Collada support is not possible, creating the characters in Blender and exporting them is an option too..

EDIT: found this live demo http://www.akjava.com/demo/poseeditor/ but the code is totally unreadable.


回答1:


I don’t feel competent enough to answer your question, but I’ll post three links which may put you on the right track.

  • wylieconlon/kinematics
    – a great demo of 2D inverse kinematics animation. The code is totally readable.

  • https://www.khanacademy.org/computer-programming/inverse-kinematics/1191743453
    – another demo, this time less flexible but more terse.

  • How to calculate inverse kinematics
    – a rabbit hole of links. Just in case you’d want to dive right into the thing.




回答2:


This seems promising.

Fullik : javascript fast iterative solver for Inverse Kinematics on three.js

is a conversion from java to Caliko 3D libs Caliko library is an implementation of the FABRIK inverse kinematics (IK) algorithm

https://github.com/lo-th/fullik



来源:https://stackoverflow.com/questions/14421031/inverse-kinematic-animation

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!