Crowds: Using ID to vary crowds

   1020   2   1
User Avatar
Member
731 posts
Joined: Dec. 2006
Offline
I am trying to get some variation in crowd behaviour using @id. For example, to get different “front search distance” in the POP steer obstacle object, I want to use fit01(rand(@id),10,40). This does nothing. If I dive into this DOP and edit the code in the snippet, (using the same expression), it works fine. Is this some kind of limitation of reading channels in a snippet VOP? If so, is there another way to get this to work so I don't have to unlock every DOP and hand-edit the code?
Sean Lewkiw
CG Supervisor
Machine FX - Cinesite MTL
User Avatar
Staff
727 posts
Joined: Oct. 2012
Offline
The ch() VEX function doesn't evaluate the parameter's expression per-point using local variables, which would be slow and cannot be multi-threaded (see www.sidefx.com/docs/houdini/vex/snippets). That node should ideally provide VEXpression support, like e.g. the POP Force DOP, so I'd suggest submitting an RFE for that
User Avatar
Member
731 posts
Joined: Dec. 2006
Offline
Will do. Everywhere I've tried to use @id in crowds, it does nothing, so I assume this is the same issue.
Sean Lewkiw
CG Supervisor
Machine FX - Cinesite MTL
  • Quick Links