Jump to content

Applying IK-Spline to joints breaks joint positions


Recommended Posts

On 9/9/2021 at 9:37 PM, Matches said:

I took a quick look at your constrictor scene, and the first thing I noticed was that in the neck chain, joints 23-41 were twisting off course and not keeping a consistent up axis. Once I fixed this, the rig behaved predictably without giving weird twists.

Try it for yourself and see if that helps. 🙂

How did you fix those?  They looked fine to me at first and they only 'broke' once I started moving the helper objects and then things would start flipping around or twisting badly.  The twisting part makes me uncomfortable since it makes it hard to animate any meaningful movement, but its also pretty tedious to work with 100+ joints so I might have to go and cut some of those and make it one long chain instead of a Neck, Hip, Tail setup like it shipped with, unless you'd recommend otherwise? The 'Hip' joint got deleted at some point it seems, making that horrid deformation in the middle

Link to comment
  • 1 month later...
On 9/9/2021 at 9:37 PM, Matches said:

I took a quick look at your constrictor scene, and the first thing I noticed was that in the neck chain, joints 23-41 were twisting off course and not keeping a consistent up axis. Once I fixed this, the rig behaved predictably without giving weird twists.

Try it for yourself and see if that helps. 🙂

 

Hey it's been a while,  I was wondering if I could ask how you managed to find out how those were the trouble spots and how you fixed it?

Also, if I may - is this the best way to go about a rig like this?  I'm still learning the intricacies of rigging in Cinema beyond the basics,  but the only way that came to mind for me is Spline-IK.  Which had its own host of issues I could never figure out and no tutorial online ever seemed to address.  Namely, when posing or animating it, the body acting weird like that?  If I needed it to climb up a tree or branch, or otherwise wrap around something,  stuff breaks.

 

https://www.artstation.com/marketplace/p/axNx/green-boa  I recently saw this model and took a look at it, the rig setup was very different (Starting at head and moving down for instance and using Clamp Constraints;  but it can't really perform movement beyond staying on the ground.  Enabling either Object or World in the Spline-IK Twist section just makes each segment spin wildly.

 

 

Is this a job for Spline IK or is there a better way to go about making a good rig setup for a serpent?

Link to comment

Hi, Sylxeria

 

The way I checked your scene was by zeroing out the rig controls' psr, and then quickly running through the joints via the object manager with the move tool set to local to see each joint's axis. Until joint 23, the chain maintained a relatively consistent up axis, which in this case was the Y axis, but afterwards started to spin around the Z, causing the up axis (Y axis) to tilt off course. This is a fairly easy fix using the Joint Align Tool.

Just as a tip for best practices, it's a good idea to freeze your joints before applying ik or binding the rig in order to have a clean starting rig or possibly to help troubleshoot later if necessary.

 

Regarding best approaches for this rig - a spline ik is definitely a good base, but could certainly have it's functionality expanded.

Just as an example, you could easily achieve an effect where the snake could roll it's tail up (or it's head) by creating an fk chain of joints or nulls and parenting the ik spline controls underneath. This is a motion and pose that would be tedious to manually animate using the spline ik controls.

There are other features that you may want to add depending on the needs of your project, and these should be incorporated into your rig and built upon to suit your needs and preferences.

 

I hope this helps

Link to comment
2 hours ago, Matches said:

Hi, Sylxeria

 

The way I checked your scene was by zeroing out the rig controls' psr, and then quickly running through the joints via the object manager with the move tool set to local to see each joint's axis. Until joint 23, the chain maintained a relatively consistent up axis, which in this case was the Y axis, but afterwards started to spin around the Z, causing the up axis (Y axis) to tilt off course. This is a fairly easy fix using the Joint Align Tool.

Just as a tip for best practices, it's a good idea to freeze your joints before applying ik or binding the rig in order to have a clean starting rig or possibly to help troubleshoot later if necessary.

 

Regarding best approaches for this rig - a spline ik is definitely a good base, but could certainly have it's functionality expanded.

