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:

Cameras:

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

 

Other:

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

Tags:

Ab3d.PowerToys