#6838·assimp

Bug: Dropping textures from fbx generated by Agisoft Metashape

Author: mmCyborgCreated Sep 14, 2026Updated Sep 14, 2026
LabelsBug

Describe the bug

The FBX importer silently discards a diffuse texture that is embedded in the file and correctly connected to the material. The resulting aiMaterial has no texture property of any type, and aiScene::mNumTextures is 0, even though the file contains a valid Video object holding a 13.5 MB JPEG and a well-formed OP connection from the Texture to the material's DiffuseColor property.

The file is produced by Agisoft Metashape (photogrammetry export, binary FBX 7700, single mesh, single material, one UV channel). The same file loads with its texture in Blender, and re-exporting it from Blender produces an FBX that assimp loads correctly.

Inspecting the raw FBX node tree shows nothing unusual:

Objects:

Material 'material0' Texture 'texture0' (Type, Version, TextureName, Properties70, Media, FileName, RelativeFilename, ModelUVTranslation, ModelUVScaling, Texture_Alpha_Source, Cropping) Video 'texture0' (Content: 13,560,596 bytes, JPEG magic FF D8 FF; RelativeFilename: "...\model-textured.jpg")

Connections:

OO Geometry 'Model' -> Model 'Model' OO Material 'material0' -> Model 'Model' OP Texture 'texture0' -> Material 'material0' ["DiffuseColor"] OO Video 'texture0' -> Texture 'texture0'

To Reproduce

Export a textured model from Agisoft Metashape as binary FBX with embedded texture. (Download model) Run assimp info model-textured.fbx. Observe Textures (embed.): 0 and that material0 lists only colour/scalar properties, every entry with texture semantic n/a — no $tex.file.

Reproduced with the stock assimp info CLI (no custom post-processing flags), and independently via Importer::ReadFile with flags 0, enumerating all values of aiTextureType from 1 to AI_TEXTURE_TYPE_MAX and dumping aiMaterial::mProperties directly. No texture property is present under any semantic.

Expected behavior

material0 should carry a diffuse texture property referencing the embedded image (*0), and aiScene::mNumTextures should be 1 with mTextures[0] holding the compressed JPEG blob and achFormatHint set to jpg.

Platform:

OS: Windows (x64) Compiler: MSVC Version: reproduced on assimp 5.4 and on 6.0.5 (release build, official Windows installer binaries for the CLI test)

Additional context

Material properties reported for material0 (abridged): ?mat.name, $mat.shadingm, $clr.diffuse, $clr.emissive, $clr.ambient, $clr.specular, $mat.shinpercent, $mat.shininess, $mat.roughnessFactor, $clr.transparent, $mat.transparencyfactor, $mat.opacity, $clr.reflective, $mat.reflectivity, $mat.bumpscaling, $mat.displacementscaling, $raw.Emissive, $raw.Ambient, $raw.Shininess, $raw.Reflectivity, $raw.Diffuse, $raw.Specular. No |file entry and no $tex.* entry of any kind.

Mesh reports 1 UV channel, so the geometry side appears intact.

Possibly unrelated, but noted in case it shares a cause: assimp info reports 2 meshes both named Model, with 943990 faces each but different vertex counts (647149 and 723429), while the source FBX contains a single Geometry 'Model'.

Scene also contains 80 camera nodes (Metashape exports one per source photo), if that is relevant to the converter's traversal.

Bot has made me a helper class to patch aiScene with lost textures, from my initial tests it works well https://pastebin.com/zRQkYSGQ