kiryha Posted March 22, 2018 Share Posted March 22, 2018 What are the options for importing animated FBX files (from mixmao) into geometry context (to scatter, modify etc)? Imported FBX file appears in the OBJ root context and currently I know 2 options to bring animated meshes to geometry context: - With "Object Merge" node. The issue here is if I have a lot of parts it could be a long process to bring all meshes together. Could be scripted although. - With "Agent" node. Not sure if I will have the same level of access to geometry data in this case, for example how to apply different materials to different parts of the mesh. What is the usual way to do such things? Quote Link to comment Share on other sites More sharing options...
Sepu Posted March 22, 2018 Share Posted March 22, 2018 I will look at @Atom vimeo or youtube page he has a bunch of stuff dealing with FBX. But as you said you always script it as well. https://vimeo.com/atomicperception 1 Quote Link to comment Share on other sites More sharing options...
kiryha Posted March 22, 2018 Author Share Posted March 22, 2018 Ok, quick script to merge FBX data into Geometry node # 256 Pipeline tools # Convert FBX subnetwork to Geometry node # Import FBX into Houdini, select FBX subnetwork, run script in Python Source Editor import hou # Get selected FBX container and scene root FBX = hou.selectedNodes() OBJ = hou.node('/obj/') def checkConditions(): ''' Check if environment conditions allows to run script without errors ''' if not FBX: # If user select anything print '>> Nothing selected! Select FBX subnetwork!' return 0 def convert_FBX(): ''' Create Geometry node and import all FBX part inside ''' # Create Geometry node to store FBX parts geometry = OBJ.createNode('geo', run_init_scripts = False) geometry.setName('GEO_{}'.format(FBX.name())) geometry.moveToGoodPosition() # Get all paerts inside FBX container geometry_FBX = [node for node in FBX.children() if node.type().name() == 'geo'] # Create merge node for parts merge = geometry.createNode('merge') # Replicate FBX structure in Geometry node for geo in geometry_FBX: # Create Object Merge node objectMerge = geometry.createNode('object_merge') objectMerge.setName(geo.name()) # Set path to FBX part object objectMerge.parm('objpath1').set(geo.path()) objectMerge.parm('xformtype').set(1) # Link part to merge merge.setNextInput(objectMerge) # Set Merge Node flags to Render merge.setDisplayFlag(1) merge.setRenderFlag(1) # Layout geometry content in Nwtwork View geometry.layoutChildren() # Check if everything is fine and run script if checkConditions() != 0: # Get FBX network FBX = FBX[0] # run conversion convert_FBX() print '>> CONVERSION DONE!' 1 Quote Link to comment Share on other sites More sharing options...
kiryha Posted April 3, 2018 Author Share Posted April 3, 2018 Aha! There is a slightly more easy solution: "Import Directly Into obj/Network" checkbox in Import FBX dialog window... 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.