Search - User list
Full Version: Configure Joints - How make work?
Root » Animation » Configure Joints - How make work?
gordig
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
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
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
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)
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"]));
- pack it back to your character

see example
gordig
The examples I've been seeing of this all seem to focus on FK, so maybe that's where I'm going wrong. I noticed that if I rotate one of the IK handles for which I've set limits, it will honor those limits, but if I try to move them, it disregards the limits. Is this an FK-only solution?
tamte
gordig
Is this an FK-only solution?
no 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

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
gordig
edit: should have actually opened your scene file before posting
gordig
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.
tamte
gordig
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.
not sure what exactly you tried

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
gordig
I'm afraid I'm not quite following. How would I go about implementing limits in the APEX logic?
tamte
gordig
How would I go about implementing limits in the APEX logic?
One 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]
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB