Important Message

You are browsing the archived Lancers Reactor forums. You cannot register or login.
The content may be outdated and links may not be functional.


To get the latest in Freelancer news, mods, modding and downloads, go to
The-Starport

Strangeness when Exporting and Importing models between 3ds

Here you can discuss building custom ships, texturing and 3D modeling in Freelancer

Post Sat May 26, 2007 2:19 pm

Strangeness when Exporting and Importing models between 3ds

Hi everyone,

I recently took the Drake (Kusari Light Fighter) ship model and imported it into Milkshape with the CMP Importer plugin. Then I exported it to 3DS format so that I could play around with it in 3ds Max 7 (which I have WAY more experience with than Milkshape so it is easier for me to use). I imported it into 3ds Max and made the changes I wanted to make in order to create a new ship model (I stole the inspiration from the Advanced Drake ship addon mod, but I made some modifications, like closing the hole in the cockpit). I saved the file as a MAX format scene file at first while it was still a Work In Progress, but now that I'm finished with it I want to get it back into Milkshape so I can get all the textures set up right and use the CMP Exporter plugin to make a CMP file so I can use it in the game, but I'm running into some strangeness...

If I export from Max to 3DS and import the 3DS into Milkshape, some of my objects have changed their positions and rotations. And if I export to OBJ and then try to import the OBJ into Milkshape it crashes Milkshape.

Has anyone else run into similar problems and/or have any ideas on how I might fix them? I'm wondering if the OBJ crash might be because I told it to compress numbers in the export options, or perhaps some other non-default options that made it so that Milkshape doesn't work correctly with it. It might also be because I have a fairly large number of Groups (22 of them) and perhaps Milkshape can't quite handle that many. Or perhaps because I had created materials for the model in 3ds Max to make sure everything looked right to me, so maybe I need to remove those materials and only make them in Milkshape. Those are just shot-in-the-dark ideas though, I really can't say with any certainty that it is any of those things or anything else.

So if anyone has any ideas on what I could try to do in order to make this work, I'd really appreciate the help.

Drake

Post Sat May 26, 2007 3:56 pm

It just occurred to me that this might be an issue with polygon and/or verticies counts on the model I'm trying to import. Does anyone know the exact limitations for what Milkshape 1.7.6 can handle?

Post Sat May 26, 2007 4:11 pm

Well, I don't think this can be an issue of polygon or verticies counts because it imports the 3DS file just moves some of the objects around. It seems like the objects that have been moved (and had their orientations altered as well) are the objects that I created by making a mirrored copy of a pre-existing object. I'm not sure what it is about the way Max handles such objects that would make Milkshape treat them differently, but I think what I'm going to end up doing is recreating the model without making use of mirrored copies (copies, yes, but not mirrored ones). Interestingly, if I remember that with one of the objects I created, I created a copy of another object, and then mirrored the copy, rather than telling the mirror tool to create the copy, so I should be able to do it that way and not have problems I think.

Drake

Post Sat May 26, 2007 6:52 pm

Upon further reflection, I think it very well may be that the pivot points are what is causing the issues when exporting from Max and importing to Milkshape as a 3DS file, so What I'm going to try is to use Max's Hierarchy system to re-orient all the pivot points (without affecting triangles or verticies) so that Max sees them as having 0x0x0 rotation and see if that fixes it without having to redo the whole model again.

Drake

EDIT: Nope, still messed up, must be the mirroring problem or something else altogether.

Edited by - Drake1132 on 5/26/2007 7:59:33 PM

Post Sun May 27, 2007 12:12 am

Well, I got it fixed finally. It isn't merely a problem with mirroring, because even when I use absolutely no mirrored objects whatever, some of the objects still have incorrect positions and orientations after import to Milkshape. But, I checked the Milkshape forums and discovered that if you select the entire model and all of it's parts and use the Max utility "Reset XForm" prior to exporting as 3DS it will fix the problem. You still have to re-orient the whole model though since the coordinate systems are different, but that isn't too hard... just remember that in the top-view viewport the front of the ship should be at the top and you should be looking at the top of the ship (at least, this is the orientation you have when you import a CMP).

Drake

Post Sun May 27, 2007 3:23 am

Drake there's a MAX2MS3D plug-in in the downloads, use it to save you any headaches, just leave it to do it's job or it will freeze MAX(needs a lot of RAM to convert the vertices).

The problem is down to how games (and Milkshape) use the xyz axis, MAX & every other large commercial 3d program have x & y as the horizontal axis, the vast majority of games use x & z instead. Milkshape was built for game modeling (halflife) and is one of the reasons it's used by most moding communities, the other is the free SDK to help create plug-ins, you need to buy a licence for MAX to do the same.

Now you know why I say use milkshape for game content instead of MAX, I use MAX 8 myself but not for game content.

**shuffles off with a new headache**

Post Sun May 27, 2007 4:27 pm

The problem with the max2ms3d plugin is that I can't get it to work with Max 7. When I install it and load Max, Max gives a loading error about the plugin being an old plugin format and incompatible with my version of Max. I don't know if newer versions of Max have improved backwards compatibility with plugins for older versions, but I've never been able to get Max 3/4 plugins to work with Max 7. I don't remember if Max 5/6 plugins work. And I suppose it may be possible that there is something unusual about my installation of Max 7 such that it is supposed to be backwards compatible, but isn't for some reason, but since plugin sites for Max tend to have separations between plugins for older versions compared to plugins for Max 7, I doubt that is the case. At any rate, unless there is another version of the plugin that I haven't seen but that is known to work with Max 7, I have to use the 3DS Export/Import method.

As to the axis conversions, if either Max or Milkshape handled the conversion correctly during Export/Import, it wouldn't be a problem. All that would need to be done is that for each Object (not vertex, not face, not edge, not poly) the values for the axises would need to be transposed... for any converter system this should be as simple as setting up an array, copying the original axis information into that array, then copying the data from the array back into the original file but with the data transposed, and saving the modified file.

What I noticed with the Export/Import of 3DS files though, is that rather than converting the axis information, the objects' orientation is simply kept as original, but displayed in the new coordinate system. The problem seems to have arisen out of the fact that with the translation and rotation modifiers made to the objects, the new pivot points had orientations that were not so easily interchanged with the new coordinate system. If the X, Y, and Z orientations are all parallel and/or perpendicular to the true horizontal and vertical planes, then the objects will suffer no ill effects in the transition from Max to Milkshape. If, however, the X, Y, and Z orientations are instead rotated by some angle or another, then when the orientations are transposed to the new coordinate system, it causes odd orientations. And if there is a translation modifier in the modifier stack AFTER the orientation modifier, then this could cause such an object to also end up with incorrect positioning as well as incorrect orientation.

The Reset XForm workaround essentially reorients all pivot points so that they have normal parallel and perpendicular orientations, and this supersedes the previous modifiers in the modifier stack so that when Milkshape's new coordinate system is applied to the objects, they are reoriented without anomalous results.

So in short, you're right, this is definitely an issue caused by the differences in the coordinate systems, but for me using purely Milkshape for game modeling and using the max2ms3d plugin are not really options. The first isn't an option because I find Milkshape to be so much more tedious to use compared to Max that it would take me easily twice as long or longer to do the same job in Milkshape as I can do in Max. And the second isn't an option because the plugin doesn't work. The Reset XForm workaround, on the other hand, is a very easy and quick fix... select all objects, Utilities tab, Reset XForm button, Reset Selected button, save file, Export to 3DS, open Milkshape, Import from 3DS, select all objects, rotate all objects around the World Origin so that they have the correct orientation for the new coordinate system... this takes all of 5 minutes tops. And that seems to me to be even easier than waiting for the max2ms3d plugin to convert all verticies even if I could get the plugin to work (although this is just a perspective issue... I know that I am making progress and I know how far along I am... the actual process probably takes a similar amount of time as the max2ms3d plugin and certainly requires more user interaction, but since I have clear progress indicators, I don't mind).

Drake

Edited by - Drake1132 on 5/27/2007 5:29:38 PM

Edited by - Drake1132 on 5/27/2007 5:33:52 PM

Post Sun May 27, 2007 5:03 pm

Ahhh... I just followed the link you posted and it IS a newer version of the plugin, which might work with Max 7. I'll give it a try some time, but since I got my model to work properly using the Reset XForm fix, it will have to wait until I decide to make another model, which might not be any time soon, because for now all I really wanted was to make a ship that I felt looked better than the others in the game (while remaining true to the feel of the original) and make that ship available in Single Player. I have previously used other ship models borrowed from different modders here, but I was never totally satisfied with them (often because they felt like they were foreign to the game's universe) and decided it was time for a new model somewhat of my own design.

