FBX Export Groups / Primitives as Separate Objects
22268 14 3- mephistonight
- Member
- 4 posts
- Joined: 3月 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!
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!
- ctrl_paint
- Member
- 4 posts
- Joined: 3月 2018
- Offline
- kif11
- Member
- 20 posts
- Joined: 9月 2012
- Offline
- SimonLundberg
- Member
- 2 posts
- Joined: 6月 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.
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.
- akesso
- Member
- 32 posts
- Joined: 9月 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:
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 - 2019年7月8日 18:13:06
- dragon3582
- Member
- 14 posts
- Joined: 4月 2018
- Offline
- xopowoo
- Member
- 28 posts
- Joined: 4月 2016
- Offline
- tamte
- Member
- 8839 posts
- Joined: 7月 2007
- Offline
xopowoois it any different in Maya for example? Can you export single Shape node as multiple objects?
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 :/
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 - 2020年3月18日 02:34:43
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
- kodbitz
- Member
- 8 posts
- Joined: 9月 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
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 - 2021年1月14日 00:47:50
- Hamster3001
- Member
- 8 posts
- Joined: 10月 2020
- Offline
- OlaHaldor
- Member
- 11 posts
- Joined: 4月 2016
- Offline
I just came here searching for exactly this;
I'm scattering modules of cliffs to form larger cliffs around on a map. There's about 500 total.
Will either of the methods above export the mesh with the orientation/rotation and scale of the object as seen in the viewport? Meaning; the cliff objects are rotated to follow the normal of the terrain plus a little random variation in both scale and rotation.
In the game engine I make maps for I can't import a huge mesh like this but would have to export temp objects (like a plane or so) and replace them with the actual model I'm supposed to use. If the data for rotation and scale is intact, that's all I need!
I'm scattering modules of cliffs to form larger cliffs around on a map. There's about 500 total.
Will either of the methods above export the mesh with the orientation/rotation and scale of the object as seen in the viewport? Meaning; the cliff objects are rotated to follow the normal of the terrain plus a little random variation in both scale and rotation.
In the game engine I make maps for I can't import a huge mesh like this but would have to export temp objects (like a plane or so) and replace them with the actual model I'm supposed to use. If the data for rotation and scale is intact, that's all I need!
- willh
- Member
- 134 posts
- Joined: 12月 2006
- Offline
OlaHaldor
I just came here searching for exactly this;
I'm scattering modules of cliffs to form larger cliffs around on a map. There's about 500 total.
Will either of the methods above export the mesh with the orientation/rotation and scale of the object as seen in the viewport? Meaning; the cliff objects are rotated to follow the normal of the terrain plus a little random variation in both scale and rotation.
In the game engine I make maps for I can't import a huge mesh like this but would have to export temp objects (like a plane or so) and replace them with the actual model I'm supposed to use. If the data for rotation and scale is intact, that's all I need!
If you are using unreal, you can create a HDA of your layout, then copy the path from the object in unreal and add it as a parameter to the points that you want to instance your geo onto.
So in unreal you import the static mesh pieces you want to instance, then you right click on the static mesh and copy its path. you can then paste that in houdini using the {s@unreal_instance = "paste the path from unreal"} in a point wrangle on the point cloud you want to copy the instances onto
you will also have to create a orient and scale attrib for the rotation and scale of the pieces.
Edited by willh - 2023年5月4日 12:06:17
- willh
- Member
- 134 posts
- Joined: 12月 2006
- Offline
- OlaHaldor
- Member
- 11 posts
- Joined: 4月 2016
- Offline
- L05
- Member
- 2 posts
- Joined: 7月 2014
- Offline
This is the way. Thank you!
kodbitz
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 jobImage Not Found
But I prefer B => manual creation of that path attribute.Image Not Found
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
-
- Quick Links