Search - User list
Full Version: Export multiple FBX from SOP result
Root » PDG/TOPs » Export multiple FBX from SOP result
borbs727
I'm loading an FBX through the file sop and then iterating over it with a for loop by prim name in order to make changes to each piece of geometry. Then I have to export each piece separately in its own fbx file (for gaming). Previously I've had to export using an alembic with a name attribute driving hierarchy, then export each piece as its own fbx using Maya's Game Exporter. PDG seems like it can save me a step. If anyone has any other suggestions on how to do with without PDG that'd be great, but I'm most curious on how to do this with the new system because I'd love to learn it!

My big hangup atm is that I'm not sure how to expose the parameters from the geometry import top. Any ideas? File attached. Thanks!
tpetrick
The geometry import currently can't create work items from piece attributes, but it can create them from groups. If you're able to put in each of the pieces of geometry into its own group, you can set the geometry import's class to Primitives, and “Create Work Item For” to “All Groups”. That will create a work item for each group in the geometry, which can then be used to drive a ROP Alembic TOP node to write out the geometry.
jsmack
Would packing by name also work by allowing creating a work item per primitive?
borbs727
tpetrick
The geometry import currently can't create work items from piece attributes, but it can create them from groups. If you're able to put in each of the pieces of geometry into its own group, you can set the geometry import's class to Primitives, and “Create Work Item For” to “All Groups”. That will create a work item for each group in the geometry, which can then be used to drive a ROP Alembic TOP node to write out the geometry.

This is working great! I'm using the partition sop like so:


Exporting as an ABC was a hacky workaround which required me to then go into Maya and batch export each asset as its own FBX using Maya's FBX exporter. Now that I have each work item separated, I'd like to remove that step and just export each file as an FBX out of Houdini using the name of that object in the file path. So “stone_A_mesh” would make a file called “stone_A_mesh.fbx”.

The path on my ROP FBX node is this:

$HIP/../../Publish/`opname("..")`/`prims("../groupdelete1", 0, "file_name")`.fbx

I can't figure out how to get the primnum dynamically though.
tpetrick
You post your .hip file, so that I can take a look?
Fontenelle89
I'm interested in the use of PDG for creating a Batch FBX Exporter too, similar to what Maya's game exporter does, it's just so useful for environment art stuff so I kind hope there's a out-of-the-box solution soon or at least a tutorial on how to setup one with PDG.

Some modular kits can go above 70 pieces, so the faster we can select everything in a scene and dump each one to a folder with its own fbx, the better.
Tertium
Fontenelle89
I'm interested in the use of PDG for creating a Batch FBX Exporter too, similar to what Maya's game exporter does, it's just so useful for environment art stuff so I kind hope there's a out-of-the-box solution soon or at least a tutorial on how to setup one with PDG.

Some modular kits can go above 70 pieces, so the faster we can select everything in a scene and dump each one to a folder with its own fbx, the better.
Did you managed how to save multiple fbx files using TOP net?
Fontenelle89
No, mostly because I had to shift my priorities to other things outside of Houdini entirely. but if Houdini 18.5 doesn't ship with anything of the sort I will brute force my way with TOPs(I'm assuming there's more documentation and tutorials nowadays) or by using python, which seems to be the standard way people do it.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB