Ab4d.SharpEngine 5.0.1075

dotnet add package Ab4d.SharpEngine --version 5.0.1075
                    
NuGet\Install-Package Ab4d.SharpEngine -Version 5.0.1075
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ab4d.SharpEngine" Version="5.0.1075" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ab4d.SharpEngine" Version="5.0.1075" />
                    
Directory.Packages.props
<PackageReference Include="Ab4d.SharpEngine" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Ab4d.SharpEngine --version 5.0.1075
                    
#r "nuget: Ab4d.SharpEngine, 5.0.1075"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Ab4d.SharpEngine@5.0.1075
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Ab4d.SharpEngine&version=5.0.1075
                    
Install as a Cake Addin
#tool nuget:?package=Ab4d.SharpEngine&version=5.0.1075
                    
Install as a Cake Tool

Ab4d.SharpEngine

Ab4d.SharpEngine is a cross-platform Vulkan based 3D rendering engine for desktop and mobile .Net applications.

Vulkan is a high performance graphics and cross-platform API that is similar to DirectX 12 but can run on multiple platforms.

The following features are supported by the current version:

  • Using any coordinate system (y-up or z-up, right-handed or left-handed)
  • Many SceneNode objects (boxes, spheres, planes, cones, lines, poly-lines, curves, etc.)
  • Render line caps (arrows, etc.), line with pattern, poly-lines with miter or bevel connections, hidden lines
  • Object instancing (InstancedMeshNode) that allows rendering millions of mesh instances
  • Simple to use cameras: TargetPositionCamera, FirstPersonCamera, FreeCamera, MatrixCamera
  • Camera controllers that can rotate the camera around the mouse position, zoom to position and other advanced functions
  • Lights: AmbientLight, DirectionalLight, PointLight, SpotLight, CameraLight
  • Improved visual quality with super-sampling and multi-sampling
  • Many post-processing effects
  • Render vector and bitmap text
  • Render CT and MRI scans by using Volume rendering
  • Included reader and writer for .obj and .stl files.
  • Import 3D objects from glTF files and export the scene to glTF file by using Ab4d.SharpEngine.glTF
  • Assimp importer that uses a third-party library to import 3D models from almost any file format

Samples

Ab4d.SharpEngine.Samples on GitHub

Platforms and UI frameworks:

Windows:

  • AvaloniaUI support with SharpEngineSceneView control (Ab4d.SharpEngine.AvaloniaUI library)
  • WPF full composition support with SharpEngineSceneView control (Ab4d.SharpEngine.Wpf library)
  • WinUI 3 support with SharpEngineSceneView control (Ab4d.SharpEngine.WinUI library)
  • WinForms support with SharpEngineSceneView control (Ab4d.SharpEngine.WinForms library)
  • Uno Platform
  • MAUI
  • Using SDL or Glfw (using a third-party Silk.Net library; the same project also works on Linux)
  • ImGui (using a third-party ImGui.NET library)

Linux (including Raspberry PI 4 and similar devices):

  • AvaloniaUI support with SharpEngineSceneView control (Ab4d.SharpEngine.AvaloniaUI library)
  • Uno Platform
  • Using SDL or Glfw (using third-party Silk.Net library; the same project also works on Windows)
  • Off-screen rendering combined with Linux framebuffer display (FbDev or DRM/KMS).
  • ImGui (using a third-party ImGui.NET library)
  • See "Vulkan on Raspberry Pi 4" guide on how to use SharpEngine on Raspberry Pi 4 with an external monitor.

Android:

  • Using AvaloniaUI with SharpEngineSceneView control (Ab4d.SharpEngine.AvaloniaUI library).
  • Using SurfaceView in C# Android Application
  • MAUI

macOS:

  • Using AvaloniaUI with SharpEngineSceneView control (Ab4d.SharpEngine.AvaloniaUI library). Requires MoltenVK library - see special project for macos.
  • Using MAUI - requires MoltenVK library - see "Building for macOS and iOS" on Ab4d.SharpEngine.Samples on GitHub.

