Jump to content
Atom

Adding Custom Agent To Crowds?

Recommended Posts

Hi All,

 

I have seen the new Crowds video that SideFx released with R14. Does anyone know how to add custom objects as agents to the system? How about something simple like a ball that rolls along the ground?

Share this post


Link to post
Share on other sites

Make your ball roll using object-level rotations. Put it into a subnet. Now bake out your subnet as an "agent".

Share this post


Link to post
Share on other sites

hi

check this file

save and set project and bake agents

then it should work

I tried simple agents with no skeleton but no luck so i went with simple skeleton rig

just to get root node location

 

bfly_fly_still_002.hip

Share this post


Link to post
Share on other sites

Zoki, thanks for the file. I am just now learning about crowds and agents so I don't fully understand your instructions on how to use the file.

 

Save, I have downloaded the file so it is saved in my Downloads folder.

Set Project...? I don't know what this instruction means.

Bake Agents. I have selected the agent_bake node and clicked on Render Control and then Render from the dialog that appears.

 

I click on Play and nothing seems to happen. I see a single sphere off in the distance.

Share this post


Link to post
Share on other sites

After the first time you bake the agents, they won't reload automatically, you need to either hit the Reload button the Crowd Source SOP to see anything. Or, you can just reload the .hip file.

Share this post


Link to post
Share on other sites

Thanks for posting the followup file Zoran.

 

I am just now getting back to this task. I am still struggling with making these posted files do anything. For instance, the crowd source node does not have a Reload button on my R13 screen. Is there another way to bake this simulation so I can see some animation?

 

post-12295-0-61330000-1425144979_thumb.p

Share this post


Link to post
Share on other sites

I think he meant the Crowd Source SOP, go inside the /obj/crowdsource object.

Share this post


Link to post
Share on other sites

So I started this in another part of the forum with different intentions initially, but I think it is better to continue here.

 

I have successfully imported an animated FBX from DAZ3D and baked it as an Agent clip. Now, I want to take the zombie street shelf example and replace one of the agent there.

 

I have a question: what is the purpose of baking the rig in and not just the animated mesh? Are transition state clips generated from the rig? How is the rig used in a baked agent?

 

Thanks!

 

Vincent

Share this post


Link to post
Share on other sites

There are no transition state clips generated. For efficiency when you have large numbers of agents, the rig is baked assuming skin weight deformations. So the character's geometry is not duplicated for all agents. Instead, the geometry is generated "just in time" for rendering on the GPU in the viewport using each agent's animation. Similar idea but on the CPU for Mantra.

  • Like 1

Share this post


Link to post
Share on other sites

Hi!

 

Anyone knows how to set up agent speed to match the rig animation? All my agents are moonwalking...

  • Like 1

Share this post


Link to post
Share on other sites

Ha! I also have this problem, then. I didn't get to where you are, yet, Guilherme, but I was wondering if I had to import BVH animations on the rigs "in place" or I should bake agent translation in the agent animation clips. So knowing how to "harmonize" animation with translation more or less automatically will be useful indeed. So thanks for your question.

 

Vincent

Share this post


Link to post
Share on other sites

There are no transition state clips generated. For efficiency when you have large numbers of agents, the rig is baked assuming skin weight deformations. So the character's geometry is not duplicated for all agents. Instead, the geometry is generated "just in time" for rendering on the GPU in the viewport using each agent's animation. Similar idea but on the CPU for Mantra.

 

Is it possible to "force" Houdini to use the mesh deformation provided in the clips? I have seen the possibility of having Alembic clips. Does that mean you can get away from re-deforming from the rig?

 

 

Thanks!

 

Vincent

Share this post


Link to post
Share on other sites

Anyone knows how to set up agent speed to match the rig animation? All my agents are moonwalking...

Try adjusting the In Gate Speed: http://www.sidefx.com/docs/houdini14.0/nodes/dop/crowdstate 

 

I was wondering if I had to import BVH animations on the rigs "in place" or I should bake agent translation in the agent animation clips.

If you have locomotive animation, then you can set the Lomotion Node and then turn on Convert to In-Place animation: http://www.sidefx.com/docs/houdini14.0/nodes/out/agent

 

Is it possible to "force" Houdini to use the mesh deformation provided in the clips? I have seen the possibility of having Alembic clips. Does that mean you can get away from re-deforming from the rig?

No. It might be possible in the future if you already have such large baked out sequences.

Share this post


Link to post
Share on other sites

Thanks Edward, gate speed did the trick, but I didn´t found a way to make agent´s foots to stick on the ground when not on air.

I know I can use the rig speed to make it work, but then I can´t randomize each agent´s speed. What I wanted is to use particle´s speed without feet sliding. Is it doable?

Share this post


Link to post
Share on other sites

Randomizing speedmax on crowdsource sop (or in dops with a wrangle) will let you vary the agent speed. Crowdsolver/animation tab Allowed Variance will specify how much you let the agent vary their speed relative to the gate speed (it should be 100 by default which will let agents come to full stop if need be). The animation should automatically get retimed based on the speed.

Edited by AdamJ

Share this post


Link to post
Share on other sites

Randomizing speedmax on crowdsource sop (or in dops with a wrangle) will let you vary the agent speed. Crowdsolver/animation tab Allowed Variance will specify how much you let the agent vary their speed relative to the gate speed (it should be 100 by default which will let agents come to full stop if need be). The animation should automatically get retimed based on the speed.

 

Thanks, but that doesn´t mean that agent´s feet won´t slide. Is there an way to make the foot stay on the ground (when it shoudn´t move)?

Share this post


Link to post
Share on other sites

Thanks, but that doesn´t mean that agent´s feet won´t slide. Is there an way to make the foot stay on the ground (when it shoudn´t move)?

Not currently.. only part that's modifying the feet/leg positions right now is the terrain adaptation but that only projects onto the terrain, it doesn't lock them in place. Is the source animation clip inplace or locomotive? In theory locomotive (crowdsolver/animation 'Lock particle speed to mocap' option) might give better results though if the agents are turning you'll most likely end up with some sliding.

Share this post


Link to post
Share on other sites

Thanks Adam. I´m trying to set up "in place" animation, to vary each agent´s speed. We use Massive here, but I´m studying houdini´s crowd capabilities...

 

One more question, if you could help. Documentation on agents layers is very simple. I´m trying to vary agent´s clothes (like hat, etc). The option I saw in documentation was using agent´s layers.

The problems is that the shape library saves layer names. So, when I render another layer, it overrides the previous layer. I coud do that by hand (in the agents layer files), but I´m trying to understant how things work here. Do you have a solution for that?

 

thanks again.

Share this post


Link to post
Share on other sites

The layers workflow is still really raw right now and so you pretty much need to hand edit for custom layers.

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

×