Jump to content

how to make crowd agents drop their weapons when turning character to ragdoll ?


anthonymcgrath

Recommended Posts

hey all another crowd question - is it possible to make the crowd drop the weapons they are carrying when they collide with my object and turn to ragdolls?  It only seems to be stuck in the characters hand and it would be awesome to put layers like weapons and helmets on them and have all that fall off when they are hit with my object?

right now my agent has an agent layer in that is pointing to the hammer mesh i built (simple shape built in another sop network) - its constrained to the hand nicely but how would i get those to disconnect when the character turns to ragdoll?  Would it be another trigger setup?
hammer.JPG

Link to comment
Share on other sites

You would need:

1) A shape in your agent's collision layer that is bound to the prop's joint. Then, the Bullet solver will update that joint's transform based on the results of the RBD sim, causing the hammer in the agent's display layer to be transformed.

2) No constraints between the prop's RBD object and any other of the agent's RBD objects. You can of course edit the constraint network manually, but you ideally shouldn't set up a joint limit for the prop joint in the Agent Configure Joints SOP, and should turn off the Pin Shapes With No Rotation Limits option on the Agent Constraint Network SOP

  • Like 1
Link to comment
Share on other sites

@cwhite ok thanks! I will take a look. I didn't know I could add a shape in the collision layer for the hammer model they carry I'll see if I can figure that out.

 

My prop doesn't have any bone in there. I'm a bit puzzled there how to get one in but I'm thinking it might be similar to how the fbx comes in with bone nodes.. might just need one of those in the prop network I have setup?

Link to comment
Share on other sites

  • 1 month later...

@cwhite hi i couldn't for the life of me suss this out.  I've attached a scene because its just confused seven bells out of me now :(

actually i was trying to go one further and do detaching limbs which i managed to get working in this scene with a prim wrangle in a sop solver in the sim network... but i couldn't get the skin to separate - i was told i need to use an agent layer but its the same problem - i've no idea how to use this layer properly and the docs aren't very helpful at all from what i can understand of them :/

can anyone take a look please?
ta
ant

ragdoll_with_tearing_limbs_test.zip

Link to comment
Share on other sites

If you're detaching limbs and the agent has deforming geometry (e.g. skin), you need to switch the agent to a layer which has different geometry that won't stretch out as the joints separate. This would involve slicing the geometry around the detachment point and adjusting the capture weights near the boundary, as well as possibly filling in the hollow interior. This of course means that you'd likely want to have a few predefined detachment points, unless you try to procedurally slice the skin geometry on the fly.

  • Like 1
Link to comment
Share on other sites

@cwhite awesome I have no prob sorting that bit out but my problem is how to setup that agent layer to start with and also how to get the mesh to switch.. eg is it done in the solver sop in dops or somewhere else?

I've only used an agent layer to put an object in the hands of a character like a hammer or sword I didn't know it can be used to do more like entire character switch. I've watched all sesi vids and a few others and nobody online is explaining how to setup that kind of system beyond "here's some dudes walking with hammers"  :-/

Link to comment
Share on other sites

Yeah, the agent layer SOP can be used to add deforming shapes to a layer - just make sure to point it at the rest geometry (i.e. the input geometry to the Deform SOP). I think the H15 crowds masterclass had some examples of this.

To switch an agent's display layer, you can use SOPs like the Agent Edit SOP, or change it in VEX via the setagentcurrentlayer() VEX function.

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.

Guest
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...