MshEx4Max - BETA Release REV3

How to create models in XSI and other 3D applications and make them work in Battlefront 1 & 2. Post models, tips for application usage and share anything XSI, 3DMax, SketchUp, etc.

Moderator: Moderators

Post Reply
RepSharpshooter
Gametoast Staff
Gametoast Staff
Posts: 1351
Joined: Tue Jul 10, 2007 4:10 pm

MshEx4Max - BETA Release REV3

Post by RepSharpshooter »

A .msh exporter for 3ds Max
BETA Release - see below \/ \/ \/

I went to start work on DMI again, but I had since updated my 3ds Max license, so XSI Crosswalk no longer worked. This meant I couldn't get models in XSI to export them with MshEx. Solution: rewrite a msh exporter from scratch compatible with 3ds Max

How it works:
1) Run a MaxScript in 3ds Max (pops out a text file)
2) Run MshEx4Max.exe (takes text file turns it into .msh)

You got msh.

Pics:

In Max:
Hidden/Spoiler:
Image
A minute later in ZE:
Hidden/Spoiler:
Image

BETA 1 Release - REV3
http://www.filefront.com/16736673/Mshex4Max_rev3.zip

Readme:
Hidden/Spoiler:
MshEx4Max BETA 1 **REV3**

How to Use:
1) Set up scene in 3ds Max*
2) Run MaxGrab.ms (Maxscript menu > Run Script)
3) Save file in same directory as MshEx4Max.exe, name it something like MyMesh.txt
4) Run MshEx4Max.exe, enter the following command: ex MyMesh.txt
5) Wait until it says "DONE!" Your msh appears as "MyMesh.msh" in same folder


* some stipulations are listed here:
-If you want to export more than one object in a scene, I reccomend at this point just merging them all into one object. Otherwise, use the select-and-link tool to link all the other objects to one object.
-Make sure everything has textures and uv coords.
-Only tested with editable poly objects
-Material IDS: if you go into editable poly > material IDS, make sure that the material ids of every face actually reference the submaterial in the multimaterial. For example, if your mulit-material has 5 submaterials, don't have a material id of 12. Max somehow undestands to roll around, but for my lazy sake I made it so 5 = 5, and anything above 5 would not work in this case. Beware of this, sometimes max likes to by default assign these wrong material ideas to things such as spheres. I will address this issue later but at the moment it is not.
-MaxGrab.ms was only tested with 3ds Max 2010

Notes for Rev2
-Fixed MaxGrab.ms to export normals correctly

Notes for Rev3
-Fixed MaxGrab.ms to export normals correctly
Null_1138
Jedi
Jedi
Posts: 1192
Joined: Thu Oct 16, 2008 4:05 pm

Re: MshEx4Max (WIP)

Post by Null_1138 »

This is awesome Rep! If this works, I'll finally have a viable way to turn some of my models (the more modest ones) to msh. Great work!
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: MshEx4Max (WIP)

Post by DarthD.U.C.K. »

:eek: repsharpshooter does it again
Darth_Spiderpig
Sith Master
Sith Master
Posts: 2631
Joined: Fri Mar 27, 2009 10:23 am
Projects :: Something cool...
Games I'm Playing :: BF2 CoDBO BFBC2
xbox live or psn: Has no xbox....Yup
Location: Does whatever a Spiderpig does
Contact:

Re: MshEx4Max (WIP)

Post by Darth_Spiderpig »

RepSharpshooter wrote:

Because the MaxScript grabs stuff right out of 3ds Max, this would perhaps make it easier to pull stuff out like vertex lighting, bones, envelopes, anims, etc. But my time is limited so I may not get to this unfortunately.



Ouch that would be a great feature too.
But omg, then I finally can export my models alone :D
:bowdown: :thumbs:
RepSharpshooter
Gametoast Staff
Gametoast Staff
Posts: 1351
Joined: Tue Jul 10, 2007 4:10 pm

Re: MshEx4Max (WIP)

Post by RepSharpshooter »

I guess the question is, how many people use 3ds Max anyways? Or how many COULD use it?

Seeing as Autodesk bought XSI, I'm thinking a Max exporter will be a stable tool for years to come.


As of now there's an issue with the program:
Hidden/Spoiler:
Image

It's all blocky like that because I thought I could save time by splitting the model all apart into separate triangles. Turns out it looses its smoothness in the process.

So it may take me like a week to rewrite the algorithms that do this.
Null_1138
Jedi
Jedi
Posts: 1192
Joined: Thu Oct 16, 2008 4:05 pm

