New experimental loaders

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Post Reply
hybrid

New experimental loaders

Post by hybrid »

I have implemented two new loaders for Irrlicht: For DXF and ASE files. Both support only a very small part of the complete format specifications, but are quite useful to quickly visualize some models downloaded or brought by your customer without using expensive or buggy converters.
I will upload the patches to my patch page http://parsys.informatik.uni-oldenburg. ... d/irrlicht as soon as I have the sources online (I am writing on a different machine right now). Maybe you can already make some wishes about which features should be included :P
Note that at least for the ASE files another library is currently doing the parsing job (libASE) which is LGPL'ed such that this loader will probably not become a part of Irrlicht (although the LGPL would allow for - don't know if Niko will agree with that). But that part might be rewritten sometimes.
hybrid

Post by hybrid »

Ok, all patch files are up and tested. Note that most files you'll find for download are not textured, so many of them will show up completely white.

For the ASE file format you'll need libASE to be found at http://interreality.org/projects/libase which must also be added to the linker commands in your makefile/project or put into Irrlicht directly (like zlib etc.)
There are good chances that these loaders will change in the next days/weeks due to their preliminary state, so keep updated and don't remove your patch files.
hybrid

Post by hybrid »

I have fixed some problems with the dxf file loader which made it completely unusable for most dxf files: It did not recognize dos line ends correctly. I had tested several files with unix line ends so I did not find this bug. I even had the '\r' things added, but apparently not correct. So now it's working for all dxf files I have tested so far.
The ase loader got support for transparent materials, so might be worth updating, too.

There are still several problems with these loaders. The most important one is normal orientation. Some files I have found on the web just have some or all normals flipped which makes it rather compilated to properly present them. Does anyone know about a good fix for this?
hybrid

Post by hybrid »

I have now also added the COB file to the supported file formats. The original version of this loader was written by Morrog (see this very old thread: http://irrlicht.sourceforge.net/phpBB2/ ... php?t=4772
I have rewritten large parts of it, adding the binary cob format (which all files I found on the web were made in), removing STL data structures, and fixing all material problems the original version had. I think the correct hierarchy handling has to be implemented in order to draw all meshes correctly, but a lot of them are already working. Just try yourself.
afecelis
Admin
Posts: 3075
Joined: Sun Feb 22, 2004 10:44 pm
Location: Colombia
Contact:

Post by afecelis »

whoa hybrid! you got some interesting stuff going on here!

The DXF loader may interest Architects a lot!! Have you got any screenshots? You got any info of which DXF version it will be compatible with? Or if working in Autocad which DXF export options will work better?

Gotta check your latest patches!!! :D
vermeer
Posts: 2017
Joined: Wed Jan 21, 2004 3:22 pm
Contact:

Post by vermeer »

ase is cool, as supports several uvmapping channels, but only max, and some few more export it. Close to none of the free tools.

cob is very cool as supports many advanced stuff like vertex colors, and has good support of other mesh features, like smoothing normals, quads -not that we should care, all ends in triangles- and is averagely well supported in many modelers.

But if you're in the mood of adding formats, a loader for vrml2.0 would be really interesting. Specially if... multi uvs supported(for lightmaps, multitexturing) , lights positions, camera positions (both supported, I think even animation of em) . Softwares like Wings, Blender, and way many others do export vrml2.0. is an ascii format.
Finally making games again!
http://www.konekogames.com
hybrid

Post by hybrid »

Sorry, vermeer, most of these techniques are not supported yet. I just use the techniques directly supported by Irrlicht. Interesting with cob is NURBS support which I'd like to implement, but a lack of knowledge of this feature is currently preventing this :? Vertex colors in cob are curently not implemented as I were really fed up with this format. Everything is split into it's own separate section which leads to several combination steps later on. But I will add it in one of the next steps. My ase loader supports vertex colors! It looks really nice with smoothing normals and vertex colors.
BTW: Most of the advanced techniques you mentioned are also supported by other formats. Smoothing groups in 3ds, smoothing normals in ase. COB even has even arbitrary size faces with a simple triangulation method (I think it's using a fake triangle fan currently).
DXF is definitely only useful for simple coloring due to lack of texture coordinates. I am using a first simple split into several mesh buffers such that you can use manually added materials. All supported features are compatible with latest Autocad version as I were using the Autocad 2005/2006 file format specification. I have tested several dxf files from the net and worked on the loader until all of them (at least the 3d faces) were correctly displayed. But many things are still missing.
Any suggestions on any of the formats are thus highly appreciated!
hybrid

Post by hybrid »

I just want to draw attention to two other file formats I had a rather deep look into: obj+mtl and 3ds. You can find the forum threads here:
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=11083
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=12417

While both were originally supported by Irrlicht for several versions now, the addition of materials from the MTL file by looneychewey and some additions by myself, as well as my bug fixes to 3ds have made these file formats much more useable. So if you found many strange things with these formats give them another try (after patching your Irrlicht library of course :D )
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

keep up the good work bro
hybrid

Post by hybrid »

Thanks midnight!
Unfortunately, I have none of the original tools which produce the proper models, nor would I be able to create ones with those advanced features the formats do support. So I heavily rely on feedback by people using these formats and get wrong results. Something like "should be" and "currently looks like". And models which are properly textured, most models found on the web are just crap.
But yes, I will make my way through all Irrlicht models and the most common ones found in the community!
hybrid

Post by hybrid »

Ok, cob and ase loader had some coloring bug included: SColorf uses rgba while SColor uses argb such that I completely messed some of the colors. These are now fixed in the patches. Manually updating the files is rather simple: Just search for SColorf move the first value to the last position.
Could someone tell me the reason for this interface decision :? Is SColorf just used for OpenGL? But then it would be handy to have a SColor.toSColorf() which is missing...
Post Reply