Cross-platform Vulkan based 3D rendering engine for .Net Apps

Ab4d.SharpEngine is a blazing fast 3D rendering engine that can be used in desktop and mobile .Net Apps.


The main goals of the Ab4d.SharpEngine are:

  • Easy to use:
    The engine was created after having a lot of experience with the highly popular Ab3d.PowerToys and Ab3d.DXEngine libraries that were used in many professional 3D applications but can work only on Windows (see example app).
  • High performance:
    Vulkan API is a high performance and low overhead graphics API that can squeeze as much performance from the graphics card as possible. By using Vulkan best practices, knowledge and algorithms from Ab3d.DXEngine and high optimizations of .Net 6 and newer .Net versions, the engine is built to provide blazing fast rendering.
  • General purpose:
    The engine supports any coordinate system (y-up or z-up, right-handed or left-handed) and can be used by users that are used to any other 3D workflow.
  • Cross-platform and multi UI framework:
    Vulkan API and .Net 6+ can run on any CPU and platform. The plan is to provide easy to use integration and support for most of the UI frameworks.
  • Minimal dependencies:
    Core Ab4d.SharpEngine assembly has no third-party dependencies. Assemblies that provide integration with UI framework depend only on that framework and not other third-party library. Also, png file reader and writer is included into the core library.

 

Traditionally C++ was used for rendering 3D graphics. But .Net has become so well optimized and fast (see example) that it has become a perfect choice for 3D graphics because C++ does not produce that much faster code that it would justify much more complex development.


The engine uses Vulkan 3D that is a high performance next-generation graphics API.
It is also cross-platform and this allows the Ab4d.SharpEngine to run on the following platforms:

  • Windows 7, 8, 10, 11 (including virtual machine or server *)
  • Linux (including Raspberry Pi 4 and 5**)
  • Mac OS
  • Android
  • iOS
* See instructions on how to use Vulkan in a Virtual machine or on a server.
** See instructions on how to run Ab4d.SharpEngine on Raspberry Pi 4 with a touch screen.

The engine can be integrated into almost any UI framework. The following UI frameworks are supported:

In any UI framework it is also possible to render to an offscreen texture. That texture can be read by the application or saved to an image file. Offscreen rendering can work with hardware or software rendering - can be also used on a sever or VM by using LLVMpipe.

 

Minimum requirements

Ab4d.SharpEngine requires Vulkan support to be able to render the 3D scene. Vulkan is supported on all newer GPUs and many older graphics devices.

Quick info for Windows:

  • NVIDIA supports Vulkan 1.3 from the Maxwell architecture on (introduced in 2015). Kepler cards support Vulkan 1.2
  • Intel supports Vulkan 1.3 on Intel Arc graphics cards and all integrated GPUs from the Skylake (6000+ series; introduced in 2017).
  • AMD supports Vulkan 1.3 on GCN 4 and newer (Radeon 400+ series; introduced in 2016) and Vulkan 1.2 on older GCN series (introduced in 2012).

See Wikipedia article for more details and other platforms.

On unsupported system, it is possible to use a software rendered - see instructions on how to use software llvmpipe.

 

Samples and downloads

GitHub samples: NuGet packages:
Click here to create a 60-day trial license for Ab4d.SharpEngine.

 

Screenshots on different platforms and UI frameworks

Ab4d.SharpEngine in a WPF application on Windows (PointerCameraContoller sample)
Ab4d.SharpEngine in a WinUI 3.0 application on Windows (WireGrid sample)
Ab4d.SharpEngine in a WinForms application on Windows (Introduction sample)
Ab4d.SharpEngine in an Avalonia UI application on Windows (Animation sample)
Ab4d.SharpEngine in an Avalonia UI application on macOS (Input events sample)
Ab4d.SharpEngine in an Avalonia application on Ubuntu Linux (3D lines sample)
Ab4d.SharpEngine in an Avalonia application on Ubuntu Linux with native assimp library (Assimp importer sample)
Ab4d.SharpEngine in  a generic SDL / Glfw application on Ubuntu Linux (Multi-SceneNodes sample)
Ab4d.SharpEngine in an Android application (Multi-SceneNodes sample)
Ab4d.SharpEngine runnig in Android emulator (Multi-SceneNodes sample)
Ab4d.SharpEngine in a cross-platform Avalonia UI app running on iOS
Photo of Rasberry PI 4 devide with a touch screen running a Ab4d.SharpEngine in an Avalonia UI application (Multi-SceneNodes sample)
Ab4d.SharpEngine in an Avalonia UI application on Rasberry PI 4 (Multi-SceneNodes sample)
Ab4d.SharpEngine in a generic SDL / Glfw application on Rasberry PI 4 (Multi-SceneNodes sample)

 

Samples screenshots

Introduction 3D animation of Ab4d.SharpEngine logo
Sample showing that Ab4d.SharpEngine can support any coordinate system (any combination of y-up or z-up, right-handed or left-handed)
Multiple SceneNode objects with multiple materils
Animation sample
Using mesh instancing to render many instances of one 3D mesh
3D line performance sample showing 62.5 million line segments
Rendering 9 million pixels
Point-cloud importer that can import data from .ply and .xyz files
Sample showing different light types
Sample showing different materials
PointerCameraController is used to control the camera with the pointer or mouse
ReaderObj can be used to import 3D models from obj files
Importing 3D model from glTF files and exporting existing scene to glTF file
Using third-party assimp importer to import 3D models from many file formats
Sample showing different 3D lines
Creating 3D curves with different curve types
Slicing 3D models
Created 3D mesh by extruding 2D shape into 3D space (shapes with holes are supported)
3D Boolean operations showing Subtract, Intersect and Union of two 3D models
Rendering poly-lines with different miter limit settings
ModelMover, ModelRotator and ModelScalar
Lathe 3D objects are created by rotating a 2D shape around
Different 3D tubes
Tubes along a 3D path
Planar shadows
WireGrid sample with many options
Rendering overlay and background 3D objecst
Custom fog effect (available with full effect and shader source code)