Wednesday 12 February 2014

Houdini Import OBJ Python Script

Recently I'v been working on a project where I had to import an obj file into Houdini which was made up of loads of different objects. The problem with using a simple file node is that the entire obj file is imported into a single geometry node. If you need to get an individual object then you can get it as a group. However this is tedious if you want to animate each individual group.

So instead of creating a transform sop node for each group and then animating it, I decided to make a simple python script. The script creates a geometry node for each group and puts an object merge node in it which only imports that specific group. Then all the geometry nodes are put inside a subnet.

To use the script just create a geometry node which has the file node that imports the obj file in it. Then select the geometry node and run the script. You have to create a shelf tool to use the script.

Obj file split into separate geometry nodes.

No comments:

Post a Comment