Set attribute on fractured geometry and read it after

   1225   4   0
User Avatar
Member
3 posts
Joined: 1月 2021
Offline
So i do rbdmaterialfracture on geometry after i need to set some attribute (to random value but which will be constant for this fracture piece) and read it after in rbdconfigure. how can i do it? preferably in hscript. i want to use it to control the activate state of the piece, so every has a different offset. seems like a simple task but i couldn't find the right solution so far.
User Avatar
スタッフ
356 posts
Joined: 2月 2008
Offline
As long as the attribute lives on the proxy geometry, you can transfer the attribute onto the resulting packed fragments coming out of the RBD Configure SOP - add the attribute name to the "Transfer Attributes" parm.

Attachments:
Configure_Transfer.hip (642.2 KB)

User Avatar
Member
3 posts
Joined: 1月 2021
Offline
Thank you a lot! Now i understand the concept better, but i still don't know how to read the attribute (kind of ashamed...)
here is my test project i rebuilt the same network with extra stuff which i need.
the problem is in rbdconfigure bullet data "active" it seems to return 0 (or NaN idk) all the time, expression is $F > @attrib
what is the correct way to access this attribute?

Attachments:
Configure_Transfer_2.hip (979.0 KB)

User Avatar
スタッフ
356 posts
Joined: 2月 2008
Offline
Ah, that won't work.
Your best bet is to simply set the active attribute beforehand and transfer it, or you could transfer the attribute and use a Wrangle or an Attribute Expression SOP to set the active value after the RBD Configure SOP.

Attachments:
Configure_Transfer_3.hip (979.8 KB)

User Avatar
Member
3 posts
Joined: 1月 2021
Offline
!!! Thanks, works perfectly! <3 but i must say it's a specific logic, ie you won't figure it out unless you read the documentation in depth or ask someone who knows.
  • Quick Links