iOS:

  • AvaloniaUI with SharpEngineSceneView control (Ab4d.SharpEngine.AvaloniaUI library). Requires MoltenVK library - see Building for macOS and iOS below.
  • Using MAUI - requires MoltenVK library - see "Building for macOS and iOS" on Ab4d.SharpEngine.Samples on GitHub.

Browser Browser and browser based apps like Electron require Ab4d.SharpEngine.WebGL NuGet package that uses WebGL rendering. See Online browser demo.

Online help

Online Ab4d.SharpEngine Reference help

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.
  • net11.0

    • No dependencies.
  • net6.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net9.0

    • No dependencies.

NuGet packages (8)

Showing the top 5 NuGet packages that depend on Ab4d.SharpEngine:

Package Downloads
Ab4d.SharpEngine.AvaloniaUI

Ab4d.SharpEngine.AvaloniaUI defines Avalonia controls that can show 3D scene rendered by Ab4d.SharpEngine rendering engine

Ab4d.SharpEngine.glTF

Ab4d.SharpEngine.glTF library provides a glTF 2.0 importer that can import 3D objects from glTF files to Ab4d.SharpEngine 3D objects. The library also provides a glTF exporter that can export the 3D scene created by Ab4d.SharpEngine to the glTF file.

Ab4d.SharpEngine.Assimp

Ab4d.SharpEngine.Assimp provides classes that can use Assimp importer to import 3D objects into Ab4d.SharpEngine 3D rendering engine

Ab4d.SharpEngine.WinUI

Ab4d.SharpEngine.WinUI defines WinUI controls that can show 3D scene rendered by Ab4d.SharpEngine rendering engine

Ab4d.SharpEngine.Wpf

Ab4d.SharpEngine.Wpf defines WPF controls that can show 3D scene rendered by Ab4d.SharpEngine rendering engine

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
5.0.1075 63 11/19/2026
4.1.9689 5,757 7/11/2026
4.1.9680 7,338 7/3/2026
4.0.9594 7,437 4/8/2026
3.2.9509 920 1/13/2026
3.2.9386 1,591 9/12/2025
3.2.9364-beta 337 8/21/2025
3.1.9316 1,019 7/7/2025
3.1.9300-rc3 337 6/18/2025
3.1.9299-rc2 350 6/17/2025
3.1.9287-rc1 307 6/5/2025
3.0.9208 723 3/19/2025
3.0.9196 920 3/6/2025
3.0.9195-rc4 409 3/5/2025
Loading failed

