Patchwork 3D Community 2021.1 X5

FBX Import

The FBX import allows information related to surfaces and surface parameterization, textures, camera animation paths, and materials to be imported. Furthermore, Patchwork 3D supports FBX files up to version 2012 included.

The Import Parameters dialog box for an FBX file.

Import Parameters dialog box for an FBX file

During the import process of one or more FBX files, a log window displays its progression. The log window shows events, warnings (printed in orange), and errors (printed in red).

Imported FBX Data
Surfaces

The Patchwork 3D FBX importer only supports FBX mesh surfaces. If the FBX surface contains quadrangles or polygons which have more than four vertices, they are triangulated.

If the FBX file contains NURBS or Patch nodes, the importer carries out a preprocessing step in order to triangulate these geometries using the FBX SDK. After this preprocessing step, these surfaces are imported as Shaper mesh surfaces. The FBX importer does not try to stitch surfaces automatically.

If the surface contains more than one material, it is split into sub-surfaces. Each sub-surface corresponds to the restriction of the original surface to one material. In this case, a null surface is created and serves as a parent for the sub-surfaces.

Point cache

If references to point cache files containing information for vertex displacement are found in the FBX file, the animation of the meshes are imported at the same time as the surfaces.

Point cache files are exported from Autodesk Maya or Autodesk 3ds Max during the FBX export. This plugin is included in both Autodesk Maya 2017 and Autodesk 3ds Max 2017.The Geometry Cache File(s) option (Autodesk Maya) or the Point Cache File(s) option (Autodesk 3ds Max) must be selected.

The MC (XML) format is preferred. Point cache files in pc2 or MC (XML) format are supported.

Example: exporting from Autodesk 3ds Max 2017

  1. Create an object with a mesh animation.

  2. Select the menu option Edit > Manage Selection Sets. The named selection set management window will open.

  3. Select the object with a mesh animation, then create a new selection set. This new set contains the animated mesh.

  4. Select the option from the main menu > Export > Export. Choose the FBX export and confirm. You will need to provide a filename and a location to save the export.

  5. An options window opens. Expand the Animation section. Check the box beside the Animation option.

  6. Expand the Cache Point File section. Check the box beside the Cache Point File(s) option. Then, in the drop-down list, choose the selection set you created for the animated mesh.

  7. Validate. This operation will create an FBX file with the vertex displacement information. It also creates a folder with the same name and the _FPC suffix, containing an MC file and an XML file. These are the point cache.

If you prefer, you can modify the type of point cache file to be created:

  1. Create an object with a mesh animation.

  2. In the sidebar, select the Modify group.

  3. Select the mesh.

  4. Add a modifier by selecting Point Cache from the List of Modifiers.

  5. In the Parameters zone, click on New. At this point, you can select the file format: XML (the default format) or PC2. Validate your choice.

When exporting an FBX file with point cache files as described above, the selected point cache format will be respected.

For additional information on creating animated meshes and their properties, refer to the Autodesk Maya documentation under the Geometry Cache section, or to the Autodesk 3ds Max documentation under the sections Modifiers, Point Cache Modifier (Object Space) or Point Cache Files.

Surface Parameterization

The Patchwork 3D FBX importer supports the import of the FBX UV sets, which are copied automatically into the fields uvw:0, uvw:1… of the Patchwork 3D surfaces. For each of these UV sets, the surface mapping type is set to Extract.

Materials

The Patchwork 3D FBX importer also imports some of the materials used on mesh surfaces. The imported materials are assigned to the imported surfaces.

Lambert and Phong materials can be imported. The imported properties are the following:

  • Diffuse color,

  • Ambient color,

  • Opacity modulator,

  • Reflection Factor (for Phong materials),

  • Specular color and factor (for Phong materials).

The following figure shows the expected behavior when importing a FBX file created using Maya software (note: the lighting is different between the two screenshots).

Maya shading (left) for an imported FBX file.
Matter shading (right) for an imported FBX file.

Maya shading (left) and Matter shading (right) for an imported FBX file.

Textures

If a texture file is found on the diffuse, bump or specular layer of a Lambert or Phong material, it is imported provided the FBX importer is able to retrieve it. Only the first texture file on each layer can be imported. If more than one texture file is found on a given layer of a FBX material, all files starting from the second one are ignored. In such cases, a warning is inserted in the log file.

The Patchwork 3D FBX importer looks for texture files as follows: it tries to retrieve the file using the absolute file name found in the FBX file first, and then using the relative file name generated by the FBX export module. Lastly, it tries to retrieve the file in the FBX file directory using only the texture file name.

The texture is assigned to the corresponding layer of the material, and is also visible in the Texture tab of Matter.

Camera Animation Path

The Patchwork 3D FBX importer imports camera paths as follows: each key frame is imported as a tuple (from, to, up, fov) written in a Patchwork 3D Kam file. Thus, baking the animation at the desired frame rate while exporting a FBX file is necessary as intermediate positions cannot be rebuilt from Kam files.

The FBX importer creates one Kam file per camera. The Kam file name is built as follows: "fbx_file_name> FBX importcamera_name>".

Animation

Transformations of the scene graph saved in FBX format are imported as a timeline containing channel animations. Each channel animation corresponds to the animation of a node in the FBX scene graph and is placed at the correct time in the timeline.

As channel animations, these elements appear in the Channel Animations library in the Timelines editor and can be reused in other timelines. Channel animations created by the FBX importer are not editable.

The FBX importer creates the following elements:

  • A timeline with the name of the imported FBX file. This timeline is shared with imported animated meshes.

  • One channel animation per node animation, each with the name of the corresponding node.

Other FBX Nodes

Any other FBX nodes are imported as null surfaces. The null surface name in Patchwork 3D is the node name read in the FBX file.

Visibility Layer Hierarchy

The FBX importer first creates a layer with the time stamp and the path to the directory used to store the temporary files generated during the import process. Then, it creates a layer for each imported file using the file name as layer name.

For each file, the FBX importer builds a layer hierarchy corresponding to the FBX file node hierarchy.

Layer hierarchy from data in the FBX format in Maya (left).
Layer hierarchy from data in the FBX format in Patchwork 3D (right).

Layer hierarchy from data in the FBX format in Maya (left) and Patchwork 3D (right).

Kinematic Hierarchy

The FBX importer also builds a kinematic hierarchy that follows the FBX node hierarchy.

Example of kinematic hierarchy in Shaper built according to a FBX node hierarchy.

Example of kinematic hierarchy in Shaper built according to a FBX node hierarchy.