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.
| Cause | Fix |
|---|---|
| File is a valid container but content uses unsupported extensions | Inspect the file with a hex editor; ensure the format is in the supported format list |
glTF file is missing its .bin buffer | Keep 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 sceneRendered 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.0If 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 AsposeDiagnostic Checklist
Before opening a support issue, run through this checklist:
- Confirm the format is supported — check Format Support.
- Check the scene node count —
scene.RootNode.ChildNodes.Count > 0after loading. - Add a light before rendering — any
LightType.Directionalat non-zeroEulerAngles. - Verify camera position — call
LookAtwith the scene centre coordinates. - Use a memory stream to isolate file I/O — if loading from disk fails, try loading into a
MemoryStreamfirst.
Related Resources
- Getting Started — installation and first steps
- Format Support — complete list of supported formats
- Rendering 3D Scenes — Camera and Light setup