WpfGeometryModel3DNode vs MeshObjectNode
#1
We have integrated Assimp to provide import/export of 3D models into our app.
  • Importing via Assimp creates a Model3D. This then generates WpfGeometryModel3DNodes to display the meshes via SceneNodeFactory.CreateFromModel3D().There are also MeshObjectNodes that we can manually create to display meshes as well. These two aren’t compatible and the MeshObjectNodes cannot be exported unless they are first converted to a Model3D object (we haven’t done this yet, but it looks possible).The major difference we see is MeshObjectNode uses Vector3/StandardMaterial, whereby WpfGeometryModel3dNodes use Point3D/Media3D.Material. 1. Is performance of one better than the other, or are the any benefits to using either one?2. Is there a built in way to convert nodes?
#2
Assimp importer and exporter that comes with Ab3d.PowerToys.Assimp library. This means that it works on WPF 3D objects and objects created from Ab3d.PowerToys library. 

The DXEngine can render WPF 3D objects and objects from Ab3d.PowerToys. But this requires them to be converted into ObjectNode - those objects provide low level data for the DirectX.

To get more details about that see DXEngine Deep Dive: https://www.ab4d.com/DirectX/3D/DXEngineDeepDive.aspx


When rendering the scene, both object types provide the same performance (ObjectNode objects are used for both types). But the ObjectNode objects are faster to initialize (it is not needed to convert Point3D structs to Vector3) and require less memory.

To export the 3D scene with Assimp exporter you will need to convert the ObjectNodes into WPF 3D objects (GeometryModel3D and Model3DGroup objects).
Andrej Benedik
#3
As written in the previous post, I have tried to add support for exporting a single MeshGeometry3D that is used by many GeometryModel3D objects that would be created from InstanceData. Unfortunatelly the assimp object model allows to store only a single material with a mesh - the material is not assigned to the node but to the mesh. This means that when using assimp exported the same mesh will be saved for each GeometryModel3D.

If you want to save to some simple text base file format, then you may want to wrote your own exporter - this does only need to support your objects and therefore it may be more simple.


You can also check the source for Ab3d.PowerToys.Assimp. You may provide a way to export the ObjectNodes directly - you would need to convert them to Assimp objects.

Here is the new repo for the Ab3d.PowerToys.Assimp: https://github.com/ab4d/Ab3d.PowerToys.Assimp
Andrej Benedik
#4
Thanks very much Andrej,

Understood that the many instances will require individual materials for export so it is not possible to share the geometry.
  


Forum Jump:


Users browsing this thread:
1 Guest(s)