AB4D File Format?
#1
Hi,

I've implemented Assimp for import/export of our models. Works well. However there are some features AB4D provides that are not supported (even in the file formats for that matter).

I'm wondering if there is a built in AB4D file format. I'm specifically looking for the following functionality:

  • VertexColorMaterials
  • Mesh Instancing
You have eluded to the latter in one of my earlier posts (Obtaining instance meshes from InstancedMeshGeometryVisual3D (ab4d.com)), just wondering if that was the only thing you were working on. Or is this a case that we have to roll our own file format to support the above functionality? There are also a number of other cool tricks/features in AB4D that could be useful as well.

My target is to be able to export/import this model attached, without having to process the data every time (it's a long process). 

I've also had a thought that we may be able to use textures/texture mapping/custom materials to achieve this, which might be a better way to go?

Any thoughts are appreciated.

(can't add an attachment, forum system isn't the nicest experience :))
#2
Assimp object model supports per vertex colors (Assimp.Mesh object defines the VertexColorChannels and VertexColorChannelsCount properties). But because Ab3d.PowerToys.Assimp library works only with WPF 3D objects, you cannot save DXEngine objects into Assimp objects.

But the source of the Ab3d.PowerToys.Assimp library is available on https://github.com/ab4d/Ab3d.PowerToys.Assimp. So you could change the AssimpWpfExporter to also set the VertexColorChannels.


But Assimp object model does not support mesh instancing, so you will not be able to export that in an efficient way - as stated in the post that you mentioned, you would need to convert the instanced meshes into individual models.


But you may use the wpf3d file format. The source code for that file format is part of the Ab3d.PowerToys.Samples project (in Wpf3DFile folder). You could extend the file format to add support for saving and loading objects with per-vertex colors and for objects with instancing. This would require some work but would be the most efficient way of storing data. You may even change the extension from .wpf3d to any other extension that you want.
Andrej Benedik
  


Forum Jump:


Users browsing this thread:
1 Guest(s)