Jump to content

Recommended Posts

Hey guys,

Somewhat of a newbie to Houdini here - please excuse this (hopefully) simple question...

I'm trying to process a number of FBX models to establish a kind of "connectivity tree" for future animation operations. Essentially I want to divide my models into numbered visual chunks then tag them to associate them with a "parent chunk". This parent chunk would be the neighboring chunk they are primarily attached/grounded to. I plan to use this order to reveal the chunks one-by-one - so I never have a floating chunk (chunk #0 will be on the ground plane). I've got some way into this but am struggling with tying up the final stages.

In the attached HIP example I divide the model into chunks with Connectivity SOP. Then I loop through the chunk pieces - for each one I make a padded bounding box and use it to group neighbor 'child' chunks that intersect its surface (feels a little hacky but seems to work). Next I'm trying to add a prim attribute to these grouped prims - basically the numerical ID of the 'parent' chunk I'm using to group them. 

When I run a single loop pass, things look somewhat OK but it falls apart on successive loops. I think the issue is perhaps how I'm accessing the parent chunk ID in the loop - or maybe my attrs are getting overwritten in subsequent loops?

Any ideas much appreciated - if you have a better idea on general approach I'd love to hear it (I'm probably going about it all wrong)

Thanks!

 

 

 

 

stackTest_help.hip

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

×