Just as an example, you could easily achieve an effect where the snake could roll it's tail up (or it's head) by creating an fk chain of joints or nulls and parenting the ik spline controls underneath. This is a motion and pose that would be tedious to manually animate using the spline ik controls.

There are other features that you may want to add depending on the needs of your project, and these should be incorporated into your rig and built upon to suit your needs and preferences.

 

I hope this helps

 

I just tried that, and they all still seem aligned equally?  I might be missing something though.

 

 

A Joint chain with the handles assigned like this? (Ignore the mess in the viewport haha)

 

806443578_Screenshot2021-10-26214027.jpg.afa9e4d12150b0bc7005c1c794a58848.jpg

 

 

Well, it looked better before I took the screenshot;  I hit an Undo after posing it really quickly and the end of the neck twisted in a way that wasn't *bad* but it wasn't how I had it prior to the Undo. After a bit of tinkering I ended up hitting Reset Bind Pose and all hell broke loose.  Reloading the file it looked like this hah. 

I found that all this time I hadn't seen that the model's Scale was set to 0.491,  which was probably causing a host of issues but I'm not really sure how to fix that either except for repositioning things by hand.  I might as well just dig back up the original exported file and start from scratch!

 

While it was working, it was working very well. Thank you for the advice about an FK Chain driving the Handles!

 

 

 

'There are other features that you may want to add'

As a beginner/novice with rigging, I'm not even sure what those features might even be;  especially while I'm still sorting out comparatively simple things.  Thanks again for the help!

 

Link to comment

I've uploaded the file where I've gone ahead and cleaned up the joint rotations on the neck joints, and provided a rough example of the fk setup.

Just an fyi, setting the ik control spline to bezier and adjusting the tangent handles accordingly will give your ik spline controls influence over the rig's P rotation. However this can give you messy results when working with the fk setup, so depending on your animation shot you'll want to set your spline on either bezier or something like b-spline, like you had it originally.

 

I hope this makes sense. 🙂

Constrictor_0006.rar

Link to comment
8 hours ago, Matches said:

I've uploaded the file where I've gone ahead and cleaned up the joint rotations on the neck joints, and provided a rough example of the fk setup.

Just an fyi, setting the ik control spline to bezier and adjusting the tangent handles accordingly will give your ik spline controls influence over the rig's P rotation. However this can give you messy results when working with the fk setup, so depending on your animation shot you'll want to set your spline on either bezier or something like b-spline, like you had it originally.

 

I hope this makes sense. 🙂

Constrictor_0006.rar 2.52 MB · 1 download

That's been a lot of help,  examining what went wrong and where;  though I'm still trying to see where and how I failed to get the joints to align properly - I thought i was doing it right, but I guess not!

 

There's still the issue of the missing middle joint (The transition between the 'neck' chain and 'tail' chain) as well as if having a Neck/Tail split is ideal for a model like this, but that's a whole different story than the IK Chain topic.  Since this was a model I bought I certainly didn't set it up like that and the Boa model I linked earlier is just one long chain starting at the head and ending at the tail, instead of starting at a "Hip" middle point and ending with the Head. 

 

 

It does make sense yes 🙂  Thanks again for all the help, it's definitely helped with my understanding joints and IK

Link to comment
On 10/27/2021 at 1:32 AM, Matches said:

I've uploaded the file where I've gone ahead and cleaned up the joint rotations on the neck joints, and provided a rough example of the fk setup.

Just an fyi, setting the ik control spline to bezier and adjusting the tangent handles accordingly will give your ik spline controls influence over the rig's P rotation. However this can give you messy results when working with the fk setup, so depending on your animation shot you'll want to set your spline on either bezier or something like b-spline, like you had it originally.

 

I hope this makes sense. 🙂

Constrictor_0006.rar 2.52 MB · 1 downloa

 

Things have been going pretty well with your advice, though I might need to add in extra handles since it doesn't seem to bend tightly enough with the very few it has on the neck especially.  However, my current main concern is the "tip" of the head and tail both can't bend properly and won't rotate like their preceding handles?  How would I fix that? Add more points to the spline, or make it longer?

987281142_Screenshot2021-10-29185705.jpg.71e2b01fb7281d8f4d5c48656c11e97f.jpg

