HDA distribution from Houdini to export FBX with hierarchy and transforms

Overview

Now that I've created an HDA in Houdini that preserves hierarchies and transforms and exports FBX, I'll summarize the issues with standard features and how to use them. HDA and sample files can be downloaded from the URL at the end of the page.

Problems with standard functions

For example, suppose you have a car model in Maya that is separated by tires and body as shown in the figure. The tire pivot is at the center and the body is at the origin.

If you reduce this model in Houdini and export the FBX, you will lose the hierarchy and transforms.

To solve this problem, you have to separate the Geometry node for each object and write it out in the Subnet from the Out context.

To bring it as an LOD, create a null node with the name ** LODGroup ** and connect the connection. At this time, it is not possible to create a node with the same name in the same network, so if you want to make it an object with the same name, you need to create parameters ** fbx_node_name ** and ** fbx_node_path ** and set the path and name. LODHierarchyDescription.png

If you import FBX with ** File> Import> Filmbox FBX ** in the menu, the hierarchy will be created automatically, but these methods are difficult to edit and update the file.

You can do something with this level of hierarchy, but it's quite annoying when it comes to more complex hierarchies.

How to implement HDA

The HDA to be distributed reads the hierarchy path and transform from the attributes and automatically builds them in Python when exporting to FBX.

Hierarchy and transform attributes

So, how to create the attributes of hierarchy and transform is that when FBX is read by File node, it is automatically set to ** name ** attribute, position to ** fbx_translation **, ** fbx_rotation **. Rotate, the scale value is read into ** fbx_scale **.

HDA reads values from these attributes by default, so you can keep the hierarchy and transforms and export by leaving the original values. Attribute control makes it easy to have hierarchies and transforms even for models created from scratch in Houdini.

Creating a LOD

To create an LOD, the name attribute is exported as a LOD by giving it a hierarchy named LODGroup (the image has LOD0 and LOD1 overlapping at the same position). NamePreview.png

If you load it in Maya, it will be loaded as a model with a hierarchy and LODGroup as shown in the figure.

You can see that the LOD is loaded properly even if you import this model directly with Unreal Engine.

HDA UI and parameters

UI

** Parameters **

Parameter name Description
Render                                               Export FBX.
If the Build Hierarchy From Attribute is checked and the attribute for the hierarchy is not found, the button cannot be pressed.
Hierarchy                                         
Build Hierarchy From Attribute Build a hierarchy based on the attributes for the hierarchy.
Path Attribute Attribute name for hierarchy
Transform From Attribute Set the transform based on the attributes for the transform.
Translation Attribute Attribute name for position
Rotation Attribute Attribute name for rotation
Scale Attribute Attribute name for scale
Export                                              
FBX SDK Version You can specify the SDK version of the FBX file to export.
Export in ASCII Format If checked, the exported FBX file will be in human-readable ASCII format. If unchecked, it will be in binary format.
Output File File to save geometry(Extension.Please fbx)。

HDA and sample file download

If you download HDA from the following and copy it to a folder where HDA is recognized, a node called ** FBX Export ** will be added with ** Sop ** and ** Rop **.

-Download HDA -Download sample file

Sop Rop

Finally

In the future, there is a possibility that these functions will be officially added to FBX, and there is a possibility that it will replace the flow that does not use FBX such as USD in the first place, but I hope this HDA will be useful for your production as much as possible.

If you have any bugs or feature requests, please write them in the comments.

Recommended Posts

HDA distribution from Houdini to export FBX with hierarchy and transforms
Automatically render Blender and export FBX with Git Hook
[Python] Regularly export from CloudWatch Logs to S3 with Lambda
Getting Started with Poetry From installation to execution and version control
From ubuntu installation to running kinect with docker and ros (overview)
[Python] Try to recognize characters from images with OpenCV and pyocr
Create folders from '01' to '12' with python
Read fbx from python with cinema4d
I tried to learn the angle from sin and cos with chainer