Re: MshEx4Max (WIP)

Post by Null_1138 »

RepSharpshooter wrote:I guess the question is, how many people use 3ds Max anyways? Or how many COULD use it?
I'm using it for my robotics team. I'll take some tutorials over the summer to get proficient at it. And if I do, I will definitely use this tool.
User avatar
RED51
Jedi
Jedi
Posts: 1024
Joined: Sun Sep 07, 2008 6:25 pm
Games I'm Playing :: SWBFII

Re: MshEx4Max (WIP)

Post by RED51 »

Will this work with Gmax?
RogueKnight
Space Ranger
Posts: 2512
Joined: Sat Nov 22, 2008 1:50 pm
Projects :: Life. Work.
Games I'm Playing :: League of Legends
xbox live or psn: No gamertag set
Location: Washington, US

Re: MshEx4Max (WIP)

Post by RogueKnight »

RED51 wrote:Will this work with Gmax?
This program is only for 3DS Max.
RepSharpshooter
Gametoast Staff
Gametoast Staff
Posts: 1351
Joined: Tue Jul 10, 2007 4:10 pm

Re: MshEx4Max (WIP)

Post by RepSharpshooter »

RED51 wrote:Will this work with Gmax?
Because both gmax and 3ds Max use MAXScript, there is a chance that I may be able to make a gmax-compatible script as well.

Problem is that gmax is 10 years old, and they've added more commands to maxscript since then, and I may have used some. I have a feeling though that I may be able to get most of the important info out of it, but my first priority now is to fix the blockyness issue.
MsHwIz
Private Second Class
Posts: 73
Joined: Sat Feb 07, 2009 6:10 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Nowhere :) :)

Re: MshEx4Max (WIP)

Post by MsHwIz »

Any chance you will be releasing the source so someone can possibly port it to a free modeling program such as blender?
User avatar
RED51
Jedi
Jedi
Posts: 1024
Joined: Sun Sep 07, 2008 6:25 pm
Games I'm Playing :: SWBFII

Re: MshEx4Max (WIP)

Post by RED51 »

You don't have to do it right now, since I have no use for it for the time being. I never knew Gmax was 10 years old...
RepSharpshooter
Gametoast Staff
Gametoast Staff
Posts: 1351
Joined: Tue Jul 10, 2007 4:10 pm

Re: MshEx4Max - BETA Release

Post by RepSharpshooter »

MsHwIz wrote:Any chance you will be releasing the source so someone can possibly port it to a free modeling program such as blender?
Well the file format in between max and mshex is a slightly modified .obj format. I just added more information to it. So if you can find a .obj export script that you can modify to add this info in, then it will work with mshex.



EDIT: Good news, I fixed the blockyness issue, now it works as well as the old mshex! I'll release a beta shortly.


EDIT2: Fixed a small bug in MaxGrab.ms, make sure you download the Rev 2 version!


EDIT3: Already working on rev3 '-_- the normals were more messed up than I had thought.

EDIT4: revision 3 is uploaded and available here http://www.filefront.com/16736673/Mshex4Max_rev3.zip

I think I got it mostly right this time:
Image
VF501
Lieutenant Colonel
Lieutenant Colonel
Posts: 539
Joined: Fri Jun 08, 2007 1:18 am
Projects :: Various Stuff- Weapon models. UDK Stuff
Games I'm Playing :: Fallout New Vegas
xbox live or psn: Vintage Tagious
Location: Terra Firma, Sol System; Milky Way

Re: MshEx4Max - BETA Release REV3

Post by VF501 »

Very nice. I might give it a go to compare it to the Pandemic XSI exporter.

On a side note. If you have a valid Student e-mail that qualifies. Try registering here -> http://students.autodesk.com/
Its free student licenses for all Autodesk professional products (Softimage, Mudbox, Maya, 3DSMax). 6-13 months depending on version you use. You do have to be a current student with valid email, so don't try and cheat the system.
MsHwIz
Private Second Class
Posts: 73
Joined: Sat Feb 07, 2009 6:10 pm
Projects :: No Mod project currently.
Games I'm Playing :: I have not listed any games yet
xbox live or psn: No gamertag set
Location: Nowhere :) :)

Re: MshEx4Max - BETA Release REV3

Post by MsHwIz »

I have been working on an exporter for blender. The script exports the same file(hopefully) as the maxscript one.
Here is the download link. CLICKY

Download BlenderExport.zip from MediaFire

*note*For testing purposes I have added only one default material for export.
Post Reply