Jump to content

CROWDS : Walking over other agents / Constraint Network


StepbyStepVFX

Recommended Posts

Hi,

Some R&D about the Crowd system.

Ultimately, I want to recreate a shot from World War Z (more or less a zombie pyramid, where they are crawling over each others, but "realistically", without too much interpenetration).

For the time being I am testing a much more simpler setup to allow agents walking over other agents, using regular nodes and limited code.

In this scene I try to recreate the AdaptGround Behavior of Golaem crowd system (http://golaem.com/content/doc/golaem-crowd-documentation/adaptground-behavior) : my "troops" agents can walk on dead / ragdoll agents.

For the time being, the dead agents are only taken into account for terrain projection, not yet terrain adaptation / foot planting.

If anyone has ideas about that - foot planting and particularly floot planting on uneven ground - , I would be happy to learn or explore these directions ! :-)

I have opened the agent_util.h, terrain_adaptation.h, terrain_projection.h ... VEX code used by the crowd system, but foot planting remains complex and doesn't seem to be easily hacked... (by the way, I have used some code coming from there for this setup)

 

MORE DETAILS ABOUT THIS SETUP :

- In DOP, I duplicate the ground with a poly version of it (convert heightfield to poly) : this is an object that I call "offsetTerrain"

- In DOP, I duplicate the crowd geometry and keep only the dead agents : inside the crowd object (allow editing of content) I add a fetch data and duplicate Geometry into standGuyGeometry. Then with a SOP Solver, I delete all the agents except the dead ones (that happens to be ragdolls, but would work with any other agents).

- I use the DOP data "offsetGeometry" of the object "offsetTerrain" in a Geometry Wrangle to create an attribute (@offsetDead) on each point of the farthest distance of intersection with the standGuyGeometry.

- Using another SOPSolver, I blur the @offsetDead attribute created above, to smooth the trajectory of my future agents when stepping on the dead agents.

- In the stream of the crows state of the walking agents, I add a POP Wrangle to sample the "offsetTerrain" geometry (2nd input of the POPWrangle), and get the attribute created previously (@offsetDead)

- In the agenTerrainProjection1 node, I go inside and change the VEX code of the POPWrangle : I change parms.offset = chf("../offset"); with : parms.offset = f@offsetDead; Therefore, each agent has its own offset and virtually walk over the dead.

testWalkOverDeads_vMocapBiped.hip

Edited by StepbyStepVFX
Link to comment
Share on other sites

  • 3 weeks later...
  • StepbyStepVFX changed the title to CROWDS : Walking over other agents / Constraint Network

Good evening,

Following my studies on crowds systems, and a question from @jackassol about sticking ragdolls to colliders, I have tried to create constraints on the fly during the simulation, using Impact data.

My first attempt being a quasi-failure (see attached testRagdollDynCon_v1.hip), I have tried with a simpler setup : a sphere rolling over cubes, and when hitting cubes, creating constraints on the impact data.

You can see my test file attached as well : dynConTest.hip

This, again, being not satisfaying, I have tried with a much more simpler setup : 2 cubes sliding on a plane and "joining" where impact occurs. AND IT WORKS !! (see file dynConTest_basics_v2.hip)

Now, I really have a hard time figuring out why my setup dynConTest_basics doesn't work... I am afraid this comes from bad matrix inversion / rounding errors (I use an inversed fullpackedtransform to bring the impact position back to the "initial object space" of the sphere). Does anyone have any idea on where the problem is ?

Thanks for your help !

testRagdollDynCon_v1.hip

 

dynConTest_basics_v2.hip

Edited by StepbyStepVFX
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...