Skip to main content

FBX Importer

The FBX Importer GUI has some additional options added to the standard importer GUI. The additional options permit you to select or override some of the variables within the FBX file. This is necessary because FBXs from some source programs may set properties in a different manner to those from another source program. The FBX Importer does detect known differences internally using the identity of the source program to make decisions about how some data should be used. However, this only covers files from 3DS Max, Maya, Revit and Blender.

Settings

The FBX Importer includes various format-specific settings.

Basic

SettingDescription
UnitThe unit to apply to the import, such as millimetres, feet, miles, etc. If this is set to “auto” then the file will decide which unit to apply. [default: auto]

Entity Filters

SettingDescription
Import LinesImport lines from files. [default: true]
Import LightsImport lights from files. [default: true]
Import AnimationsImport animations from files. [default: true]
Import Deformable ObjectsImport skins and morphs from files. [default: true]

Preparation

SettingDescription
Flip Winding OrderFlip the winding order of triangles in meshes. There are 3 options:
  • Auto – flip winding order if the mesh has negative scale. [default]
  • Never – don’t flip winding order.
  • Always – flip winding order.
Generate NormalsGenerate new normal. [default: true]
Generate TangentsGenerate new tangents. [default: false]
Duplication CheckCheck for and remove any duplicate materials from the file. [default: true]

Materials

SettingDescription
Transparency EnabledAttempt to use material transparency values. [default: true]
Transparency ValueHow to interpret transparency values. Transparency can be set quite differently by FBX exporters from different exporter programs. For 3ds Max, Revit and Maya exports the selector can be left on Auto. The way that transparency is treated by these packages is understood. For FBX files from other sources some experimentation may be needed. Basically there is a transparency value and a three colour vector. The vector and the value can be used in a variety of different ways and each FBX exporter seems to set them differently, probably based upon the method used in the exporting package. The options in the list are the most likely formats. The names in brackets are the packages which use this method. So, if there are odd effects occurring with transparency then it is possible to try other options. The NONE option can be used to remove transparency completely if a useful option cannot be found. The Transparency could then be reapplied after import, if required.
Transparency ColourHow to interpret transparency colours. There are 3 options:
  • Auto [default]
  • Inverted
  • Normal

Material XML File

The material xml file allows you to associate materials with objects in several different ways. The material xml file is placed in the same directory as the FBX file with the same name, but with the extension .xml rather than .fbx.

Default Colour

The simplest way of all is to simply set a default colour for the entire scene.

<variable default_colour = "1.0, 0.0, 0.5"/>

This default colour will be used when an object has no other material assigned to it.

Metadata Map

The metadata map allows you to either use metadata directly from the FBX file or associate the metadata with colours in the material xml file.

There are 3 methods:

  • Direct Colour (type = “colour”) - The metadata value is 3 floating point numbers (red, green, blue), with a range of 0 to 1, which is used as a colour. E.g. A door with a colorMat value of 0.8, 0.0, 0.0 would be red.
  • Direct Material Name (type = "direct") - The string value of the metadata corresponds to a material name in the material xml. E.g. using the directMat example below - the value of the directMat metadata on a girder could be “grey”.
  • Pair Mappings - This is a list which associates values of a particular metadata name with materials in the material xml file. In the example below a box with the value of “2” in the metadata “stage” would be have the “blue” xml material.

The following xml fragment shows three types in use.

<metadata_map>
<metadata name="colorMat" type = "colour" /> <!--value is rgb vector-->
<metadata name="directmat" type = "direct" /><!-- value is a material-->
<!-- example of table to match metadata values to materials in the material file -->
<metadata name="stage" >
<pair value="1" material="red"/>
<pair value="2" material="blue"/>
<pair value="3" material="green"/>
<pair value="4" material="orange"/>
</metadata>
</metadata_map>

Geometry Map

You can assign materials using the name or part of the name using a geometry map.

<geometry_map>
<pair geometry="teapot001" material="red"/>
<pair geometry="teapot002" material="green"/>
<pair geometry="teapot" material="grey"/> <!-- part name-->
<pair geometry="teapot003" material="blue"/>
<pair geometry="teapot004" material="orange"/>
</geometry_map>

In the above example objects there are five objects teapot001 to teapot005 and one object named teapot. Objects teapot001 to teapot004 would be assigned the colours as shown in the list while Teapot005 and teapot would be grey, matched on the partial name. Full name matches are made first and then a search for part matches on unmatched objects. So the order of the list is unimportant. This method is particularly useful when you have are given a file with no means of asking for additions or changes to it.

Material List

The materials in the material list can be defined as simple three colour values or as a value and, if required, a texture mapping for each material property.

<material_list>
<material name="red" colour = "1 0 0" two_sided_lighting = "0"/>
<material name="green" colour = "0 1 0"/>
<material name="blue" colour = "0 0 1"/>
<material name="white" colour = "1 1 1"/>
<material name="grey" colour = "0.3 0.3 0.3"/>
<material name="orange" >
<property name = "ambient" colour ="1.0 0.5 0.2" factor = "0.7" texture=""/>
<property name = "diffuse" colour ="1.0 0.5 0.2" factor = "0.7" texture=""/>
<property name = "specular" colour ="1.0 1.0 1.0" factor = "0.7" texture=""/>
<property name = "emissive" colour ="0.0 0.0 0.0" factor = "0.7" texture=""/>
<property name = "opacity" factor = "0.7" />
<property name = "shininess" factor = "1.0" />
<property name = "reflectivity" colour ="0.0 0.0 0.0" factor = "1.0" texture=""/>
<property name = "bump" factor = "1.0" texture=""/>
<property name = "normal" factor = "1.0" texture=""/>
<property name = "gloss" texture=""/>
</material>
</material_list>

Export

This FBX Exporter Menu is used in 3DS Max and Maya. FBX export has no menu in Revit. The settings in the image below are recommended.

In particular note that:

  • Embed Media is ticked – the default is clear (in Include).
  • Up Axis is Y-up (in Advanced Options/Axis Conversion).
  • FBX File Format version is FBX 2014 (in Advanced Options/FBX File Format).

Setting units to meters is preferable but any units can be used. FBX File Format type set to binary is advisable for portability. All other options have been tested at default.

Known Issues

Blender

If a material channel is not explicitly set in Blender then the default Autodesk value is not used. Instead a value from within Blender is used. Unfortunately, some of these values are not useful (such as emissive being set to 1). When you are exporting Blender materials to FBX always set the material channels even if you have not changed the value from default. This fault was still true of a 2014 download (version 2.71). Older files may not exhibit this fault. The incorrect material channels can be disabled (see Materials).

Revit

Revit (since Revit 2011) exports the materials in “Autodesk material” format. This is a binary blob within the FBX file which can only be read by other Autodesk products such as 3DS Max. Autodesk has no intention of providing support through FBX for this type of material. For this reason, a material XML has been created which will allow you to assign materials defined within the XML to objects within the exported scene. This file can, of course, be used to add/change materials in any FBX file, not just those exported from Revit.