New maintenance release of Ab3d.PowerToys has been published

by abenedik 7. October 2015 16:13

I would like to inform you that a new maintenance release of Ab3d.PowerToys has been published.

Here is the list of new features and fixes:

  • Fixed problems with EventManager3D when events on wrong ModelEventSource3D object were triggered. This could happen when multiple GeometryModel3D objects were using the same MeshGeometry3D.
  • Improved performance of EventManager3D.
  • Improved design time behavior for MouseCameraControllerInfo with preventing calling BeginInit method when it was already called by WPF initializer (prevents thorwing exception in design time).
  • Added IsEmissiveSolidModelColor to WireframeVisual3D - when set to false it uses standard shaded color instead of single color produced by EmissiveMaterial.
  • Added modelSelectorFunc parameter to CreateWireframe method - it can be used to select which models are converted to wireframe.
  • Added new constructor to ModelMoverVisual3D that takes xAxisVector3D, yAxisVector3D and zAxisVector3D. This allows using custom axes for ModelMoverVisual3D.
  • Improved ModelDecoratorVisual3D when TargetModel3D is not defined in RootModelVisual3D.Content but in a ModelVisual3D that is defined in RootModelVisual3D.Children.



New version of Ab3d.PowerToys gets FreeCamera and many other improvements

by abenedik 2. September 2015 18:26

I am happy to inform you that a new version of Ab3d.PowerToys has been released.

The biggest new feature of the new version is the introduction of a new camera type - FreeCamera. The FreeCamera is a camera that allows free rotation around any axis.

The first difference between FreeCamera and other cameras from Ab3d.PowerToys is that the FreeCamera is not defined by Heading, Attitude and Bank angles. Instead the camera is defined by CameraPosition, TargetPosition and UpDirection. Another difference is that the FreeCamera can be rotated freely around any axis and not only around Y axis as other cameras. This extra freedom can be useful for an experienced user. 

But you need to be careful when using the camera, because most of the users can quickly become disoriented and can struggle to align the objects correctly. With other cameras you rotate the camera as you would have your target object on the desk and you would move around the object and view it from different corners. This is the most natural way to rotate the camera. The felling of horizontal plane and up direction is preserved and you can easily navigate around. 

It is also interested that some previous versions of Autodesk products (for example 3D Studio max 2009) allowed users to rotate the camera in a similar way to what FreeCamera allows. This was allowed only with ViewCube rotation. When camera was rotated with mouse the rotation was not free but was bound to Y axis. The interesting part is that later versions (3D Studio Max 2014 and Autodesk Revit 2014) removed the free rotation with ViewCume and now ViewCube allows rotations only around fixed y axis. It looks like at Autodesk they found out that increased rotation freedom is not better for users and therefore they removed it and used the proven and more intuitive rotation around y axis.

Some users have been asking for FreeCamera for quite some time. I hope that they will be satisfied. Though I would recommend them to at least test this with their users.


The new version of the Ab3d.PowerToys also brings some other improvements and fixed. Many of them are related to the Ab3d.DXEngine and improve using Ab3d.PowerToys in the Ab3d.DXEngine. The Ab3d.DXEngine is a brand new DirectX 11 rendering engine that can render existing WPF 3D graphics with a super-fast and much more accurate DirectX 11 rendering engine. The engine is already available as release candidate version and can be downloaded form the Downloads page. Some additiona information about the engine can be froud on its web page. You can expect more information about the engin in the next blog post.

Here is the whole list of changes and new features:

  • Added FreeCamera - a new camera type that can be used to freely rotate the camera around without locking the rotation around y axis.
  • Fixed reading materials with ReaderObj - before a black EmissiveMaterial was added to each material.
  • Moved CameraLight and ShowCameraLight properties and StartRotate, EndRotate and all related methods from SphericalCamera to BaseCamera (this allows its usage on FreeCamera).
  • Added AutomaticallyUpdateWhenOriginalModelIsChanged to WireframeVisual3D
  • Improved WireframeVisual3D to not generate the wireframe geometry until it is added to the parent Visual3D / Viewport3D. This can prevent multiple wireframe geometry generation in the initialization phase. Also improved xml comment (for help) and sample regarding that.
  • Improved changing ShowCameraLight property at design time (before light was not always changed when the ShowCameraLight property was changed).
  • Improved using ShowCameraLight's Auto property - before when this property was set to Auto, the camera light was not shown if the scene contained AmbientLight; now camera light is added in this case (it is not added only when DirectionalLight, PointLight or SpotLight are defined).
  • Improved automatic finding of Viewport3D in BaseCamera faster and more reliable (when TargetViewport3D is not set).

