Eyeon:Manual/Appendices/Importing/Import FBX Files

From VFXPedia

Jump to: navigation, search

Contents

The FBX Format

The FBX file format is an interchange format specifically designed to make transporting 3D scene data between different applications easier. Although originally created by Kaydara, the format is now developed and maintained by Autodesk. For details on the FBX format, see Autodesk's Website.

Fusion can use a FBX file to create a composition that matches the cameras, lights and geometry found in the scene.

FBX files can be imported into Fusion in two ways, either by using the File->Import->FBX menu or by adding a FBXMesh3D tool to the flow. In general it is better to use the File->Import->FBX menu since it provides extra options and abilities. Using the FBX Import menu, you can import:

  • lights
  • cameras
  • meshes (grouped or individually)
  • nulls
  • simple animation on lights, cameras, and meshes

If you are using the FBXMesh3D tool, you restrict yourself to importing grouped meshes without their animation.

For more information about FBX import, you can also look at the FBXMesh3D tool and the matchmoving FAQ.

At the bottom of this page is a user-editable section that users can edit to add their own tips/advice.

If this page does not help and/or you think you've found an issue not mentioned here feel free to submit it to mailto:tech@eyeonline.com.


Importing FBX Files Using the Import Menu

Selecting Import->FBX from the File menu at the top of the screen will display a file browse dialog. Use this to locate the FBX file to be imported, then click on the Open button. Fusion will display the following options for the import.

Animation

This list shows all of the animation tracks in the FBX file. The FBX format was originally designed to hold motion capture data and, to this day, supports multiple animation tracks per object. Select the animation track be to imported or, if a static scene is preferred, select No Animation.

Resampling Rate

Use this control to select the number of frames per second for the animation.

Collapse Transform Hierarchy

To understand what this option does, it is important to understand that FBX files can contain a hierarchy of 3D objects where one object may be parented off of another. For example, it may contain a human body with the fingers parented off the arm and the arm parented off the torso.

Collapse Transform Hierarchy can be used to flatten the hierarchy of transforms down into the leaf nodes. As of Fusion 5.2 this functionality is now deprecated because Fusion is now capable of importing the hierarchy of transforms.

Choosing to flatten the transforms has several bad consequences:

  • You can lose animations.
  • You can lose 360 degree rotations. For example, if you have an animated rotation that has two keyframes at 1 and 365 degrees, this would get imported as 1 and 5 degrees and the object would lose a 360 degree rotation.

When Collapse Transform Hierarchy is off, the whole 3D hierarchy is imported. You will often see extra merge nodes showing up when you import objects that are linked/parented in the FBX. The reason for this is that in most 3D apps it is possible to parent meshes off of other objects (meshes/cameras/lights) directly, but in Fusion this is not possible so an extra merge node is added in.

So for example, suppose you have Box01 parenting Box02 in your 3D app so that when you move Box01, Box02 moves along with it. When you import this into Fusion, you will get 3 tools: a FBXMesh3D tool called 'Box01' another FBXMesh3D tool called 'Box02' and a merge tool called 'MergeBox01'. Any transforms and TRS animations on Box01 have been lifted into the MergeBox01 tool in Fusion.

Convert Up Axis To

In its 3D environment Fusion uses an axis system with the y-axis point up. Other 3D applications may have a different axis pointing up. For example, 3DSMax has the z-axis pointing up and Maya has the y-axis pointing up. This change of coordinates needs to be accounted for when transferring data from a 3D application to Fusion in one of two ways:

  • During the export process: Most 3D applications allow the user to change the up axis when exporting to the FBX format.
  • During the import process: If you did not change your up axis during export, you can alternatively change it during import. As an example, if you have an FBX which was exported from 3DSMax with the z-axis pointing up, you would want to enable this control and set the up axis to 'y'.

Choosing to convert axes can in some cases cause rotations of 360 degrees to be lost.

Import

Use these checkboxes to select which elements of the animation are to be imported. Currently, Fusion can import cameras, lights, meshes and nulls from FBX scenes.

Group Meshes

When Group Meshes are checked, all the meshes contained in the FBX file are transformed into world space and grouped together into a single FBXMesh3D tool. The Group Meshes option can be handy when what you are exporting consists of a large number of static (non-animated) meshes with the same material and you don't want lots of FBXMesh3D tools cluttering the flow. Using the Group Meshes option also has some serious consequences due to the fact that Fusion will treat the imported meshes as a single mesh:

  • It is not possible to manipulate or separate out the individual meshes anymore.
  • All animation on the meshes is lost. If the meshes in the FBX file are animated, Fusion will position them at time = 0 and group them.
  • All the meshes will be forced to use the same material. Because the FBXMesh3D tool only supports one material per mesh, when the GroupMesh option is enabled, Fusion will try its best to pick appropriate material settings for the grouped meshes but if they have different materials then basically you're screwed (you'll get a random one).
