Ab4d.SharpEngine versions history

 

See related blog posts to get additional information about development history of the Ab4d.SharpEngine rendering engine.

 

Version 2.0.8956 - hotfix

  • Fixed using correct memory type for some arm based devices.
  • Prevented recording commands buffer again when only bounding box is changed.
  • Added IsUnifiedMemory and IsDeviceLocalHostVisibleMemoryTypeAvailable properties to PhysicalDeviceDetails.
  • Added support for using DeviceLocal and HostVisible memory type when it is available (AMD GPU and newer NVIDIA GPU). This provides faster rendering. This can be disabled by setting EngineCreateOptions.UseDeviceLocalHostVisibleMemoryType to false.

 

Version 2.0.8951

Breaking changes::
  • Renamed all classes, methods and parameters with "mouse" text to use "pointer" instead, for example:
        MouseCameraController => PointerCameraController
        MouseButtons => PointerButtons
        MouseAndKeyboardConditions => PointerAndKeyboardConditions
        CameraZoomMode enum: MousePosition => PointerPosition (MousePosition is marked as obsolete)
  • Marked all methods in Color3, Color4 and BoundingBox that take parameters by ref as obsolete. There are new methods that take parameters by in keyword instead.
  • BoundingBox.Transform and protected Camera.SetCameraMatrices changed ref parameter to in parameter. This is automatically handled in .Net 8 and newer, but requires change in .Net 6 or .Net 7.
  • Marked MeshAnalyzer.CreateEdgeLines method as obsolete. It still uses the old much slower algorithm to generate edge lines. It can still be used in cases where the new method would not work correctly.
  • In StandardTransform and StandardQuaternionTransform the method GetTranslateVector3D was renamed into GetTranslateVector. The old method still works, but is marked as obsolete.
  • Ranamed Scene.HitTestOptions property to DefaultHitTestOptions. The old HitTestOptions is still available but is marked as obsolete.