v5.0.1075
- Added Ab4d.SharpEngine.IfcLite NuGet package that can be used to load BIM models from ifc files. The library uses a native IFClite library.
- Added support for rendering lines with world-space line thickness (and not only screen-space line thickness). This makes the lines are thick as 3D objects and also reduces line thickness when farther away from a perspective camera. This is controlled by the new IsLineThicknessInWorldSpace property.
- Added IsWorldSize property to PixelsNode and PixelsMaterial. It can be used to define whether PixelSize is specified in world units or in screen pixels.
- Added OptimizedGroupNode that can provide huge rendering performance improvement because it can use Vulkan's MultiDrawIndirect to render many 3D models with different material colors with a single draw call (or two for mixed opaque and transparent models).
- Added CameraNavigationCircles that show highly customizable navigation circles that can be used to rotate the camera around the target position.
- Added OverlayPanelBase that can be used as a base class for overlay panels, e.g., 3D content that is rendered on top of the 3D scene.
- Updated CameraAxisPanel to be derived from OverlayPanelBase. This significantly improves performance because the 3D objects from the CameraAxisPanel are now rendered with the same rendering pass as the main 3D scene. Before, the CameraAxisPanel was rendered using sprites, and this required waiting for the CameraAxisPanel to be rendered before its texture could be shown as a sprite.
- Added support for two-sided rendering of instance meshes (InstancedMeshNode). When the new IsTwoSided property is set to true, then the front and back sides of the triangles are rendered with a single draw call.
- Added IcosphereModelNode and MeshFactory.CreateIcosphere that creates a 3D sphere that consists of equally sized triangles.
- Added GraphTriangulator that can be used to triangulate a 2D graph that is defined by a set of points. The triangulation is much faster than using the Triangulator class because it uses a simpler algorithm that is optimized for 2D graphs. See the new "2D Graph" sample for more info.
- Added SetTwoSided method to StandardMaterial. It sets the IsTwoSided property to true. This method can be used with materials defined in StandardMaterials class, for example: Material = StandardMaterials.Green.SetTwoSided()
- Added support for using spherical interpolation when animating FreeCamera's CameraPosition, TargetPosition and UpDirection.
- Added RotateCamera and RotateTo methods to FreeCamera. They can be used to animate the FreeCamera.
- Simplified creating PointerCameraController, CameraAxisPanel and CameraNavigationCircles by adding AddPointerCameraController to SharpEngineSceneView class and AddCameraAxisPanel and AddCameraNavigationCircles to SceneView class. We can also use the constructor to create PointerCameraController, CameraAxisPanel and CameraNavigationCircles, but using the AddXYZ method better communicates that the created object is assigned to SharpEngineSceneView or SceneView and that you do not need to have a local variable or field to prevent collecting it by GC.
- Improved CameraAxisPanel when it is created only from a SceneView and without a camera. In this case, when the Camera property on the SceneView is changed to a different camera, then the CameraAxisPanel will also start using the new camera.
- Added SetCustomInstancesDataBuffer method to InstancedMeshNode. It can be used to assign a custom instancesData GpuBuffer, that can be created in the background thread by using CreateBufferAsync.
- Added CreateTexture method to TextureFactory that creates a GpuImage from a byte array that contains raw image data.
- Updated PngBitmapIO to use FileUtils.CommonFileNotFoundResolver that is used when the specified file does not exist. This method tries to find the file by looking at the base app folder and FileUtils.GlobalFileSearchPaths.
- Added PreventChangingDistanceWhenZoomingOrthographicCamera property to CameraController. It can be used to prevent changing the distance when zooming an orthographic camera. This can prevent objects from being behind the camera.
- Added CameraDistance to TwoDimensionalCamera. This can be used when the Z value is manually set. CameraDistance can be used to prevent moving the camera in front of the 3D objects.
- Added CustomValueLabelsDirection, CustomValueLabelsUpDirection and CustomValueLabelsPositionType to AxisWithLabelsNode.
- Added MeshUtils.ScaleAndTranslateMesh and MeshTransform.TranslateMesh methods.
- Significantly improved performance of MeshUtils.TransformMesh method when only scale and translation are used.
- Added CurrentKeyboardModifiers to InputEventsManager. It can be used to check the keyboard modifiers inside the Pointer events, for example inside PointerPressed or PointerMoved.
- Added EngineCreateOptions.DisablePipelineDerivatives property can be set to true to disable using derivative pipelines. This can be used on some old drivers that have problems with derivative pipelines. In this case, pipeline creation is slower.
- Added ConfigureDevicePNext property to EngineCreateOptions class. It can be used to add a custom Vulkan features struct to the deviceCreateInfo.PNext field when creating the VulkanDevice.
- Added Vulkan structures, enums and commands for the following extensions: VK_KHR_ray_tracing_pipeline, VK_KHR_acceleration_structure, VK_KHR_ray_query, VK_NV_ray_tracing, VK_KHR_ray_tracing_maintenance1, VK_KHR_pipeline_library, VK_EXT_mesh_shader
- Improved GetColor4 and SetColor4 methods in RawImageData so that when the format parameter is not specified, the format of the RawImageData is used instead of using B8G8R8A8Unorm.
- Added IsTwoSided property to PlanarShadowNode to simplify showing shadow for back-face materials.
- Added GpuImage constructor that takes existing Vulkan Image and ImageView objects. This can be used to show a Vulkan image that was created by using Vulkan directly or by using another library.
- Added optional cancellationToken parameter to GpuBuffer.WriteToBufferAsync, GpuBuffer.BeginWriteToBuffer, GpuImage.CopyDataToImageAsync and GpuImage.BeginCopyDataToImage methods.
- Added VulkanDevice.CreatePersistentlyMappedBuffer methods that create a GpuBuffer that is persistently mapped to the host memory. This can be used to improve performance when the buffer is updated often.
- Added a new PixelsNode constructor that takes a PixelsMesh as a parameter. This can be used to create a PixelsNode with a custom mesh's GpuBuffer.
- Added protected virtual CreatePixelColorsBuffer and CreatePixelSizesBuffer. They can be used to create a custom GpuBuffer for pixel colors and pixel sizes. For example, host-visible memory can be used instead of device local memory. This can improve performance when the pixels are changed often.
- Improved Scene.DumpRenderingLayers and Scene.GetRenderingLayersInfo methods so information about ParentSceneNode is shown before other properties. This makes the rendering layer details more readable.
- Added DumpRenderingLayers and GetRenderingLayersInfo methods to SceneView. Those two methods are the same as methods with the same name in the Scene class, but when used from SceneView, they also show the RenderingLayers for all Overlay panels (CameraAxisPanel, CameraNavigationCircles).
- Fixed calculating TargetPositionCamera's matrices in case Distance is negative (in this case, the absolute value is now used).
- Fixed FitIntoView so that the TargetPositionCamera's Distance is not set to a negative value.
- Fixed disposing GpuImages used by PhysicallyBasedMaterial when calling DisposeAllChildren method on RootNode or GroupNode and disposeTextures parameter is set to true.
- Fixed background upload code to prevent multiple "SharpEngine-BGUploader" background threads from remaining running in a waiting state.
- Fixed scaling axis names (X, Y and Z characters) in CameraAxisPanel when the app is moved to a monitor with a different DPI scale.
- Fixed initializing PostProcesses if they are added to the SceneView before the SceneView is initialized (before the GpuDevice is created).
- Prevented crash (device lost error) after resizing the SceneView when using Avalonia with Vulkan backend.
- Fixed rendering lines when Scene.LineRasterizationMode is changed from GeometryShader to some other value.
- Prevented an error when creating a Vulkan Pipeline for Vulkan line rasterizer (used when Scene.LineRasterizationMode is not GeometryShader and not VulkanSinglePixelWideLines) and when rendering stipple lines (lines with pattern) is not supported by the driver (for example, on older Intel graphics cards).
- Fixed rendering 3D lines if some lines are already rendered and then DefaultBlendState, DefaultOpaqueDepthStencilState, DefaultTransparentDepthStencilState, DefaultRasterizerState properties on the Scene object are changed.
- Fixed using FloatImprecisionTolerance in EdgeLinesFactory for some edges that are partially converted by other edges.
- Fixed using quick zoom with orthographic camera and when CameraZoomMode is set to PointerPosition or CameraRotationCenterPosition.
- Fixed calculating UpdatedBuffersCount and UpdatedBuffersSize values in RenderingStatistics when using some CreateBuffer methods.
- Fixed rendering 3D lines with line caps (arrows, boxes, etc.). Before, the line caps may be too small; for example, the box line caps were not square but rectangular.
- Prevented leaking Avalonia's CompositionDrawingSurface.
- Fixed creating a circle model (using CircleModelNode or MeshFactory.CreateCircleMesh) where the InnerRadius is set to 0 and CircleTextureMappingTypes is set to RadialFromCenter or RadialFromInnerRadius.
- Fixed positioning Sprite objects when the Center coordinate system is used (calling "SpriteBatch.SetCoordinateCenter(PositionTypes.Center)"). In this case, the y-axis now points down and not up.
- Improved calculating major and minor positions in AxisWithLabelsNode to prevent errors because of float imprecision problems.
- Fixed camera movement with PointerCameraController so the movement amount is adjusted based on the screen's DPI scale. Now the 3D position under the mouse or pointer better follows the mouse or pointer when moving the camera.
- Mesh.DumpDetails and GetDetailsText now align the text for Positions, Normals and TextureCoordinates when the mesh uses an array of PositionNormalTextureVertex.
- Updated the native Assimp library that comes with the samples in the lib/assimp-lib folder to v6.0.6. Also added a version that supports Arm64 architecture on Windows.

