Author Topic: A .MDL exporter  (Read 8332 times)

Offline Holy_Diver

  • Holy Diver
  • Archmage of Light
  • *****
  • Posts: 2280
  • This account won't read/reply to Private Messages
Re: A .MDL exporter
« Reply #10 on: September 07, 2010, 10:15:25 pm »
i'm dropping an x file of 500+kb onto it and it crashes. cpgen also crashes when i drop an x file onto it.

Please upload the x file. Also cpgen generates cp files from mdl files, that's why it's not called x2mdl :evil:

Offline Verdite

  • VIP
  • Dark Slayer Destroyer
  • *****
  • Posts: 1624
Re: A .MDL exporter
« Reply #11 on: September 08, 2010, 06:01:23 pm »
its untextured as its filename implies :)

Offline Holy_Diver

  • Holy Diver
  • Archmage of Light
  • *****
  • Posts: 2280
  • This account won't read/reply to Private Messages
Re: A .MDL exporter
« Reply #12 on: September 08, 2010, 09:55:23 pm »
The Assimp library won't seem to import this file or an old book.x file I think I got from Todd that was in the same directory (apparently reporting the same error)

I will have to debug the Assimp library and see what's going on / if it's simple bug I can fix/report/ask for help with or if there is some legitimate reason the file is not supported. I'm also not sure what x2mdl will do without a texture present / what Som would do, so I should probably check that also.

I bought a couple old Direct7 or older books that had some CDs with a bunch of public domain .x files on them. I haven't had any trouble loading those with the Assimp library. So it's not like Assimp only supports newer .x files (since Microsoft revived the format)

Offline Holy_Diver

  • Holy Diver
  • Archmage of Light
  • *****
  • Posts: 2280
  • This account won't read/reply to Private Messages
Re: A .MDL exporter
« Reply #13 on: September 12, 2010, 11:48:25 pm »
The reason the .x files are not working is because the MeshTextureCoords blocks look like this:

MeshTextureCoords { 104; 0.000000;0.000000; 1.000000;0.000000;

Instead of this:

MeshTextureCoords { 1479; 0.280615;0.558309;, 0.352344;0.554924;,

I would guess the exporter you all are using is buggy, except the files seem to work with the (Microsoft) "Retained Mode" libraries x2mdo depends upon... therefore there is probably a good chance the Assimp steering committee (or whatever) won't object to my modifying the .x loader to accommodate this whether it adheres to the .x specifications or not.

All of other blocks in your files seem to follow the double separator syntax, so I'm assuming that is also correct for the MeshTextureCoords blocks.
« Last Edit: September 12, 2010, 11:56:39 pm by Holy Diver »

Offline Verdite

  • VIP
  • Dark Slayer Destroyer
  • *****
  • Posts: 1624
Re: A .MDL exporter
« Reply #14 on: September 14, 2010, 07:47:29 pm »
Well would i be able to use a different x conveter solely for the use with your editor in the meantime?

Offline Holy_Diver

  • Holy Diver
  • Archmage of Light
  • *****
  • Posts: 2280
  • This account won't read/reply to Private Messages
Re: A .MDL exporter
« Reply #15 on: September 15, 2010, 02:57:42 am »
Yeah of course. Afaik this is being amended by the guy who maintains Assimp's .x loader. Might even be done already (it's a pretty simple fix) but I will have to rebuild the tool(s) with the new version of the library first before you can use it anyway. If it gets neglected I can surely hack the .x loader myself, but I'd like to give it at least a few days to a week first.

Offline Verdite

  • VIP
  • Dark Slayer Destroyer
  • *****
  • Posts: 1624
Re: A .MDL exporter
« Reply #16 on: September 15, 2010, 07:13:27 am »
Thats great news. Once the MDL uploader is ready ill post some of my enemy models for testing.

Are there any x converters you would recommend for use with x2mdl?

Offline Holy_Diver

  • Holy Diver
  • Archmage of Light
  • *****
  • Posts: 2280
  • This account won't read/reply to Private Messages
Re: A .MDL exporter
« Reply #17 on: September 15, 2010, 09:05:00 am »
Well you could've just tried without asking :smug:

I don't know anything about .x exporters. I actually looked at the .x format just now, and I gotta admit it is incredibly crummy.

I'm probably going to go ahead and code a mdl2x program anyway because it shouldn't be that hard with the D3DX libraries, and just so to justify the naming convention. I uh, would really like to see the original Som assets get an export option so people can (theoretically) start improving on those files / making new assets that conform to the esthetic / fill in some of the gaps.

I'll have to take another glance at the .x specifications though before I can say for sure if it can even represent the "soft" animations for export or not.

Hopefully Assimp will eventually come thru with Collada/Blender export support. But there's so far been only the admission that that would be handy.
« Last Edit: September 15, 2010, 09:09:02 am by Holy Diver »

Offline Holy_Diver

  • Holy Diver
  • Archmage of Light
  • *****
  • Posts: 2280
  • This account won't read/reply to Private Messages
Re: A .MDL exporter
« Reply #18 on: September 18, 2010, 08:17:46 am »
You know x2mdl also works with other types of input formats. Blender (.blend) and Collada (.dae) are probably worth trying in the meantime.

Offline Verdite

  • VIP
  • Dark Slayer Destroyer
  • *****
  • Posts: 1624
Re: A .MDL exporter
« Reply #19 on: September 19, 2010, 01:25:24 pm »
I exported files as collada dae (both versions available on blender) they didnt work, i then tried my .blend file, didnt work, so i created a cube to test as a .blend, it didnt work either... Is there reference  to go with this exe?