Ab4d.SharpEngine
3.2.9386
dotnet add package Ab4d.SharpEngine --version 3.2.9386
NuGet\Install-Package Ab4d.SharpEngine -Version 3.2.9386
<PackageReference Include="Ab4d.SharpEngine" Version="3.2.9386" />
<PackageVersion Include="Ab4d.SharpEngine" Version="3.2.9386" />
<PackageReference Include="Ab4d.SharpEngine" />
paket add Ab4d.SharpEngine --version 3.2.9386
#r "nuget: Ab4d.SharpEngine, 3.2.9386"
#:package Ab4d.SharpEngine@3.2.9386
#addin nuget:?package=Ab4d.SharpEngine&version=3.2.9386
#tool nuget:?package=Ab4d.SharpEngine&version=3.2.9386
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.
Online help
Product | Versions 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 was computed. 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. |
-
net6.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (7)
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.WinUI
Ab4d.SharpEngine.WinUI defines WinUI controls that can show 3D scene rendered by Ab4d.SharpEngine rendering engine |
|
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.Wpf
Ab4d.SharpEngine.Wpf defines WPF 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. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated |
---|---|---|
3.2.9386 | 93 | 9/12/2025 |
3.2.9377-beta2 | 152 | 9/2/2025 |
3.2.9364-beta | 151 | 8/21/2025 |
3.1.9316 | 566 | 7/7/2025 |
3.1.9300-rc3 | 191 | 6/18/2025 |
3.1.9299-rc2 | 176 | 6/17/2025 |
3.1.9287-rc1 | 177 | 6/5/2025 |
3.0.9208 | 484 | 3/19/2025 |
3.0.9196 | 712 | 3/6/2025 |
3.0.9195-rc4 | 254 | 3/5/2025 |
3.0.9175-rc3 | 203 | 2/13/2025 |
3.0.9173-rc2 | 151 | 2/11/2025 |
3.0.9169-rc1 | 181 | 2/7/2025 |
2.1.9118-beta2 | 189 | 12/19/2024 |
2.1.9028-beta1 | 214 | 9/20/2024 |
2.0.8956 | 1,387 | 7/9/2024 |
2.0.8951 | 325 | 7/4/2024 |
2.0.8941-rc2 | 229 | 6/24/2024 |
2.0.8936-rc1 | 221 | 6/19/2024 |
1.0.8740 | 1,749 | 12/7/2023 |
0.9.20-rc1 | 288 | 11/15/2023 |
0.9.18-beta6 | 265 | 10/20/2023 |
0.9.16-beta5 | 235 | 9/15/2023 |
0.9.15-beta4 | 663 | 8/23/2023 |
0.9.14-beta3 | 314 | 8/4/2023 |
0.9.13-beta3 | 1,057 | 7/11/2023 |
0.9.11-beta3 | 254 | 5/11/2023 |
0.9.10-beta3 | 197 | 5/10/2023 |
0.9.8-beta2 | 635 | 4/16/2023 |
0.9.0-beta1 | 306 | 12/14/2022 |
Ab4d.SharpEngine v3.2.9386
- Significantly improved performance of hit-testing of complex meshes by using octree structures. By default, on the first hit test operation, a MeshOctree object is generated for meshes with more than 512 positions. This increases the mesh initialization time but significantly improves hit testing performance and allows super-fast hit testing of meshes with millions of positions. MeshOctree can be created manually by calling the new CreateOctree method and then assigning it to the new Octree property. It can also be created automatically when hit testing. This is controlled by the MeshPositionsCountForOctreeGeneration, OctreeMaxNodeLevel and GenerateOctreeOnMeshInitialization properties in the HitTestOptions object.
- Added support for volume rendering (for example, CT scans, 3D smoke or clouds, etc.): added VolumeMaterial, VolumeRenderingEffect and CubeSlicer.
- Added IsTwoSided property to VertexColorMaterial. When this is true, the front and back sides of the triangles are rendered with a single draw call.
- Added PrimitiveIdMaterial that can be used to render each triangle of a mesh with a color that is defined by the triangle index. This can be used for super-fast triangle hit testing (checking which triangle on the mesh was hit).
- Improved Triangulator to triangulate some polygons with holes correctly. Also added FailedToFindPolygonEars property that is set to true when the triangulation failed to correctly triangulate the positions so the user knows that the results may not be correct.
- Added optional sourceOffset and destinationOffset parameters to VulkanDevice.CopyBuffer method.
- Added overloads to GpuBuffer.WriteToBuffer and VulkanDevice.CreateBuffer methods that also take a data parameter as a ReadOnlySpan type and not only as a Span and an array.
- Added SetCameraRotation method to SphericalCamera and TargetPositionCamera. It sets the camera's Heading and Attitude and raises the CameraChanged only once (when changing both Heading and Attitude properties then the CameraChanged event is called twice). When RotationCenterPosition is set, the method rotates the camera around RotationCenterPosition. Note that setting Heading and Attitude properties directly does not rotate the camera around the RotationCenterPosition.
- Added DescriptorSetsCache that is used to cache Vulkan's DescriptorSets so they can be reused when the material data block with the same texture image and sampler is used.
- Added new constructors to HeightMapContoursNode and HeightMapWireframeNode that can be used to set all properties that are required to generate the mesh. Before, only a few properties could be set by the constructor. Other properties must be set after that, but setting each property calls UpdateMesh method that regenerates the whole mesh. Using the new constructors significantly improves the time of height map mesh generation.
- Added EngineCreateOptions.EnableNamingVulkanResources property. When set to true, then naming Vulkan resources can be enabled without enabling standard validation.
- Added DescriptorSetsCache class and VulkanDevice.GetOrCreateDescriptorSetsCache method. The DescriptorSetsCache can be used to cache the DescriptorSets so that the same storage buffer and texture image with sampler use the same DescriptorSet.
- Added VulkanDevice.DisableBackgroundUpload and EnableBackgroundUpload methods that can be used to disable background image loading.
- Added IsDisposed to BitmapTextCreator and prevented the class usage after it is disposed.
- Added Dispose method to TextBlockFactory.
- Added DriverInfo property to PhysicalDeviceDetails. It provides the driver name and version of the graphics driver.
- Added EnableBackgroundUpload property to SharpEngineSceneView. By default it is set to true, but user can set it to false to prevent loading GpuImages and GpuBuffers on a background thread.
- Added HitTestOptions.PreventCallingUpdateBeforeHitTesting to always prevent calling Scene's Update method.
- Added an optional parameter isColorAlphaPremultiplied to some methods in the TextureFactory class. Also prevented changing the order of GradientStop items when sorting the items and two items have the same offset (using Linq OrderBy instead of Array.Sort).
- Added support for 3D images by adding the Depth property to GpuImage.
- Added VulkanDevice.IsLost property and VulkanDevice.DeviceLost event. The user can subscribe to this event and then recreate the Scene or SharpEngineSceneView to restore the rendering.
- Added RandomSamplesRunner to Samples.Common project. It can be used to randomly change the shown sample as fast as possible (on ApplicationIdle).
- Fixed Scene.GetAllHitObjects method that in some cases returned too few hit results.
- Fixed Scene.GetAllHitObjects method that in some cases returned duplicate hit results that lie on the same triangle edge event when ReportAllHitTrianglesWhenEdgeIsHit was set to false.
- Added CreateGradientColors methods with multiple overloads to TextureFactory. They can be used to create an array of colors that define the color gradient.
- Fixed rendering SolidColorMaterial when the mesh is not using PositionNormalTextureVertex format.
- Increased the default size of the staging buffer from 512 KB to 1 MB. This prevents the validation warning that the staging buffer should not be allocated to a dedicated memory block because it is too small.
- When using SharpEngineSceneView for WPF, the DirectX 9 device and DirectX 11 device that are used for sharing the texture are cached. This significantly improves the performance of creating a new SharpEngineSceneView or of showing the content of SharpEngineSceneView after its Visibility was set to Visible (from Hidden or Collapsed).
- Wait until any background queue tasks are finished before calling vkDeviceWaitIdle. This prevents the following error: "vkDeviceWaitIdle(): THREADING ERROR : object of type VkQueue is simultaneously used in current thread 52752 and thread 43220".
- Prevented application crash that could happen when back buffer resources were disposed and quickly recreated again (for example, when SharpEngineSceneView was hidden and shown again). In this case, the new depth buffer can get the same Vulkan handle as the previous back buffer image. Because of reusing the DescriptorSet objects, the source texture image was not reset because the Handle was the same, but this could produce a memory read fault in the fragment shader.
- Prevented possible application deadlock in an Avalonia app with Vulkan backend.
- Prevented calling Scene.Update method before doing hit-testing and after no bigger changes are done to the 3D scene (for example, after only a camera or lights are changed).
- Fixed setting SharpEngineSceneView.MultisampleCount and SupersamplingCount after SceneView was already initialized.
- Change the order of data that is written to the log file. Now the thread id is written after the time and not after the LogArea.
- Changed the default value of IsUsingSharedTextureForIntegratedIntelGpu to true (defined in SharpEngineSceneView for WPF). This usually requires creating an additional DirectX 11 texture because Intel drivers do not allow sharing a Vulkan texture with DirectX 9 (used by WPF). Because an additional texture copy is required, this may be slower than using WritableBitmap (WritableBitmap is used when IsUsingSharedTextureForIntegratedIntelGpu is false).
- Fixed rendering PolyLineNode when IsClosed is set to true and GeometryShader is not supported by the GPU, for example, on MacOS or iOS.
- Fixed recording the command buffers again when the RenderingStepsChanged SceneViewDirtyFlag is set (for example, in MultipleSceneViewsSample when rendering type ComboBox is set to Standard).
- Improved stability when an exception happens during rendering. The error is logged and this does not prevent rendering the next frame.
Breaking change:
A single camera object can no longer be assigned to multiple SceneView objects. If this is done, then an exception is thrown.
There are multiple reasons for that:
- The camera has a SceneView property that specifies only a single SceneView to which the camera is assigned.
- The size of the SceneView determines the aspect ratio of the camera and this is used in the calculation of the perspective matrix.
- Creating CameraLight objects do not work when using multiple SceneViews.
If you were using the same camera object on multiple SceneView objects you can:
a) Unassign the camera from the previous SceneView and then assign it to the new SceneView.
b) Or create a new camera and assign it to the new SceneView. You can also synchronize it by subscribing to CameraChanged event and then update the values. See Advanced/OutlinesOverObjectsSample.cs for an example.
Ab4d.SharpEngine.glTF:
- Added support for KHR_materials_unlit extension. When it is used, then SolidColorMaterial is used instead of StandardMaterial.
- Fixed reading data in some glTF files with Draco compression.