Crowd unpacking and packing and 2d bounding box

   1496   3   0
User Avatar
Member
141 posts
Joined: Dec. 2015
Offline
Hi

I have a crowd. I need to create 2D bounding frame around the agents from the given camera.
My idea was to unpack the crowd, store their points screen space coordinates (toNDC) in an attribute, then write the min and the max values back to the packed crowd in attributes for later use. It seems to be quite slow, but I see no other way to access the point data.
Is there any way I can connect two geometries like relational databases?
User Avatar
Member
459 posts
Joined: Oct. 2011
Offline
Can you read out the agents primitive intrinsic bound attribute instead of unpacking?

-b
http://www.racecar.no [www.racecar.no]
User Avatar
Member
1736 posts
Joined: May 2006
Offline
Can you get away with just appending a box to the crowd, giving it uvs from the camera, and using the min/max of u and v to set your 2d bounds? its rough, but might be good enough for what you need.

Attachments:
crowd_2d_bb.hipnc (362.8 KB)

http://www.tokeru.com/cgwiki [www.tokeru.com]
https://www.patreon.com/mattestela [www.patreon.com]
User Avatar
Member
141 posts
Joined: Dec. 2015
Offline
Actually, I picked up my programmer mind, and made a couple of Python nodes and Wrangles and for each loop with the unpacked crowd to get this information. It's quite fast, and reliable. Thanks for the help, anyway!
  • Quick Links