• Editor
  • Suggestion: Assymetric Resistance Constraints

Hi, I know you got your hands full with the Beta right now but I think this would complement the physics feature rather well.
I am aware there are ways to create IK "stopper" contraptions that only stretch or compress to limit movement, but (complexity inconveniences aside) these only work to "hard limit" a bone's movement.
Especially when it comes to physics, it would be useful to have a means to progressively dampen transforms in a particular direction only, bringing them to a stop in a less abrupt way when they move past a certain position.
The applications may synergize well with the whole animation framework, hence why I'm making this post.

To illustrate the idea, here's a mockup on what it could look like

And it would function as so

This would be calculated using a target bone to derive the neutral position, or simply the parent bone.
Slider values at 0 would yield no effect
While -100 and +100 would yield abrupt hard constriction in either direction
Anything inbetween would determine dampening intensity in either direction

In my humble understanding, logic checks (being CPU side) aren't efficient for this. So I made a test formula that only affects either positive or negative values depending on slider and position values.

That formula I tested is
NEW_POSITION = POSITION-((POSITION(((SQRT(SLIDER2))SGN(POSITION))+SLIDER)/2*SGN(POSITION))/100)

Which linearly shaves off movement only on either negative or positive position values depending on slider value, leaving the opposite side unaffected
This linear "padding" could of course be tweaked to use a sine curve, optional or by default, or perhaps even a custom handles through UI. But, I'm not a math guy and I only wanted to make sure I wasn't suggesting something that would necessitate logic conditions.

Crude tests seem about right, sorry I don't have a graph for you to visualize.

Applications off the top of my head to things like springs, resource efficient "cheap" collisions, stuff like physics affected hair bangs made to flip up but not (perceptibly) stretch down, hanging fabric resting on a leg, rotating outwards off the body but not inwards, and countless more. Not taking into account the possibilities if this is keyed into animations like other constraints. I'm sure you can envision the potential.

Just an idea, see if it's of any use.
Thanks for all the hard work

Related Discussions
...

I like the idea to have asymmetrical forces! Thanks for the thorough write up!

Currently the Setup sliders are effectively a "mix slider" for each property. They cannot be dragged into the negative because negative mix doesn't make sense in this case.

I think you are suggesting to add a new set of sliders to weight the two directions for each property. That makes for a lot of sliders, but maybe we could have 2 sliders per row.

Just in case, if you are suggesting to replace the current sliders, they need to perform both mix and weight functions. I don't see how that's possible with just one slider per property. We need to control the 2 directions and the mix separately, which can't be done with one slider. It could be done with 2 sliders though (eg 2 mixes, or 1 mix and 1 left/right "panning").

The first step would be to figure out how to get the desired result, which is to move less in one direction. How physics works is pretty different from how it looks: 1) When bones move an "offset" is computed to simulate lagging behind the action, then 2) forces are applied to return the offset to zero. Done very carefully it results in a lot of neat dynamic movement.

This new feature could affect the first part. First we determine which side is lagging behind the action, then we use one of the 2 mixes. More accurately, the inertia slider is what controls the lagging, but there would be an inertia "panning" slider per property.

Another way to do it could be on the output. When we go to add the offset to the current pose, scale it depending on which direction it is. This is probably more like what you had in mind. If you had a pendulum swinging back and forth, we'd do all the physics for that, but when swinging left it'd only get say 50% of the offset. This way isn't physically accurate: the physics/momentum from swinging left would still be the full left swing, you'd just see half of the swing. The speed of the swing would be half as much on the left and full speed on the right, which wouldn't look right.

