FBX (.fbx)
Background & Context
-
- Filmbox file format.
- ASCII or binary format.
- Commonly used for storage and interchange of 3D assets.
- Proprietary file format developed by Autodesk.
- Represents a 3D object or collection of objects as a surface formed by a collection of primitives, including triangles, polygons and spline curves. Can also represent a full scene, including lighting, animation and camera information.
- Optionally stores vertex normals, colors, textures and generalized shaders.
Import & Export
- Import["file.fbx"] imports an FBX file as a MeshRegion object representing the surface.
- Import["file.fbx",elem] imports the specified element from an FBX file.
- The import format can be specified with Import["file","FBX"] or Import["file",{"FBX",elem,…}].
- Export["file.fbx",expr] exports a 3D mesh-based geometric region to a binary FBX file. The expr can be any region that is ConstantRegionQ or a Graphics or Graphics3D object.
- Export["file.fbx",expr,{opt1->val1,…}] exports expr with the specified options for the file format.
- The export format can be specified with Export["file",expr,"FBX"] or Export["file",{"FBX",opt1->val1,…}].
- See the following reference pages for full general information:
-
Import, Export import from or export to a file CloudImport, CloudExport import from or export to a cloud object ImportString, ExportString import from or export to a string ImportByteArray, ExportByteArray import from or export to a byte array
Import Elements
- General Import elements:
-
"Elements" list of elements and options available in this file "Summary" summary of the file "Rules" list of rules for all available elements - Data format representation elements:
-
"BinaryFormat" whether the file is a binary or ASCII FBX "Comments" comments "VertexData" list of vertex coordinates "PolygonData" the polygon elements in indexed form "UserExtensions" user-defined data associated with polygon vertices - Geometry representation elements:
-
"BoundaryMeshRegion" boundary mesh representation of a solid "MeshRegion" mesh representation of a surface "Region" region representation of a surface - Graphics representation elements:
-
"Graphics3D" FBX file represented as a Graphics3D object "GraphicsComplex" FBX file as a GraphicsComplex object "PolygonObjects" list of polygon primitives given in absolute coordinates - Import and Export use the "MeshRegion" element by default for FBX files.
Examples
open all close allBasic Examples (2)
Import a 3D model from FBX as a MeshRegion object:
Import["ExampleData/seashell.fbx"]Summary properties of the solid model:
Import["ExampleData/seashell.fbx", "Summary"]Export a 3D model to an ASCII FBX file:
Export["model.fbx", [image], {"FBX", "BinaryFormat" -> False}]Print the raw textual contents of the file:
StringTake[ReadString[%], 300]Scope (10)
Import (4)
Import works on ASCII FBX files:
Import["ExampleData/chain.fbx"]Import["ExampleData/seashell.fbx"]str = OpenRead["ExampleData/spikey.fbx"]Import[str]Close[str]Import provides access to elements in the FBX file:
Import["ExampleData/spikey.fbx", "Elements"]Export (6)
Export works on 3D graphics:
Export["model.fbx", [image]]Export["sphere.fbx", Sphere[]]Export["ball.fbx", ImplicitRegion[x ^ 2 + y ^ 2 + z ^ 2 ≤ 1, {x, y, z}]]Export["pyramid.fbx", MeshRegion[{{-1, -1, 0}, {1, -1, 0}, {1, 1, 0}, {-1, 1, 0}, {0, 0, 1}}, Pyramid[{1, 2, 3, 4, 5}]]]Export["model.fbx", [image]]Export["model.fbx", [image], "BinaryFormat" -> False]Import Elements (10)
"BinaryFormat" (1)
"BoundaryMeshRegion" (1)
"CoordinateTransform" (1)
"Graphics3D" (1)
Give the Graphics3D object:
Import["ExampleData/spikey.fbx", "Graphics3D"]"GraphicsComplex" (1)
Give the GraphicsComplex object:
Import["ExampleData/spikey.fbx", "GraphicsComplex"]"MeshRegion" (1)
"PolygonData" (1)
"PolygonObjects" (1)
Give the list of Triangle primitives given in absolute coordinates:
Import["ExampleData/spikey.fbx", "PolygonObjects"]"Summary" (1)
Export Options (2)
By default, a binary file is generated when exporting:
Export["model.fbx", [image]]Print the raw textual contents of the file:
FilePrint[%]Use "BinaryFormat"False to generate an ASCII file:
Export["model.fbx", [image], {"FBX", "BinaryFormat" -> False}]Print the raw textual contents of the file:
StringTake[ReadString[%], 300]Related Guides
History
Introduced in 2020 (12.1)