Triggering Animated Crowd Layers?

   2316   5   1
User Avatar
Member
2537 posts
Joined: June 2008
Offline
Hi All,

I was watching the Master Class on crowds for Houdini 15.5.
There is an example file that shows how to add a hammer to an agents hand.
I want to be able to add animated geometry to my agents and trigger the animation only when the agent enters a certain state.

Here is an my simple attempt at animating the hammer spinning. Initially it works, but all animations are synchronized.

Is there any way to trigger an animated layer?

Specific case would be a dragon breath. What if I have a few dragons as agents and when they land I want a fire breath pyro simulation to occur.

I am not sure of this is possible with the current crowd system but I thought I'd ask?
Edited by Enivob - May 13, 2017 13:15:21

Attachments:
animated_crowd_layer.gif (700.7 KB)
crowd_source_HAMMER_ANIMATED.hiplc (523.9 KB)
dragon_breath.gif (1.7 MB)

Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
7 posts
Joined: Feb. 2016
Offline
Good question.
User Avatar
Staff
727 posts
Joined: Oct. 2012
Offline
An agent's shapes can be either static (a shape parented to a joint) or deforming (i.e. skin with capture weights). The spinning hammer you tried is likely only working because the Agent Layer SOP is recooked with new input geometry on each frame.

My suggestion would be to instance the pyro sims after the crowd sim, positioned at offset * packedfulltransform. The packed disk sequence primitive in H16 might work well for this.
User Avatar
Member
2537 posts
Joined: June 2008
Offline
I am beginning to think it is not possible using Houdini 16 at this time (shut your mouth!).

Is there any way to get the location of the shape object for an agent layer? If I could reference that point then I could copy something to it at a specific time.

I spent the morning trying to figure out any way to leverage python and agent layers. But I can't find a single code example on how to even use the built-in python functions for hou.Agent [www.sidefx.com]. I still don't understand why we have new bells and whistles in the graph editor yet there are not examples in the help when you need them..?

I don't think a disk sequence will really work in the case of pyro, due to collision. I would still like the pyro to collide with the area where the dragon agent lands. This may not be an empty space, as shown in my GIF. It could be an area with buildings or non-flat ground plane. This means I need to kick off a pyro simulation when agent reaches a certain state.
Edited by Enivob - May 15, 2017 12:44:50
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Staff
727 posts
Joined: Oct. 2012
Offline
You can access an agent's joint positions through either Python or VEX (see $HH/help/files/joint_positions.hip for examples of both).
User Avatar
Member
2537 posts
Joined: June 2008
Offline
Thank you, that example does allow me to get a point in my dragon's mouth!
Edited by Enivob - May 15, 2017 15:55:04

Attachments:
Untitled-1.jpg (200.9 KB)

Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
  • Quick Links