Ab3d.DXEngine versions history

 

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

 

Version 4.3

  • Added CreateDynamicVertexBuffer to DXAttributeType enum. This attribute can be set to a GeometryModel3D object. When set to true, then a dynamic vertex buffer will be created. This can be used when you change the Positions, Normals or TextureCoordinates very often (and when count of position is the same). When using a dynamic vertex buffer, the existing vertex buffer is reused when updating the data; otherwise the existing vertex buffer is disposed and a new vertex buffer is created - this can lead to GPU memory fragmentation. When this attribute is set to false, this prevents automatic usage of dynamic vertex buffer after the MeshGeometry3D has changed a few times.
  • Improved using WireframeVisual3D in DXEngine when the original Model3D is using PBR material (PhysicallyBasedMaterial).
  • Fixed rendering WireframeVisual3D when it was showing solid model and when initially IsVisible was set to false and later set to true.
  • Fixed showing InstancedModelGroupVisual3D if it is initially hidden and later IsVisible is set to true.
  • Solved an issue that can prevent updating the rendered scene on the screen if after a change of the 3D scene the the RenderToBitmap method is called before the 3D scene is rendered to the screen.
  • Prevented rendering 3D scene with fuzzy edges that may appear under some rare circumstances (introduced by the previous version when trying to improve line sharpness).
  • Fixed setting DXAttributes on 3D lines that are created by Ab3d.Models.Line3DFactory and Ab3d.Models.WireframeFactory.
  • Fixed rendering environment map that is set by using Material_EnvironmentMap DXAttribute (broken in version 4.2.7655).
  • Fixed removing a disposed SceneNode from its parent.
  • Reduced the number of created objects by creating less GCHandle.Alloc objects.
  • Prevented throwing ArgumentOutOfRangeException in MeshUtils.CalculateNormals and in HitTester.HitTest methods in some cases when MeshGeometry3D.TriangleIndices count is not divisible by 3.
  • Prevented resetting static OptimizeWpfIsVisibleChangeProcessing and IsPreservingHiddenObjectsInMemory fields in WpfModelVisual3DNode to true.
  • Fixed sorting transparent objects that are created by MeshObjectNode and have a custom transformation set.

Version 4.2.7697 (hotfix)

  • Fixed getting hit positions when calling DXScene.GetAllHitObjects method and when OctTree structure is used. In previous version sometimes not all hit positions were returned.
  • Added public CalculateNormals method to Ab3d.DirectX.Utilities.MeshUtils class (before this method was internal).

