Configure Joints - How make work?
1322 10 2-
- gordig
- Member
- 77 posts
- Joined: 9月 2019
- Offline
I've used the Configure Joints SOP in the context of a ragdoll setup, and that was straightforward enough. Outside of that, however, I can't figure out how to make it actually DO anything. I've got my skeleton fed into it, I've got all the joint limits configured, I've got the mode set to Rig Pose, I connect it to a Rig Pose SOP and...it acts as if the Configure Joints SOP weren't even there. I also haven't been able to get it working with APEX, but I suspect that once I understand why it's not working outside of APEX, I'll know what to do.
-
- gordig
- Member
- 77 posts
- Joined: 9月 2019
- Offline
I tried replacing the Configure Joints with Configure Joint Limits and manually adding joint limits to a Rig Pose that's feeding a MotionClip, and that works to limit transforms in a Rig Pose, but I'm no closer to understanding why it still doesn't work within an APEX rig. Do I need to unpack it, apply the joint limits and repack it? Do I need to extract the controls?
-
- edward
- Member
- 7937 posts
- Joined: 7月 2005
- Offline
For using Configure Joints with Rig Pose, did you set its mode to Rig Pose? The configuration attributes for them work a little differently AFAIR. As for APEX rigs, that's yet again a different configuration because we're configuring the _controllers_ here, which don't have a unique mapping to joints. To set rotation limits on controllers, see the APEX Configure Controls SOP. See https://www.sidefx.com/docs/houdini/character/kinefx/animatestate.html#transformlimits [www.sidefx.com] .
-
- tamte
- Member
- 9078 posts
- Joined: 7月 2007
- Offline
since fktransform component automatically stores mapping to the source skeleton joint, like
"mapping:Guides.skel":"L_Thigh"
you can potentially still use Configure Joints SOP to autocompute the limits from motion clip (or of course manually or interactively in viewport for that matter)
then
- unpack your Base.rig
- populate "min_lock:r" and "max_lock:r" properties of FK controls with values from mapped joint ( just from quick look configure Joints stores them in Radians and APEX control limits seem to be in Degrees so you need to convert them)
- pack it back to your character
see example
"mapping:Guides.skel":"L_Thigh"
you can potentially still use Configure Joints SOP to autocompute the limits from motion clip (or of course manually or interactively in viewport for that matter)
then
- unpack your Base.rig
- populate "min_lock:r" and "max_lock:r" properties of FK controls with values from mapped joint ( just from quick look configure Joints stores them in Radians and APEX control limits seem to be in Degrees so you need to convert them)
string joint_name = d@properties['mapping:Guides.skel']; int joint = nametopoint( 1, joint_name ); if ( joint == -1 ) return; dict joint_config = point( 1, "fbik_jointconfig", joint ); if ( isvalidindex( joint_config, "rotation_lower_limits" ) ) d@properties['min_lock:r'] = degrees(vector(joint_config["rotation_lower_limits"])); if ( isvalidindex( joint_config, "rotation_upper_limits" ) ) d@properties['max_lock:r'] = degrees(vector(joint_config["rotation_upper_limits"]));
see example
Edited by tamte - 2025年1月27日 20:44:32
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
-
- gordig
- Member
- 77 posts
- Joined: 9月 2019
- Offline
-
- tamte
- Member
- 9078 posts
- Joined: 7月 2007
- Offline
gordigno it's for any APEX controls that map to kinefx joints and any limits, just note that in the quick example I only used rotation limits as FK is common, but you can limit t as well if your joints have Translation limits set
Is this an FK-only solution?
string joint_name = d@properties['mapping:Guides.skel']; int joint = nametopoint( 1, joint_name ); if ( joint == -1 ) return; dict joint_config = point( 1, "fbik_jointconfig", joint ); if ( isvalidindex( joint_config, "rotation_lower_limits" ) ) d@properties['min_lock:r'] = degrees(vector(joint_config["rotation_lower_limits"])); if ( isvalidindex( joint_config, "rotation_upper_limits" ) ) d@properties['max_lock:r'] = degrees(vector(joint_config["rotation_upper_limits"])); if ( isvalidindex( joint_config, "translation_lower_limits" ) ) d@properties['min_lock:t'] = vector(joint_config["translation_lower_limits"]); if ( isvalidindex( joint_config, "translation_upper_limits" ) ) d@properties['max_lock:t'] = vector(joint_config["translation_upper_limits"]);
EDIT: if your IK and FK controls for hand for example map to the same L_Hand joint you can of course have 2 streams of configured joints with different limits and copy one to FK controls and another to IK for example
Edited by tamte - 2025年1月28日 02:30:41
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
-
- gordig
- Member
- 77 posts
- Joined: 9月 2019
- Offline
-
- gordig
- Member
- 77 posts
- Joined: 9月 2019
- Offline
I've had absolutely no luck applying limits to IK controllers. If I try to apply a rotation limit to, say, leg_l_fore_ik_target, it will add minlock:r and maxlock:r values of 0,0,0 no matter what's in the Configure Joints SOP, whether I'm using Configure Joints OR Configure Joint Limits SOP, whether I'm manually entering the limits or using a MotionClip...
edit: and of course, right after I posted that, I tried something I apparently hadn't tried yet: applying the limits to the actual joints instead of the controllers. Would be nice to know why that isn't working, though.
edit: and of course, right after I posted that, I tried something I apparently hadn't tried yet: applying the limits to the actual joints instead of the controllers. Would be nice to know why that isn't working, though.
Edited by gordig - 2025年2月4日 01:45:05
-
- tamte
- Member
- 9078 posts
- Joined: 7月 2007
- Offline
gordignot sure what exactly you tried
I've had absolutely no luck applying limits to IK controllers. If I try to apply a rotation limit to, say, leg_l_fore_ik_target, it will add minlock:r and maxlock:r values of 0,0,0 no matter what's in the Configure Joints SOP, whether I'm using Configure Joints OR Configure Joint Limits SOP, whether I'm manually entering the limits or using a MotionClip...
edit: and of course, right after I posted that, I tried something I apparently hadn't tried yet: applying the limits to the actual joints instead of the controllers. Would be nice to know why that isn't working, though.
the setup I posted uses mapping defined on the controllers, it maps to joints, so you define limits on the joints and it will replicate the same limits on APEX controller copied from the mapped joint
leg_l_fore_ik_target likely maps to leg_l_fore joint
but it's likely that the configured limits on joints are in parent space, so for "t" likely {0,0,0}..{0,0,0} , however for "r" or with manually configured translation values values I'd expect it to produce nonzero results
also the limits are likely for the Animate state handles only, so while you can limit IK or FK handle itself, setting the FK controller limit doesn't actually limit the APEX skeleton joints during IK solve, that would need to be implemented in the APEX logic and likely configured using the actual joint limits
Edited by tamte - 2025年2月6日 00:44:36
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
-
- gordig
- Member
- 77 posts
- Joined: 9月 2019
- Offline
-
- tamte
- Member
- 9078 posts
- Joined: 7月 2007
- Offline
gordigOne way would be to wait for the IK solvers to actually support them https://www.sidefx.com/forum/topic/99580/?page=1#post-436945 [www.sidefx.com]
How would I go about implementing limits in the APEX logic?
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
-
- Quick Links