New features:
  • Added PixelsNode, PixelMaterial and PixelEffect that can be used to render 3D pixels and point-clouds.
  • Added ModelMover that can be used to move selected 3D models in the 3D space.
  • Added ModelScalar that can be used to scale selected 3D models.
  • Added ModelRotator that can be used to rotate selected 3D models.
  • Added MultiMaterialModelNode that defines a SceneNode with a single mesh and multiple materials. It uses SubMesh objects to define which triangles in the mesh are rendered with which material.
  • Added InputEventsManager (platform specific) and ManualInputEventsManager (generic) that can be used to easily subscribe to pointer and mouse events on 3D objects.
  • Added PointCloudImporter sample with PlyPointCloudReader and PlyPointCloudWriter classes (in the Utils folder) that can import from .ply files and export to that file.
  • Significantly improved the performance of generating edge lines (can be more than 100 times faster than before). To use the new method create an instance of the EdgeLinesFactory class and call any of its public methods.
  • Significantly improved the performance of LineSelectorData that can be used to select lines with pointer or mouse. See updated "HitTesting / Line selection" sample.
  • Added SliceSceneNode, SliceGroupNode and SliceModelNode methods to ModelUtils. They can slice SceneNode objects by a plane.
  • GetClosestHitObject, GetAllHitObjects, HitTestSceneNode and GetHitSceneNodeBounds methods in SceneView and Scene now have an additional optional customHitTestOptions parameter that can be used to specify custom HitTestOptions.
  • Added OverlayRenderingLayer and BackgroundRenderingLayer properties to HitTestOptions. They can be used to increase or lower the priority of hit tested objects in background or overlay rendering layer. For example, the objects in an overlay rendering layer can be marked to be hit tested before other objects. (see "BG and Overlay rendering" sample for more info).
  • When there are multiple graphics cards, use device-level Vulkan commands instead of instance-level commands. This slightly improves performance.
  • Improved hit-testing by preventing the creation of new objects on each hit test.
  • Added UpdateInstancesData and SetInstancesRange methods to InstancedMeshNode class. The methods can be used to prevent recalculating the bounding box.
  • Added GetPositionFromVertexBuffer, GetTriangleFromVertexBuffer methods to MeshUtils. They get a position or a triangle (3 positions) from a genetic vertex buffer type, for example, from an array of PositionNormalTextureVertex items.
  • Added TrianglesCount property and GetTrianglePositions method to TriangleMesh.
  • Added GetPointToLineDistance method to MathUtils.
  • Improved performance of methods in Color3 and Color4 classes.
  • Added LineUtils.AddWireframeLinePositions that takes Mesh and Matrix4x4 as parameters (so it is not needed to convert Matrix4x4 to a MatrixTransform object). Also added an optional HashSet as an additional parameter to existing GetWireframeLinePositions methods.
  • Added WireframeRenderingEffectTechnique that can be in RenderObjectsRenderingStep.OverrideEffectTechnique to render all objects as wireframe.
  • Added a new constructor for VertexColorMaterial that also takes a hasTransparency property. It specifies if positionColors array defines any color with alpha value less than 1. This prevents checking the individual colors in the positionColors array before the material is used.
  • Improved using custom data channels on Mesh object. Added AvailableDataChannels and HasCustomMeshDataChannels properties. Added option to store GpuBuffer in each data channel. Renamed ClearDataChannel to RemoveDataChannel.
  • Added SetMetadata, GetMetadata and RemoveMetadata methods to Mesh object to add any metadata to the mesh (key is a string, value is an object).
  • Added IsBackFacing property to DXRayHitTestResult. It is set to true when a back-face of a triangle is hit.
  • Added new overloads to GpuBuffer.ReadFromBuffer and WriteToBuffer methods. New oveloads can be used to specify the data length and offset in the buffer. Also, single struct values can be written to buffer and read from it.
  • Improved performance of RenderToRawImageData (and RenderToBitmap) when the size of cached RawImageData or StagingGpuBuffer is bigger than the size calculated from the current view.
  • Prevented calling Render method from SceneUpdating event handler.
  • CameraAxisPanel is automatically disposed when parent SceneView is disposed.
  • Added ClearDepthStencilBufferBeforeRendering and ClearDepthStencilBufferAfterRendering properties to RenderingLayer. They can be used to render 3D objects behind all other objects or on top of all other objects. See the new "Advanced / BG and Overlay Rendering" sample.
  • Added SetTranslate method to TranslateTransform that takes Vector3 as a parameter.
  • In StandardTransform and StandardQuaternionTransform added overloards to Move, SetTranslate and SetScale methods that take Vector3 as a parameter (instead of individual x, y and z values).
  • Added GetScaleFactors method to StandardTransform and StandardQuaternionTransform.
  • Added GetRayRayClosestPoint to MathUtils.
  • Improved GpuImage.CopyDataFromImage with byte array as a parameter. The new method can copy data also from GpuImages that are DeviceLocal (its memory is not accessible from the cpu). In this case a staging GpuImage is created that can be copied to main memory.
  • Added GpuImage.CopyDataFromImage without any parameters that returns a new RawImageData object with the data from the GpuImage (it can also retrieve data from DeviceLocal GpuImage).
  • Added SetCustomRenderingLayer to Utilities.ModelUtils class. It can set the CustomRenderingLayer on all child nodes.
  • The Scene is now automatically rendered again when the properties in the RenderingLayer are changed (for example changing IsRenderingEnabled or ClearDepthStencilBufferBeforeRendering).
  • Added Version property to Camera. It is increased each time the camera is changed. This can be used to check if the camera was changed between two points in time.
  • Improved AddTransformation and CombineTransformations in TransformationUtils. In case when both transformation are StandardTransform or StandardQuaternionTransform than transformation values from transform2 are added to transform1 and transform1 is returned.
  • Added GetQuaternion method to StandardQuaternionTransform.
  • Added SimplifyNormalCalculation to PlanarShadowMeshCreator.
  • Improved VertexColorEffect so it can read VertexColors from mesh's DataChannel (set by calling Mesh.SetDataChannel(MeshDataChannelTypes.VertexColors, positionColors))
  • Added GetAverageScale method to ScaleTransform, StandardTransform and StandardQuaternionTransform.
  • Added PivotPoint property to AxisAngleRotateTransform, AxisAngleRotateTransform and ScaleTransform. It defines a custom center of rotation and custom scale origin. Note that StandardTransform and StandardQuaternionTransform already define the PivotPoint.
  • Added RemovePremultipliedAlpha method to RawImageData.
  • Added ItemType and ItemsCount properties to GpuBuffer. This helps understand what data are stored in the buffer. Those two values are now mandatory when creating a GpuBuffer.
  • New CustomFogEffectSample that shows how to create a custom effect with custom vertex and fragment shaders.
  • Show the current coordinate system in the Diagnostics window.
  • Added gltf export to Diagnostics window.
  • Prevented closing stream in SkiaSharpBitmapIO.LoadBitmap method.
  • Improved reading emissive materials and emissive texture - now SolidColorMaterial is used to show emissive material.

