Jump to content

visualising attribs on packed geo points

Recommended Posts

Posted (edited)


i'm still pretty new to houdini but just trying to get my head around something (sorry if this is a stupid question).

When you pack geometry, the geo gets saved as a reference and the packed geo represented by a primitive.   But after its packed you can still add attributes to the new packed geometry points.  For example i've seen people adding rotation and scale attributes that can then be used in a primitive sop to transform the packed geo.

So say i added a randomised float attribute to the pieces after its been packed (maybe i'm going to use this in a wrangle to randomise the @P.y of the points later on), is it possible to visualise the attribute on the geo either with a visualise or color sop?  So far i've not been able to do so.

I know what i'm doing is probably wrong anyways, but just trying to understand why if the attribute is there on the packed point, why can it not be visualised on the geo like a tint on the geometry?  Because the points are now locked away and can't have their color set right?

Heres an example file of me creating a falloff attrib and trying to visualise that on the points


Thanks guys


Edited by richnosworthy
better explanation

Share this post

Link to post
Share on other sites

The reason for this is a bit arcane if you're new to Houdini. The Assemble SOP creates a kind of packed geometry called "packed fragments," which means that rather than a typical packed primitive that is a reference to a single file or SOP data, it's a reference to a FRAGMENT of that data. This is more memory efficient when you have a single object that's been shattered into a bunch of pieces, rather than lots of copies of a few identical objects. The side effect of this is that the viewport shader that can tint packed primitives when you assign a color attribute to them won't work on packed fragments.

If you wanted to tint these things individually in the viewport, you'd have to either tint them BEFORE you pack, or you'd have to make regular packed geometry instead of fragments. I'm attaching a file where I just cracked open that Assemble SOP and toggled the "Create Packed Fragments" option on the Pack SOP near the end of the chain. 


Share this post

Link to post
Share on other sites

alternatively just append Repack SOP after native Assemble SOP and check Repack Packed Fragments

  • Like 2

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now