Jump to content

Control crowd source randomization


younglegend

Recommended Posts

Hello,

Widening my houdini knowledge and getting to know crowds here.

So I have an agent with multiple layers like, an agent holding a sword and shield, just a sword, holding nothing etc. with multiple running states. The crowd source randomizes everything which is great, but i have few running states where the shield and sword overlap because of the randomness. Is there a way to make a particular layer only use a particular state all the time? Or creating a new agent primitive for that is the only way to go? Thanks!

Edited by younglegend
Link to comment
Share on other sites

1 hour ago, JP Shep said:

By layer I'm assuming you mean agent?  if so then yes there is, a user named Atom made a very useful tutorial for doing just that.

 

https://www.sidefx.com/tutorials/crowd-based-relay-race/

 

 

Thanks for sharing that interesting tutorial! But unfortunately it doesn't help my situation. By layer i meant different agent layers, In my case i have 3 agent layers sourcing from one agent. A layer holding a sword, a layer with shield and sword and a layer holding nothing.

Edited by younglegend
Link to comment
Share on other sites

If you need more precise control over how each agent's layer is selected, I'd just use the VEX setagentcurrentlayer() function. The Attribute Randomize SOP has a mode that is similar to the Crowd Source SOP's options (the Custom Discrete mode with Type set to String), which might be useful for doing the actual randomizatoin

Link to comment
Share on other sites

1 minute ago, cwhite said:

If you need more precise control over how each agent's layer is selected, I'd just use the VEX setagentcurrentlayer() function. The Attribute Randomize SOP has a mode that is similar to the Crowd Source SOP's options (the Custom Discrete mode with Type set to String), which might be useful for doing the actual randomizatoin

I should also mention - the input points to the Crowd Source SOP can have point attributes like state, agentcurrentlayer, etc that will override the Crowd Source SOP's parameters

  • Thanks 1
Link to comment
Share on other sites

20 hours ago, cwhite said:

I should also mention - the input points to the Crowd Source SOP can have point attributes like state, agentcurrentlayer, etc that will override the Crowd Source SOP's parameters

Oh yes, setagentcurrentlayer() and state is the one i'm looking for! Thank you!

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