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