New Assimp importer for Ab3d.DXEngine published

by abenedik 30. July 2021 14:22

In this short blog post I would like to inform you that a new Ab3d.DXEngine.Assimp library has been published. It can be used to import 3D objects from many file formats into Ab3d.DXEngine objects.


The library is available with full source code on GitHub: https://github.com/ab4d/Ab3d.DXEngine.Assimp.

 

It is also available as a NuGet packge: https://www.nuget.org/packages/Ab3d.DXEngine.Assimp

 

Before this new library was published, it was also possible to import 3D objects into Ab3d.DXEngine objects, but this required using Ab3d.PowerToys.Assimp library. That library first converted native assimp objects into managed objects in Assimp.Net library, then converted those objects into WPF 3D objects and finally converted that into Ab3d.DXEngine objects. This took much longer and required more memory.

 


Now with the Ab3d.DXEngine.Assimp library it is possible to convert the native assimp objects directly into the Ab3d.DXEngine objects. The library creates the following objects:

  • MeshObjectNode for objects with meshes
  • SceneNode objects for groups of objects
  • SimpleMesh<PositionNormalTexture> for meshes
  • StandardMaterial for materials


The new library is using a Silk.NET.Assimp library as a wrapper library (instead of an old Assimp.Net library that Ab3d.PowerToys.Assimp uses).

 

Because of Silk.NET.Assimp the new library can currently work only in x64 processes (I have added an issue to the Silk.NET.Assimp GitHub repository about the problem in x86 process so hopefully, this will be solved soon).

 

Though the Ab3d.DXEngine.Assimp is much faster then Ab3d.PowerToys. Assimp, it also have the following limitations compared to Ab3d.PowerToys.Assimp:

  • cannot read animation data (Ab3d.PowerToys.Assimp can read animations and even play skinned animations by using Ab3d.PowerToys)
  • cannot read polygon data (polygon indices are read by Ab3d.PowerToys.Assimp into MeshGeometry3D).
  • cannot export 3D scene into file by using assimp as an exporter.

 

Anyway, if you only need to import 3D objects and you are using Ab3d.DXEngine that in it worth checking the new importer. Some missing features will be added in the future versions.



 

As a sidenote, I would also like to inform you that at the beginning of this week, a new hotfix version of Ab3d.DXEngine was published. It fixes a few issues mainly related to using multiple DXViewportView objects. The change log can be read here: https://www.ab4d.com/DXEngine-history.aspx


If you are using multiple DXViewportView objects, then it is highly recommended to upgrade to that version.

Tags:

DXEngine