A .MDL exporter

#11
(2010-09-07, 07:44 PM)Verdite link Wrote: 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
Reply

#12
its untextured as its filename implies :)


Attached Files
.x   untextured.x (Size: 477.29 KB / Downloads: 122)
Reply

#13
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)
Reply

#14
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.
Reply

#15
Well would i be able to use a different x conveter solely for the use with your editor in the meantime?
Reply

#16
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.
Reply

#17
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?
Reply

#18
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.
Reply

#19
You know x2mdl also works with other types of input formats. Blender (.blend) and Collada (.dae) are probably worth trying in the meantime.
Reply

#20
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?
Reply





Users browsing this thread:
7 Guest(s)