Revert Marker to "Use Translate/Rotate Stiffness"

Hello!

During creation of a new Marker, we can choose to enable Use Translate/Rotate Stiffness. I made a whole character using this option.

Is it possible to disable/enable this feature after creating a Marker?

Thank you!

There is, but not for long. Translate and Rotate stiffness is the newer addition that replace the older Pose Space etc. They exist only to bridge the gap between scenes saved in an older version of Ragdoll and a newer. Given that these are about a year old, they are about to be removed.

With that in mind, there is a way to do what you want.

  1. Select the Markers you want to revert
  2. Run the below script
from maya import cmds

for marker in cmds.ls(selection=True, type="rdMarker"):
    cmds.setAttr(marker + ".useLinearAngularStiffness", False)

You still won’t see the channels in the Channel Box, they can instead be found at the bottom of the Attribute Editor, under Extra Attributes.

image

You can manually hide the Translate/Rotate Stiffness attributes, and show these attributes in the Channel Box via Maya’s Channel Control editor.

1 Like

I dug a bit after my original post and noticed the Attr had different values, though wasn’t 100% sure that was exactly the difference. Thank you! I’ll write out some scripts to add/remove these Attrs when enabling this feature. Should add some temporary backwards compatibility on older setups (especially since it’ll all be removed later!).

Thank you!

Here’s the command to switch old Nodes to the new style. It will also swap the Attributes in the ChannelBox to reflect the change.
@marcus , let me know if any Attributes are missing from the old or new attribute lists.

from maya import cmds

def enable_new_ragdollNodes(markers, enable):
    '''
    Switch Ragdoll Dynamics markers to use the new Angular Stiffness.
    Will also switch Attributes in ChannelBox to match the change.
    :param markers list:
        List of rdMarkers to perform the switch on.
    :param enable bool:
        True: apply the new node type, disable old Attributes in ChannelBox,
        enable new Attributes.
        False: revert to legacy node type, enable old Attributes in ChannelBox,
        disable new Attributes.
    '''
    
    old_attr_list = ['driveStiffness', # Pose Stiffness
                    'driveDampingRatio', # Pose Damping
                    'driveSpace', # Pose Space
                    ]

    new_attr_list = ['angularStiffness', # Rotate Stiffness
                    'angularDampingRatio',  # Rotate Damping
                    ]

    for marker in markers:
        cmds.setAttr(marker + ".useLinearAngularStiffness", enable)
        
        for attr in new_attr_list:
            cmds.setAttr(marker+'.'+attr,keyable=enable)
        
        for attr in old_attr_list:
            cmds.setAttr(marker+'.'+attr,keyable=not enable)

# Change selected Markers
enable_new_ragdollNodes(markers = cmds.ls(sl=1,typ='rdMarker'), enable = True)

# Change all scene Markers
enable_new_ragdollNodes(markers = cmds.ls(typ='rdMarker'), enable = True)

Yes, that’s it. Here’s the internal function used to switch from Old to New.

For completeness, this will work in Ragdoll 2023.04.09 and below. And also for completeness, would it be possible to elaborate on what you miss in the old way @isai? Pose Space is permanently Local now, and World is achieved with Pin Constraints.

1 Like

Thank you for the code!

I suppose I had gotten used to the previous system, mainly because it’s compatible with a lot of legacy tutorials. Looking up previous tutorials and following them is pretty fun. I’m experimenting now with both systems, comparing how to get equivalent functionality between the two.

Previous system is great for quick Dynamics, “Just work when I apply it”.

New system makes sense as well, but needs some further understanding of what’s happening.

For instance, after setting up a whole body for Ragdoll, the Root Marker must be changed to Simulated. Then, the same Root Marker needs a Pin with Constrained ON. If at any point you want another body part to follow closer to the Rig, you need to add another Pin with Constrained ON, and Animate the Stiffness and Dampening OFF at the start when it’s not needed. (Animating the Enabled also works, but it can be an abrupt change in the Animation).

In the previous version, after the whole body is setup, it already works. PoseSpace on the node keeps these abilities readily available for the user, no need to add more Pins. I still use Pins, of course, with the previous setup since it allows me to perfectly hit exact locations during an Animation. If I want all the fingers to stick super close to the Rig’s location, I can select the fingers’ Group, set PoseSpace to World, and done. No need for Pins. I haven’t found a workaround for this issue with the new setup :confused: Do you have a technique in such a case?

I’m still wrapping my head around using Pins now more often, though the Outliner is already feeling messier. If I want a feature to be turned on/off on a Marker, I also have to double-check if I have a Pin on it, and then if the Pin’s Attributes are animated to be enabled since they’ll override the Pinning.

Thank you!

Thanks for sharing your experience, @isai!

I expect it’s quicker and easier because of habit, but in case it is not and in case we moved backwards with the removal of Pose Space, how about this; if you show me something done using Pose Space I’ll show you the same thing done using Pin Constraint. Then we’ll measure the time and ease of both methods and empirically get to the bottom of which route is ideal.

Under the hood, this is exactly the same as Pose Space = Custom. Namely, it’ll try and maintain both the local and world position/orientation of the control. But it’s true there is one extra step involved to apply the Pin Constraint. (Marker still needed to be changed to Simulated (formerly called “Dynamic”) in previous versions).

