Effects of pins on markers connected to pin-constrained markers

pinEffect_test.zip (19.3 KB)

Hi Marcus,

I’m having trouble with a situation where a marker (let’s call it B) connected to a pin-constrained marker (let’s call it A) is significantly affected by the pin.

Please have a look at the attached scene. The pin has a strong stiffness value. Moreover, B possesses an even stronger stiffness.

In such a relationship, B tends to orient in a direction deviating from the target joint’s direction. This becomes more noticeable with extremely strong values. Interestingly, the stronger the stiffness of the marker, which is supposedly unrelated to the pin, the stronger the impact received from the pin. This is somewhat counterintuitive.

Ideally, I would like B’s rotation to depend on its rotation relative to A. In fact, if the values aren’t taken to extreme levels, this impact eases and behavior approaches the ideal. Also, reducing the damper tends to mitigate the issue. A practical solution at the moment is to adjust all other parameters so that the pin adheres sufficiently even with a relatively small value, and so that B’s animation can be controlled firmly. Nevertheless, the influence from the pin inevitably remains, and the more this influence is feared, the less the marker, which should ideally follow the pin, actually does so.

Also, please try to apply a limit of 10,10,10 to B (referred to as joint4 in the shared file) with a strong Limit Stiffness. You will notice that the limit does not function. Regardless of B’s Rotation Stiffness, the influence of the pin is too strong, disabling the limit.

Is there a solution to this?

1 Like

Hi @AGEnt, thanks for reporting this.

Would it be possible to include a video or at least a screenshot of what you are seeing, so we can be sure we are seeing the same thing. And if you upload a .ma file instead of a .mb that would enable us to open the file. Alternatively a .rag file from Ragdoll → Export Physics.

I should have shared the ma file.

pinEffect_test_ma.zip (40.3 KB)

The one that applies limit.

Hi @AGEnt, sorry for the late reply.

I’ve had a look at your scene and videos, and it’s true the behaviour doesn’t seem intuitive. I expect what is happening is due to the overly large forces in action, especially the translation force.

To address the goal first, there will be a point at which forces stop having a sensible effect. So your primary option is to lower the forces to try and achieve the effect you are after. My understanding is that you want your cylinders to follow the Pin Constraint as closely as possible, the best I was able to achieve was this.

With Limits, I got the best results lowering the Rotate Stiffness on the Marker and switching to the Stable solver type.

How it works

It still isn’t able to stay straight, and that’s due to the nature of how constraints are solved internally in Ragdoll. Which is a little too complicated to get into, but in a nutshell you can think of it like a 2 step process.

  1. For every constraint, translate and rotate each Marker
  2. For Markers with more than 1 constraint, blend the results relative their Stiffness value
  3. Repeat for N-number of times

The N is your Iterations attributes on the solver. And constraints include the Pin Constraint, the Stiffness/Damping value on each Marker and the Limit, those would be 3 constraints acting on a single Marker. Contacts would also be considered a constraint.

In this case, the reason the tip Marker is bent even though the limit is applied to its parent, is because:

  1. Both markers are rotated and positioned due to the Rotate Stiffness of the parent
  2. The results of the limited child is then applied and blended together
  3. Repeat

Because the limited child is directly affected, it receives a greater blend of the the result than the parent.

Now this probably still isn’t crystal clear, and frankly it doesn’t have to be. The forces you’ve got here are too strong for this particular solver, which is called an iterative constraint solver. If you want to try and build some intuition, there is a great GDC presentation here.

Pay special attention to the steps the solver takes to figure out the final position of each “rigid body”, these are our Markers.

1 Like

Thanks, Marcus.

The values here represent the limit at which the Pin can control a mass-bearing object at a sufficient speed, and given that this still cannot eliminate the effect, this approach to animation may be deemed impossible.

Also, changing to a Stable solver type contradicts my aim to pose and animate the bones, so I cannot do it.

The phenomenon I showed here was a problem with fingers and palms. I wanted to control the hand like IK with Pin while posing the fingertips like FK. The Stable solver type was not suitable for firmly controlling the fingers.

I’ll consider another approach.

1 Like

Hi @AGEnt, here’s an example of how to control the hand like IK with a Pin Constraint, while posing the fingers with FK.

pirate_ikposingwithpin.zip (462.6 KB)

I’ve included the .rag file that you can use via the Ragdoll → Load Physics option. To replicate, there is not much other than default values going on here; the arms follow the Pin Constraint because of their very low stiffness value. And the hand retains a rather high (default) value to be posed in FK.

Let me know if this is what you were looking for!

1 Like

It was precisely this approach that led me to discover this issue. If there are pins in the elbows and chest and I want to carefully create a scene with quick movements and lots of contact, this rigidity isn’t enough.

I haven’t fully verified the optimal values yet, so I’ll keep trying a bit more.

Thank you.

If you have an example of what you want to achieve I would be more than happy to help you very your optimal values.

Here’s an example of quick movements with lots of contact (notice the pins on elbows and chest too), using the same technique as before except with an additional character involved.

In my case, I’ve been using trackers from motion capture as pins. In this video, the head and chest are significantly pulled away from the pins by the hand, suggesting that the pin force may not be sufficient to faithfully reproduce the motion capture.

Looking at the trajectory of motion capture, I often find that human bodies, especially the head and chest, don’t wobble much due to the vibration of their own movements. That’s why I needed to make the pins stronger.

Before finding the optimal values to harmoniously coordinate more than ten pins, I just made all pins stronger. That allowed me to capture movements that are faithful to the motion capture. That’s when I ran into the problem with fingertips.I created this thread hoping there might be a way to avoid influencing the rotation at the fingertips, as it would make things easier for me… But I’m beginning to understand that it might be a matter of adjusting the values. Seems I still need to enhance my skills. I’ll keep trying.

The video you shared is a great demonstration of the real value of RD.