Jump to content

Maya --> H12 --> Maya while maintaining hierarchy


Zach

Recommended Posts

Hey guys,

I'm looking for an intelligent way to work out the following problem:

I'm trying to bring in some heavy, non-deforming geometry from Maya, run a foreach loop to do some poly reducing, and re-export to Maya... all while maintaining the geo's hierarchy. In other words, I'd like to use Houdini to create proxy geometry for our riggers and animators to use, while the high-res geo is loaded at render-time... so, it's very important that the hierarchy is kept.

I've exported FBX and Alembic scenes from Maya, and they come in to Houdini beautifully... the hierarchy is maintained and manifested as nested OBJ subnetworks, ultimately drilling down to a single SOP-level geo for each level of the hierarchy.

My question is: is there a simple / smart way of recursing through the top-level alembic or fbx subnetworks, referencing all the bottom-level SOP contexts, applying the contents of a ForEach loop to each geo, all while maintianing the structure?

It seems like exactly the kind of thing Houdini should be good at handling... but I don't have enough experience to know what to do. So I turn to you, odforce wizards. Any suggestions?

Z

Link to comment
Share on other sites

Here's an update on my progress...

This little bit of python will recurse into all the children of a given node and return the paths to each of the file nodes... I think a forEach loop might not work so well at this point, since I'd have to bring the results back into each path; so I'm probably better off adding the contents of the forEach node after each file, and setting the display flag to the last point. Somehow. With Python. I guess.

toplevel = "/obj/"

list = []

for node in allSubChildren(hou.node(toplevel)):
    if node.type() == hou.nodeType(hou.sopNodeTypeCategory(), 'file'):
        list.append(node.path())

Link to comment
Share on other sites

as a prep step in out character finaling workflow I've done the following in a shelf button script:

get the selected alembic archive

foreach node inside, drill down to the SOP

place a little network of nodes down that

1, creates a node called OUT so I can grab the geo in another obj level object (bla_mod).

2, places an object merge node and points it to an node called OUT in the obj object that I'll use to modify the geometry (bla_mod)

then at the object level I make a node called bla_mod

inside I can place an object merge node that "knows" of all the "OUT" nodes - and brings them in

then I do all kinds of stuff - in your case it would be poly reduction

then the results of this are fed into a node called OUT - which is read by the object merge node in each of the alembics geo objects...

it sounds a little convoluted but basically you pull out the geometry you need from the alembic network and do something to it, then send it right back for export

HTH

  • Like 1
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...