We'll give it more thought and see what happens when we try to prototype it. It seems like there could be something really useful here! Though I hate to add even more sliders, it starts to become spaceship controls (like the export dialog 😄).

  • warmanw がこの投稿に返信しました。

    I just noticed I left the "Setup" in the mockup. This wasn't intentional, just a remnant from the original screenshot, sorry if it led to confusion.
    This was meant to be presented as a separate non-physics constraint, similar to a transform constraint.
    The idea, when combined with physics, would be to add "Resistance Constraint" after the physics constraint is applied in the constraint order, to dampen movement in a single direction. Similarly to how one may shave off animation intensity of a bone by using a matching transform constraint targeting the parent bone.

    Although its most useful to control real time simulated behavior like physics (which unlike animations isn't fully predictable), this could also be useful for non-physics stuff. e.g. one may have an animation with a certain movement range, which, after the resistance is applied, becomes more dampened in a single direction.

    It's true that, applied afterwards it wouldn't be true to the physics and could cause some issues, but even if not physically accurate, if the reduction is applied with a sine curve, it would smoothly dampen the movement and can perhaps feel correct enough. Not for very complex things, true, I understand physics relies on the previous position to derive a new position in real time, and in this case would do so completely ignoring the resistance constraint. But then again, it's more of a lightweight solution to prevent clipping and patch up behavior when "bone shouldn't ever be here", or dampen movement just enough to make things feel correct enough.

    To specify, suppose the pendulum you mentioned is swinging left. When it reaches 0 it gets into the negatives, it progressively shave off 1%, then 2%, then 3%, then 4% and so on as it gets farther and farther away. Rather than a shaving a constant 50%. The crude formula I posted more or less does this, just linearly (not applied as a flat reduction).

    And I should mention again, it doesn't need to be linear. I just cooked it up to demonstrate a non-logical way to process direction without conditions, which probably isn't a surprise to you, but, I'm not that knowledgeable and had no clue, so I needed the confirmation before making this suggestion.

    In any case, yes, all of this is made close to obsolete if resistance can be integrated directly into physics, as you considered in your post.
    And I agree with the too many sliders thing, a clean UI shouldn't be compromised, lean tools are the best tools.

    Thanks for the early reply

    Nate Though I hate to add even more sliders, it starts to become spaceship controls (like the export dialog 😄).

    I love export dialog 😃 Just make copy paste feature of the crop-rectangle from one type of export to another
    Ignore this already asked this in older thread.

    @Paperbot Oohhh you were thinking it would be a separate constraint. We've considered something like this before, a "limit constraint", but it's usefulness is increased now that we have physics. I'll have to do some thinking on how that could work. Physics constraint has an offset, so it knows if it's eg left or right of the unconstrained pose. With only a limit constraint, the constraint would need to define the origin for left/right, as well as the limiting factor. How is the origin defined? You may want it in world or local coordinates, or in coordinates of a particular bone.

    @warmanw Haha, I can see that pasting cropping is annoying, since it's 4 separate text boxes. Maybe we could make it a single text box and enforce the formatting.

    • Paperbot がこの投稿に返信しました。

      Nate
      Yes, it would need a reference, I think a target bone would be optimal. The reason for this is doubly so when one may want to account for a possible shifting axis. That is, if the the skeleton were rotate, the intended direction may not match anymore (depending on how the limit is intended to be used, of course), similar to what happens with non-local transform constraints when asymmetric translation is applied and the skeleton is rotated (at 90° X constraint becomes Y).
      I think copypasting transform constraints would do the trick to offer the most options, perhaps with the same offset submenu.

      I made another mockup. I think using sliders for opposing axis is good to compress more options into an intelligible UI, but in hindsight I don't think it's very intuitive.
      UI space concerns aside, I think something like this offers more control and versatility, UI space concerns aside. (This doesn't use the formula posted in the OP)

      And to clarify:

      If avoiding UI clutter hell is a priority, you may also want to consider a drop menu limited to a single transform. It isn't that much of a downgrade if you consider the Limiter's applications will 99% of the time be used on a single transform. Downside would be forcing the user to add more individual constraints if required.

      Just dropping ideas

      To avoid "UI clutter hell" you could add an option in the physics to hide / show if unwanted the limit sliders.

      Edit : Nevermind, I read too fast, I was thinking it was added inside the physics constraint, not as another constraint in addition to the physics constraint

      • Paperbot がこの投稿に返信しました。

        Pentacles
        Yes it can get a bit confusing

        In fact, the Suppresion box might not be needed at all. I ran the stuff in my head again and concluded this last setup is not only unnecessary but detrimentally confusing.
        I was wrongly considering the box as percentage of reduction, while it should be read as position (or any transform value) within the limit range.
        If read like this, a linear setup would yield no movement suppression until the limit is reached and then stop abruptly at the limit, and anything above the slope would cause undesirable dips.
        You'd either want the a smoother ride to the hard limit or a harsher one.
        Thus, only the bottom handle would be needed, which can be represented as a supression value 0-100 (where 0 is linear, and 100 is akin to the bottom handle moved all the way to the left, creating a very steep curve).
        This can be simply another entry at the bottom, taking negligible space.