- Home /
How can I animate an avatar using only joint position data and inverse kinematics? (No rotation data)
I'm currently trying to animate my humanoid avatar with a CSV (comma separated values) file that contains the desired x,y,z coordinates of each joint, frame after frame (no rotation information). I want to accomplish this myself without the use of any 3rd party software.
Video Link: https://vimeo.com/228297572
Current Solution: I set my avatar's rig to humanoid and wrote a script to attach every joint on the avatar to the desired Vector3 coordinate in the csv file. I'm also using Unity's IK system to connect the avatar's wrists and ankles to the red "skeleton" that I constructed out of the CSV points and DrawLine() functions. The problem is that only the wrists and ankles connect, but none of the other joints are connecting! When I disable the IK, my avatar completely breaks! (Depicted in the image) I would really appreciate any insight, suggestions, or tutorials. Thanks!
Firstly, make sure any code that is programmatically altering the transform of a bone is done in LateUpdate, to override anything the Animator does.
Unless the source of your data can provide you with more information, there is not really a single correct way to do this. I don't know what the format of the data is or how closely it matches Unity's human rig. You should be able to make a good guess as to the orientation of a bone based on its position, and bones that connect to it. e.g. you can use the left and right shoulder position to make a pretty good guess about the direction the upper body is facing.
Hi VV, I'm also interested in using raw joint data to animate a humanoid avatar, but mostly focused on the arm and hand regions. Would you $$anonymous$$d sharing more details regarding the script you wrote that sets joint positions from a CSV file?
Your answer
Follow this Question
Related Questions
How can I use IK with AnimationClipPlayable or AnimationMixerPlayable? 1 Answer
Do I need Inverse Kinematics? Asking for guidelines to program my own custom script 0 Answers
Have IK track point when it is a child of the animator but not the rig. 0 Answers
Inverse Kinematics - Turn off smoothly 0 Answers
Adjusting humanoid character animations (Procedural animations) 0 Answers