![]() |
|
AB4D File Format? - Printable Version +- AB4D Forum (https://forum.ab4d.com) +-- Forum: Products Forums (https://forum.ab4d.com/forumdisplay.php?fid=4) +--- Forum: Ab3d.PowerToys (https://forum.ab4d.com/forumdisplay.php?fid=9) +--- Thread: AB4D File Format? (/showthread.php?tid=4266) |
AB4D File Format? - siik - 06-11-2021 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:
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 :)) RE: AB4D File Format? - abenedik - 06-11-2021 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. |