Jump to content
Sign in to follow this  
StepbyStepVFX

CROWDS : Walking over other agents

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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×