Assemble Modifies @class ? {[SOLVED]}

   1582   3   0
User Avatar
Member
1177 posts
Joined: April 2017
Offline
Hi!

I've got an asset with lots of pieces. I'm using a Connectivity sop to get primitive @class. After that, I use the assemble sop with Transfer Attribute set to "class" to preserve it.

Before the assemble, the @class goes up to 11127. After the assemble, it goes up to 10646. it looks like it's "combining" multiple pieces under the same @class value. Why am I getting a different result?

-Olivier
Edited by olivierth - Dec. 7, 2023 15:15:35

Attachments:
Houdini_assemble_class_problem.JPG (18.7 KB)

User Avatar
Member
1177 posts
Joined: April 2017
Offline
I found a work around. By using a for-each loop and a pack sop, I get the result I need.

...I'm still curious about why the assemble sop gave a different result...

Attachments:
Houdini_assemble_class_problem_02.JPG (25.3 KB)

User Avatar
Member
9381 posts
Joined: July 2007
Online
olivierth
I use the assemble sop with Transfer Attribute set to "class" to preserve it.
not sure what you mean by "to preserve it"
it will be nicely preserved inside of packed geo even without the transfer

what the transfer does, it will promote the attribute values to packed primitives, you will get a single value per packed prim which can already introduce discrepancy if the attribute value differs among elements within the packed prim geo

based on your screenshot you are not assembling based on connectivity attrib so it's likely you will get the discrepancy

to assemble by connectivity you have to check Create Name Attribute, which will base that on internally computed connectivity attribute, and you will get a chance it will be the same as your class attribute if you used Connectivity SOP right before

However if you want to ensure you pack the pieces by your specific attribute just use Pack SOP (instead of Assemble)
- check Name Attribute and type in: class
- uncheck Create Packed Fragments (as that supports only string piece attribs, or make your class string in Connectivity if you want fragments)
- Transfer Attributes: class (this will now match 1-1 value wise since now each piece is created from the same class value)
Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
1177 posts
Joined: April 2017
Offline
...but now, Everything is slow in my viewport because of my pack sop method... arg!!

EDIT: Oops, I posted this before I saw your reply. You method with a string @class and pack sop works. I'll just have to convert the string @class values to integers and the rest should work just right!

Thanks a lot!
Edited by olivierth - Dec. 7, 2023 15:16:38
  • Quick Links