Fixes:
  • Fixed zooming when using Orthographics camera, ZoomMode is set to PointerPosition and user zooms to an area without any 3D object (before zoom to center was used).
  • Prevented "Specified argument was out of the range of valid values. (Parameter 'x')' exception when allocating a huge number of objects.
  • Improved using LineRasterizationMode when some modes are not supported by the system.
  • Fixed lazy loading DiffuseTexture in StandardMaterial that is created from a file stream.
  • In PngBitmapIO (build-in png reader) improved detecting transparent pixels in images that use a palette with alpha colors but do not define AlphaChannelUsed flag in the file header.
  • Fixed showing specular reflection when using CameraLight.
  • Improved hit-testing by preventing returning two hit results when the ray hits an edge that is shared by two triangles. This can be prevented by setting the new HitTestOptions.ReportAllHitTrianglesWhenEdgeIsHit property to true.
  • Fixed using transformation in LineUtils.GetNormalLinePositions. Also, added a GetNormalLinePositions method overload that takes Matrix4x4 as a parameter instead of Transform.
  • Prevented an exception that may occur when SceneView is disposed from the finalizer.
  • Fixed calculating 2D screen positions in ceneView.BoundingBox3DTo2D.
  • Fixed setting normalized normal to mesh that is used to display bitmap text.
  • Fixed setting RotationCenterPosition from CameraController when ZoomMode is set to PointerPosition (previously MousePosition) and when user zooms to an empty area (no 3D object is under the pointer).

Created a new Ab4d.SharpEngine.glTF library that can read 3D objects from glTF files and export an existing 3D scene to glTF file.

Created a new Ab4d.SharpEngine.WinForms library that provides helper classes (SharpEngineSceneView, MouseCameraController, InputEventsManager and SystemDrawingBitmapIO). There are also new samples for WinForms.

 

Version 1.0.8740

  • Added licensing code. Now license must be activated by calling SetLicense method.
  • Simplified GetChild, GetAllChildren and ForEachChild in GroupNode. Removed search by regular expression. The wildcard (using '*') search is now automatically determined from the specified name.
  • Removed SerializeToJson and DeserializeJson from Camera because they were rarely used. This removed reference to System.Text.Json assembly.
  • Added Camera.Name property that can be set when creating the camera.
  • Prevented throwing "Value cannot be null" exception when CreateOptions.ApplicationName was null or empty string.
  • Fixed rendering semi-transparent rectangles with SpriteBatch.
  • Fixed WpfBitmapIO to set HasTransparency property.
  • Fixed WinUIBitmapIO by converting to pre-multiplied alpha.
  • Changed default sampler type from Wrap to Mirror.
  • Documented many additional classes, properties and methods. See online help here: https://www.ab4d.com/help/SharpEngine/html/R_Project_Ab4d_SharpEngine.htm
Breaking changes:
  • Change the order of parameters in the VulkanDevice.Create methods - the EngineCreateOptions parameter was moved after surface parameters because it is now optional.
  • Removed IRotatedViewCamera interface and moved ViewRotation property from camera to SceneView.
  • Removed public VulkanInstance and VulkanDevice constructors. Now it is possible to create VulkanInstance and VulkanDevice objects only by using static Create methods (before both constructor and Create method were available).
  • Renamed some parameter names in some methods in transformation classes (uniformScale to scale).
  • Renamed FreeCamera.CalculateUpDirectionFromPositions to CalculateCurrentUpDirection.

 

