With the release of Ab3d.Reader3ds v7.0 and Ab3d.PowerToys v2.0 a new milestone in 3D programming was reached.
The first version of WPF brought us simplified programming with 3D. With WPF there is no need any more to deal with C++, DirectX and graphics drivers. Now programmers can use xaml and managed code to define the 3D scene. Besides this WPF can use high end graphic cards when they are available and can fallback to software rendering when the computer does not have an accelerated graphics.
Of course WPF does not provide all the features of DirectX, so it is not capable of running high end 3D games. But my customers have already proven that it is very capable of showing very complex 3D scenes with models with several hundred thousands triangles.
But WPF still lacks many features to make programming with 3D easy.
Now with Ab3d.Reader3ds and Ab3d.PowerToys users have the ultimate framework to work with WPF 3D.
The Ab3d.PowerToys includes advanced cameras, camera controllers (rotate and move the camera with the mouse, etc.), 3D objects (Box, Sphere, Cone, etc.), 3D lines, 3D text and classes to simplify using mouse events on 3D objects.
With Ab3d.Reader3ds and Viewer3ds it is possible to define 3D models in almost any 3D modeling application (3D Studio Max, Maya, AutoCad, etc.), save the objects into 3ds file and use the 3D models in your WPF application.
The libraries gives you a complete solution for:
- creating monitoring systems with 3D models,
- displaying 3D simulations and mathematical models,
- displaying 3D models of your products or prototypes,
- creating designing and configuration applications in reality-like 3D scenes,
- creating interesting 3D effects,
- etc.
That was a short overview. Now to the details about the libraries and more information about new features.
The new version of Viewer3ds application (3ds to xaml converter) that comes with Ab3d.Reader3ds library brings many new improvements.
The application is now using the Ab3d.PowerToys library. Therefore it was really easy to add camera rotation and movement. Among other changes I would also like to mention the new possibility to get detailed information about selected objects (sizes, materials, detailed mesh information, etc.).
The Ab3d.Reader3ds library also got many improvements.
The biggest enhancement is great performance improvement - because of optimized algorithm and multi-threaded processing some 3ds files are read 80% faster. But reading some very large 3ds files can still take a few seconds. To improve user experiance it is now possible to get progress reports while reading the file. The samples that came with the library demonstrate how to show progress window on another thread or read the 3ds file on another thread and show the progress on the main thread.
Let me also mention some other important changes:
- Improved handling of texture files with simplified notifications about missing texture files.
- Added GetXaml method to Reader3ds class to get formatted xaml text of the read 3ds file.
- Improved reading FiledOfView and SpecularMaterials.
- Improved support for running in partially trusted environment.
- Added Lights collection.
Complete list of changes can be seen here.
I am really proud of the features and capabilities the Ab3d.PowerToys library. They really bring WPF 3D to a completely new level.
The library makes Visual Studio a simple 3D modeling application as all the 3D objects and cameras that are defined in xaml are immediately seen in designer window. This way it is very easy to arrange the objects, set camera or otherwise define the scene.
Already the previous version of the library had advanced cameras (SceneCamera, FirstPersonCamera, ThirdPersonCamera) that enable setting the camera with simply setting heading, attitude and bank angles and defining some other properties like distance. The cameras can be simply rotated with the mouse or camera control panel. The new version goes further with enabling moving the camera. Now any camera can be rotated and moved around. And it is possible to assign rotation and movement of the camera to any mouse button and to any keyboard modifiers. For example the following two lines of xaml add a SceneCamera to the scene and enable rotationg the camera with right mouse button and moving the camera with right mouse button and alt key pressed:
<cameras:SceneCamera Heading="30" Attitude="-20" Distance="200"/>
<ab3dControls:MouseCameraController RotateCameraConditions="RightMouseButtonPressed"
MoveCameraConditions="RightMouseButtonPressed, AltKey"/>
The previous version of Ab3d.PowerToys already included many basic 3D objects (Box, Sphere, Cone, etc), 3D Lines and simplified mouse event handling on 3D objects.
Besides improved cameras the following are the main improvements of the new version:
- Added support for 3D text.
- Improved PolyLines - they are now correctly connected to each other.
- Added MultiMaterialBox where each side of the box can have its own material.
- Added CreateFrom method to all Ab3d.Cameras - it can be used to create any Ab3d.Camera from existing WPF's Camera (or camera read from 3ds file with Ab3d.Reader3ds).
- Added CameraAxisPanel - a predefined panel that shows the axis orientation for the target camera.
- Added RectangleVisual3D, WireBoxVisual3, WireCrossVisual3D, VerticalPlaneVisual3D and LineArcVisual3D.
- Added IsVisible property to all 3D models derived from Visual3D.
- Added CreateWireframe method that takes Model3D to create wireframe from Model3DGroup or GeometryModel3D.
- Fixed for using in partially trusted environment - before creating custom cursor was not allowed - now a Hand cursor is used instead.
- BREAKING CHANGE: Fixed Bank - now the positive bank values rotate the camera in the clockwise direction (before the direction was counter-clockwise). For example bank angle 30 means that the Camera is rotated as a head would be bended to the right.
The complete list of changes is really long - it can be seen on Abd3.PowerToys web page.
A quick preview of cameras and 3D objects can be seen from two cheat sheets (prepared with WPF; full source code is included with the samples that come with the library):
Cameras cheat sheet
3D Objects cheat sheet
The following are a few screenshots (click on xaml link to see the xaml source code):
To see more screenshots and details about the library see Abd3.PowerToys web page.
Ab3d.Reader3ds and Ab3d.PowerToys are separate products, but when the Ab3d.Reader3ds pro library license is purchased, the price for Ab3d.PowerToys library is ONLY 1 USD.
I am already planning to add a few new exciting features to the library. If you have any recommendation and other comments you are most welcome to post them to the library’s forum.
As usual the new version can be downloaded from User Account page (for commercial users) or from my Downloads page (for evaluation version).
PS: For the customers of Ab3d.Reader3ds with expired updates subscription I am preparing a very special offer to renew the subscription – detailed information will be sent to your email in the following days.