Jump to content

Getting connectivity "tree"


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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...