Mesh loader / Writer idea
Mesh loader / Writer idea
Just an idea, I'm not volunteering to do it. I'm posting it here because it may just inspire someone to write it (it shouldn't be difficult). Also it would never make it into the engine, as it would be Windows only and possibly also a bit naughty. It is the spawn of a discussion on IRC last night, but was quickly buried by off-topic arguments about politics, religion, philosophy and cheese, so I'm reposting it here because it's my best idea of 2008 so far!
Okay that's the disclaimer out of the way, now to launch the meme...
Milkshape is a wonderful 3D modeling and conversion tool. It is cheap ($25 when I bought it), and supports importing and exporting around 50 different mesh formats.
The power comes from the DLL-based, pluggable importer/exporter system, which makes it very popular with the game modding scene.
MilkShape's internal format is completely compatible with Irrlicht's bone based meshes, because (IIRC) Luke originally based the B3D loader on the MS3D loader, which were eventually merged together with the X loader to form the new internal SkinnedMesh format.
So, it should be possible and easy to write a MilkShape plugin loader that uses the MS3D DLLs to load bone based meshes into a SkinnedMesh. I'm guessing the code would look pretty similar to the MS3D loader, only simpler because it doesn't deal with the actual file data. Adding the ability to save in these 50 different formats should also be easy.
To make things even better, the vast majority of plugins are written by MilkShape users not by chUmbaLum sOft. So they are quite likely to give permission to redistribute these DLLs if approached.
Okay that's the disclaimer out of the way, now to launch the meme...
Milkshape is a wonderful 3D modeling and conversion tool. It is cheap ($25 when I bought it), and supports importing and exporting around 50 different mesh formats.
The power comes from the DLL-based, pluggable importer/exporter system, which makes it very popular with the game modding scene.
MilkShape's internal format is completely compatible with Irrlicht's bone based meshes, because (IIRC) Luke originally based the B3D loader on the MS3D loader, which were eventually merged together with the X loader to form the new internal SkinnedMesh format.
So, it should be possible and easy to write a MilkShape plugin loader that uses the MS3D DLLs to load bone based meshes into a SkinnedMesh. I'm guessing the code would look pretty similar to the MS3D loader, only simpler because it doesn't deal with the actual file data. Adding the ability to save in these 50 different formats should also be easy.
To make things even better, the vast majority of plugins are written by MilkShape users not by chUmbaLum sOft. So they are quite likely to give permission to redistribute these DLLs if approached.
-
- Posts: 914
- Joined: Fri Aug 03, 2007 12:43 pm
- Location: South Africa
- Contact:
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact:
just a thought, we could discuss the spec here hoping someone would use that spec to write the code.
my suggestion:
1) define the document object model (dom) for the application on which the modules will fit-in.
2) define the interfaces for each object.
3) write a simple prototype for each object targetting the dom.
my suggestion:
1) define the document object model (dom) for the application on which the modules will fit-in.
2) define the interfaces for each object.
3) write a simple prototype for each object targetting the dom.
Do you know if Milkshape supports now well full bone weights ? I know it can import them and export them finally (it used to only use 1.0 or 0.0 weights , like HL1) .What I don't know is if the interface is allowing to skin it with those partial weights, like, for example, in Blender or Max. (anyway, if so, still could be valid for robots or other made by rigid parts models )
Finally making games again!
http://www.konekogames.com
http://www.konekogames.com
Yep, the latest version of the MS3D format is supported.. Either Hybrid or Luke fixed the loader, not sure who but when I went to raise it as a bug someone had already fixed itvermeer wrote:Do you know if Milkshape supports now well full bone weights ? I know it can import them and export them finally (it used to only use 1.0 or 0.0 weights , like HL1)
I don't know whether the MS3D plugins support multiple bone influences per vertex yet, but I guess they will eventually.
@dlangdev, what do you mean by DOM? The DLL exports are defined by the MS3D SDK, Irrlicht's bone based mesh format is defined by ISkinnedMesh.h, and the mesh loader and writers are defined in IMeshLoader.h and IMeshWriter.h. I don't think it would need any new interface designs or anything, it's all implementing existing ones.
Now, I meant, I know since long it can import/export weights(it didn't before); what I didn't know if there's a solution in the UI to actually create you partial weights(it hadn't) to several bones, or were left alone in the rain with importing already weighted models...
Just checked. While the solution imho is slower than it could be (ie, blender or max has quite faster options) , the fact is that it has it already, which (am a registered user also) was one of my main dislikings of the tool. I know it's great for usual mesh editing game tasks. Not my fav by far, but seems halve of the humankind is using it, while the other is adopting Blender (I mean considering the part of the humankind that doesnt go direct to Max or Maya) ...so we can't forget the ms3d half
And yep, it allows it, so, no issues. Indeed has been updated as well b3d exporter for adding to it more features.
Just checked. While the solution imho is slower than it could be (ie, blender or max has quite faster options) , the fact is that it has it already, which (am a registered user also) was one of my main dislikings of the tool. I know it's great for usual mesh editing game tasks. Not my fav by far, but seems halve of the humankind is using it, while the other is adopting Blender (I mean considering the part of the humankind that doesnt go direct to Max or Maya) ...so we can't forget the ms3d half
And yep, it allows it, so, no issues. Indeed has been updated as well b3d exporter for adding to it more features.
Finally making games again!
http://www.konekogames.com
http://www.konekogames.com
my mind was someplace else when i was typing them.
anyway, the interface is exported by the loader, so the only thing needed to produce is the loader.
i'm all for that, though i don't have access to the source code.
plus i write very sloppy code, it's the secret for keeping my job, though. i write tons of code (very complex algorithms for simple problems) and keep prying eyes baffled from sloppy coding. it's close to egyptian hieroglyphs, to be exact.
seriously, i would love to have this tool, i'm starting to feel the sting of irredit (it's fighting back) as it won't do some of the things i'd want it to do.
with the plugin loader implemented, irredit or perhaps another tool can be created to support those plugins.
just make sure irrlicht's imesh aligns perfectly when the plugin is shovelling the data in, though.
anyway, the interface is exported by the loader, so the only thing needed to produce is the loader.
i'm all for that, though i don't have access to the source code.
plus i write very sloppy code, it's the secret for keeping my job, though. i write tons of code (very complex algorithms for simple problems) and keep prying eyes baffled from sloppy coding. it's close to egyptian hieroglyphs, to be exact.
seriously, i would love to have this tool, i'm starting to feel the sting of irredit (it's fighting back) as it won't do some of the things i'd want it to do.
with the plugin loader implemented, irredit or perhaps another tool can be created to support those plugins.
just make sure irrlicht's imesh aligns perfectly when the plugin is shovelling the data in, though.
i found an example here...
http://www.xbdev.net/3dformats/milkshape/index.php
the next step is setup a template project for the plugin and loader, i'd prefer it to written in msvc 2003 and above. this task will take me at least 80 hours to figure out, maybe someone can do this in 8 hours, that'd be cool.
http://www.xbdev.net/3dformats/milkshape/index.php
the next step is setup a template project for the plugin and loader, i'd prefer it to written in msvc 2003 and above. this task will take me at least 80 hours to figure out, maybe someone can do this in 8 hours, that'd be cool.