Create New Document/Merge Into Existing Document

These radio buttons can be used to select whether the import of the FBX file will create a brand new composition or if the tools will be imported into the current composition.


Importing FBX Meshes Using the FBXMesh3D Tool

Only static meshes with the same material should be imported using this method. See the FBXMesh3D tool for more information.

Supported/Unsupported FBX Features

The FBX specification does not support all the features found in a 3D application (like 3DSMax or Maya) and Fusion does not support all the features of the FBX specification. This means that some things in a 3D application cannot be exported into a FBX file and some things in a FBX file cannot be imported into Fusion. Fusion is not a 3D modeling application, nor do we plan to turn it into one (we are a compositor), but we have tried to support as many features as possible (given time constraints) to make FBX import a useful tool for compositors.

Animation

In general it is always safest to bake all animations per frame in your 3D application. However, if you want to try to import keyframes on animation curves for translation, rotation, and scaling (TRS) what follows is some advice.

There are many different types of animation curves, some of which Fusion does not support or are subtly different from Fusions. Note that if your animation does not consist of linear and Bezier segments you must bake in animations per frame.

If you are experiencing problems with splines:

  • Make sure Collapse Transform Hierarchy is turned off in the import options
  • If you are trying to import TRS animation on a mesh, then make sure Group Meshes is turned off
  • Import of B-splines (TCB controllers) is not supported (B-Spline is not the same as Bezier)

If the FBX is coming from Max and it is not using a bezier controller, you must bake the animation per frame. In our testing, there are only certain bezier tangent types in the Max spline editor that export and reimport correctly. If you use certain unsupported tangent types, the imported curve will not match or Max sticks in extra keypoints at every frame. Linear/custom tangents in Max are safe.

In internal testing we've had much better luck with splines from Maya.

Cameras and Lights

  • Only spot, point, directional and ambient lights are imported. Area lights and other more advanced lights are not supported.
  • Targeted cameras/spots can have problems when you exporting from a 3D application with z-axis pointing up (eg. Max) into Fusion.
  • Inner/outer angle for spotlights: Only a single angle value is stored in the FBX and this is what Max uses. A 3D application will usually store one of these two angles into the FBX or an average of them.
  • Fusion only supports import of cameras where the film gate aspect ratio is the same as the resolution gate aspect ratio. For example, if you are rendering out to an HD720 image make sure your camera aperture is set to have an aspect of 1.7777778. In particular, the "Fit Resolution Gate" option in Maya is not supported. Fusion will internally fit the film gate to the resolution gate vertically which may or may not be what is wanted.

Nulls

  • Animation on nulls is not imported. If the nulls are animated they are imported at time = 0. It was decided not to add this feature to prevent users from 'shooting themselves in their foot' since so many animated inputs (think point clouds produced by tracking software with typically 100s - 1000s of points) would cause problems with Fusion.
  • Any nulls within the FBX are combined into one point cloud.
  • The point cloud is converted to world space on import.
  • Import/export of point clouds tends to be slow because each null is stored as a separate node in the FBX bloating the file significantly.

Geometry

  • Wireframe, smoothing, and culling information stored in the FBX is ignored.
  • Meshes will be triangulated upon import.
  • NURB surfaces are not supported.

Materials

  • Fusion only supports reading in one material/texture per mesh. In particular, Fusion does not support import of meshes that have multiple materials assigned to their faces or multilayered materials. In such situations, Fusion will simply use the first material/texture it encounters on the mesh for the entire mesh.
  • The diffuse color texture is the only texutre read in.
  • Animations on material/textures parameters is not supported.
  • Note that the default mesh colors in 3DSMax are not counted as materials and do not get imported.
  • Material import is limited to diffuse/specular color, and specular exponent.
  • When importing using File -> Import -> FBX, a Loader will be created for diffuse textures.
  • Material opacity is not imported from the FBX. The reason is that sometimes seems Maya will incorrectly set the material's opacity in the FBX to 0 causing the object to be invisible in Fusions view, which is confusing to users.

