GitHub - CeSun/Aura3D: Aura3D is a lightweight, extensible, and high-performance 3D rendering control (original) (raw)
A lightweight, extensible, high-performance 3D rendering control
Demo project: TowerDefense3D — A tower defense game built with Aura3D, showcasing real-world usage of the engine.
Important
The project is under active development. Feedback and suggestions are welcome via Issues.
Overview
Aura3D is an Avalonia-based 3D rendering control built on OpenGL ES 3.0. It provides a complete set of capabilities from model loading, scene management, and lighting/shadows to custom rendering pipelines, suitable for integrating 3D content into .NET desktop applications.
Features
Scene & Models
- Multi-format model loading — Native glTF/GLB support, plus 50+ formats via Assimp extension (FBX, OBJ, 3DS, etc.)
- Built-in geometries — Box, sphere, cylinder, plane
- Scene graph — Hierarchical node tree with parent-child transform inheritance
Lighting & Shadows
- Directional / Point / Spot lights — Three light types with color, attenuation radius, and shadow casting
- CSM cascaded shadows — Automatic cascaded shadow maps for the main directional light, configurable cascade count and split scheme
- Blinn-Phong lighting model — Default forward rendering pipeline
- HDR environment maps — Skybox / ambient background
Animation System
- Skeletal animation — glTF skinning and Assimp-imported external animations
- Animation blend space — 2D blend space for smooth transitions between animations
- Animation graph — Condition-based state machine with blend transitions
Rendering Pipelines
- Replaceable pipelines — Built-in BlinnPhong (realistic) and NoLight (unlit)
- PBR deferred pipeline — Physically-based rendering with Metallic-Roughness workflow
- Cel shading pipeline — Toon shading style
- Custom pipelines — Compose RenderPass freely without dealing with VAO/VBO
Advanced Rendering
- GPU instancing —
InstancedMeshfor high-performance rendering of thousands of instances - Hierarchical instancing —
InstancedMeshGroup(similar to UE's HISM) with incremental updates and auto-grouping - Frustum culling — Togglable, greatly reduces invisible draw calls
- Octree spatial index — Auto-expanding octree for efficient spatial queries and culling
- Point cloud — Built-in
PointCloudPipelinefor high-performance instancing-based point cloud rendering - Primitive rendering — Triangles, Lines, LineStrip, LineLoop, Points, TriangleStrip, TriangleFan
- Click picking —
Scene.Pick/Scene.PickClosestfor triangle-precise picking of Mesh and InstancedMesh - Debug visualization — Built-in debug drawing for bounding boxes, lights, bones, and camera frustums
Platforms
- Avalonia — Windows, Linux, macOS, Android, iOS
- .NET 8+ — Supports .NET 8.0 and .NET 10.0
Quick Start
1. Install
dotnet add package Aura3D.Avalonia dotnet add package Aura3D.Model.GltfLoader
At minimum you need one model loader.
Aura3D.Model.GltfLoaderhandles glTF/GLB. For FBX, OBJ, 3DS and 50+ other formats, also addAura3D.Model.AssimpLoader.
2. Use in XAML
<Window xmlns:a="https://github.com/CeSun/Aura3D" ...> <a:Aura3DView x:Name="aura3Dview" SceneInitialized="OnSceneInitialized"/>
3. Load a model
public void OnSceneInitialized(object sender, InitializedRoutedEventArgs args) { var view = (Aura3DView)sender; var camera = view.MainCamera;
// Set background color
view.Scene.Background = Texture.CreateFromColor(Color.Gray);
// Load glTF/GLB model
var model = ModelLoader.LoadGlbModel("model.glb");
model.Position = camera.Forward * 3;
view.AddNode(model);
// Add a directional light (required by the default pipeline)
var dl = new DirectionalLight();
dl.RotationDegrees = new Vector3(-30, 0, 0);
dl.LightColor = Color.White;
view.AddNode(dl);}
See the documentation for more features.
NuGet Packages
| Package | Description |
|---|---|
| Aura3D.Avalonia | Avalonia 3D rendering control (depends on Aura3D.Core) |
| Aura3D.Core | Core engine: scene graph, nodes, resources, default pipeline |
| Aura3D.Model.GltfLoader | glTF/GLB model loader |
| Aura3D.Model.AssimpLoader | Assimp model loader (50+ formats) |
| Aura3D.Pipeline.PBR | PBR deferred rendering pipeline |
| Aura3D.Pipeline.CelShading | Cel shading rendering pipeline |