Version 0.9.20-rc1

  • Added support for custom coordinate system - it can be changed by calling Scene.SetCoordinateSystem. Supported coordinate systems: YUpRightHanded (default), YUpLeftHanded, ZUpRightHanded, ZUpLeftHanded. There are also new methods in Scene and CameraUtils that can help you get information about the coordinate system.
  • Added CameraAxisPanel, which can show a small panel displaying the orientation of the X, Y, and Z axes.
  • Added PngBitmapIO class to SharpEngine. It can read or write png images so no third-party library is needed anymore to import textures or save rendered bitmap to disk.
  • Added SolidColorMaterial to make it easier to use solid color material (before user need to use StandardMaterial and set Effect to SolidColorEffect).
  • Added PlaneModelNode.AlignWithCamera method that orients the plane model so that it is facing the camera.
  • Added GetCameraPlaneOrientation to camera classes.
  • Added support to load textures from stream with new overloads to LoadDiffuseTexture method in StandardMaterialBase (base class for StandardMaterial and SolidColorMaterial). Before TextureLoader was needed to create a texture from stream.
  • bitmapIO parameter is now optional in the LoadDiffuseTexture method in StandardMaterialBase. When bitmapIO is null, then DefaultBitmapIO from GpuDevice is used.
  • Removed SharpDX dependency from Ab4d.SharpEngine.WinUI library (add DirectX 11 interop code to the library).
  • Added SharpEngineSceneView.DisableWpfResizingOfRenderedImage in Ab4d.SharpEngine.Wpf. When set to default true value, it produces sharper rendered image.
  • Added EngineCreateOptions.AdditionalValidationFeatures
  • Fixed using model or parent Group transformation on InstancedMeshNode.
  • Fixed moving camera with MouseCameraController in some cases when using an orthographic camera.
  • Fixed disposing DirectX 11 device (used by Ab4d.SharpEngine.Avalonia on Windows and can be used by Ab4d.SharpEngine.Wpf with Intel gpu).
  • Improved LineSelectorData so that in case the LineSelectorData is created with LineNode, then LineNode's WorldMatrix will be used to transform all the line positions.
  • Improved AssimpImporter - names that are assigned to created GroupNode and MeshModelNode from Assump's Nodes are assigned more correctly.
  • Updated SpriteBatch class: Renamed Draw method to DrawSprite. Added DrawBitmapText method to render a 2D text behind or on top of 3D scene. Added DrawRectangle method to render a 2D rectangle behind or on top of 3D scene.
Breaking changes:
  • Changed the order of parameters in TextureLoader.CreateTexture method - the bitmapIO is now optional and was moved after scene or gpuDevice parameters. When bitmapIO is not set, then DefaultBitmapIO from GpuDevice is used.
  • Removed CreateTextureMaterial methods from TextureLoader. StandardMaterial and SolidColorMaterial with texture can be easily created by using class constructor and providing file name or file stream.
  • Removed Scene.BitmapIO property and added VulkanDevice.DefaultBitmapIO property that is set to an instance of PngBitmapIO. This provides the default (and fallback) png loader to load textures from png files so not other third-party BitmapIO is needed.
  • Renamed IBitmapIO.ConvertToBgra to ConvertToSupportedFormat and updated the code accordingly (now the rgba images are not converted to bgra anymore but are shown by the engine in its original format).
  • Renamed AssimpImporter.ImportSceneNodes method to Import. Also changed the return type from SceneNode to GroupNode.

 

Version 0.9.18-beta6

  • TextBlockFactory, BitmapTextCreator and BitmapFont are now part of SharpEngine. Also there is a build-in bitmap font that can be used without the need to provide your font.
  • Improved ways to manually dispose objects and resources by adding the following methods: GroupNode.DisposeAllChildren, GroupNode.DisposeWithAllChildren, GroupNode.DisposeChildren, ModelNode.DisposeWithMaterial, MeshModelNode.DisposeWithMeshAndMaterial, LineBaseNode.DisposeWithMaterial and StandardMaterial.DisposeWithTexture (see Ab4d.SharpEngine online help for more info)
  • Added support for rendering sprites - see SpritesSample
  • Renamed GroupNode.GetFirstChild to GetChild
  • Improved support for using SharedTexture for WPF on Intel graphics cards. Before WritableBitmap was used because Intel's Vulkan driver do not support sharing DirectX 9 texture (created by WPF) with Vulkan. Note that this requries copying to another texture and this means that for integrated Intel GPU this is not faster so for now WritableBitamp is used by default. SharedTexture can be forece by setting IsUsingSharedTextureForIntegratedIntelGpu to true.
  • When calling RenderToBitmap or similar method and when format parameter is omitted, them the currently used Format from SceneView is used (before Bgra was used).
  • Updated RenderingSteps that render objects: FillCommandBufferRenderingStep is now abstract; there are new RenderObjectsRenderingStep and RenderSpritesRenderingStep; renamed SceneView.DefaultFillCommandBufferRenderingStep to SceneView.DefaultRenderObjectsRenderingStep; renamed CompleteRenderingStep to CompleteRenderingRenderingStep; renamed SceneView.DefaultCompleteRenderingRenderingStep to SceneView.DefaultCompleteRenderingStep
  • Added ClampNoInterpolation to CommonSamplerTypes - can be used for height maps with hard gradient.
  • Fixed hit-testing for InstancedMeshNode
  • Fixed using transparency in WPF's WriteableBitmap.
  • Updated TextureLoader to add options to cache a loaded texture (GpuImage) in a Scene's cache and not only in GpuDevice's cache. This way the textures are disposed when the Scene is disposed.
  • ReaderObj and AssimpImporter now have new constructors that take Scene object. When used, then textures are cached by the Scene and not by the GpuDevice.
  • Updated native Assimp importer to v5.3.1.
  • Updated Ab3d.Assimp library to correctly read file with non-ascii file names
  • Breaking change: The cacheGpuTexture paramter in TextureLoader.CreateTexture has been renamed to useGpuDeviceCache. Note that the new version also allows using Scene's cache for texture. To use that call CreateTexture by providing the Scene object and setting the useSceneCache to true.

 

