Skip to content

Grantmartin2002/Inverse-Kinematics-Readme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

Inverse-Kinematics-In-Opengl

- NOTICE: This project is a read-me ONLY. The codebase the project was developed on is confidential and thus cannot be shared.

Presentation (Presents outdated codebase. Branching, quaternion calcultions, and end effector movement have been remedied as explained below).

I implemented inverse kinematics in OpenGl

Development Process:

  • Find a way to represent and update the joint chain

    • Ended up finding all the bones with no children, and those endpoints would be the end effectors

    • The chain would be the bone with the end effector and all its parents

    • Because IK deals with joints, but we only have bones with A4, I had to add an extra layer of abstraction when updating joint positions:

  • Find a way to visualize and intersect the end effectors

  • Find way to tell end effector where I want it to go

    • When dragging an end effector, targetPos = p  + v * (most recently calculated t value when calculating end effector intersection)
    • Results:
  • Implement FABRIK

  • Fix branching issue

    • FABRIK doesn’t handle branching (updating positions of bones not in the joint chain)

    • I’m handling this by setting all children’s positions to their parents endpoint at the end of an IK iteration

      • This works for most scenes, but breaks if the scene has disconnected bones (such as the mannequin and the head). I tried to remedy this, but didn’t have enough time to find a good solution.
    • Results:

  • Get Quaternion calculations working

  • Bugs/limitations

    • My current bone branching implementation assumes bones/joints are connected, which isnt always the case (mannequin and head scene).

      • So the bones snap together when they shouldnt
    • Didn’t have time to implement angle constraints (so rotations on mannequin look unrealistic)

  • Codebase difficulties

    • A4 is extremely difficult to deal with due to needing render passes and shaders for everything (rendering the sphere/gridded lines around the sphere alone was quite painful)
    • A4 has bones, not joints, so had to add extra logic and abstractions to represent that
    • FABRIK expects a single chain, not branching, which is required for A4 models
    • FABRIK expects connected joints, but A4 models have separated joints (not enough time to fix this, unfortunately)
    • I hate quaternions (that issue alone took forever, yet the solution was so simple ;-;)

About

Inverse Kinematics Readme (code repository is confidential)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published