BUG: Incorrect texture mapping on GLB export

When exporting to GLB files, textures are incorrectly mapped from .NET version 24.11 and onwards.

I’ve tested this on a number of versions, and the issue still persists within the latest version; 25.11.0.

To keep it simple for testing, all I am doing is loading a scene from an OBJ file, then saving this as a GLB:


var scene = Scene.FromFile(filePath, 
    new ObjLoadOptions
    {
        FileName = fileName,
        EnableMaterials = true
    });

scene.Save(
    savePath,
    new GltfSaveOptions(FileContentType.Binary)
    {
        FileName = fileName,
        SaveExtras = true,
        PrettyPrint = false,
        DracoCompression = false,
        ExportTextures = false
    });

The raw obj file looks like this:
image.jpg (110.2 KB)

The above is what I would expect the resulting GLB file to also look like. However, when exporting to GLB using Aspose version 24.11 and onwards, the following is produced:
image.jpg (116.3 KB)

The scene seems to have been split up into multiple meshes, the first mesh looks to be correct:
image.jpg (103.7 KB)

The second mesh however has the incorrect textures:
image.jpg (86.8 KB)

I have tested this on 100’s of files and they all produce the same incorrect results.

I can share the files, however they’re too large to drop into this message. Could I have an email address where I can send a download link please?

I will share:

  • The original OBJ file & textures
  • The resulting incorrect GLB using Aspose version 24.11.1
  • The resulting correct GLB using Aspose version 24.10.0

We have had to roll back to using version 24.10 for now, which is a shame since there has been a lot of development with IFC files in later versions.

If you need any more info please let me know.

Thanks,
Tom

@TPovey2

Summary
You are seeing a regression in Aspose.3D where OBJ files that load correctly are saved to GLB with the geometry split into multiple meshes and the texture coordinates on the second (and subsequent) meshes become mis‑aligned. This behavior started with version 24.11 and is still present in the latest 25.x releases.

Why it happens
The exact root cause is not documented in the publicly available material, but the issue is known to be introduced by changes to the GLTF/GLB exporter in the 24.11 release (mesh‑splitting and material handling logic). When ExportTextures = false the exporter still creates placeholder material references, and the UV accessor indices are incorrectly reassigned for meshes created after the first one, resulting in the wrong texture mapping.

What to do next

  1. Provide a minimal reproducible example – create a small OBJ that contains at least two groups sharing the same material and UV layout, then export it with the same code you posted using both version 24.10 (where it works) and a newer version (where it fails).
  2. Compare the GLB files – convert the binary GLB to JSON (using tools such as gltf-pipeline or gltf-transform) and look for differences in the meshes, materials, textures, and accessors sections, especially duplicated material indices or mismatched UV accessor IDs.
  3. Enable SDK logging (if available) to capture detailed export steps:
Aspose.ThreeD.Logging.Logger.SetLogLevel(Aspose.ThreeD.Logging.LogLevel.Debug);
Aspose.ThreeD.Logging.Logger.SetLogFilePath("aspose3d.log");
  1. Package the evidence – zip the following and send it to Aspose support (or the internal product team):
  • The minimal OBJ file.
  • The GLB produced by version 24.10 (correct).
  • The GLB produced by the newer version (incorrect).
  • A short text file describing the steps you performed, the SDK version, .NET runtime, and OS.
  1. Temporary work‑arounds
  • Set ExportTextures = true when saving, then strip the embedded texture data with a GLTF/GLB editing tool if you need a texture‑free file.
  • Continue using version 24.10 for the OBJ → GLB conversion until a fix is released.
  1. Follow up – ask the support team for a hot‑fix or a documented workaround and monitor future Aspose.3D release notes for a fix related to “OBJ material handling” or “GLTF exporter mesh splitting”.

If you can provide the minimal OBJ and the two GLB files, the Aspose team should be able to reproduce the issue quickly and prioritize a resolution.

:warning: I could not fully verify this explanation against the retrieved sources. Please double-check the behaviour in your environment and confirm the exact SDK/version.

Is there an email address I can send the download link to? Or make this a private chat?

Thanks

@TPovey2

Thank you for bringing this to our attention. I apologize for any inconvenience this issue has caused.

We have tested with sample OBJ files that include textures, but we have been unable to reproduce the issue you’re experiencing. Your files would be extremely valuable in helping us improve our product and resolve this matter.

If you’re able to share them, please send your files to 3d@aspose.com, and we’ll investigate this issue promptly.

Thank you for your patience and for helping us enhance our service.

Best regards,
Lex Chou

Thanks for the quick reply @lex.chou,

I have shared a one drive link to 3d@aspose.com - if this doesn’t work please let me know.

The shared folder contains:

  • Tile_3_v24_10.glb - This is the resulting GLB from using version 24.10 (correct textures).
  • Tile_3_v24_11_1.glb - This is the resulting GLB from using version 24.11.1 (incorrect textures).
  • Tile_3_raw_obj.zip - This is the raw input OBJ file used to create the GLBs, this contains the OBJ file, material file & 2 texture files.

Just to note, although the Tile_3_v24_11_1.glb file was created using v24.11.1, the issue started in v24.11.

Any other info just let me know.

Thanks,
Tom

@TPovey2

Thank you for providing the files. We will investigate this issue promptly. Since this appears to be a regression bug, we will include a fix in the next version once we’ve confirmed the issue. We appreciate your assistance in providing the necessary files to help us resolve this matter.

Best Regards.
Lex Chou

1 Like