So what did I have to do to make all this work? First, I needed a way to write out modified meshes. I thought a bit about what file format to use, and decided to go for COLLADA, because it is quite popular currently. Irrlicht already is able to load COLLADA files and it was also easily possible to squeeze Irrlicht's materials and vertex formats into there. After some programming it worked, and the result was ok for me. Here's the proof :)
The nice side effect is now that irrEdit can export every mesh into COLLADA, which means .3ds, .obj, .b3d, ogre .mesh, .dmf, .oct, .x, .ms3d, .my3d, .csm, .lmts, .md2 and .bsp files. Cool. I also had to extend the Irrlicht COLLADA importer, to handle more than one texture coordinate set per mesh. The mesh writer isn't included in Irrlicht and will not ever, because IMO, a mesh writer has no place in a 3D rendering engine, and in this way, I can also include irrEdit specific meta data in the written meshes.
But writing COLLADA files wasn't everything I had to do, the hardest thing was the mesh file management. As you know, irrEdit is primary a scene graph editor. And the problem now is that a single mesh can be referenced more than once in a scene. Just like this:
Here, a file named 'room.3ds' has been imported, light mapped, then cloned twice and the clones again light mapped differently. As you can see on the right, irrEdit correctly created new mesh copies for every modified mesh and manages the serialization state of every file and its textures separetely and automagically if needed. This was a bit complicated to implement because I also had to track unmodified meshes and had to be aware to add the possibility of adding undo/redo functionality in irrEdit some day, but it works now.
Some features are still missing for the light mapper, but I think I'll finish them soon and release irrEdit 0.4 with the complete lightmapping tool included in about 3-4 weeks.
fourteen comments, already:
Good work niko! :D
bicunisa (link) - 14 08 06 - 18:41
This is sooo cool niko.I just hope it can also export animated directX meshes. keep you the great work. we are depending on you. btw I checked the irrlicht psp.. and yeah its all irrlicht.. so it got me thinking wouldnt it be cool to have irrlichtPS (playstation) and also irrlichtXbox that would be something… just a wild thought
Thanks for the superb work…
leo () (link) - 14 08 06 - 18:43
Mhh, very cool.
So is your Collada implementation able to import/export animations?
Would be really a cool feature, there are so many tools lacking collada animation support :/
Gauntlet - 14 08 06 - 20:02
We need to get you a wallet that says “Bad Ass Mother Fucker” because damn you are either really good or have a whole lot more time than I do.
TSM - 14 08 06 - 20:04
You’re simply the best! niko!
I’m waiting for the lightmapper!!!
Blizzard (link) - 14 08 06 - 21:23
Really great work Niko! The first picture seems to have very realistic light.
You are the best!
cmoibenlepro - 15 08 06 - 03:41
really cool, though i’m not sure i sgree about the meshwriter. here’s an example, like what if i used klasker’s scenenode to generate a really cool tree, but i wanted to use it in irredit. id need a mesh. if i had a meshwriter i could modify my klasker app to be a treemagik-like app, and create meshes from klasker trees.
just a thought. most of the time, you’d be right, and perhaps it would be better to just add treenode support to irredit, and retain the advantage of programmatic generation, but we can’t add new nodes to irredit yet can we? i dunno how far along the plugin capability is….
buhatkj - 15 08 06 - 07:33
Wow Niko, at last as usual a successful work! You are busy as a bree.
Don’t forget to relax also during your spare time!
minimax - 15 08 06 - 10:39
It’s incredible… Can’t wait to see more of it!
Lino () - 15 08 06 - 15:09
absolutely great !
andrei25ni () - 15 08 06 - 17:10
Really great work!! But i ask me, do you sleep ever?
Stefan Branske - 15 08 06 - 18:29
I hope this means the COLLADA loader will be much better soon… 60% isn’t ideal
RabidLockerGnome - 16 08 06 - 01:51
*lug does the niko shuffle in delight*
lug - 16 08 06 - 21:47
Niko is very efficient. I just wonder how this man have enough time to do all these things. Here is answer – he is wizard. Thanks for your work, and also your engine can be a great tutorial for 3d peoples.
etcaptor () - 17 08 06 - 23:14