We are excited to announce the availability of Aspose.3D FOSS for .NET – a free, open-source library for working with 3D file formats in .NET applications. Built as a pure C# solution with no native dependencies, the library targets .NET 10.0 and later, making it accessible to a broad range of projects and environments.
This post walks through what the library offers, how to get started, and where to go from here.
What Is Aspose.3D FOSS for .NET?
Aspose.3D FOSS for .NET is a lightweight 3D file processing library published under the MIT license. It provides a scene-graph API that lets you load, inspect, transform, and save 3D models across several widely used formats. The library is entirely written in C# and requires no external native binaries or platform-specific configurations.
The source code is available on GitHub: https://github.com/aspose-3d-foss/Aspose.3D-FOSS-for-NET
Key Highlights
- Pure C# – no P/Invoke, no native libraries, no platform restrictions.
- .NET 10.0+ compatible.
- MIT licensed – use it in personal, commercial, or proprietary projects without restrictions.
- Scene-graph architecture – a familiar tree of nodes, meshes, cameras, and materials.
- Multi-format support – read and write OBJ, STL, glTF 2.0, GLB, FBX, Collada, and 3MF files.
Quick Start
NuGet Installation
Add the NuGet package to your project:
dotnet add package Aspose.3D.Converter --version 1.0.0
Your First Conversion
The simplest use case is loading a 3D file in one format and saving it in another. Here is a two-line conversion from OBJ to STL:
using Aspose.ThreeD;
var scene = new Scene();
scene.Open("cube.obj");
scene.Save("output.stl");
The Scene class is the central entry point. Call scene.Open() with a file path to load a model, then call Save() with the target path. The library infers the format from the file extension.
Building a Scene from Scratch
You can also construct scenes programmatically:
using Aspose.ThreeD;
using Aspose.ThreeD.Entities;
var scene = new Scene();
var box = new Box(2, 2, 2);
var node = scene.RootNode.CreateChildNode("Box", box);
node.Transform.Translation = new FVector3(1, 2, 3);
scene.Save("scene.gltf");
This creates a new scene, adds a box primitive as a child node under the root, positions it at coordinates (1, 2, 3), and exports the result as a glTF file.
Loading with Format-Specific Options
When you need finer control over the loading process, each format provides a dedicated options class. For example, loading an STL file with explicit options:
using Aspose.ThreeD;
using Aspose.ThreeD.Formats;
var scene = new Scene();
var opts = new StlLoadOptions();
scene.Open("part.stl", opts);
// Inspect the loaded scene
Console.WriteLine("Root children: " + scene.RootNode.ChildNodes.Count);
// Re-export as OBJ
scene.Save("part.obj");
The scene.Open() method accepts any of the load option types: ObjLoadOptions, StlLoadOptions, GltfLoadOptions, FbxLoadOptions, or TmfLoadOptions.
Traversing the Scene Graph
Once a scene is loaded, you can walk the node tree to inspect or modify its contents:
using Aspose.ThreeD;
using Aspose.ThreeD.Entities;
var scene = new Scene();
scene.Open("model.gltf");
foreach (var child in scene.RootNode.ChildNodes)
{
Console.WriteLine("Node: " + child.Name);
Console.WriteLine(" Translation: " + child.Transform.Translation);
if (child.Entity is Mesh mesh)
{
Console.WriteLine(" Vertices: " + mesh.ControlPoints.Count);
}
}
This pattern is useful for debugging, generating reports about model contents, or selectively modifying parts of a scene before re-exporting.
Applying Transforms
Positioning nodes in 3D space is done through the Transform property on each Node:
using Aspose.ThreeD;
using Aspose.ThreeD.Entities;
var scene = new Scene();
var parent = scene.RootNode.CreateChildNode("Parent");
parent.Transform.Translation = new FVector3(10, 0, 0);
var child = parent.CreateChildNode("Child");
child.Transform.Translation = new FVector3(5, 0, 0);
child.Transform.Scale = new FVector3(2, 2, 2);
// Child's world position is (15, 0, 0) due to
// parent-child transform inheritance
scene.Save("transformed.gltf");
Transforms follow the standard parent-child inheritance model: a child’s world-space position is the combination of its local transform and all ancestor transforms up to the root.
What’s Included
The library ships with a focused set of capabilities designed around the 3D scene-graph model.
Scene Graph
The scene graph is the backbone of the API. Every 3D file is represented as a tree structure:
| Class | Role |
|---|---|
Scene | Top-level container; the root of the scene graph |
Node | A named position in the tree; holds transforms and child nodes |
Entity | Abstract base for visual objects attached to nodes |
Mesh | Polygonal geometry – vertices, faces, normals |
Camera | Virtual camera definition |
Transform | Local translation, rotation, and scale for a node |
GlobalTransform | Computed world-space transform |
Built-In Primitives
The .NET edition includes parametric shape classes that can be attached to nodes directly or converted to Mesh:
- Box – axis-aligned box with configurable width, height, and depth.
- Sphere – parametric sphere with configurable radius.
- Cylinder – parametric cylinder with configurable radii and height.
var sphere = new Sphere(1);
var mesh = sphere.ToMesh();
Console.WriteLine("Vertices: " + mesh.ControlPoints.Count);
Materials
The library provides multiple material types:
- LambertMaterial – classic diffuse-only material with ambient, diffuse, emissive, and reflective colour components.
- PhongMaterial – extends Lambert with specular highlights and shininess.
- PbrMaterial – physically based rendering material with base color, metallic, roughness, occlusion, and texture slots.
Math Utilities
The Aspose.ThreeD namespace includes essential math primitives:
- FVector3 – single-precision 3-component vector for positions, directions, and scale. Used by
Transform.TranslationandTransform.Scale. - Vector4 – single-precision 4-component vector for control points and normals.
- Matrix4 – 4x4 transformation matrix.
- Quaternion – rotation representation. Used by
Transform.Rotation. - BoundingBox – axis-aligned bounding box for spatial queries.
var a = new FVector3(1, 0, 0);
var b = new FVector3(0, 1, 0);
// Vector operations for spatial computations
Load and Save Options
Each format has dedicated option classes that let you control import and export behavior:
| Format | Load Options | Save Options |
|---|---|---|
| OBJ | ObjLoadOptions | ObjSaveOptions |
| STL | StlLoadOptions | StlSaveOptions |
| glTF / GLB | GltfLoadOptions | GltfSaveOptions |
| FBX | FbxLoadOptions | FbxSaveOptions |
| 3MF | TmfLoadOptions | TmfSaveOptions |
For example, to load an OBJ file with coordinate flipping and normal normalization:
var opts = new ObjLoadOptions();
opts.FlipCoordinateSystem = true;
opts.NormalizeNormal = true;
scene.Open("model.obj", opts);
Supported Formats
The following table summarizes the formats that Aspose.3D FOSS for .NET can read and write.
| Format | Extension | Import | Export | Notes |
|---|---|---|---|---|
| OBJ | .obj | Yes | Yes | With MTL materials |
| STL | .stl | Yes | Yes | Binary + ASCII |
| glTF 2.0 | .gltf | Yes | Yes | JSON format |
| GLB | .glb | Yes | Yes | Binary glTF |
| FBX | .fbx | Yes | Yes | ASCII and binary modes |
| Collada | .dae | Yes | Yes | |
| 3MF | .3mf | Yes | Yes | ZIP-based 3D manufacturing format |
Format Selection Guide
Choosing the right format depends on your use case:
OBJ is ideal when you need maximum compatibility across 3D tools. Nearly every modeling application can read and write OBJ. It works well for mesh data exchange but carries only basic material information through companion MTL files.
STL is the format of choice for 3D printing workflows. It stores raw triangulated geometry without materials or scene hierarchy, which is exactly what slicer software expects.
glTF is the modern standard for web and real-time 3D. It supports PBR materials, full scene hierarchies, and is designed for efficient transmission. Use glTF when building web-based viewers or targeting any real-time rendering pipeline.
FBX is deeply integrated into game development and digital content creation workflows. It supports rich scene data including hierarchies and materials. Aspose.3D FOSS for .NET supports FBX import and export in both ASCII and binary modes.
3MF is a modern 3D printing format that supports rich metadata, materials, and multi-object scenes in a single ZIP-based package.
Known Limitations
Scene.Render() is not supported in the FOSS edition. Calling this method will throw a NotImplementedException. The library is designed for file-based 3D processing – loading, manipulating, transforming, and saving models – rather than real-time rendering to a display.
Open Source and Licensing
Aspose.3D FOSS for .NET is released under the MIT License. This means you are free to:
- Use the library in commercial and proprietary applications.
- Modify the source code to fit your needs.
- Distribute the library as part of your own software.
There are no royalty fees, no usage limits, and no attribution requirements beyond what the MIT license specifies.
The full source code is hosted on GitHub, and contributions are welcome: https://github.com/aspose-3d-foss/Aspose.3D-FOSS-for-NET
System Requirements
| Requirement | Detail |
|---|---|
| .NET version | 10.0 or later |
| Dependencies | None (pure C#) |
| Platforms | Any platform that runs .NET |
| Package manager | NuGet |
Getting Started
Here are the resources to help you get up and running:
- Documentation – comprehensive guides and API walkthroughs are available on the Aspose.3D documentation site.
- Knowledge Base – practical how-to articles and troubleshooting tips in the Aspose.3D KB.
- API Reference – detailed class and method reference at the Aspose.3D API Reference.
- Source Code – browse and contribute on GitHub.
- NuGet – the package is published as
Aspose.3D.Converteron NuGet.
Common Use Cases
Here are some practical scenarios where Aspose.3D FOSS for .NET fits well:
Format Conversion Pipelines
Many teams receive 3D assets in one format but need them in another. A design team might work in FBX while the web team needs glTF. The library lets you build automated conversion pipelines:
using Aspose.ThreeD;
using Aspose.ThreeD.Formats;
// Convert all incoming FBX assets to GLB for the web team
var scene = new Scene();
scene.Open("asset.fbx");
scene.Save("asset.glb");
3D Model Inspection and Validation
Before integrating a 3D asset into your application, you may want to validate its contents – checking node counts, verifying geometry, or confirming that expected elements are present:
using Aspose.ThreeD;
using Aspose.ThreeD.Entities;
var scene = new Scene();
scene.Open("model.obj");
int nodeCount = scene.RootNode.ChildNodes.Count;
Console.WriteLine("Top-level nodes: " + nodeCount);
foreach (var child in scene.RootNode.ChildNodes)
{
if (child.Entity is Mesh mesh)
{
Console.WriteLine(child.Name + ": "
+ mesh.ControlPoints.Count + " vertices");
}
}
Scene Assembly
You can load multiple models and combine them into a single scene:
using Aspose.ThreeD;
var scene = new Scene();
var part1 = new Scene();
part1.Open("chassis.obj");
var part2 = new Scene();
part2.Open("wheels.obj");
// Add nodes from each part into the combined scene
foreach (var child in part1.RootNode.ChildNodes)
{
scene.RootNode.ChildNodes.Add(child);
}
foreach (var child in part2.RootNode.ChildNodes)
{
scene.RootNode.ChildNodes.Add(child);
}
scene.Save("assembled.gltf");
What’s Next
In upcoming posts, we will cover:
- A deep dive into the key features of the scene-graph API, materials, and math utilities.
- A practical guide to working with each supported 3D format – OBJ, STL, glTF, FBX, and 3MF – including load/save options and batch conversion patterns.
Stay tuned, and feel free to explore the library and share your feedback on GitHub.