For anyone interested, here are some pics of the new ship (rendered in Max, with slight reflectivity on the cockpit glass texture)...

Click here
Click here
Click here
Click here

I think I mentioned this before, but this design was inspired by the Advanced Drake ship addon mod. I would link to that mod and give credit to the original author of it if I could find it again (search of downloads from "any date" using the keywords "advanced" and "drake" didn't turn it up... it's possible that I pulled it out of another mod rather than it being a stand-alone, but I thought it was stand-alone).

EDIT: Found it... not sure if this is where I originally picked it up or not, but the Advanced Drake is a part of the Black Future ship pack (Click here). Anyone who looks that up will see extreme similarities in the models, but I created my model from the original Drake, not from the Advanced Drake. The Advanced Drake, aside from having the hole in the Cockpit like the original Drake has, also was missing it's interior, so that if the cockpit glass was semi-transparent, you could see right out the bottom of the ship... highly annoying to me.

Basic changes to the model are as follows...

1. At the exhaust port, removed dorsal stabilizer fin and replaced with two larger fins at off-angle.
2. Added port and starboard stabilizer fins at exhaust port.
3. Changed angle of ventral wing fins.
4. Increased size of main wings.
5. Added wing fins to main wings
6. Added half-sized dorsal wing fins just behind the cockpit
7. Closed holes in the cockpit glass (the original Drake ship model has two gaps in the cockpit, one of which is covered by a single stand-alone triangle face that uses the same texture and material as the main cockpit object, and the other is just empty... always bothered me to have a hole in the cockpit, so I fixed it and made it into a single object).
8. Retextured the whole thing.

Drake

Edited by - Drake1132 on 5/27/2007 6:06:45 PM

Edited by - Drake1132 on 5/27/2007 6:09:40 PM

Post Sun May 27, 2007 11:25 pm

Well, after running into problems with CMP Exporter crashing when I try to export my ship model, I decided to try the max2ms3d plugin and see if that would make things better. No such luck . I get no errors when I export to MS3D, but when I try to open the newly created file with Milkshape, it crashes Milkshape .

So now I've spent the better part of my weekend making a new ship model out of an old one and retexturing the thing, only to find that I can't get the bloody thing into the game! I'm a little frustrated.

So now I may be forced to recreate the model using Milkshape ONLY and see if I can get it to work that way, and considering the lack of precision controls Milkshape gives you for moving and rotating objects, that isn't a prospect I much look forward to... it will take a bloody long time.

So if anyone has any insights into how I can possibly get Milkshape to load my exported MS3D files, or if you have any insight as to how I might be able to get CMP Exporter to work (please see my thread in the 3rd Party Utilities forum for more details on that one), I would very much appreciate the help.

Drake

Post Tue May 29, 2007 6:49 am

There's a .md3 exporter for 3dsm 6 available that works with 8, so it should work with 7 as well. I haven't had to worry about realigning the models I've cobbled together and imported into ms3d when exporting them into .md3, so this should help you streamline the conversion process from 3dsm to ms3d at least. I can't help you w/ .CMP's, as I'm still in the process of unwrapping and skinning my models, and haven't bothered trying to fully export them into FL, yet... Modding FL gives me enough headaches as it is w/o trying to undergo steps I'm not even ready for yet

Edit:

When you go to export, it'll give you a window w/ a box that says 'frames' you'll want to set that to 0, you don't need to change any of the other settings... Depending on the poly (or vertex? can't rightly recall at the moment) count it may tell you that it's too high, but it will still save the .md3 properly, and it can be imported into ms3d.

Edited by - akaraiu on 5/29/2007 7:51:30 AM

Post Tue May 29, 2007 2:33 pm

Have you tried "Grouping" the parts together in Max before export to ms3d format? I've had no problems using this method, as it still lets you "open" the group to edit each part separately later on, but exports them all as essentially one object.

Return to Freelancer 3D Modeling and Texturing Forum