Overview
The FBX loader enables you to load 3D models in Autodesk’s FBX format. FBX is widely supported by 3D modeling software and supports animations, skeletal rigging, and complex material properties.Usage
Parameters
Loader type. Must be
'fbx' for FBX files.URL or path to the FBX model file.
Units for the model scale. Options:
'scene'- Scene units (default)'meters'- Meters
Scale factor for the model. FBX models are often exported in centimeters, so you may need to scale down (e.g.,
0.01).Can be:- A single number:
0.01(uniform scale) - An array:
[x, y, z]for per-axis scaling
scale: [0.01, 0.01, 0.01] or scale: 0.01Rotation for the model in degrees. Can be:
- A single number:
90(rotation around Y axis) - An object:
{ x: 90, y: 0, z: 0 } - An array:
[90, 0, 0](X, Y, Z rotation)
Anchor point for the model positioning. Options:
'center'- Center of the model'bottom-left'- Bottom-left corner'bottom-right'- Bottom-right corner'top-left'- Top-left corner'top-right'- Top-right corner'bottom-center'- Bottom center'top-center'- Top center'left'- Left center'right'- Right center
Manual adjustment to override the automatic center calculation.Example:
{ x: 0, y: 0, z: 0 }Normalize specular, metalness, and shininess properties for better rendering in Mapbox.FBX models often have high specular values that require many lights. Setting this to
true reduces these values for better appearance.Index of the default animation to play from the model’s animation array.
Whether the model should be included in raycasting for mouse interactions.
Whether to calculate and display a bounding box for the model.
Whether to enable tooltips for the model.
Whether to clone the model when adding multiple instances.
Whether to send cookies and authorization headers with cross-origin requests.
Callback
The callback function receives the loaded model object with the following properties:Model Structure
FBX models are loaded with the following structure:- The root FBX object is used directly
animationsarray is preserved and accessible viamodel.animations- All child meshes, materials, and bones are included
- Skeletal animations and morph targets are supported
/home/daytona/workspace/source/src/objects/loadObj.js:77-79:
Normalization
FBX models exported from software like Maya or 3ds Max often have very high specular and metalness values. Use thenormalize option to reduce these:
- Metalness by 90% (multiply by 0.1)
- Glossiness by 75% (multiply by 0.25)
- Sets specular color to
(12, 12, 12)for MeshStandardMaterial - Sets shininess to 0.1 for MeshPhongMaterial