Troubleshooting Aspose.3D for .NET

Troubleshooting Aspose.3D for .NET

Troubleshooting Aspose.3D for .NET

This page covers the most common problems encountered when working with Aspose.3D for .NET and how to resolve them.


Loading Problems

Exception: “File format not supported” or unknown extension

Aspose.3D auto-detects format from the file extension. If the extension is missing or non-standard, specify the format explicitly:

var scene = new Scene();
scene.Open("model.bin", FileFormat.GLTF2_Binary);

Scene loads but contains no geometry

The file loaded successfully but scene.RootNode.ChildNodes is empty or all nodes have no entities.

CauseFix
File is a valid container but content uses unsupported extensionsInspect the file with a hex editor; ensure the format is in the supported format list
glTF file is missing its .bin bufferKeep all .bin and texture files in the same directory as the .gltf file
FBX version too old (pre-2013)Re-export from source application using FBX 2013 or later

IOException when loading a stream

Ensure the stream is positioned at the start before passing it to Scene.Open:

stream.Seek(0, SeekOrigin.Begin);
scene.Open(stream, FileFormat.STL);

Saving Problems

Output file is empty or zero bytes

This usually means the scene had no geometry when saved.

// Verify before saving
Console.WriteLine("Nodes: " + scene.RootNode.ChildNodes.Count);
scene.Save("output.gltf");

glTF output references missing textures

When saving as .gltf (non-binary), textures are written as separate files. If you need a single portable file, save as GLB:

scene.Save("output.glb", FileFormat.GLTF2_Binary);

Rendering Problems

Rendered image is solid black

A black output image means either no lights are in the scene or the camera is positioned inside geometry.

// Always add at least one light
var light = new Light("sun") { LightType = LightType.Directional };
var lightNode = scene.RootNode.CreateChildNode("sun", light);
lightNode.Transform.EulerAngles = new Vector3(45, -30, 0);

Object is not visible in the rendered image

The camera may be pointing away from the geometry. Use LookAt to aim the camera at the scene origin or the bounding centre of the model:

cameraNode.Transform.EulerAngles = new Vector3(-30, 0, 0); // tilt down toward scene

Rendered image dimensions are wrong

The Size parameter passed to Scene.Render controls the output pixel dimensions. Verify both the Size argument and the ImageFormat:

scene.Render(camera, "output.png",
    new System.Drawing.Size(1280, 720),
    System.Drawing.Imaging.ImageFormat.Png);

Installation Problems

dotnet add package reports “package not found”

Confirm the exact package name and version:

dotnet add package Aspose.3D.Converter --version 1.0.0

If the package is not in the default NuGet feed, add the Aspose NuGet source:

dotnet nuget add source https://releases.aspose.com/net/repo/ --name Aspose

Diagnostic Checklist

Before opening a support issue, run through this checklist:

  1. Confirm the format is supported — check Format Support.
  2. Check the scene node countscene.RootNode.ChildNodes.Count > 0 after loading.
  3. Add a light before rendering — any LightType.Directional at non-zero EulerAngles.
  4. Verify camera position — call LookAt with the scene centre coordinates.
  5. Use a memory stream to isolate file I/O — if loading from disk fails, try loading into a MemoryStream first.

Related Resources