But I’d argue this removes any and all confusion about what “Pose Space” is, and especially the “Custom” option which made no sense haha. So at the end of the day, I expect you’d save time from not having this confusion, this is the tradeoff in this case.

You would select all relevant controls and run the Pin Constraint command, it would create a pin for each selection.

This is true, but they can be arranged into groups and even parented to your controllers.

I say this not to justify and hold onto our beliefs, but to invite a conversation about it. We made this change because our most common query and source of confusion used to be “what the heck is Pose Space?!” and since making this change there has been no confusion at all about what Rotate Stiffness and Pin Constraints are and how they work. But it’s possible there is a middle-ground, because I do recognise the convenience of baking one Pin Constraint into each Marker as the feature is a common thing to need. So let me know your thoughts!

Alrighty, I downloaded a clapping Anim from Mixamo, and brought it into Maya twice. The Left one is using the current system. The Right one is using the poseSpace system.

Nothing else has been done to these Ragdoll Setups.

Here, you’ll see both rigs Simulate pretty much the same. Then in the Right one, I select the RdGroup and change only the poseSpace to World.

Notice how quickly I get a usable result. I can then refine it all by separating the fingers into their own Groups, and set how hard I want it to follow there. The amount of nodes I have to manage stays very minimal, while also allowing me to go in and add a Pin to specific controls as well if needed.

In this video, I go through each finger control and Pin it with Constraint enabled.

Notice the Outliner quickly gets crowded. I then have to adjust more settings per Pin.

I have not figured out how to do get to the same stage as accurately with the new, non-poseSpace setup. Once I learn a process to get it to the same stage, I can then work on speed, maybe even a script.

By the way, this poseSpace process is how I cleaned up Mocap for a large stadium shot I worked on last year :wink:

Here’s the Maya file if you want to try it out!
Basic_setup.zip (3.1 MB)

Thank you!

Whelp, I figured out a workflow:

Use Pins on the whole body.


By the end of this video, I get a very similar result from both techniques. In fact, I could do the same Constrained Pin technique with the old process.

———————————————

I went ahead and also did some further tests, and came to the following conclusions:

  • The poseSpace feature is awesome.
  • Pins are awesome.
  • They do very similar things, if not equal things.
  • PoseSpace == World is fantastic for getting things going immediately without much further setup.
  • PoseSpace == Custom is also really useful, though this one can sometimes be better handled by Pins.
  • Pins require quite a bit of setup, but you can get similar results.
  • rGroups are awesome.
  • poseSpace + rGroups, the real super-power. Add Pins to become unstoppable.
  • Pins and rGroups fight each other.
  • Pins must be disabled for rGroups to work again.
  • If poseSpace == local and Pins are enabled, rGroups are reduced to just another way to contain Markers.
  • If poseSpace, cleaning up dense animation can be done entirely using rGroups (pending motion modification).
  • If no poseSpace, cleaning up dense animation must be done at least using Markers and Pins.

And the two most important conclusions I’ve made so far:

  • Markers have a way to DISABLE “Use Group”.
  • Markers do NOT have a way to DISABLE “Use Pins”.

I’ll keep playing with both versions some more to refine the workflows.

@marcus, got a few questions:
Is poseSpace being removed to reduce feature redundancy or user confusion? (“Both” is of course also an answer, by I’m more interested in the Leading reason)
What feature is being added to Markers and rGroups if poseSpace is being removed?
Could we keep poseSpace?

Thank you!

Great taking of initiative, we are on! :smiley:

Shape Sizes

Firstly, I need to illustrate how the shapes of parents affect the motion of children.

These are identical, apart from their shapes. Because the spine has more weight, it has the most impact on the overall motion of the character. In the left-hand case, the arms are much heavier, and thus have the greatest impact. Are most affected by gravity and respond much less to the spine.

So in this case, and ideally all cases, you should not need Pins or World Pose Space to achieve the effect you want. At the end of the day, anything worldspace is fake, and will look fake. It is an override, something to force physics to achieve the effect you want. Sometimes necessary, but definitely not to the extent you are seeing here.

:bulb: As a general rule of thumb, try keeping parents heavier than its children.

Under the hood, they are equal. Only the stiffness/damping values have a slightly different multiplication, but they can achieve the exact same result.

They would work together, identical to having two (or more) pins operate on the same Marker.

Both, but primarily user confusion. It was the number 1 question, and is no longer. People discovered and love Pins now.

Markers used to have 1 Pin embedded into it, it was just removed. Nothing was added.

The one thing I did like and do miss is the option to apply a Pin across a full group, via the Pose Space attribute on the group itself. I wonder, would it make sense to apply a Pin Constraint to a group? Would that replicate the advantage?

For the root, it was also convenient to set it to World such that it can be softly constrained. At the moment, the stiffness/damping values on the root does nothing; because they are local and there is no parent. I’ve considered making those world instead, such that they become useful and avoid the need for that root Pin Constraint.

These are just a few things I think can keep the benefits of Pose Space without the complexity. What do you think? Can you think of any other way to regain those advantages?