Ab3d.DXEngine versions history
See related blog posts
to get additional information about development history of the Ab3d.DXEngine rendering engine
- Added support for multi-threaded rendering. See remarks in DXScene.MaxBackgroundThreadsCount for more info.
- Added DXScene.MaxBackgroundThreadsCount, RenderObjectsRenderingStep.UseMultiThreading, RenderObjectsRenderingStep.MinObjectsPerThread and RenderingQueue.UseMultiThreading properties.
- Added BackgroundThreadsManager class that is set to the DXDevice object and can be also set to the DXScene object.
- The following classes are now thread safe an can be safely called from any thread: Ab3d.DirectX.EffectsManager, WpfCamera (after calling Update from UI thread)
- RenderingStatistics is now thread safe. To support that the draw calls need to be reported by calling new ReportDrawCall or ReportDrawCalls (the DrawCallsCount and DrawnIndicesCount properties do not have setters any more). State changes from background ContextStatesManager can now be reported by calling the new ReportStateChanges method.
- Improved the code that waits until GPU finishes rendering the frame (used for DirectXImage PresentationType) to decrease the wait time.
- Added RenderTextureRenderingStep class. It can be used to render a specified ShaderResourceView to a part of the scene. It also contains a static RenderTexture method to render the specified texture to the current rendering context.
- Fixed Bounds.TransformAllCorners method.
- Fixed calculating Bounds for MeshObjectNode when MeshObjectNode has a Transformation set.
- Moved OriginalObject field from RenderablePrimitive to RenderablePrimitiveBase. This makes it easier and faster to check the OriginalObject in the RenderObjectsRenderingStep.FilterObjectsFunction delegate.
- Added OverrideModelColor property to SolidColorEffect to render all objects with the color defined by the OverrideModelColor and not be model's material.
- Added OutlineThickness property to SolidColorEffect to expand the rendered objects in the direction of object's normal.
- The BeforeRunningStep and AfterRunningStep event handlers on classes derived from RenderingStepBase are changed from simple EventHandler to RenderingEventHandler so that an instance of RenderingContext is passed with the event args.
- Added SeparableKernelPostProcess as an abstract base class for post processes that use separable kernel filter - for example GaussianBlurPostProcess.
- Improved SimpleBlurPostProcess so that allows using FilterWidth values set to 0 - in this case the original image is copied without any blur. Also GaussianBlurPostProcess now allows using BlurStandardDeviation set to 0.
- Added SoberEdgeDetectionPostProcess post process to find edges with using a sobel algorithm.
- Added ExpandPostProcess post process that can be used to expand rendered objects.
- Improved caching texture files that are created from ImageBrush and where relative Uri or FileStream was used to create the BitmapImage (before only textures from absolute uri were cached).
- Prevented problems with showing or hiding 3D lines that could sometimes happen when IsVisible value is changed.
- Prevented throwing an exception that could be thrown in some cases when hit testing with using OctTree.
- Fixed hiding 3D lines with setting IsVisible to false under some circumstances (using BeginInit, EndInit and showing the line before the next frame is rendered).
- Fixed calculating Bounds for WpfOptimizedModel3DGroupNode (created from frozen Model3DGroup) when using transformations.
- When using hit testing on a frozen Model3DGroup (with using WpfOptimizedModel3DGroupNode) the DXRayHitTestResult.TriangleIndex now provides the triangle index from the hit MeshGeometry3D and not from the index of the combined meshed.
- Fixed multiple calls to GetAllHitObjects method in the same frame when OctTree was used.
- Fixed GetAllHitObjects method to get correct results when using InstancedModelGroupVisual3D.
- Renamed InstancedMeshGeometry3DNode.StartInstanceLocation property to StartInstanceIndex
- Added GetInstanceData and GetInstanceBuffer methods to InstancedMeshGeometry3DNode. The later allows getting instance buffer that can be then used by another InstancedMeshGeometry3DNode that is using different StartInstanceIndex and InstanceCount values to render different range of instances in a very efficient way.
- Improved changing StartInstanceIndex and InstanceCount in InstancedMeshGeometry3DNode
- In InstancedMeshGeometry3DNode fixed setting InstancesCount and StartInstanceIndex when SetInstanceBuffer method was used to initialize instances (instead of calling SetInstanceData).
- Added OverrideEffect property to InstancedMeshGeometryVisual3D. This allows using custom effect to render instanced objects.
- Added support for rendering textured instanced objects without any lighting calculations to improve performance (this can be enabled with setting IsSolidColorMaterial property on InstancedMeshGeometryVisual3D to true).
- Added new DXEngineAdvanced/OutlinesSample that shows how to render object outlines that are visible through other 3D objects.
- Added new DXEngineAdvanced/AdvancedInstanceRendering sample that shows how to use StartInstanceIndex and InstancesCount properties and how to override the instance color information without changing instance data.
Improvements in DiagnosticsWindow (defined in Ab3d.DirectX.Client.Diagnostics project). Also used in DXEngineSnoop tool:
- Greatly reduced time to show the DiagnosticsWindow by disabling showing CPU performance counters on window open (creating PerformanceCounters can take very long time). It is possible to enable CPU timers by a new CheckBox. This change is done in the Ab3d.DirectX.Client.Diagnostics project (available with full source code). It is still possible to show CPU timers with a checking a CheckBox in the menu.
- Improved finding the correct Ab3d.PowerToys camera (that with the correct TargetViewport3D value) when there are multiple cameras defined in the scene.
- Added option to show live camera information instead of rendering statistics.
- Added TextureBitmap property to the InstancedMeshGeometryVisual3D class. This adds support for rendering 3D instanced objects with textures. Note to set UseAlphaBlend to true when parts of the textures are transparent (in this case the instances also need to be sorted so that those farther away from camera are rendered first).
- Added support for SubMeshes in MeshObjectNode (SubMeshes are defined by the SimpleMesh or any other class that is derived from the MeshBase class). Using SubMeshes allows having the same vertex and index buffer and render parts of triangle indices with different materials. It is also possible to change the SubMesh's StartIndexLocation and IndexCount to change what parts of the mesh are rendered and with which material (you need to call MeshObjectNode.UpdateMesh after that change).
- Added UpdateMaterial method to MeshObjectNode. The method needs to be called after a material in MeshObjectNode or SubMeshes is changed.
- Added GammaCorrectionPostProcess to apply a custom gamma correction value to the final image. Usually it is not needed to apply any gamma correction, but this can be done to achieve some special effects.
- Added a highly optimized CalculateBoundingBox method to the Bounds class. The method calculates BoundingBox from an array of PositionNormalTexture, PositionNormal or Vector3 elements.
- Added new constructors to OctTree class that do not require a BoundingBox as a parameter (in this case and in case a BoundingBox is empty, it is calculated in the constructor).
- Fixed GetRayFromCamera to correctly get the ray when DpiScale is used.
- Fixed setting DXScene.DpiScaleX and DpiScaleY when DXViewportView is loaded without having its size set (ActualWidth, ActualHeight).
- Optimized performance critical code in hit testing (with heavy inlining some parts work more than 3 times faster).
- Prevented slow hit testing in DXEngine when the specified ray is not valid (has NaN or Infinity values).
Major new features:
- Added support for Physically Based Rendering (PRB) that support base color, metalness, roughness, emissive map, normal map and ambient occlusion textures.
- Greatly improved performance when a value of IsVisible property in Ab3d.PowerToys Visual3D objects is changed. In the previous version all DirectX resources were disposed when the object was hidden (IsVisible was set to false). Now the resources stay in memory so when IsVisible is set back to true the object can be immediately shown without any resource creation or SceneNode objects changes. This can be disabled with setting static WpfModelVisual3DNode.OptimizeWpfIsVisibleChangeProcessing property to false.
- Using the latest version of SharpDX v4.2 instead of v4.0.1.
Improved Hit testing:
- Added hit testing support that is build into Ab3d.DXEngine and is much faster then WPF hit testing that was used before. For maximal hit testing performance an OctTree data structure is used for complex mesh objects. The new hit testing also supports hit testing of SceneNodes that are not created from WPF 3D objects (for example MeshSceneNode).
- Added GetClosestHitObject, GetAllHitObjects, GetHitPosition and GetHitSceneNodeBounds methods to DXViewportView.
- Added HitTester class that can do simple hit testing on meshes that are defined from various vertex buffer formats.
- Added OctTree class - it can be used to organize triangles in oct-tree structure that allows very fast ray intersection.
- Added CreateOctTree to DXMeshGeometry3D to manually create OctTree from a MeshGeometry3D.
- Added GetRayFromCamera and GetRayFromNearPlane to DXScene.
- Added HitTestingTimeMs property to RenderingStatistics class - assigned to DXScene.Statistics property (when DXDiagnostics.IsCollectingStatistics is true).
Other New features and improvements:
- Added support to render shadows from instanced objects and added a possibility to render shadows from 3D lines (they still cannot receive shadow).
- Greatly reduced effect of "light bleeding" at the edges of the scene 3D objects (objects that have edges with empty scene).
- Redesigned the custom rendering steps (DXScene.RenderSteps) that are needed to render shadows. In the previous version the rendering steps were dynamically added or removed from the PrepareVarianceShadowMappingRenderingStep rendering step. Now all the required rendering steps are added when the user initializes shadow rendering with calling DXScene.InitializeShadowRendering.
- Added IShadowCastingNode and IShadowReceivingNode interfaces that allow specifying if SceneNode casts and receives shadow (another way to filter shadow objects is to set FilterObjectsFunction in the RenderObjectsRenderingStep that are used to render shadows).
- Improved PixelsVisual3D to support per-pixel color and per-pixel size (in the previous version only one color and size was used for all pixels). Also pixels can be quickly hidden with setting pixel's alpha color value to 0 or size to 0. To support that a new PixelColors array and a new PixelSizes array were added to PixelsVisual3D and PixelMaterial objects.
- Improved VertexColorEffect so that it can be also used with PointLights, SpotLights and more than 3 DirectionalLights.
- Added Ab3d.DirectX.OnePixelTexture class that can be used to simply create 1x1 textures and change its color.
- Added IsSupportedFile and IsSupportedFileExtension methods to Ab3d.DirectX.TextureLoader.
- Added IsBackFaceMaterial property to MeshObjectNode.
- Improved performance in cases when MeshGeometry is changed (Update time is significantly shortened).
- Added IsSolidColorMaterial property to InstancedMeshGeometryVisual3D and InstancedMeshGeometry3DNode. When set to true, the instanced objects are rendered with a single color without any shading that is based on lighting calculations.
- Added ForEachChildNode method to the SceneNode class. The method calls the childNodeFoundAction for each SceneNode of type T in the hierarchy of the child SceneNodes starting at this SceneNode's ChildNodes.
- Added GetTotalTransformMatrix method to SceneNode class.
- Added extension methods to SceneNode: GetGeometryModel3D, GetModel3D, GetModelVisual3D and GetVisual3D to get WPF objects from SceneNodes.
- Added SceneNode.WorldBounds field that defines the bounding box of the SceneNode in world coordinate system.
- Renamed SceneNode.isWorldMatrixIdentity and SceneNode.worldMatrix fields into SceneNode.IsWorldMatrixIdentity and SceneNode.WorldMatrix and changed their visibility from protected to public.
- Improved SceneNode description text to provide better information about BoundingBox for small objects (used by SceneNode.ToString, SceneNode.GetDetailsText and with DXScene.DumpSceneNodes method).
- Added statistics about original objects used to create SceneNodes to DXScene.DumpSceneNodes.
- Renamed Flags field in RenderablePrimitiveBase to MaterialFlags.
- Changed RenderablePrimitiveBase to store all Boolean settings in a new RenderingFlags filed and have many properties to get or set them: IsHidden, IsFrontCounterClockwise, IsBackFaceMaterial, IsWorldMatrixIdentity, CastShadow, ReceiveShadow.
- Added IsCheckingChildrenForChanges to WpfModel3DGroupNode to be able to prevent checking for children changes - when set to false and when there are no changes in the child models, this improves the performance of the DXScene.Update method.
- Added UpdatePositions method to ScreenSpaceLineNode to simplify updating line positions.
- Added CreateDynamicVertexBuffer property to ScreenSpaceLineMesh.
- Added CreateDynamicVertexBuffer property to PixelsVisual3D.
- Improved performance of PixelsVisual3D.UpdatePositions.
- Added GetVertexAndIndexBuffers method to DXMeshGeometry3D.
- Added BaseDXVisual3D class as a base class for all Visual3D objects in DXEngine (InstancedMeshGeometryVisual3D, InstancedModelGroupVisual3D, PixelsVisual3D and SceneNodeVisual3D). The class provides a standard way of disposing objects, getting bounding box and providing information if its content is shown when WPF 3D rendering is used. BaseDXVisual3D also has IsVisible property that allows fast IsVisible processing.
- Added static DXDiagnostics.CurrentDXView property that can be set to the current DXViewportView (or any other class derived from DXView). This allows DXEngineSnoop (DXEngine diagnostics tool) to easily find DXViewportView. When using WinForms applications this is the only way to set DXViewportView. The CurrentDXView property internally uses WeakReference so no strong link is created from a static field.
- Improved performance with starting rendering instance objects before other objects are rendered. This way GPU has more time to render instanced objects.
- Prevented "Null reference exception" when MeshGeometry3D.Positions is set to null.
- Prevented throwing an exception in ScreenSpaceLineNode when it is created from a polyline where all positions have the same x, y and z values.
- Allowed setting null to InstancesData on InstancedMeshGeometryVisual3D and InstancedModelGroupVisual3D.
- Fixed removing objects derived from SceneNodeVisual3D (for example PixelsVisual3D) from the scene and then adding them back.
- Improved OptimizedPointMesh to prevent throwing an exception when the number of positions is smaller than the number of segments.
- Improved WinFormsMouseCameraController so that it can be created from any ContainerControl - SharpDX.Windows.RenderForm or SharpDX.Windows.RenderControl.
- DXEngineSnoop can now display diagnostics information for DXViewportView used in WinForms applications if the static DXDiagnostics.CurrentDXView property is set to the used DXViewportView.
- Added sample on how to use Ab3d.DXEngine with SharpDX.Windows.RenderForm.
- Added a few samples that demonstrate PBR rendering. The samples also contain many helper classes that can be used for assigning PBR materials and for defining their properties.
- Added InstancedAnimatedArrows and "Instance world matrix samples" - later shows how to calculate transformation matrices to transform some basic 3D meshes to a desired size, position and orientation.
- Added DXSceneHitTester
- Added ShadedPointCloudSample with full hlsl source code - same as optimized point cloud but with points that are shaded according to lighting calculations.
- Added ScreenSpaceLineNodeSample that shows how to create 3D lines with low-level ScreenSpaceLineNode and update the positions of the lines. This greatly reduces initialization and update time.
- Added OptimizedTubePathSample that shows how to create optimized tube paths.
- Renamed SceneNode.IsActive property to IsVisible to better describe its purpose.
- Renamed RenderableInstancedObjectsNode into RenderableInstancedObjectsPrimitive (this object was not a SceneNode but a class derived from RenderablePrimitive that is used in RenderingQueues).
- When WPF hit testing is used (using VisualTreeHelper.HitTest), then the hit object can be a Visual3D that has IsVisible property set to false and is not visible on the scene. This can happen because DXEngine optimizes handling hidden objects (IsVisible = false) - hidden objects are not removed from WPF objects tree but are just skipped when rendering. To solve this problem use hit testing from DXEngine, EventManager3D that can handle such cases or in your hit testing code check if hit Visual3D is derived from BaseVisual3D and has IsVisible set to false - in this case continue hit testing.
Version 2.3.6564 hotfix
- Fixed using actual system DPI scale in DXViewportView.
- Fixed using DPI scale when rendering hardware accelerated PolyLines.
- Improved using dpi values in RenderToBitmap method.
- Fixed using Attenuation values when using PointLight.
- Implemented rendering materials with diffuse, normal (bump) and specular texture. Note: does not work yet with shadow rendering.
- Added MultiMapMaterial that can be used to render material with diffuse, normal, specular and environment reflection texture.
- Added DXAttributeType.MeshTangentArray that can be set to the MeshGeometry3D with SetDXAttribute extension method and allows attaching tangent array to MeshGeometry3D
- Added Ab3d.DirectX.Utilities.MeshUtils.CalculateTangentVectors method (can be used calculate tangents on the CPU for objects that are rendered with normal / bump map)
- Added support for rendering 3D lines with custom pattern. This allows rendering dashed and dotted lines (only for disconnected 3D lines; not for poly-lines):
- Added ILinePattern interface with properties that define line pattern: LinePattern, LinePatternScale and LinePatternOffset.
- Implemented ILinePattern with LineMaterial object.
- Added LinePattern, LinePatternScale and LinePatternOffset to DXAttributeType. This way it is possible to specify line pattern parameters on LineVisual3D objects with using SetDXAttribute extension method.
- Added support for rendering connected 3D lines (PolyLineVisual3D, etc.) with full hardware acceleration. Note that lines with arrows are not rendered with full hardware acceleration.
- Changed default value of DXScene.RenderConnectedLinesAsDisconnectedLinesThicknessLimit from 3 to 0 - so connected lines that are thinner than 3 are not rendered as disconnected lines by default.
- Added IPolyLine interface with IsPolyLine and MiterLimit properties.
- Updated LineMaterial to implement IPolyLine interface.
- Improved time and memory consumption when reading textures.
- Added Ab3d.DirectX.TextureLoader.LoadShaderResourceView method that can be used to load textures from standard image files (png, jpg, tiff, gif, bmp) and from DDS files.
- Added Ab3d.DirectX.TextureLoader.CreateShaderResourceView method that can create ShaderResourceView from texture stored in byte array (for cases when bitmap is read from a stream).
- Added static bool LoadDdsIfAvailable field to WpfMaterial. When LoadDdsIfAvailable us true, then the texture loader will check if there is a DDS file with the same name but dds file extension. In this case the DDS file will be loaded. Using dds files can greatly improve required load time and memory usage.
- Added static CreateTexture2D method to WpfMaterial that creates a ShaderResourceView from the specified WPF BitmapSource.
- Created OptimizedPointMesh class that can be used to show point cloud and can dynamically reduce the number of rendered positions to improve rendering performance.
- Make CalculateCameraPlanes on DXScene public. The method calculates zNear and zFar values for the specified camera.
- Added ParentNodeChanged and ResourcesInitialized events to SceneNode.
- Added ForegroundRenderingQueue to DXScene. This is a new rendering queue that is rendered after GeometryRenderingQueue but before TransparentRenderingQueue.
- Set default values of ReadZBuffer and WriteZBuffer properties on PixelMaterial to true.
- Removed ScreenSpaceLineNode constructors that takes both isPolyLine and LineMaterial as parameters - IsPolyLine values is now provided only by LineMaterial parameter (when it implements the IPolyLine interface).
- Added CustomRenderableNode and CustomRenderablePrimitive. Those two SceneNode classes simplify using custom rendering logic to render 3D objects with providing a callback method that is called to render the 3D object (used can call Draw calls on DirectX device in the callback method).
- Added DXAttribute OnSceneNodeCreatedAction. Its value can be set to a callback method defined by an Action<SceneNode>. The callback method is called after a SceneNode is created from the WPF object.
- Added DXAttribute OnDXResourcesInitializedAction. Its value can be set to a callback method defined by an Action<object>. The callback method is called after the specified DXEngine's resource is initialized and DirectX resource objects are created.
- Fixed problems when color from PixelEffect is used to render 3D lines instead of the color defined in the LineColor property (and vice-versa).
- Added dpiX and dpiY parameters to DXView.RenderToBitmap method (they default to 96 but can be changed by the user).
- Renamed Ab3d.DirectX.ContexStatesManager class to Ab3d.DirectX.ContextStatesManager to fix spelling of the class.
Apart from samples that demonstrate new functionality the following samples are also added or improved:
- Added BackgroundObjectsCreation sample that shows how it is possible to initialize 3D objects on the background thread so that when they are shown the UI thread is not blocked for a longer time.
- Added Frustum culling sample. The sample shows how to determine which 3D objects are visible in the camera view.
- Improved WinForms sample to show how to use DXViewportView in WinForms with SharpDX.RenderForm. Using DXViewportView in WinForms application allows easy conversion of samples from Ab3d.DXEngine and Ab3d.PowerToys to WinForms application.
- Added support for rendering PolygonLines with WireframeVisual3D (added to Ab3d.PowerToys v8.0)
- Fixed updating textures from RenderTargetBitmap and WriteableBitmap when they are changed.
- Added static WpfMaterial.LoadTexture2D method that creates a 2D texture from file and returns its ShaderResourceView
- Prevented reusing a disposed DXViewportView (for example if DXViewportView is disposed in Unloaded event and then loaded again)
- Added MinNearPlaneDistance and MaxFarPlaneDistance properties to DXScene - the properties can be set to have better control over the calculated near and far plane distance (for example to prevent z-fighting).
- Added basic support for rendering 3D object defined with Viewport2DVisual3D - note that because Viewport3D is not visible (from WPF's perspective), the Viewport2DVisual3D is not interactive.
- Fixed firing SceneRendered event after the scene is rendered because its size is changed.
- Improved performance of rendering 3D lines when not using geometry shader (UseGeometryShaderFor3DLines is set to false). This is done with reducing number of changed states.
- Set UseLayoutRounding to true on DXViewportView to improve sharpness when DirectX 11 image is combined with WPF objects (SnapsToDevicePixels was already set to true)
- Added VertexColorEffect and VertexColorMaterial - this adds support for rendering 3D objects with specifying color for each vertex (position).
- Added PixelEffect, PixelMaterial and PixelsVisual3D - allows rendering millions of 3D pixels.
- Added HiddenLineMaterial that can render 3D lines that are behind other 3D objects (should be hidden).
- Added RenderConnectedLinesAsDisconnectedLinesThicknessLimit property to DXScene and set its default value to 3. This will render connected 3D lines (PolyLines, LineArc, Text3D, ect.) as disconnected 3D lines and therefore provide full hardware acceleration of 3D lines when LineThickness is less or equal then 3.
- Added scaling LineThickness and PixelSize with current DPI scaling factor.
- Fixed WpfMaterial.Refresh method to update VisualBrush.
- Added CachedBitmapSize to DXAttributeType - this simplify setting the size of the rendered bitmap with calling SetDXAttribute extension method on WPF's material (instead of using RenderedBrushTextureWidth and RenderedBrushTextureHeight on WpfMaterial).
- Added RenderToBitmapOnEveryFrame property to WpfMaterial - this instructs DXEngine to render the WPF material into bitmap before each frame is rendered.
- Improved using RenderedBrushTextureWidth and RenderedBrushTextureHeight on WpfMaterial object for rendering materials with DrawingImage.
- Fixed using IsBackFaceMaterial property in InstancedMeshGeometry3DNode.
- Added rendering BackMaterial for GeometryModel3D objects rendered with InstancedModelGroupVisual3D.
- Added UseAlphaBlend property to InstancedMeshGeometry3DNode and added support for rendering semi-transparent objects in InstancedModelGroupVisual3D.
- Added "Get camera info" action to DiagnosticsWindow (and to DXEngineSnoop) to get detailed information about the camera that is currently used.
- Added a new overload of WpfMaterial.SetUsedDXMaterial method that does not take parentDXDevice as parameter (the existing method that takes parentDXDevice is marked as Obsolete).
- Fixed problems with showing and updating the 3D Scene that could sometimes occur on monitors with high DPI settings and with high UI thread usage before the first frame is rendered.
- Added protected virtual Dispose method to SceneNodeVisual3D so that derived classes can dispose their resources in the overridden Dispose method.
- Added IsDisposing to SharedDXResource (base class to most of the classes in DXEngine).
Major new features:
- Added variance shadow rendering that can render nice soft shadows for one SpotLight or one DirectionalLight.
- Greatly improved working with frozen WPF objects. Before, DXEngine's objects created from frozen WPF objects (for example MeshGeometry3D or Material) were not reused when they were used by multiple Model3D objects. The new version caches the DXEngine's objects created from frozen WPF objects so they can be used by multiple DXEngine’s SceneNodes.
- Changed references to SharpDX libraries to use later versions of the library. The .Net 4.5 build of DXEngine now uses the latest version of SharpDX - version 3.1 (before 2.6.3 version was used); the .Net 4.0 build of DXEngine now uses SharpDX version 2.6.3 that support feature level 11.1 (before 11.0 was the last version that was supported by SharpDX). The 2.6.3 is the latest version that is supported on .Net 4.0.
- Added DXEngineSnoop diagnostics utility and full source code of Ab3d.DirectX.Client.Diagnostics project
- Various performance and stability improvements.
Other new features and changes:
- Improved performance when DXViewportView is resized.
- Improved "Complete rendering step" performance for scenes with many SceneNodes - especially for scenes with many BoxVisual3D or similar objects from Ab3d.PowerToys library.
- Added ReadZBuffer to DXAttributeType enum so you can call SetDXAttribute on any WPF 3D line Visual3D or WireframeVisual3D object. This allows rendering 3D lines with disabled Z-buffer reading (rendering 3D lines that are visible thorough other 3D objects).
- Added ReadZBuffer property to WpfWireframeVisual3DNode
- Improved performance of updating instance data for object instancing: Added new override of Update method that takes startIndex, count and updateBounds parameters to InstancedMeshGeometryVisual3D and InstancedModelGroupVisual3D - this can improve performance by updating data for only a few instances and can skip updating bounding box (use only when the instanced objects do not exceed the bounds of the whole scene)
- Added UseDynamicInstanceBuffer property to InstancedMeshGeometryVisual3D, InstancedModelGroupVisual3D, InstancedMeshGeometry3DNode and InstancedModel3DGroupNode - this allows using dynamic instance buffer (instead of immutable) that gives better performance for cases when the instance data are changed very often (for example once per frame).
- Added AfterUpdated event to DXScene - the event is triggered after the SceneNode objects have been updated and before the decision is made to render the next frame or not (subscriber can change the).
- When using RenderToBitmap and the DXViewportView is not shown on the screen, it is not needed to manually call Update method before each RenderToBitmap call.
- Prevented memory leak in RenderToBitmap and DXScene.CreateCustomRenderingContext methods.
- Added DisposeWithDXDevice method to DXDevice - it adds the specified disposable object to the list of objects that will be disposed when this DXDevice will be disposed.
- Added BeforeDeviceDisposed event to DXDevice - occurs just before the DirectX device will be disposed and after all other resources have been already disposed.
- Added ClearWpfObjects and AutomaticallyClearWpfObjectsAfterInitialization to WpfOptimizedModel3DGroupNode - this allows freeing the memory with data taken by MeshGeometry3D objects (other references to WPF objects also needs to be removed)
- Added ArrayStride to SimpleMesh to allow creating SimpleMesh from base types like float and byte (and not only from PositionNormalTexture and other structs).
- Improved handling of exceptions that happen during resizing - in case of sharing DirectX 11 rendered scene with WPF's DirectX 9 and if the error happens with resizing the DirectX 9 texture, DXEngine falls back to copying DirectX 11 rendered scene to main memory and using WritableBitmap to show it in WPF.
- Added ChildNodesChanged event to SceneNode
- Because of a new DXDevice based caching, the following static methods now require a new parentDXDevice parameter: Ab3d.DirectX.DXWireframeHelper.SetLineMaterial, Ab3d.DirectX.DXWireframeHelper.ClearLineMaterial, Ab3d.DirectX.Materials.WpfMaterial.SetUsedDXMaterial
- Added calling Loaded and Unloaded routed events on Viewport3D when it is used inside DXViewportView (because Viewport3D is not part of WPF logical tree, the Loaded and Unloaded events would never be raised; to make those two events work as in WPF 3D rendering, the DXViewportView raises it manually)
- Added DXDiagnostics.ReportLiveDeviceObjectsOnDispose property to allow showing a report of live objects in Visual Studio Output window when the DXDevice is disposed.
- Changed default value of preferedMultisampling paremeter for RenderToBitmap method to -1. This value means that the multisampling count from DXScene will be used.
- Fixed using RenderToBitmap when AnaglyphVirtualRealityProvider was used and when preferedMultisampling parameter in RenderToBitmap was different than DXScene's MultisampleCount.
New features and changes for advanced users:
- Added SceneNodeVisual3D that can show DXEngine's SceneNodes and can be added to WPF's Viewport3D Children. This allows creating SceneNodes without WPF Model3D or Visual3D objects.
- Added a new overload of RegisterBackBufferMapping method in the RenderingContext class. The new overload takes only a delegate and does not require to create a staging buffer and to pass it as a parameter. This allows very easy capture of next rendered frame - the next rendered frame is passes as a mapped staging buffer to the specified delegate.
- Added RenderingStepsGroup that can be used to group a few rendering steps together (by default the PreparePostProcessing and RenderPostProcessing rendering steps are grouped into a new RenderPostProcessingGroup rendering step)
- Added static GetLastRenderingStep, GetFirstRenderingStep and IsRenderingStepConnected methods to RenderingStepBase.
- Added ForEach to RenderingStepsList.
- Added ImmediateContext to DXDevice to simplify accessing ImmediateContext (before it was possible to get it from Device but this could lead to an undisposed reference).
- Added CustomRenderingQueue to DXAttributeType enum to easily set the CustomRenderingQueue to any WPF 3D object.
- Added CustomRenderingQueue property to SceneNode.
- Changed DXDevice.StandardBufferFormat and DXDevice.StandardDepthStencilFormat fields from const to static so that it is possible to change the default back buffer format (B8G8R8A8_UNorm - required by WPF) and default depth stencil format (D32_Float).
- Added new override of DXScene.CreateCustomRenderingContext method that also takes custom format and can be used to create rendering context with some other back buffer format.
- Added a new CustomRenderingContext class that is derived from RenderingContext and also allows changing some additional context data line FinalBackBuffer and FrameNumber.
- Added CreateCustomRenderingContext method to DXScene that takes existing back buffer, its render target view and depthStencilView to create RenderingContext that can be later used in RenderScene method.
- Added new overload of CreateCustomRenderingContext that also takes virtualRealityProvider as parameter.
- All overloads of the CreateCustomRenderingContext method in DXScene now return CustomRenderingContext class instead of its base class (RenderingContext).
- Changed constructor of RenderingContext to take SwapChain as parameter - SwapChain can now be set only from constructor because the protected SetFinalBackBufferAndSwapChain method was replaced by a SetFinalBackBuffer method.
- Added UnregisterAllBackBufferMappings to RenderingContext to unregister all registered delegates (this simplifies the unregister process; before the only way to unregister was to use UnregisterBackBufferMapping that required the delegate as parameter and this prevented defining delegate as an anonymous methods)
- Removed MaterialEffect property from WpfGeometryModel3DNode - if you were using it, then create a new material and override the Effect on it instead.
- Changed SceneNode class with converting the following pubic methods from virtual to non-virtual: AddChild, InsertChild, RemoveChild, RemoveChildAt, ReplaceChild, ClearChildNodes (to prevent virtual call in constructor; to get notified about the change of ChildNodes you can now use the new ChildNodesChanged event instead of overriding the Add or other methods)
- TextureCache.GetTextureFromFile method does not load texture file any more in case the file was not loaded and cached before (reason: ShaderResourceView.FromFile is deprecated for Windows 8 and not used in SharpDX v3+ any more - https://msdn.microsoft.com/en-us/library/windows/desktop/ff476283(v=vs.85).aspx)
- Removed DXCubeMap constructor that takes ddsFileName as parameter. If you were using dds file for cube map, create the ShaderResourceView from dds by yourself and set the created ShaderResourceView in the call to SetDXAttribute with DXAttributeType.Material_EnvironmentMap (reason: ShaderResourceView.FromFile is deprecated for Windows 8 and not used in SharpDX v3+ any more)
- Moved IsD3DPerformanceEventGroupingEnabled property from DXScene to DXDiagnostics.
- Added overload of Add method on Bounds class that also takes Vector3 object and adds the specified position to the current bounds.
- Added CalculateBounds to SimpleMesh and automatic bounds calculations when the vertext buffer is created from PositionNormalTexture or PositionNormal structs.
- Improved classes derived from MeshBase (GeometryMesh, DXMeshGeometry3D, DXMultiMeshGeometry3D, ScreenSpaceLineMesh and SimpleMesh) to correctly set their Bounds and to have similar public method to recreate mesh.
- Prevented camera problems when one DXDevice was used for multiple DXScenes.
- Fixed showing WireframeVisual3D when its Transform is set.
- Added support for semi-transparent SolidModelColor in WireframeVisual3D.
- Fixed rendering 3D lines in RenderToBitmap method when the parent DXViewportView is not shown.
- Fixed setting Viewport3D property on DXViewportView to null.
- Fixed problems with not showing the content of DXSceneView that could occur sometimes when DirectXImage presentation type was used and the DXSceneView was recreated (previously the content was updated after resize of DXViewportView)
- Fixed not showing 3D image that occur sometimes for computers with multiple graphics cards (usually laptops with dedicated graphics card) when DirectXOverlay PresentationType was used on Windows 10.
- Fixed not updating 3D image when DXView was loaded without a valid size (for example after a breakpoint in VS)
- Improved caching Textures and prevented using a lot of memory for textures cache that could occur because of too little cache cleanups.
- Fixed rendering textures with ImageBrush Opacity set to values lower than 1 for scenes with 3 or less directional lights.
- Fixed setting DXViewportView.UseViewport3DCamera property in code.
- Fixed calculating camera positon from MatrixCamera. Also added SetCameraPosition method to prevent calling invert on view matrix when GetCameraPosition is called.
- Added showing diagnostics window from main DXEngine samples project
- Added Shadow rendering sample
- Added BackgroundRenderingSample
- Added ReadZBuffer sample
- Added "Multiple scene views" sample - how to use the same DXDevice to share resources with multiple DXViewportViews
- Added sample on how to manually create SceneNodes
- Added sample on how to use custom fog shader that is created with Shader factory sample project.
- Improved PolyLines sample and Performance test
- Added sample of global exception handler that gets detailed system information when DXEngine or SharpDX exception happens
- Added WinForms sample project that shows 3 different ways on how to use DXEngine in WinForms application.
- Support for virtual reality with split-screen and anglyph rendering.
- Added UltraQualityHardwareRendering to GraphicsProfile that uses supersampling instead of multisampling.
- Added support for RemoteDesktop for DirectXImage PresentationType - this works only in .Net 45 build of Ab3d.DXEngine and for .Net 4.5 or later target framework.
- Simplified setting line depth bias with SetDXAttribute(DXAttributeType.LineDepthBias, depthBias) method - this can prevent z-fighting when rendering 3D lines on top of solid objects.
- Added Ab3d.DirectX.DXDiagnostics.CaptureNextFrame and IsCaptureFrameSupported methods to programmatically captures the next rendered frame with Visual Studio Graphics Debugging (this also allows capturing frames for DirectXImage PresentationType).
- Added support for Visibility property on objects derived from UIElement3D .
- Added IsMaterialSortingEnabled property to DXScene to control if sorting objects by their materials is enabled. Enabling sorting improves performance because objects with the same materials are rendered one after another (this reduces the required DirectX state changes), but when you want to have determined order of rendering you can disable the sorting.
- Improved automatically updating WireframeVisual3D when LineThickenss or LineColor is changed.
- Improved hardware rendering of 3D lines - depth problems could occur when long lines are crossing the near plane (one end of the line is behind the line).
- Added Clone method to GraphicsProfile to simplify creating your custom graphic profiles that are based on default graphics profiles.
- Added ExecutePixelShaderPerSample to DXScene and to GraphicsProfile - this allows turning multisampling into supersampling for better shader quality (used by new UltraQualityHardwareRendering).
- Prevented throwing exception when ImageBrush uses a texture with relative Uri.
- Fixed using EmissiveMaterial properties on materials that do not have DiffuseMaterial (under some circumstances).
- Fixed using Opacity or alpha value for EmissiveMaterial.
- Changed some properties and methods in RenderingContext class and in some RenderingSteps - if you are an advanced DXEngine user and use custom rendering steps, you can contact us to get a full list of changes.
- Greatly improved performance of WireframeVisual3D when the 3D objects showing with WireframeVisual3D are animated with changing transformations.
- Prevented black edges that sometimes appeared when showing textures.
- Fixed rendering transparent objects that were not visible sometimes because of incorrect object order.
- Fixed rendering specular highlight for directional light shader.
- Fixed getting camera's view and projection matrices for left handed coordinate system (when IsRightHandedCoordinateSystem is false).
- Added support for rendering reflections with using EnvironmentalMaps.
- Added support for ReflectionMaps.
- Added support for rendering more than 16 lights (+ ambient light) with using multi-pass rendering.
- Added support for Transform on InstancedMeshGeometryVisual3D.
- Added InstancedModelGroupVisual3D that can render many instances of all 3D models defined in the Model3DGroup.
- Added GetHitInstanceIndex method to InstanceData to get an index of hit instance.
- Fixed showing transparent objects in some cases.
- Added TextureBlendState to IDiffuseTextureMaterial interface.
- Fixed rendering textures from files that use different DPI settings.
- Added extension methods that simplify adding additional DXEngine attributes to the existing WPF's objects (SetDXAttribute, GetDXAttributeCollection, GetDXAttribute, IsDXAttributeSet, ClearDXAttribute, GetDXAttributeOrDefault). This is currently used to specify the EnvironmentalMap and ReflectionMap.
- Prevented memory leak when 3D model that was shown inside WireframeVisual3D was changed (further performance improvements in this case will follow).
- Prevented rendering strange 3D lines that sometimes occur when the 3D lines were completely behind the camera.
- Fixed rendering transparent 3D lines.
- Fixed rendering transparent objects with emissive materials.
- Some other smaller bug fixes and improvements.
- BREAKING CHANGE: Renamed InstancedGeometryVisual3D into InstancedMeshGeometryVisual3D - the reason is that this Visual3D uses only one MeshGeometry3D to render. This is more exact description of what the Visual3D does - the Geometry is too broad term.
- Fixed using Binding on objects inside DXViewportView.
- Fixed rendering 3D lines with hardware accelerating geometry shader (instead of Ab3d.PowerToys's LinesUpdater).
- Improved support for transformations on TileBrush (used on ImageBrush, VisualBrush and DrawingBrush).
- Added IsWpfHitTestVisible to InstancedGeometryVisual3D - this allows WPF hit testing of instanced geometry (though this increased initialization time because WPF's GeometryModel3D objects needs to be created).
- Improved InstancedGeometryVisual3D so that it is not needed any more to call Update method when the InstancesData is set for the first time. Also fixed problems when the objects were not shown if Update was called before the InstancedGeometryVisual3D was added to Visual tree.
- Improved performance with moving some matrix calculations to vertex shader.
- Added support for rendering WPF's UIElement3D objects. NOTE: WpfUIElement3DNode can only show 3D models but does not support the input events on the UIElement3D (MouseEnter, MouseMove, etc.). Those events cannot be supported because Viewport3D control is not visible and does not provide the events to the UIElement3D.
- Greatly improved Update method call performance when many Visual3D objects from Ab3d.PowerToys are used (for example BoxVisual3D objects).
- Added IsCheckingChildrenForChanges field to WpfModelVisual3DNode that can be used to skip checking ModelVisual3D's Childen collection and improve Update performance.
- Added IsCheckingChildrenForChangesDefaultValue static field to WpfModelVisual3DNode - used to set the default value of the IsCheckingChildrenForChanges field.
- Fixed problems where wrong image was shown when multiple DrawingImage brushes or VisualBrshes were used.
- Prevented throwing exception when unsupported type of Visual3D (for example UIElement3D) or Model3D was used in the scene.
- Added Refresh method to Ab3d.DirectX.Material and its derived classes. This allows user to manually update the materials properties and its resources (textures are regenerated).
- Fixed hit testing on some Viewport3D objects (usually when the Viewport3D was removed from visual tree and then added to DXViewportView).
- Fixed using IsAutomaticallyUpdatingDXScene when the DXScene was created after the IsAutomaticallyUpdatingDXScene property was set.