Human Spine

72 views
Skip to first unread message

voysey....@gmail.com

unread,
Feb 12, 2016, 10:33:57 AM2/12/16
to Final IK

Hi,

I am trying to recreate a human spine within Unity using Final IK to control the individual vertebra. I need to have it follow along a certain path intersecting certain marker points. At the moment I am using 17 fabrik chains (using two vertabra) and each with a joint limit (15 degrees). It is sorta working but was wondering if there is a better way (more than likely)

Thank you in advance for any help
Michael

Image details (top to bottom), path for the spine to follow, yellow dots are the target points and then the final spine view




Pärtel Lang

unread,
Feb 15, 2016, 4:48:34 AM2/15/16
to Final IK, voysey....@gmail.com
Hey,

The only other solution that comes to mind, is to modify the solving process of FABRIK by a script like this:

using UnityEngine;
using System.Collections;
using RootMotion.FinalIK;

public class FABRIKModifier : MonoBehaviour {

    public FABRIK ik;
    public int boneIndex;

    void Start() {
        ik.solver.OnPreIteration += OnPreIteration;
    }

    void OnPreIteration(int i) {
        ik.solver.bones[boneIndex].solverPosition = transform.position;
    }
}


Add it to an empty gameObject, it will behave like an effector for the bone at "boneIndex."
FABRIK solves in position space so this script just moves the solver position of the bone to the position of this GameObject.
Unfortunately it does not work with the rotation limits. It's not "real IK", but it just might be helpful to you.

Regards,
Pärtel
Reply all
Reply to author
Forward
Message has been deleted
0 new messages