Version 0.9.16-beta5

  • Improved ReaderObj to also read textures.
  • Swapped AssimpImporter constructor parameters (first parameter is now BitmapIO and not GpuDevice - BitmapIO is more important becuse it is required to load textures).
  • AssimpImporter can now read textures even when it is not created with a valid GpuDevice (in this case textures are lazily loaded).
  • Added RenderToBitmap method to SharpEngineSceneView that take WritableBitmap as parameter.
  • Ab4d.SharpEngine.AvaloniaUI: removed dependency from SharpDX.DXGI and SharpDX.Direct3D11.

 

Version 0.9.15-beta4

  • Engine can load the vulkan loader from the path that is set to the VK_DRIVER_FILES environment variable (see the following on how to use SharpEngine in a virtual machine or a web server: https://www.ab4d.com/SharpEngine/using-vulkan-in-virtual-machine-mesa-llvmpipe.aspx)
  • Removed isDeviceLocal parameter from GpuImage constructor and TextureLoader.CreateTexture method.
  • By default MSAA (multi-sampling anti-aliasing) is disabled for software renderer (Mesa's llvmpipe).
  • Renamed SharpEngineSceneView.RequiredDeviceExtensionNames to RequiredDeviceExtensionNamesForSharedTexture.
  • Added DesiredInstanceExtensionNames and DesiredDeviceExtensionNames to EngineCreateOptions class (before there were only RequiredInstanceExtensionNames and RequiredDeviceExtensionNames).
  • Moved methods to create edge lines from Ab4d.SharpEngine.Utilities.EdgeLinesFactory class to Ab4d.SharpEngine.Utilities.LineUtils class.
  • Many other improvements and fixes.

 

Version 0.9.14-beta3

  • Added SetAmbientLight, GetAmbientLightColor, GetAmbientLightIntensity methods to Scene.
  • Added overloads to SceneView.Points3Dto2D and BoundingBox.FromPoints that get Span<Vector3> instead of arrays.
  • Renamed BoundingBox.IsEmpty to BoundingBox.IsUndefined and BoundingBox.Empty to BoundingBox.Undefined.
  • Fixed BoundingBox.Add method when calling Add with (0, 0, 0) parameter after the BoundingBox was created.
  • Added Diagnostics window to Avalonia and WinUI samples.
  • Added a few new samples.
  • Improved workinig on Android and Android.Application sample.
  • Updated to Avalonia v11.0.0-preview8.
  • Many other smaller changes and fixes.

 

Version 0.9.8-beta2

  • Improve SharedTexture support for integrated Intel graphic cards and older graphics cards
  • Using SwapChainPanel for WinUI instead of SurfaceImageSource - this is faster and better supported by WinUI
  • Helped design External GPU memory interop (OpenGL, Vulkan, DirectX) and then implemented the new much better way to share Vulkan texture with Avalonia UI application
  • Objects and camera animation similar to Anime.js
  • Many other updates and fixes
  • Added many samples to help you understand the SharpEngine and provide code templates for your projects
  • Breaking change: Renamed StandardMaterial.Alpha property to Opacity

 

Version 0.9.0-beta1

  • first public beta version