764136078_Screenshot2021-10-29182619.jpg.cb0de9d77bb77a6370d10dd3491915c3.jpg

 

Ignore where the axis currently is though,  I had to move it back there to get the curve in the neck behind it  -  but its the one that can't "bend", only twist a bit.  Unless its in Bezier mode, in which case it can bend just fine. It just can't bend in any other mode.

 

 

 

A lesser note is the vertices on the tail tip are all scrunched up. It seems the Spline involved is to blame but I'm not sure how?

Screenshot 2021-10-29 185642.jpg

Link to comment

I can't be sure what's causing the tail displacement without seeing the current scene file, however I would suggest a rig solution that offers convenience and control with minimal effort. The basic idea is to have two rigs for your model: one should be IK-spline and the other FK. The FK rig should be skinned to your model and be driven by the IK rig through a parenting setup. This would allow you the convenience of the IK-spline rig without surrendering control by using an FK rig when you feel the need.

 

I'm including an example scene to demo what I'm talking about.

There are other solutions to handle a project like this, but I feel that this approach should be a sufficient start without too much hassle.

IK-FK_demo.c4d

Link to comment
13 hours ago, Matches said:

I can't be sure what's causing the tail displacement without seeing the current scene file, however I would suggest a rig solution that offers convenience and control with minimal effort. The basic idea is to have two rigs for your model: one should be IK-spline and the other FK. The FK rig should be skinned to your model and be driven by the IK rig through a parenting setup. This would allow you the convenience of the IK-spline rig without surrendering control by using an FK rig when you feel the need.

 

I'm including an example scene to demo what I'm talking about.

There are other solutions to handle a project like this, but I feel that this approach should be a sufficient start without too much hassle.

IK-FK_demo.c4d 281.78 kB · 0 downloads

I didn't know you could have IK and FK work in conjunction with each other like that!  Really shows how little my understanding of Cinema4D's rigging is, thanks for the clarification and insight 🙂

 

I don't have the project file on-hand right now but when I get back to my work computer I'll get the file up.  I think it might have had something to do with the spline length or the handles, but I can't be sure. 

Link to comment
On 10/31/2021 at 9:00 PM, Matches said:

I can't be sure what's causing the tail displacement without seeing the current scene file, however I would suggest a rig solution that offers convenience and control with minimal effort. The basic idea is to have two rigs for your model: one should be IK-spline and the other FK. The FK rig should be skinned to your model and be driven by the IK rig through a parenting setup. This would allow you the convenience of the IK-spline rig without surrendering control by using an FK rig when you feel the need.

 

I'm including an example scene to demo what I'm talking about.

There are other solutions to handle a project like this, but I feel that this approach should be a sufficient start without too much hassle.

IK-FK_demo.c4d 281.78 kB · 1 download

Sorry for the silence,  IRL's been pretty hectic lately!   There's a big render ongoing right now but I found out what was causing the distortion in the tail before I started the project rendering - somewhere along the line the weighting on the few joints got royally messed up and now each joint is belonging to four or five other joints haphazardly. Was an easy fix!

 

Not as easy is figuring out a good solution for the neck and head's 'stiffness' with the IK,  the very last controller is unable to really do much with that last portion. I found by changing it off of 'Fit' and onto 'Relative' or something else helps at the cost of the body potentially being able to stretch imcorrectly.  Maybe Clamp Constraints on the handles?

 

 

I took a look at the IK-FK Demo, had a hard time applying it to another serpentine creature I had and it didn't even have 60 joints, the Constrictor one has 180 !!  Didn't seem practical to try setting it up.

 

One change I've made since we last talked was moving the controls for the head and jaw to the top of the hierarchy and then constraining the respective joints to them.  It's not perfect, since sometimes they don't move properly when the spline handles move,  but it does prevent the TImeline from becoming unreadable. Whenever those were animated before, it'd stretch the timeline out across the entire screen just so it could show the Head/LowerJaw joints!

Link to comment
×
×
  • Create New...

Copyright Core 4D © 2023 Powered by Invision Community