I'm creating a file importer using python and I can create a custom SOP to import geometry and bones without any problem, but I'm totally stuck on how to import the weight data.
Looking at an imported fbx file, it looks like I need capture, override, and deform nodes. It looks like the override node is handling the weight data, but I can't find any information in the python documentation anywhere about bones or geometry capture etc. I'm guessing this is why I couldn't find any other python based importers for Houdini…… :?
Custom File Importer
2292 3 1- El_Duderino
- Member
- 2 posts
- Joined: Nov. 2014
- Offline
- Stalkerx777
- Member
- 183 posts
- Joined: Nov. 2008
- Offline
El_DuderinoNope. This is because it slow as hell :twisted:
I'm guessing this is why I couldn't find any other python based importers for Houdini…… :?
it looks like I need capture, override, and deform nodes.Capture - creates weights attributes.
Override - can modify them (optional)
Deform - use capture attributes (weight, region) to deform geometry.
but I can't find any information in the python documentation anywhere about bones or geometry capture etcAnd you don't. Because in houdini there is no such thing as bones and geometry capture from python point of view. Python cares about nodes, parameters and geometry attributes. If you want to use standard Deform sop, you have to create capture attributes in your “custom importer”, then Deform sop will do his job.
Aleksei Rusev
Sr. Graphics Tools Engineer @ Nvidia
Sr. Graphics Tools Engineer @ Nvidia
- tamte
- Member
- 8599 posts
- Joined: July 2007
- Online
the capture weights are special type of attribute containing index pair table, which is perfectly accessible through Python so there should be no issue
http://www.sidefx.com/docs/houdini13.0/hom/hou/IndexPairPropertyTable [sidefx.com]
just analyze through python what boneCapture attrib contains in index pair table and you should be able to replicate that easily for your custom weight importer so it will work with Deform SOP afterwards
http://www.sidefx.com/docs/houdini13.0/hom/hou/IndexPairPropertyTable [sidefx.com]
just analyze through python what boneCapture attrib contains in index pair table and you should be able to replicate that easily for your custom weight importer so it will work with Deform SOP afterwards
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- El_Duderino
- Member
- 2 posts
- Joined: Nov. 2014
- Offline
OK, thanks tamte.
I just started learning Houdini.
So, using
hou.node('/obj/Blender_fbx/_001_Junk_Body/_001_Junk_Body_capture').geometry().points().attribValue(“boneCapture”)
will give me the bone ID,weight pairs and then I can use those IDs with
hou.node('/obj/Blender_fbx/_001_Junk_Body/_001_Junk_Body_capture').geometry().pointAttribs().indexPairPropertyTables().stringPropertyValueAtIndex(“pCaptPath”,ID)
for the bone path.
I just started learning Houdini.
So, using
hou.node('/obj/Blender_fbx/_001_Junk_Body/_001_Junk_Body_capture').geometry().points().attribValue(“boneCapture”)
will give me the bone ID,weight pairs and then I can use those IDs with
hou.node('/obj/Blender_fbx/_001_Junk_Body/_001_Junk_Body_capture').geometry().pointAttribs().indexPairPropertyTables().stringPropertyValueAtIndex(“pCaptPath”,ID)
for the bone path.
-
- Quick Links