Export multiple FBX from SOP result

   10550   7   0
User Avatar
Member
29 posts
Joined: Aug. 2014
Offline
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!
Edited by borbs727 - April 4, 2019 19:48:05

Attachments:
pdg_export_multiple_fbx.hiplc (726.9 KB)

User Avatar
Staff
585 posts
Joined: May 2014
Offline
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.
User Avatar
Member
7747 posts
Joined: Sept. 2011
Offline
Would packing by name also work by allowing creating a work item per primitive?
User Avatar
Member
29 posts
Joined: Aug. 2014
Offline
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.
Edited by borbs727 - April 7, 2019 17:21:31

Attachments:
partition_sop.PNG (7.7 KB)

User Avatar
Staff
585 posts
Joined: May 2014
Offline
You post your .hip file, so that I can take a look?
User Avatar
Member
18 posts
Joined: Sept. 2017
Offline
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.
Edited by Fontenelle89 - April 14, 2019 20:32:44
User Avatar
Member
5 posts
Joined: July 2020
Offline
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?
User Avatar
Member
18 posts
Joined: Sept. 2017
Offline
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.
  • Quick Links