How to pin a body in ragdoll state to target points in a crowd system ?

   2374   6   2
User Avatar
Member
38 posts
Joined: June 2019
Offline
Hi,

I'm trying to find a way to pin multiple iterations of the default biped to points of an animated deformed geometry, via the crowd system, but with the ragdoll activated. Actually, as if the body was literally nailed, hanging to the points, each part of the body moving accordingly to the point position, ragdoll on each. Like a dead doll whose limbs would move according to the support on which it's nailed…
In other words : kind of similar to the effect of a copy to point operation, but where each copied body would benefit from it's own independent ragdoll effect, while every one sticks to its corresponding moving point.

I managed to populate each point of my target geo with the biped, but the default behavior, when using the “populate” command, defines that each point is the spawn location of the crowd agent. Collision layer and joints, ragdoll is activated, but I can't find the way to pin each body to a target point, and make the ragdoll work as I want.

Maybe some of you masters of H will have some ideas on how to constrain each members of a crowd to a point, on a ragdoll state ?
Edited by frBorges34 - May 13, 2020 17:17:55
User Avatar
Member
38 posts
Joined: June 2019
Offline
Anyone ?
User Avatar
Member
38 posts
Joined: June 2019
Offline
Another way of asking the question : what would be the workflow to create a crowd of hanged bodies in ragdoll state, reacting to forces like wind, etc…?
User Avatar
Staff
727 posts
Joined: Oct. 2012
Offline
Have you taken a look at the ‘PinnedRagdolls’ example file in the docs? It sounds like you want to set up pin constraints from some of the joints to a particular target position
User Avatar
Member
38 posts
Joined: June 2019
Offline
cwhite
Have you taken a look at the ‘PinnedRagdolls’ example file in the docs? It sounds like you want to set up pin constraints from some of the joints to a particular target position

Thank a lot, that's exactly the kind of things I was searching for. For some reason I don't know, when I compulsively searched in the doc, I hadn't seen this page ! I'll dig this lead.
User Avatar
Member
2537 posts
Joined: June 2008
Offline
I was looking at the ‘PinnedRagdolls’ example file.
While the agents do rise, when I add an animated mountain node, their hands don't stick to specific points.

Is it possible to attach to specific points using this kind of technique?
Edited by Enivob - Jan. 24, 2021 16:50:01

Attachments:
crowd_pin.gif (630.6 KB)

Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Staff
727 posts
Joined: Oct. 2012
Offline
There would be a couple approaches:
- Modify how the goal position for the constraint is computed. Currently this is `vector goal_pos = minpos(2, joint_pos) + t;` which always takes the closest point from the current frame. You could replace minpos() with xyzdist() to also record the primitive number and uvw coords. If you get the prim and uvw from the rest frame, you can use Attribute Interpolate or primuv() in VEX to compute the updated position from the deformed geometry, letting you stick the joint to a location on the surface.
You might also need to adjust the Overwrite with SOP parameter on the constraint network to pull in the updated constraints.

- If you only want to attach to a point, rather than an arbitrary position on the surface, use pcfind() and record the anchor_id point attribute to set up a point attachment anchor (https://www.sidefx.com/docs/houdini18.5/nodes/dop/constraintnetwork#anchortypes)
  • Quick Links