Changes related to Ab3d.DXEngine:

  • Updated BaseCamera to correctly find the Viewport3D if used inside DXEngine and if TargetViewport3D or TargetViewport3DName are not set.
  • Fixed updating line color when the line color is changed after the line is already shown (when rendered with hardware accelerated in Ab3d.DXEngine).
  • Improved EventsManager3D when EventsManager3D.CustomEventsSourceElement is not set - now the default event source is DXViewportView instead of Viewport3D.
  • Improved MouseCameraController - it is not needed any more to set the EventsSourceElement to DXViewportView; now if EventsSourceElement is not set, it will be automatically set to DXViewportView.
  • Improved sending lines data to Ab3d.DXEngine (so that the lines can be created in geometry shader).



Amazing new samples and features of the next major version of Ab3d.PowerToys library

by abenedik 18. June 2015 21:14

I am really happy to announce that I have just published the biggest update in the history of the AB4D Company. 

This update brings many great new features, improvements and fixes to Ab3d.PowerToys library - best library for rapid 3D application development. What is more, there are some new samples that show the power of the library. The samples can also jump start your development with providing the startup code for the standard 3D use cases.


Let’s start with a few screenshots of the new samples:

The following screenshot shows a sample that allows user to show the scene from different angles and with different rendering settings (in top row user can also change the layout of the scene views):

Multi scene layout with Ab3d.PowerToys library


The following sample shows visualization of sample data in 3D graph. The graph also supports selection of single or multiple spheres. The lower left corner of the screenshot is showing a new MouseCameraContollerInfo control that shows which mouse buttons and keyboard keys are used to rotate and move the camera:

3D graph with Ab3d.PowerToys library


The following image shows new ModelMoverVisual3D that simplifies moving 3D models:

Model mover to move 3D models in the 3D scene


And now to the list of new features:

Major new features:

  • Added LightingRigVisual3D that adds 3 DirectionalLights and one AmbientLight to the scene. The lights define the so called standard lighting rig with key, fill and back light.
  • Added TubeLinesVisual3D and TubeLinesMesh3D that can be used to create 3D lines from 3D tube objects. Those lines does not require LinesUpdater to update their geometry when camera is changed and can therefore greatly improve performance when the application is running (but require a little bit more time to initialize)
  • Added ModelMoverVisual3D that can be used to help users move 3D objects. The ModelMoverVisual3D shows 3 arrows for all three axes and allow users to move object along the axis. It can also show 3 rectangles that allow users to move the object on the plane defined by the rectangle.
  • Added support for touch events and touch manipulation events to EventManager3D (TouchEnter, TouchDown, TouchMove, TouchUp, TouchLeave; ManipulationStarted, ManipulationDelta and ManipulationCompleted) (only in .Net 4 version of the library)
  • Added MultiPolyLineVisual3D to show multiple polylines with one Visual3D – this improves performance because LinesUpdated needs to check less objects.
  • Added Ab3d.Utilities.RenderToBitmap method to render any FrameworkElement to bitmap (with support for custom size, antialasing and custom dpi setting).
  • Added RenderToBitmap to BaseCamera to render current Viewport3D to bitmap.
  • Added support for creating 3D trapezoid objects with TrapezoidVisual3D, TrapezoidUIElement3D and Ab3d.Meshes.TrapezoidMesh3D classes and with new Ab3d.Models.Model3DFactory.CreateTrapezoid and Ab3d.Meshes.TrapezoidMesh3D method
  • Added MouseCameraControllerInfo control that shows which mouse button and keyboard is required to rotate and move the camera. Also added MouseWithButtons, KeyboardKey user controls.
  • Added Ab3d.Utilities.Dump methods that can dump 3D model information into Visual Studio Immediate Window – useful for getting information about 3D objects during debugging.