Common Pitfalls and Tips

  • Note that in general, one should not expect an exact match between a 3D render from Fusion with a render from any other 3D application, although the match should be pretty close. The biggest difference arises when doing subpixel sampling of edges and materials. On some renderers this subpixel sampling is done in a stochastic/random manner while in others it is done on a regular subpixel grid. The number of stochastic samples done and their positions within the pixel and the dimensions of the grid can vary from renderer to renderer. This will give rise to very small variations in the color values of pixels if you are comparing the results from two separate renderers.
  • See the matchmoving FAQ for several useful tips about getting cameras to match up.
  • Max to Fusion: Max uses the z-up convention but Fusions uses a y-up convention. This can cause problems when importing rotations. Angles outside of the range 0-359 may get converted to angles in the 0-359 range. Choosing a different coordinate system conversion setting may affect the wrapping of angles to 0-359 and the targeting of lights/cameras depending on your scene. All you can do is experiment. There are 3 separate coordinate system conversion settings in the 3DSMax export dialog you can use:
    • No Conversion: When importing in Fusion, you will have to choose to convert the up axis to y in Fusions import fbx dialog.
    • Add Root Node (y-up): Don't pick z-up.
    • Convert Animation (y-up): Don't pick z-up.
  • More Max to Fusion: If you don't know how to or can't bake animation in 3DSMax you can use the Collada format. In the Collada exporter for 3DSMax you have the option to sample animations per frame via the 'Sample Animation' checkbox. You'll probably want to leave 'Bake Matrices' unchecked.
  • C4D to Fusion: Do not pick 'Compatible to FBX V5' when exporting from C4D. When the FBX is imported into Fusion it crashes in FBX SDK code. As far as we know, there is nothing we can do about this.
  • Update the FBX plugin used by your 3D applications. Newer versions have bug fixes and more features. For Max/Maya you can download a new FBX exporter plugin for free from Autodesk's Website. Also make sure you have a recent Collada exporter if you're going to be using Collada - you can download a Collada exporter from Feeling Software.

Known Issues

5.2 Issues

  • See the list of unsupported features above. Perhaps you are doing something unsupported.

5.1/5.0 Issues

  • There is one known bug in 5.02 when importing LightWave camera keyframe data at negative times, though this has been fixed for 5.1.
  • Angles on animations that are larger than 360 degrees or less than 0 degrees will be imported as angles within the 0 - 360 range. This should only affect people are trying to import keyframe animations (if you bake the animation per frame, you should be fine).
  • Object hierarchy is not imported. When you import an object hierarchy from a FBX into Fusion, the transforms on the hierarchy are flattened into the leaf nodes. If you are baking your animations, this should not be a problem.
  • Animations on geometry objects are not imported. The FBX importer will only import animations on cameras and lights. To import the animations on geometry objects you must first import the objects and then afterwards use the "Import Transform" button on the FBX Mesh tool.
  • Targeted cameras and lights will not work correctly if originally exported from an application that uses a different up-axis than Fusion's y-axis. In particular, this means targeting from Maya which uses its y-axis as up will work, but targeting from Max which has its z-axis as up, will have problems. If you bake the targeting animation, this should not a a problem.
  • There is a bug is when an FBXMesh3D tool from a loaded comp gets viewed the first time, it will reload the material from the file instead of using the values from the material inputs. The problem happens if you change the material inputs on the FBXMesh tool before viewing it. The workaround is always to view your FBXMesh3D tool before changing its material. (This bug was introduced in 5.1 when we modified Fusion not to load the FBX file from disk at comp load time but rather at first use.)
  • The importer recomputes the normals on the meshes with no regard to smooth groups. This will cause problems with hard edges in the mesh, that is vertices that have more than one normal. For example, a corner vertex on a cube has 3 normals assigned to it but Fusion will recompute only a single normal not taking into account that the 3 adjoining faces belong to different smooth groups.


Changes in 5.2

  • Fusion now uses the 2006/11 version of the FBX SDK. Please note some features may not be supported with FBX files exported from an older exporter. (eg. The creation of loaders for textures may not work. Various other object properties may not import.) We recommend you update your FBX exporter plugin in your 3D applications.
  • Imports 3D hierarchy. Merge3D nodes are inserted to create the appropriate parent/child relationships.
  • Loaders are created for diffuse textures.
  • Animations on meshes are read in (you no longer need to import them separately)
  • Now imports animation splines for LightColor, LightIntensity, LightConeAngle, CameraAoV, and CameraFocalLength.
  • Better handling of Bezier animation curves.
  • No longer recomputes the normals on the incoming mesh (while ignoring smoothing groups).



The contents of this page are copyright by eyeon Software.



Tips for Import FBX Files (edit)

EyeonTips:Manual/Appendices/Importing/Import FBX Files