HowTo/Export from Blender using FBX
(Work in progress)
This page provides advice on exporting from Blender to the FBX format. It may contain sections that may be better placed on other pages, such as material definition pages, but will be hosted here for now.
Note that FBX export/import is currently only available to TrainzDev members using dev build 81786 or higher. (as at 14 Apr 2016)
Introduction
This guide provides information for the export of FilmBoX (FBX) files from Blender. The FBX format is currently only available for TrainzDev members using TANE test builds. The guide will be updated as lessons are learned and features added to the export process.
The FBX format is intended as a replacement for existing indexed mesh (IM) and perhaps animation (KIN) files. It is not known if existing IM and KIN will continue to be supported by N3V.
|
Development of this guide
The FBX importer is incomplete as is this guide. The guide will be updated as testing discovers new information. Currently (18 Apr 2016), only mesh objects can be imported. There is no support as yet for attachments or animation.
Versions
TANE: 4.4 or later.
Blender: Not sure about this but it does work for Blender 2.77. The FBX exporter is a standard addon for Blender.
FBX format: Binary format only (see discussion below). FBX 2011, FBX2012, FBX2013.
Special requirements: None. Creators will need their preferred image editors and text editors but there are no special requirements for FBX.
Other software: There are free FBX viewers available on the web including the "FBX Review" program by Autodesk. See http://www.autodesk.com/products/fbx/fbx-review
The FBX format
See [1]. FBX can be exported either as an ASCII (i.e. human readable) file or in binary format. TANE will only recognise the binary format.
Blender and FBX
Blender is capable of both importing and exporting FBX. The Blender exporter does not export all possible object attributes, including materials, and it is likely that TANE will not recognise all those attributes that are exported. You can find a list of attributes that are exported from Blender here. [2]
Included in this guide is a list of attributes that have been observed as exported and treatment/acceptance by TANE. The list is incomplete and so is a work in progress.
Skills Required
For this version of the guide, it is assumed the user has some knowledge of the use of Blender and an understanding of the Trainz asset creation process.
Exporting a mesh object from Blender in FBX format
The FBX exporter addon must be enabled in User Preferences.
The FBX Exporter Panel After selecting File->Export->Export FBX, the FBX export panel will show in the bottom left hand corner and should look like the following picture. The panel contents vary significantly between the Binary export version and the ASCII export version so make sure you have Binary selected.
(pic 1 here)
1. Ignore the Operator Presets for now. 2. Ensure FBX 7.4 binary version is selected. 3. The Main/Geometry/Armatures/Animation all provide menu options for the item selected. Make sure that within Geometry that Apply Modifiers is not selected. This option has not been tested. Select the Main option. 4. Selected Objects. This option needs careful consideration. Unlike the Blender XML exporter, the FBX exporter will export all objects in all layers which is probably undesirable in many cases and particularly if you have different LOD models in different layers. So, first select those objects within Blender that you want to export and then select Selected Objects in this panel. (note that hiding objects may be a useful option but that hasn't been tested) 5. Scale. Leave the Scale value as 1.00 and deselect the small icon to the right of the Scale value. The default value for this icon is selected and will cause your object to be 100 times its specified size in Blender. This issue is still being investigated. 6. Forward and Up. Leave these in the default values of "-Z Forward" and "Y Up". 7. The next six options of Empty, Camera, Lamp, Armature, Mesh and Other are mult select. i.e. zero or more can be selected. Select Mesh only at this point. 8. Leave the Experimental and Custom Properties as deselected. These have not been tested. 9. Leave Path Mode as Auto and Batch Mode as Off. These will be investigated later. 10. Choose the FBX filename and export using the Export FBX in the top right hand corner. There is no exporter log.
Setting up the CONFIG.TXT (The config.txt WiKi page will probably be updated in the future to reflect changes required for FBX)
The only changes to the config.txt are in the mesh table. The mesh entries for FBX files now have a "trainzmesh" extention as per the following example:
mesh-table {
default { auto-create 1 mesh "my-mesh.trainzmesh" }
}
The file my-mesh.trainzmesh is created during the asset commit. Currently the FBX file is not deleted but bundled into the asset and made available if opened for edit. This may change.
Materials
(This section may be moved to the Materials WiKi pages when the FBX importer is mature)
Treatment of materials is unchanged and no changes to existing textures are required.
m.notex
Currently there may be a problem with mixing NOTEX materials and other materials in the same export. This is being investigated.
m.onetex
There are no special Blender settings for ONETEX materials. A sample ONETEX material and texture setting is shown below.
(insert pics for onetex)
m.reflect
(TBD)
m.gloss
(TBD)
m.tbumptex
(TBD)
m.tbumpenv
(TBD)
m.tbumpgloss
(TBD)
Exportable Attribute and TANE
(table here)
(to be continued)