Improvements and fixes:


  • Added MoveOnlyHorizontally property to MouseCameraController to restrict the camera movements to horizontal plane.
  • Added IsRotationDirectionAdjusted property to MouseCameraController. It can be used to enable adjusting camera rotation direction based on current mouse position and current attitude value. 
  • Added CameraRotateStared, CameraRotateEnded, CameraMoveStared, CameraMoveEnded events to MouseCameraController
  • Fixed calculating camera bank angle when using Ab3d.Utilities.CameraUtils.CalculateCameraAngles method.
  • Added static GetCameraMatrixes method to BaseCamera that takes Viewport3D and returns camera matrixes. Also the GetCameraMatrixes now returns Boolean instead of void - it returns false if camera matrixes cannot be calculated.
  • Fixed showing camera light after the previous Light visual was manually removed from Viewport3D.Children
  • Improved CameraLight property in Ab3d.Cameras objects. The property is used to get or set a custom light for camera’s light. In previous version under some circumstances the property's value was not set to the actual Light object that is used to illuminate the scene.
  • Added GetMousePositionOnPlane method to all cameras from Ab3d.PowerToys library
  • Added GetNormalizedHeading, GetNormalizedAttitude, GetNormalizedBank methods that return Heading, Attitude and Bank angles that between 0 and 360.


3D Lines:

  • Fixed updating 3D lines for WireGridVisual3D when its IsClosed property was set to true.
  • Improved LinesUpdater with adding a RegisteredLinesCount property to get number of registered lines. Also added UnregisterLine method that takes any 3D line visual from Ab3d.PowerToys.
  • Improved performance of LinesUpdater.
  • Removed memory leak from LinesUpdater - some lines that were disconnected from parent Visual3D were not disposed and were checked on each frame.
  • Improved LinesUpdater so that it did not regenerate some geometry models when the camera (or some other property) is not changed.
  • Improved rendering lines when Othographics camera is used and the lines have the same direction as the camera.
  • Fixed hiding 3D lines when IsVisible is set to false and the line is child of another ModelVisual3D


3D objects:

  • Improved rendering Arrow3D - before the arrow tip was rendered with a single position and that made the arrow shading too dark.
  • Changed default value for Length property on AxisVisual3D and ColorAxisVisual from 1 to 100.
  • Fixed changing DefaultMaterial on ObjModelVisual3D after the obj file has been already read. In previous version all materials were replaced by new DefaultMaterial even if obj file defined their own material and DefaultMaterial was not used.
  • Added DefaultBackMaterial to ObjModelVisual3D to specify the back material of the read models.



  • Added RayPlaneIntersection method to Ab3d.Utilities.MathUtils to calculate intersection of 3D ray and a plane.
  • Added ReplaceMaterial to Ab3d.Utilities.ModelUtils to replace one material with another material in a Model3D
  • Prevented freezing objects with ModelOptimizer when FreezeAll is not set to true.
  • Prevented throwing exception when MeshGeometry3D have TriangleIndices set to null in CollectModelCounters, GetDumpString and GetMeshInitializationCode methods. 
  • Improved performance of ModelOptimizer and MeshUtils.CalculateNormals
  • Added new overloads to TransparencySorter constructor, SimpleSort and SortByCameraDistance methods that also take ContainerUIElement3D as parameter.
  • Improved ModelDecoratorVisual3D when showing normal vectors on an objects that has been scaled by transformation
  • Fixed CreateFromCurvePositions method in BezierCurve - the method has thrown an exception when there were less than 6 curve points (instead of less than 2).
  • Changed return type of the HeightMapMesh3D.GetGradientColorsArray method - now the method returns array of Color value instead of array of uint values. If you still want to get array of uint values, call the new GetGradientColorsUIntArray method.


As mentioned before – this is the longest new features list so far. And guess what. This is not the whole list. The samples project have two additional new controls that are available with full source code:

  • AxisWireBoxVisual3D – Visual3D that shows a wireframe box with Y axis lines and values that can be used to show 3D data.
  • SceneView3D – UserControl that can show 3D models in Viewport3D and has ComboBox to specify the view angle (top, left, right, front, etc.) and a ContextMenu that specify how the 3D models are rendered (with solid model or wireframe) and what type of camera is used (perspective or orthographic). 


I am really excited about this new release. I hope that after checking out the new samples you will share that excitement with me.

As always, the licensed users can download their commercial version from their User Account page. Others are welcome to try the new evaluation version that can be download from our downloads page.