Alexander Bong Posted March 16, 2012 Share Posted March 16, 2012 (edited) Hi, I am looking for a way to import my massive simulation into Houdini so I can add some effects to it. Massive 4 has the ability to output the agents as an FBX file, However, without the skinned mesh. The ideal solution is to skin the mesh back to these joints on every agent. So, my naive solution is to read every agent's joint's rotational value and paste it into my own skinned character's joint chain. So I tried picking up the the HOU module. This is where i need help. This is what i got so far... # to load in the simulated agents, copy it's joint rotation and position, paste it on a skinned character for agentNumber in range(20): #change to number of agent #load in agent from simulation hou.hscript("fbximport /Sim/soldierAgent2.%i.fbx" %agentNumber) importedSoldier = hou.node('/obj/soldierAgent2_%i' %agentNumber) #duplicate master copy of skinned character mySoldier = hou.node('/obj/masterSoldier') mySoldier = duplicate(mySoldier)#<--------need help with this command. duplicating the master copy so i can copy the agent xform values into it. mySoldier.setName('mySoldier_%i' %agentNumber) for frameNumber in range(24): #number of frame mySoldier = mySoldier.allSubChildren( type == joints ) #<---need help to filter out joints only. recursiveGlob on the root joint perhaps? for soldierJoint in mySoldier:# (every joints in soldier node): soldierJoint.parmTuple('r').set(#read in value of the same joint from importedSoldier, via node name) not sure if this would work. #and do the same for root joint's translation values soldierJoint.parmTuple('t').set() #next frame hou.setFrame(i) delete importedSoldier So I'm hitting a wall at three places there. -duplicating a node -listing out all joint chain inside a node -copying values of joints with the same name from inside a node to another. This seems like a naive solution, but it's all i got. :| Thanks in advance! Edited March 16, 2012 by Alexander Bong Quote Link to comment Share on other sites More sharing options...
edward Posted March 16, 2012 Share Posted March 16, 2012 Hint for the first one: http://www.sidefx.com/docs/houdini12.0/hom/hou/copyNodesTo Quote Link to comment Share on other sites More sharing options...
Alexander Bong Posted March 16, 2012 Author Share Posted March 16, 2012 (edited) Thanks. I think I've got them all now. Edited March 16, 2012 by Alexander Bong Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.