Breaking change:
- Renamed all XYZAsync methods in GpuBuffer (WriteToBufferAsync) and GpuImage that take a callback (are not awaitable) to BeginXYZ methods. The old methods are marked as obsolete.
- Removed pAllocator parameter from calls to Vulkan Create and Destroy commands. This is done to be able to remove many unsafe keywords from the code.


Ab4d.SharpEngine.WebGL:
- All above changes that are not related to or require Vulkan; for example, OptimizedGroupNode and overlay panels are not supported in WebGL.
- Added support for hardware-accelerated thick lines (LineThickness > 1). IsLineThicknessInWorldSpace, DepthBias and lines with patterns are also supported. LineCaps (lines with arrows and other ending shapes) and connected lines (miter or beveled line joints) are not supported yet.
- Implemented PixelsNode and PixelsMaterial.
- Implemented rendering PhysicallyBasedMaterial (PBR), including support for environment mapping.
- Implemented rendering per-vertex colored models by using VertexColorMaterial or setting VertexColors data to a mesh.
- Added ModelMover, ModelRotator and ModelScalar that can be used to move, rotate and scale the selected 3D models.
- Added TwoDimensionalCamera that can be used to show 2D shapes and lines. The TwoDimensionalCamera class is provided with full source code.
- Added MultiMaterialModelNode that can show one mesh with different materials. For example, it is used to show a skybox.
- Implemented importing keyframe and skeletal animations from glTF files. Note that when running in a Debug or Release build, skeletal animation can be very slow. Start the app in Deploy build to run it at full speed.
- Added support for background and overlay object and line rendering. This is achived by setting ClearDepthStencilBufferBeforeRendering or ClearDepthStencilBufferAfterRendering property on RenderingLayer to true and adding SceneNode to that RenderingLayer. See new Advanced/BackgroundAndOverlayRenderingSample for more info.
- Fixed glTFImporter when an embedded texture is used by multiple models.
- Fixed using CustomRenderingLayer for line SceneNodes.

Ab4d.SharpEngine.WinUI:
- Fixed showing the content of the 3D scene if the SharpEngineSceneView control is loaded when the size of the parent control is zero.
- Removed dependency to Ab4d.SharpEngine.Wpf from Ab4d.SharpEngine.WinUI NuGet package.
- Fixed sizing the rendered 3D scene when the WinUI app is moved to another monitor with a different DPI scale.

Ab4d.SharpEngine.WPF:
- Improved using WritableBitmap PresentationType for WPF: now the staging buffer is preserved and recreated for each frame.
- Fixed calling RenderToBitmap when using WPF and PresentationType is set to OverlayTexture.
- Added OverlayControlsSample sample for WPF that shows how to render WPF controls to a bitmap and show that as Sprites. This can be used to render WPF controls on top of a 3D scene when using OverlayTexture PresentationMode (this mode prevents rendering WPF controls on top of a 3D scene so Sprites provide a way to render non-interactive controls on top of 3D scene).

Ab4d.SharpEngine.glTF
- Improved glTFExporter to export textures from PhysicallyBasedMaterial.
- Create a new DefaultMaterial if the previous material was disposed by the user.