3d export/import library
Blitz3D Forums/Blitz3D Programming/3d export/import library
| ||
Not sure if i am going to use the correct words , but saw it talked about before . I see lots of requests for this/that type of 3d importer/exporter, what we need is a set of defualt commands / types which we can all add. so we can create one.bb with lots of different importers/exports .. make it simple to add more etc when people can write them. note sure if that made sense , but i have written an import for .dof's (only used for one game) but i think having one libray for them would be good . thanks Matt |
| ||
This sounds awesome, seems like alot of open source Blitz projects would massively improve the community in many ways. I would love to help/learn with this project as much as possible. |
| ||
we realy need someone to set the basic structure of code up . eg default types , functions etc... and a good naming convention . I am not the one to do that as my code is not very clean :) anyone ? Matt |
| ||
Okay, I wasn't going to give this away, but what the hell... The BEST file format I've found (and I've done a LOT of looking) is ASE - ASCII Scene Export. It deals with pretty much EVERYTHING, including lights and cameras. There are also a number of freeware variations (.RTX is one) that deal with bones and skin. Now, the reasons this format is ideal are A) they are easy to read, hence B) they are reasonably easy to parse C) 3DMax has an ASCII exporter built in as does D) Milkshape AFAIK, and E) Writing an exporter that writes data to text is relatively simple. I started doing an ASE to B3D converter in Blitz3D last week, and although given enough time I might be able to finish it myself, it's probably better that I turn it over to the community. My main worry is that I've never done anything involving bones, and I can't get my head around how B3Ds store animation data (even hierarchy). I wont post the code now, but if anybody is interested in taking this further (and has the skill - its NOT easy) then post here and I'll put up the code I've done as a base. Beware, I don't do a lot of commenting! I've got it to read in the materials, sub materials, geometry data for individual objects, faces, and normals, (all in types) and the framework allows other data to be read by adding a couple of lines. The main issue is with writing the data back to a .B3D. |
| ||
I'm interested in the ASE/RTX format import/export system! Alas, I am not able to help with the coding :( I'm just voicing my interest in something along those lines being available. |
| ||
You have to be careful as far as the support for ASE in 3D art tools. 3D Studio Max actually has two ASCII file formats, ASE and ASC, which are different. For example, Milkshape imports/exports ASC, not ASE. |
| ||
Yes. The thing is though, if we can collectively get ASE working, the framework could in theory be adapted for use with ANY file format, providing the 'rules' of the exporter are followed. For example, I have each material in a type. Whether that material was read from an ASE or a .XYZ makes no difference to the exporter as long as the numbers are right (ie. RGB ranging from 0-255 instead of 0-1). If somebody can help with writing .B3D, the rest will write itself! :) |
| ||
All the code you need to write .b3d files is in the specs and utils section - you should have a look at the B3D2XML routines in the code archives as well. |
| ||
I've got all that code. I just can't translate it into what is required. The code from the specs and utils section doesn't seem to cover anything to do with animation or bones, and I'm left guessing. Ideally there should be a 'plain English' description of the format. Does anybody want to write the 'exporter' section of this thing? The 'importer' is basically done, and I wrote it in such a way that it can be easily extended. |
| ||
skitchy: Send me the code (my email is in my profile and I'll have a look. |
| ||
Just sent it. Good luck :) |