Thanks very much Toni. I got in touch with one of the OpenCollada devs. He also advised me to stick with my C# code.
I continued on with C# but, while testing today, the results were less than encouraging. It's painfully slow to load meshes with more than a few thousand polygons. I haven't gotten to the bottom of it yet, but I think it's down to the very nature of collada data. The data is stored in a raw form and one has to calculate just about everything manually. From normals to share vertices, etc. These calculations seem to scale exponentially with model complexity. Some months back, I invented my own xml-based 3d format where everything is pre-calculated before being written to file. I've been using that to save/load 3d scenes within the app. It looks more and more likely that I'll have to write a blender exporter for that format rather than using collada. Fingers crossed, that should fix the long waits when loading models. Thank you very much. On Sun, Jul 24, 2016 at 6:03 PM, Toni Alatalo <[email protected]> wrote: > OpenCollada is a C++ library that Blender indeed uses. > > I don't think there is any secret documentation, just what they have in > github to describe the parts of their code repository > https://github.com/KhronosGroup/OpenCOLLADA/#directories . Then you can > read the C++ sources to see what's there, for example this tells how you > can get mesh information: > https://github.com/KhronosGroup/OpenCOLLADA/blob/master/COLLADAFramework/src/COLLADAFWMesh.cpp > > It is possible to use C++ libraries in C# code but can be simpler for you > to just add what you need in your code. Both because using C++ in C# adds > complexity and indeed because OpenCOLLADA is not so documented and > reportedly (have no experience myself) painful to work with. > > Khronos is now active with glTF which has been adopted by some companies > and projects. It is JSON + binary data instead of XML. Work there is active > on many fronts so if you want a bandwagon to jump on it can be a good > choice, depending what you need (glTF is to have small files to transfer, > unlike COLLADA which was made for interop between apps using bigger files). > They are marketing it here at SIGGRAPH now, gave t-shirts yesterday and > sponsor a lunch to talk about it here at the web3d event where am now :) > https://github.com/KhronosGroup/glTF > > But again if you already have things working with your own .net XML code > it can be simplest to just add what you need there, depends on the > specifics. > > ~Toni > > On Sun, Jul 17, 2016 at 10:58 PM, Khalifa Lame <[email protected]> > wrote: > >> Hello. I've been working with collada files on a personal project for a >> while now. I wrote an importer using an xml parser. Now everything works >> fine, but I'm considering upgrading to OpenCollada SDK in order to take >> advantage of some advanced features that would take ages to develop on my >> own. >> >> Honestly, I'm not even sure what OpenCollada is... let alone how to use >> it. >> I can't find any documentation on it and the data around it is confusing. >> >> Does someone have any documentation or examples on how to use the SDK? My >> project is written in C#, would that be a problem? >> I understand blender uses OpenCollada. Did the devs have access to some >> secret documentation or something? :D >> >> I've never done something like this before so please assume I'm a total >> noob. >> >> -- >> khalibloo® >> >> >> _______________________________________________ >> Bf-python mailing list >> [email protected] >> https://lists.blender.org/mailman/listinfo/bf-python >> >> > > _______________________________________________ > Bf-python mailing list > [email protected] > https://lists.blender.org/mailman/listinfo/bf-python > > -- khalibloo®
_______________________________________________ Bf-python mailing list [email protected] https://lists.blender.org/mailman/listinfo/bf-python
