FBX Export Groups / Primitives as Separate Objects

   3400   8   3
User Avatar
Member
4 posts
Joined: March 2018
Offline
Hi,

I'm quite new to Houdini and loving it. I have been using the GameDev tools and they're excellent. However, one thing I'm struggling with is this:

If I use GOZ (Zbrush) or import an FBX with polygon meshes in that are separate ‘objects’ in the FBX sense of the word (subtools in Zbrush speak), I can manipulate those ‘primitives’ as groups. However, when I use the ROP FBX Output node the geometry is all packed in to one FBX object. So for example, if I want one part of a mesh to stay separate so it can be animated in another package (have its own transform values) I can't use the Houdini FBX export because the geo is all one object.

Is there any advice anyone can give on how to keep my groups as separate FBX objects but in the same FBX file when I export from Houdini?

Many thanks!
User Avatar
Member
4 posts
Joined: March 2018
Offline
I'd love to know the answer to this one as well!
User Avatar
Member
18 posts
Joined: Sept. 2012
Offline
I would like to know that as well.
User Avatar
Member
2 posts
Joined: June 2016
Offline
I think I figured out a sort-of workaround for this. You need to go via the Alembic output, which as an option to build the object hierarchy from a string attribute. What you need to do is the following:

1. Set up a string attribute on the primitive level. This string defines the path in the output file that the primitive will be placed in.
2. Create an Alembic output node. Doesn't matter if this is a ROP in the SOP context or the output context.
3. Turn on “Build hierarchy from attribute” and point it to the string attribute you set up in step 1.
4. Export.
5. Import the Alembic file and re-export it as FBX. This FBX export will preserve the attribute-driven hierarchy created.

See the attached screenshots. As you can see in the modo screenshot, the object names are preserved. Forward slashes means it creates a hierarchy of nulls. These nulls are presumably at world origin, so it might be difficult to use this for animation.

Attachments:
Screen Shot 2019-06-27 at 09.35.27.png (3.4 MB)
Screen Shot 2019-06-27 at 09.35.14.png (3.4 MB)
Screen Shot 2019-06-27 at 09.35.37.png (1.2 MB)

User Avatar
Member
31 posts
Joined: Sept. 2017
Offline
I don't think this workaround solves the problem of being able to export FBX from Houdini and maintain separate meshes in a single FBX file.

Good to know that you can do that with Alembic though.

I just figured this out - if you are at the sop context, you need to create an objnet. Inside the objnet, you create a geo node for each piece that you want to be in a separate sub mesh. This is easily done with Python if you have an exporter for destruction pieces or something.

Then create a ROP net with filmboxfbx node and in the startnode/Export field, point to the objnet node.
You can uncheck the “Create Root for Subnet” checkbox if you do not want the separate meshes in group node and instead let the meshes be in the root of the hierarchy.

Here is the visual explanation:

Edited by akesso - July 8, 2019 18:13:06

Attachments:
fbxExportSubmeshes.jpg (386.5 KB)
fbxExportSubmeshes_inMaya.jpg (144.2 KB)

User Avatar
Member
14 posts
Joined: April 2018
Offline
I was having a similar thing of wanting to export thing as separate groups, as well as have an object that already has separate groups, be imported and maintain them being separated. Good to know there's a way to have them exported separately.
User Avatar
Member
13 posts
Joined: April 2016
Offline
If it is divided into 200 pieces, make 200 geo nodes?
Is there any solution? It is hard to believe that
the magic tool houdini cannot export fbx properly :/
User Avatar
Member
5005 posts
Joined: July 2007
Offline
xopowoo
If it is divided into 200 pieces, make 200 geo nodes?
Is there any solution? It is hard to believe that
the magic tool houdini cannot export fbx properly :/
is it any different in Maya for example? Can you export single Shape node as multiple objects?
geo level is the same as a single Shape node in Maya, simply geometry of a single object
hierarchy of objects with transforms exports to fbx as hierarchy of objects with transforms, I'd call that properly

but on top of that you have option to export complex hierarchies into .abc or .usd directly from geo level
Edited by tamte - March 18, 2020 02:34:43
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
7 posts
Joined: Sept. 2019
Offline
If you want to export from Geometry level you need to enable Hierarchy Path in ROP_FBX.
That means we need to have that "path" Attribute on Primitives been created.
As variant A, use Asseble SOP to do the job



But I prefer B => manual creation of that path attribute.



And to get nice looking semi automated paths, in Attribute Create for String I use expression `opname('..') + '/' + opinput('.', 0)` to combine Object name and Previous Node Name.
In FBX ROP I use $HIP/`opname("..")`.fbx to export in same directory as my project file and name it as Object Named
Edited by kodbitz - Jan. 14, 2021 00:47:50

Attachments:
houdini_export_v1.jpg (291.2 KB)
houdini_export_v2.jpg (314.9 KB)

  • Quick Links