Version 4.2.7655

  • Published assembly compiled for .Net 5.0.
  • Added Ab3d.DirectX.Models.InstancedTextNode class that can render many texts, each on different position and orientation and with different color and size. This way InstancedTextNode can render millions (!!!) of characters without performance problems (on a high end graphics card). Any font can be used to render the text. Because alpha clipping is used, the text objects do not need to be sorted for transparency. Such performance is achieved with using object instancing and reusing the rendered character textures.
  • Added UseSingleObjectColor and UseInstanceObjectColor methods to InstancedMeshGeometryVisual3D. When calling the UseSingleObjectColor method, then all the instances are rendered with the color provided in the method parameter. Calling the UseInstanceObjectColor sets rendering back to use color from instance data.
  • When rendering instanced objects with a texture, the pixels in texture are now multiplied by the instance color. To preserve the colors in texture, use White instance color. You can also call UseSingleObjectColor method with white color. Multiplying color from the texture with color from each instance can be used to provide differently colored texture for each instance - to do that use texture with white color and then specify the desired texture color with the instance color.
  • Improved InstancedMeshGeometryVisual3D to support changing values of TextureAlphaClipThreshold and UseAlphaBlend after the object has already been rendered.
  • Improved InstancedMeshGeometryVisual3D to automatically set UseAlphaBlend when using the TextureBitmap (the used texture is checked and if it has any transparent pixels, the UseAlphaBlend is automatically set to true).
  • Added OverrideBlendState property to ThickLineEffect. By using OverrideBlendState property it is possible to render lines with a custom blend state - for example, always use OpaqueBlend even when alpha color is less than 1 (used for rendering object id map).
  • Improved SolidColorEffect to support AlphaClipThreshold property in the material.
  • Improved SolidColorEffect when it is used in RenderObjectsRenderingStep.OverrideEffect to render 3D lines - in case the SolidColorEffect.OverrideBlendState is set, then the same OverrideBlendState is also set to the ThickLineEffect.
  • Fixed rendering textures with SolidColorEffect.
  • Added support to render only selected lines as 1 screen pixel thick lines without anti-aliasing - this produces sharp horizontal and vertical lines that are always rendered to screen pixels. This can be enabled by setting new DXAttributes UseGeometryShaderFor3DLines and RenderAntialiased3DLines to false. There is also a new ILineRenderingTechnique interface that is implemented by LineMaterial. It defines the UseGeometryShaderFor3DLines, RenderAntialiased3DLines properties. Note that this does not work with super-sampling because there the line is rendered to a super-sampled texture as a 1 pixel thick line and when this line is down-sampled to the final resolution, this makes the line 1/2 or 1/4 thick.
  • Added DXFinalPixelSize to the DXView and DXViewSizeChangedEventArgs. This property defines the size of the shown rendering area in screen pixels (this value is WPF's size is multiplied by dpi scale but is not multiplied by super-sampling factor).
  • Updated RenderToBitmap method that takes no parameters - the method now uses the pixel size instead of size of the DXViewportView (this is scaled by DPI scale).
  • Updated extension methods so that methods that can set or get DXAttributes can now be used only for Model3D, Visual3D, Geometry3D and Material objects and not on all DependencyObject (for example in previous verison it was possible to call SetDXAttribute method on CheckBox object - this showed invalid methods by IntelliSence).
  • Fixed using assembly compiled for .Net 4.0 and .Net 4.5 in .NET Core 3.1 or .Net 5.0 application (if .Net 4.0 assembly was used in a Core 3.1 or .Net 5.0 project, a "Null reference exception" was caused by a third-party obfuscator). The version compiled for .NET Core 3.1 worked correctly.
  • Fixed rendering over Remote Desktop in version compiled for .NET Core 3.1.
  • Prevented UCEERR_RENDERTHREADFAILURE exception in WPF's render thread that could occur when the primary monitor is changed - for example, when a laptop is closed and after that an external monitor becomes the primary monitor.
  • Added UseSolidColorEffect to DXAttributeType enum. This DXAttribute can be used on any WPF material. When set to true, the specified material will be rendered with a SolidColorEffect (without any lighting). For example, this can be useful on TextBlockVisual3D.Material to prevent dimming the text when the text is not facing the light.
  • Added AddAmbientColor property to SolidColorEffect. When true (false by default), then scene's ambient light color is added to the rendered color. In the previous version, the ambient color was always added to the rendered color.
  • Improved rendering object ID bitmap (bitmap where the colors of the objects is set by the object's id - so it is possible to get the object from the colors on the bitmap). Also added a sample that demonstrates that when using a rectangular selection.
  • Added TwoDimensionalCamera class (available with full source - defined in the samples project in the Common folder). This camera can be used to show 2D lines and 2D shapes with Ab3d.DXEngine. There are 3 news samples that show how to use the camera including a 2D line editor with position snapping.

 

Version 4.1

  • Added support for super-sampling - there the scene is rendered at higher resolution and then down-sampled with using a special filter for best quality.
  • Breaking change for advanced users: Renamed ResolveMultisampledBackBufferRenderingStep into ResolveBackBufferRenderingStep. This rendering step now resolves multi-sampled back buffer (MSAA) and also down-samples the super-samples back buffer (SSAA). There are two new Boolean properties to control that process: ResolveMultisampledBackBuffer and ResolveSuperSampledBackBuffer. Also to set the DestinationBuffer, you now need to call SetCustomDestinationBuffer method instead of using property setter (with the method you also need to provide Texture2DDescription and RenderTargetView).
  • Added DownSampleWithFilerPostProcess and DownSamplePostProcess post processes that can down-sample a super-sampled texture with and without using special filters (reading texels with special offsets and weights to better read the color of the surrounding pixels). Those post-processes can also be used in your own custom rendering pipelines.
  • Updated RenderToBitmap methods on DXView and DXScene so that they take a new superSamplingCount parameter.
  • Updated Ab3d.DirectX.Client.Settings project with adding a ComboBox where users can select the super-sampling count.
  • Improved support for rendering the same 3D scene (DXScene object) with multiple DXViewportView objects that can have different cameras and rendering settings. Before the DirectX resources could be shared but each DXViewportView required new WPF 3D objects to show the same scene. Now new DXViewportView and new DXScene constructors are available that can take master DXViewportView / DXScene objects - in this case the DXScene object from the master object is used.
  • Improved using IsVisible property on SceneNodes. In previous versions, the SceneNode was rendered when IsVisible was set to true even if the parent SceneNode was hidden (its IsVisible was false). Now the parent visibility is taken into account - the actual visibility can be read from the new IsActuallyVisible read-only property.
  • Improved VarianceShadowRendering with preventing darkening the edges of objects that are on the edges of the 3D scene.
  • Added ShadowDepthBias property to the VarianceShadowRenderingProvider - it can be used to offset the light distance and prevent shadow artifacts in the corners of some objects.
  • Added option to create WpfGeometryModel3DNode and DXMeshGeometry3D objects with a dynamic vertex buffer. This improves update time when rendering 3D lines with arrows (their geometry is created on the CPU and updated on each camera change).
  • Added AutomaticallyChangeToDynamicVertexBuffer property to DXMeshGeometry3D. When true (by default), then after 3 changes of the MeshGeometry3D the CreateDynamicVertexBuffer will be automatically set to true so that a dynamic vertex buffer will be used for any additional changes.
  • Added ChangeIndexBuffers method to RenderablePrimitive to allow changing IndexBuffer in the already created RenderablePrimitive.
  • Significantly improved update time when only Positions or TrainagleIndices are changed. In the previous version, in this case all rendering queues were regenerated. Now, this is not needed anymore (for example, this is used in case when a line with an arrow is shown - such lines are generated on the CPU).
  • Significantly improved update time when only Model3D or Visual3D Transformation is changed.
  • Improved GaussianBlurPostProcess and SeparableKernelPostProcess (base class for GaussianBlurPostProcess) so that it is possible to use custom filter size (number of pixels that are read to get the color produces by this post-process). In the previous version, the filter size was fixed to 15, now it is possible to use smaller filter sizes.
  • Added SizeChanged event to DXScene.
  • Added DXRenderSizeChanged event and DXRenderSize and DXRenderPixelSize properties to DXView and DXViewportView.
  • Added OverrideBlendState and PremultiplyAlphaColors properties to SolidColorEffect. This way it is possible to control how colors with an alpha value less than 1 are rendered. For example, this is useful when rendering object-id bitmap because we can write id information into the alpha color component.
  • Added DepthBias and OverrideRasterizerState properties to SolidColorEffect. This adds additional options to customize the rendering of the 3D scene when the whole scene is rendered with SolidColorEffect (in RenderObjectsRenderingStep.OverrideEffect)
  • SolidColorEffect can now render 3D lines with correct line thickness and other line parameters. This can be used when SolidColorEffect is used in RenderObjectsRenderingStep.OverrdeEffect property to render all objects with the specified color - now the 3D lines are also rendered with the specified color.
  • Added a static GetDpiScale method to DXView (and DXViewportView).
  • Fixed calling RenderToBitmap when the scene was rendered by Ab3d.DXEngine and DirectX command list caching was used (by default when the number of objects was bigger than 200).
  • Fixed using an emissive map in PBR shader. Also added EmissiveColor to PhysicallyBasedMaterial that allows setting a single EmissiveColor that is added to the final color.
  • Improved Line DepthBias that now moves the line in the direction of the camera so bigger DepthBias do not move the lines away from the object (when using a perspective camera). This simplifies setting the correct DepthBias value.
  • Improved CPU performance when rendering 3D lines with transformations.
  • Significantly improved the performance of calling SceneNode.NotifySceneNodeChange and informing the parent DXScene about the changes.
  • Optimized initialization code and shorten time to convert WPF 3D objects to DXEngine's SceneNodes.
  • Added IsCheckingForChanges property and NotifyChanges method to WpfVisual3DCollectionNode. This can be used with the ContentVisual3D object because it provides ChildrenChanged event so it is possible to disable checking for changes in WpfVisual3DCollectionNode and in case when ChildrenChanged event handler is called, then the NotifyChanges method is used inform the WpfVisual3DCollectionNode about the changes.
  • Added additional showMaterialInfo and showMeshInfo parameters to DXScene.GetSceneNodesDumpString to better control the created SceneNodes information text.
  • Fixed calling ClearDXAttribute for LineDepthBias, LinePattern, LinePatternScale, LinePatternOffset and ReadZBuffer.
  • Added SetCustomDestinationBackBuffer method to PreparePostProcessingRenderingStep so it is possible to render post-processing to a custom back buffer and not only to RenderingContext.FinalBackBuffer.
  • Fixed using Visibility property on ContainerUIElement3D when it is set from Hidden or Collapsed back to Visible.
  • Added a new overload to the DXViewportView.RenderToBitmap method that takes WriteableBitmap as a parameter. This way it is possible to reuse the same instance of WriteableBitmap on multiple calls of the method (note the DirectX resources are still regenerated on each call)
  • Improved performance of DirectXOverlay PresentationType that uses SwapChain - the SwapChain is now created with FlipDiscard SwapEffect that is faster than the previous Discard SwapEffect because it does not require that the Windows Composition engine copies the frame memory. The FlipDiscard is only used when supported (Windows 10), otherwise the FlipSequential is used (if supported) or Discard is used - the used effect is set to the new DXScene.UsedSwapChainEffect property. Users can change the default value with the static DXDevice.StandardSwapEffect field.
  • Added support to specify the value of the CustomRenderingQueue DXAttribute as the name of the RenderingQueue (as string) and not just as an instance of RenderingQueue. This way this property can be set before the DXScene is initialized.
  • Added GetValueOrDefault to the DXAttributeCollection to get the value of the DXAttribute or null in case the attribute is not defined.
  • Updated created blend state for non-premultiplied alpha (CommonStates.NonPremultipliedAlphaBlend) so that alpha values are added to the existing alpha values (before the semi-transparent objects can change opaque background to semi-transparent, now opaque background is preserved and alpha values are correctly added to a transparent background).
  • Fixed rendering some objects (they may appear too dark) when Low quality shader (using LowQualityHardwareRendering) is used and more than 3 directional lights are used or when point or spot light is used.
  • Fixed using ambient light when DirectX commands caching is used and more than 3 directional lights are used or when point or spot light is used.
  • Fixed rendering instanced objects when Low quality shader (using LowQualityHardwareRendering) is used.
  • Fixed PixelFormat that is created by RenderToBitmap method - it now correctly sets Pbgra for pre-multiplied alpha and not Bgra as before.
  • Fixed rendering some objects when only transformation is changed.
  • Fixed updating Visual3D objects if some properties were changed when the Visual3D was hidden (IsVisible was set to false, then some properties were changed, then IsVisibile was set to true).
  • Prevented invalid rendering when using Low quality rendering with shadows - now scene is rendered without shadows.
  • Added ToNonPremultipliedAlphaPostProcess that can convert a pre-multiplied alpha texture to a non pre-multiplied alpha texture.
  • Added convertToNonPreMultipledAlpha parameter to RenderToBitmap method. When it is set to true (false by default), the method will create a bitmap without pre-multiplied alpha. Also, the RenderToBitmap method that takes WriteableBitmap as parameter will render the image as non-premultiplied when the pixel format of the WriteableBitmap is set to Bgra (and not Pbgra).
  • Added a new diagnostics method GetBackBufferChangesReport to RenderingContext. It shows the changes or BackBuffer and its usage during rendering. To use the method set RenderingContext.IsCollectingBackBufferChanges to true, render the scene and then call GetBackBufferChangesReport. This method can also be called from DiagnosticsWindow from the 'Dump BackBuffer changes' command (shown only when DirectX device is created with debug mode)
  • Added IsPreMultipliedAlphaColor Boolean property to IDiffuseMaterial - used by StandardMaterial. By default it is set to false - this converts the non-pre-multiplied alpha color to pre-multiplied color when this is required by the shader. This way the same color with alpha value can be used in WPF's SolidColorBrush and DXEngine's StandardMaterial. In the previous version user needed to pre-multiply the color components by alpha value manually. You can still do that, but now set IsPreMultipliedAlphaColor to true so that this is not done again.
  • Updated DiagnosticsWindows in Ab3d.DirectX.Client.Diagnostics project to show the MSAA and SSAA settings and the memory usage of the back buffers used to show the 3D scene. Also, an option to show back buffer changes report is added to the menu.

 

Version 4.0

  • Added support for DirectX command lists caching - when only camera or lights are changed, then the new frame can be rendered with only updating the camera and lights data and then "instructing" the graphics card to re-render the new frame with using the DirectX commands that were recorded in one of the previous frames. This can be controlled by setting DXScene.IsCachingCommandLists property (true by default). Command list caching works only for objects in StandardGeometryRenderingQueue and starts when number of objects in this queue is more then 400 (defined by a static RenderObjectsRenderingStep.MinObjectsForCachedCommandLists field).

  • Added IsTransparencySortingEnabled property to DXScene. It can be used to enable or disable sorting objects in the TransparentRenderingQueue by camera distance. This can also be done with setting IsSortingEnabled on the DXScene.TransparentRenderingQueue. By default, IsTransparencySortingEnabled is set to false and must be manually set to true to enable transparency sorting.
  • Added time that is required to sort rendering queues by camera distance or by material to the RenderingStatistics.PrepareRenderTimeMs property (this property already collects time to prepare and clear render targets and set up the initial rendering states).

  • Added AlphaClipThreshold property to IDiffuseTextureMaterial interface (0 means alpha clipping is disabled, values bigger than 0 enable alpha clipping and specify the threshold value). The IDiffuseTextureMaterial is implemented by StandardMaterial, MultiMapMaterial and WpfMaterial (the later is created from WPF's materials).
  • Added AlphaToCoverage BlendState to CommonStates class.
  • Added two new DXAttribute values that can be set to WPF's materials: Texture_AlphaClipThreshold (float value that defines the alpha clipping threshold value; 0 means alpha clipping is disabled; values bigger than 0 clip pixels with an alpha value bigger than the specified value) and Texture_UseAlphaToCoverage (Boolean value to enable or disable alpha-to-coverage).
  • Added TextureAlphaClipThreshold property to InstancedMeshGeometryVisual3D and InstancedMeshGeometry3DNode. It can be used to enable alpha-clipping when using instancing to render meshes with texture (for example to render text).
  • Added TextureBlendState property to InstancedMeshGeometryVisual3D and InstancedMeshGeometry3DNode - it can be used to specify a custom blend state used when rendering instances with textures (for example for using CommonStates.AlphaToCoverage).

  • Added support for rendering instanced objects with defining their size in scree-space coordinates - so the objects are always the same size on the screen regardless of the camera position. This is enabled by setting the UseScreenSpaceScaling property to true on InstancedMeshGeometryVisual3D or InstancedMeshGeometry3DNode. Note: screen-space instances do not work (yet) with textures and solid-color rendering.
  • Added a shader to render instanced objects with a single solid color (without any lighting and without getting the color from instance data). This can be used by calling UseSingleObjectColor method on InstancedMeshGeometry3DNode and setting the IsSolidColorMaterial property to true.
  • Improved instance rendering with discarding instances that have the alpha color set to 0 (this way, it is possible to hide some instances without recreating the whole instancesData quickly).
  • Updated SolidColorEffect so that the effect can also render instanced objects with the specified solid color - for example, when it is used in the RenderObjectsRenderingStep.OverrideEffect. Note that OutlineThickness and WriteMaxDepthValue properties are not supported when rendering instanced objects (for example, for rendering outlines).

  • Split DXScene.GeometryRenderingQueue into 4 new rendering queues: ComplexGeometryRenderingQueue (sent to GPU as fast as possible - used for complex and instanced geometries), LineGeometryRenderingQueue (used for opaque and solid color 3D lines - support multi-thrading), StandardGeometryRenderingQueue (highly optimized for rendering standard 3D objects - support multi-thrading and command list caching), OtherGeometryRenderingQueue (used for other 3D objects with non-standard effects).
  • Added static MeshTriangleIndicesCountRequiredForComplexGeometry and LinesCountRequiredForComplexGeometry fields to DXScene. They specifies the number of triangle indices or line positions that are required to put the rendered object into the ComplexGeometryRenderingQueue (send to GPU as fast as possible) instead of into the StandardGeometryRenderingQueue or LineGeometryRenderingQueue. Default value is 100.000 for MeshTriangleIndicesCountRequiredForComplexGeometry and 20.000 for LinesCountRequiredForComplexGeometry.
  • Marked DXScene.GeometryRenderingQueue as obsolete (for backward compatibility, it is assigned to the new OtherGeometryRenderingQueue). If you are using that rendering queue, please use any of the 4 new rendering queues instead.

  • Improved detection of transparent pixels in a texture image - this way, alpha blending is used only on textures with actual transparent pixels.
  • Added new overloaded LoadShaderResourceView methods to the Ab3d.DirectX.TextureLoader class. The new methods also set a TextureInfo class that describes the loaded texture (size, dpi, format, hasTransparency).
  • Added static WpfMaterial.CreateTexture2D and WpfMaterial.LoadTexture2D method that can now also set an out TextureInfo class that describes the loaded texture (size, dpi, format, hasTransparency).
  • Added CreateStandardTextureMaterial method to the Ab3d.DirectX.TextureLoader class. The method can be used to load an image file and create a StandardMaterial object with the loaded texture.
  • Added Ab3d.DirectX.TextureLoader.HasTransparentPixels method that checks the texture image (defined by a byte array) and returns true when the texture contains some transparent pixels (alpha < 1).
  • Added a new GetRecommendedBlendState method to CommonStates - the method takes two Boolean parameters (hasTransparency and hasPreMultipliedAlpha) and returns a BlendState objects that is best used for a texture with specified parameters.
  • Added new constructors to Ab3d.DirectX.Materials.StandardMaterial class to simplify the creation of a material with a diffuse color or a diffuse texture.
  • Improved rendering WPF bitmaps that are rotated by 90, 180 or 270 degrees.
  • Added support for ImageBrush.RelativeTransform.

  • Added overload of InstancedMeshGeometryVisual3D.Update method that takes only updateBounds parameter (startIndex and count parameters are not required anymore).
  • Improved CustomRenderableNode to correctly render and update its Bounds when its or parent transformation is changed.
  • Added handling of device removal if it happens inside the RootNode.Update method.
  • Simplified registering custom shaders with adding RegisterShaderResource and RegisterShaderResourceStatic methods to Ab3d.DirectX.EffectsManager - they take resource name and byte array that represents shader bytecode. There are also new UnregisterShaderResource and UnregisterShaderResourceStatic to remove the registered resource.
  • Removed DirectionalLightShader permutations that require that the WorldViewProjection matrix is calculated on the CPU.
  • When StandardMaterial is created with a Color4 argument, then the HasAlpha property is automatically set from the alpha value of the Color4.

  • PhysicallyBasedRenderingEffect now correctly sets backface culling when rendering BackMaterial or Material (before no culling was always used). Also, the normal is correctly flipped when rendering back faces.
  • Fixed PhysicallyBasedRendering shader to prevent color darkening in some cases when point lights or spot lights are used.
  • Added BlendState property to IMultiMapMaterial interface and to PhysicallyBasedMaterial. This way it is possible to better define the BlendState that is used for PhysicallyBasedRendering.
  • Fixed using variance shadows with PBR (Physically based rendering) objects.

  • Added GetChildNode method to SceneNode so it is possible to get child SceneNodes.
  • Improved information that is written when dumping RenderingQueues (displaying details about RenderingQueue that can be get with DXScene.GetRenderingQueuesDumpString and DXScene.DumpRenderingQueues methods or with using Diagnostics Window).
  • Fixed using CustomRenderingQueue in ScreenSpaceLineNode.
  • Removed a few cases when small objects can be created on each rendered frame - so the code is nicer to the GC.
  • Added public getters for IsLineStrip and IsLineClosed to ScreenSpaceLineNode.
  • Added support for setting DXAttributeType.CustomRenderingQueue on 3D lines defined in Ab3d.PowerToys, for example LineVisual3D, PolylineVisual3D, etc. Note that this does not work on TextVisual3D, CenteredTextVisual3D and WireGridVisual3D (see BackgroundAndOverlayRendering sample on how to enable that).
  • Moved initialization of RenderingQueues to DXScene's constructor. This way the RenderingQueues are already defined in the DXViewportView.DXSceneDeviceCreated event handler.
  • Updated usage of DXViewportView.DXSceneDeviceCreated event. This event is now called only when DirectX 11 rendering is used and when the DXScene property is set. In the previous versions this event was also called when WPF 3D rendering was used and in this case the DXScene property in the event handler was set to null. Now there is a new event Wpf3DRenderingInitialized that is called in case WPF 3D rendering is used.
  • Added IsHitTestVisible to SceneNode object. It can be set to false to prevent the SceneNode and its child SceneNodes from hit testing.
  • Prevented throwing an exception from DXScene.GetRayFromCamera when DXScene.Camera is null.
  • Updated MeshObjectNode objects so its IsCastingShadow and IsReceivingShadow properties are true by default.
  • Added HasDirtyFlag method to DXScene to check the value of the DXScene's dirty flags. Note that if this value is checked before the Update phase is completed, then the value may not have the final value (but it has the camera and light changed flags already set).
  • Renamed OctTree to MeshOctTree and OctTreeNode to MeshOctTreeNode (the reason is that OctTree is a generic name but the class is specialized for meshes). The old classes still exist but have been marked as obsolete.
  • Renamed ShadowThreshold to ShadowThreshold in VarianceShadowRenderingProvider and in PhysicallyBasedRenderingEffect. The old property still exists but is marked as obsolete.
  • Added IsRenderingEnabled property to RenderingQueue objects to easily disable rendering of objects inside the specified rendering queue.
Ab3d.DirectX.Client.Diagnostics project (that is also used by the DXEngineSnoop):
  • Added "Render Objects-Id" menu item to Diagnostics window.
  • Added "DXEngine settings editor" menu item that can change some of the DXScene's properties.
  • Added "Rendering filter" menu item to enable or disable selected RenderingQueues and RenderingSteps.

 

Version 3.3

  • Added support for .Net CORE 3.1.
  • Added support for rendering lines with different start and end color (added Ab3d.DirectX.Materials.PositionColoredLineMaterial that can be used with ScreenSpaceLineNode).
  • Added PlanarShadowRenderingProvider that can render semi-transparent planar shadows.
  • Added DepthStencilBufferFormat property to DXScene. This allows using stencil buffer for some effects that require it (for example planar shadows).
  • Added DeviceRemoved event to DXScene that can be used to handle cases when DirectX device is removed or reset (for example when the application is running and a driver is updated; not when computer wakes up from sleep).
  • Added GetOriginalWpfObject method to BaseWpfObjectNode class - base class for all SceneNode objects that show WPF 3D objects. The method returns the WPF object that was used to create this SceneNode.
  • Added SetCustomPerFrameConstantBuffers method to StandardEffect, SuperShader and DirectionalLightShader. This method sets custom constant buffer that are set outside the shader. It can be used to crate cached DirectX command lists (coming to next version of Ab3d.DXEngine).
  • Added CustomRenderingQueue property to MeshObjectNode to simply set a custom rendering queue.
  • Improved performance with optimizing regeneration of RenderingQueues.
  • Added new override of RenderScene method on DXScene and DXView - the new override takes two Boolean parameters: forceRender and forceUpdate so it is possible force rendering the scene without forcing to update the scene (recreate all RenderingQueues).
  • Updated EffectsManager.GetEffect method so that it by default returns the type that exactly matches the specified type T and not also the derived types (this can be contoller by the new exactlyMatchType).
  • Added CreateBackBufferShaderResourceView and BackBufferShaderResourceView to DXScene. The created BackBufferShaderResourceView can be set to true to use the rendered scene as a texture in some other 3D scene (on the same DirectX device so the texture does not need to be copied to main memory as with RenderToBitmap).
  • Added IsRenderedWithCustomRenderingStep property to the RenderingQueue. When set to true, then this RenderingQueue can be rendered only with a RenderObjectsRenderingStep that has the FilterRenderingQueuesFunction set and that returns true from the filter function. This simplifies rendering custom RenderingQueues because it is not needed to exclude rendering of such RenderingQueues in the DefaultRenderObjectsRenderingStep.
  • When using DXViewportView the DXScene.RootNode is now a simple SceneNode and not WpfVisual3DCollectionNode any more (the WpfVisual3DCollectionNode is then added to this SceneNode). This way it is possible to insert some custom SceneNode to the RootNode (before this break the WpfVisual3DCollectionNode because the number of ChildNodes was different then the number of Viewport3D.Children objects).
  • Added GetClosestPositionIndex method to the OptimizedPointMesh class to get hit testing to the optimized point cloud data. The method returns an index of the position that is the closest to the specified ray. The method is highly optimized and checks only the segments that ray goes through (ray intersects segment's bounding box).
  • Added GetPositionIndexesAroundRay method to the OptimizedPointMesh - the method returns a list of position indexes that are closer to the ray then the specified distance.
  • Added PositionsArray getter property to the OptimizedPointMesh.
  • Improved OptimizedPointMesh.GetClosestPositionIndex method to find the closest result even when the specified ray does not intersect with the point cloud bounding box.
  • Fixed rendering textures after changing TextureCoordinates when the TextureCoordinates are not specified in the standard range (from 0 to 1).
  • Fixed rendering lines with arrows when the line is changed on each frame (usually happens when the StartLineCap or EndLineCap are changed from Flat to ArrowAnchor).
  • Fixed rendering SolidColorEffect when OverrideModelColor is set to a color with alpha value smaller then 1 (using transparent color).
  • Fixed reading the initial value of the CustomRenderingQueue DXAttribute in some cases (can be set by SetDXAttribute method to add the model to a custom rendering queue).
  • Fixed setting MeshObjectNode.Bounds when MeshObjectNode was created with uninitialized Mesh.
  • Fixed calling Update method on SceneNode when it is shown with SceneNodeVisual3D.
  • Fixed rendering where in some rare cases some objects may be rendered with invalid material (using material from some other object). This may happen when many 3D objects are rendered with multi-threading enabled and many objects use the same material and many objects are not visible.
  • Fixed changing IsVisible property value for MeshObjectNode when it is using SubMeshes.
  • Updated RenderObjectsRenderingStep so that in case when OverrideBlendState, OverrideDepthStencilState or OverrideRasterizerState are used the current state is saved and reset back when RenderObjectsRenderingStep is finished.
  • Changed type of DXScene.UseSharedWpfTexture property from boolean to nullable boolean. When the value of the property is not set by the user, it is set by the DXEngine when the DXScene is initialized.
  • Prevented getting duplicate results when getting all hit objects on instanced Model3DGroup objects that also use BackMaterial.
  • Fixed updating SceneNode Bounds after Transformation is changed for some SceneNode objects that are created from WPF 3D objects (sometimes the Bounds value was not updated).
  • Fixed rendering MeshGeometry3D objects without defined TriangleIndices.
  • Improved DXEngineSnoop tool that can now also connect to .Net CORE applications.

 

Version 3.2

Multi-threading:
  • 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.

Other changes:
  • 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.

 

Version 3.1

  • 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).

 

Version 3.0

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.

Fixes:
  • 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.

WinForms:
  • 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.

Samples:
  • 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.

Breaking change:
  • 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.

 

Version 2.3.6549

  • 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).

Breaking change:
  • 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.

 

Version 2.2

  • 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)

 

Version 2.1

  • 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).

 

Version 2.0

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.
Fixes:
  • 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.
New samples:
  • 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.

 

Version 1.4

  • 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.

 

Version 1.3

  • 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).

 

Version 1.2

  • 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.

 

Version 1.1

  • 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.