agelosc Posted June 21, 2017 Share Posted June 21, 2017 Hi all, I have a fractured geometry and I need to calculate a mass, size or area attribute for each piece. I'm using an assemble sop to create packed geometry and I animate each piece with a vex expression using the intrinsic transforms of the pieces. However I'd like the animation to be varied by an attribute that holds a relative size value. I know the measure sop calculates area, volume etc but how can I "promote" this value to the packed primitives? A brute approach would be to get the number of points for each packed primitve. Is there any way to get that info from the packed primitive? Thanks, Quote Link to comment Share on other sites More sharing options...
agelosc Posted June 22, 2017 Author Share Posted June 22, 2017 In case anyone finds this useful, The way I solved this was by adding any measured data from the unpacked geometry to a primitive attribute on the packed geometry via a primitive wrangle. The class attribute value created by a connectivity sop corresponds to the primitive id after the assemble so I could compare the class attriute with the primnum. I've attached a simple example file. If however someone has a different solution I would still like to know difrerent ways of approaching something like this. PackedPrimitiveMeasure.hipnc 1 Quote Link to comment Share on other sites More sharing options...
crozer Posted June 23, 2017 Share Posted June 23, 2017 hey, so if i understood it correctly, you want to do this: pipe your packed geo to a foreach loop. within it, unpack and get whichever attributes you want (with a pointwrangle for example), repack. for something like volume, within the foreach, you add a measure sop, set it to volume, then add an attribute promote sop (attribute "volume", from primitive to detail, method sum), and lastly demote the volume (another attribute promote, "volume" detail to primitive). hope this helps! chris 1 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.