Jump to content

Breaking Ragdoll Constraints


Recommended Posts


Just finished the crowds course on cgcircuit, witch I think gives a really good introduction to setting up your own crowd characters. Hope part 2 comes out soon.


Anyway I have been working on the sim now using Ragdolls and now partial Ragdolls. Here is a playblast:


For the next step I want to break the constraint to the hats so that they fall off. In the help it says you can do this in the following SOPsolver node modify_ragdoll_constraints. Now this node does not get created anymore by the shelf tool, I am using Houdini 16.5 I have tried creating a SOPsolver and connecting it to the third input of the Ragdoll Constraints but get the following warning: This data is attached to an unexpected parent data.  

The help continues by adding this line to a primitive wrangle 

if (f@torque > 50)
    removeprim(0, @primnum, /* andpoints */ 1);

I have also tried adding this but nothing happens.

Anyone know how to fix this?





Link to comment
Share on other sites

usually the constraints come close to the end of the whole dop network.

in your picture it looks like you have the contraints separate from the crowd solver and merge both together somewhere.

plug your crowd object into the 1st input of multisolver, other solvers in 2nd input and then use that output as 1st input of constraint network

Link to comment
Share on other sites

Hi. In Houdini 16 with regular ragdolls it works without any problems, but probably you already tried it in the past. 

Looking at your screenshot I see that the third input of the "ragdoll_constraints" is green. Shouldn't be violet in any case? I would say try look inside of it if the input is connected to the multisolver(violet) as usual or to the constraint network relationship (green).

Link to comment
Share on other sites

Sorry, now I have this part working I have another question:

I am using a primitivewrangle with the following VEX to delete the constraints, which now works.

    removeprim(0, @primnum, 1);

But what I need to do is only delete a specific joint. I'm not sure if you can search through the primitives by name in VEX or if I need to create a group for these joints somewhere else. 

My scene consists of a ragdoll with a Hat and I am trying to delete the constraint to the hat only. At the moment I am deleting all constraints.

Thanks for any help :)

Link to comment
Share on other sites

So you have to use the name of the constrained object. 

In the primitive wrangle you can check if the constraint has one of the two points with the name of the hat (for example using primvertex and vertex point functions). 

The problem is that probably you have all the names like this: agent01/hat, agent02/hat, agent03/hat... So you need to filter the name before the primitive wrangle with VEX in a point wrangle or an attribute string edit sop. With the point wrangle:

string splitname[] = split(@name, "/");      //create an array splitting the name at the "/"

s@splittedname = splitname[-1];    //take the final segment of the splitted name, so "hat"


In the following condition I would check if one of the two points has the s@splittedname=="hat". Or if you decide to promote it to primitive attribute you can use in the primitive wrangle:

if (f@torque > 50 && s@splittedname=="hat")
Edited by Andrea
Link to comment
Share on other sites


This method would have worked but the constraint primitive names are all the same with a numbered footer per character. This only lets me break all joints on a single character. Not sure if this is going tobe possible unless I can find a way of changing the name of the primitives before DOPs.



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...