[Tutorial] Import MESH into 3DS MAX

3DS Max Importscript for OgreXML ( beta )
I'm a 3D Studio Max user and did not find anything on importing a Ogre MESH model !
So when I read that it could be converted to XML ( readable but hugh ) I decided to do a little scripting.
And the result is as follows ( after a few hours of trial and error )

OgreCommandLineTools -> http://www.ogre3d.org/download/tools
Autodesk 3D Studio Max -> http://usa.autodesk.com/adsk/servlet/pc ... eID=123112
My Import Script -> http://users.telenet.be/u122561/downloa ... OgreXml.ms
So how it works:
1. Open the Pack.zip
2. choose a MESH file and extract it
3. convert the MESH file with the OgreXmlConverter.exe to an XML file ( just drag the MESH file on the exe )
example:
Alchemist.MESH -> Achemist.MESH.xml
4. Open Max
5. Select Run Max Script and select my script
6. It asks for a xml file -> select the Alchemist.MESH.xml
7. Wait a few seconds
8. Apply the texture on the Alchemist ( it is the body.png )
NOTE: It may be required to download dds support for MAX from the NVIDIA website to support dds files in MAX ( but I think it is supported in the later versions )
TODO:
1. The xml file format support different sets of formats when it comes to uv mappings and normals, for example the weapons have another file format then the characters. This needs to be added !
2. The bones are not imported ( yet )
3. No animation is done ( yet ) -> for that I need to figure out how to decrypt the ANIMATION files.
But for now, on a one nights works, it is starting to look good.
Imput is ALWAYS welcome.
Hope you can enjoy for
T.
I'm a 3D Studio Max user and did not find anything on importing a Ogre MESH model !
So when I read that it could be converted to XML ( readable but hugh ) I decided to do a little scripting.
And the result is as follows ( after a few hours of trial and error )

OgreCommandLineTools -> http://www.ogre3d.org/download/tools
Autodesk 3D Studio Max -> http://usa.autodesk.com/adsk/servlet/pc ... eID=123112
My Import Script -> http://users.telenet.be/u122561/downloa ... OgreXml.ms
So how it works:
1. Open the Pack.zip
2. choose a MESH file and extract it
3. convert the MESH file with the OgreXmlConverter.exe to an XML file ( just drag the MESH file on the exe )
example:
Alchemist.MESH -> Achemist.MESH.xml
4. Open Max
5. Select Run Max Script and select my script
6. It asks for a xml file -> select the Alchemist.MESH.xml
7. Wait a few seconds
8. Apply the texture on the Alchemist ( it is the body.png )
NOTE: It may be required to download dds support for MAX from the NVIDIA website to support dds files in MAX ( but I think it is supported in the later versions )
TODO:
1. The xml file format support different sets of formats when it comes to uv mappings and normals, for example the weapons have another file format then the characters. This needs to be added !
2. The bones are not imported ( yet )
3. No animation is done ( yet ) -> for that I need to figure out how to decrypt the ANIMATION files.
But for now, on a one nights works, it is starting to look good.
Imput is ALWAYS welcome.
Hope you can enjoy for
T.


0
Comments
-- Type error: Call needs function or class, got: undefined
I tried it on 3 pc 32 and 64 bit versions.
Max Version: 2009 SP1
I've been searching for some type of 3DS Max importer for the past few days. I found the OgreXMLconverter (which works a treat by the way) but I still had no way to import the .xml files into Max.
As far as I know, the only way to convert ogre .xml files into a format Max can read, is to use either 3D Object Converter or Ultimate Unwrap 3D (but those programs cost more than Torchlight itself :shock:).
So this script is wonderful! Thankyou so much!
I'm going to try it out right now
Uh oh! I just got the same error
I just tried using it in Max 8 (32 bit Windows XP). I really wish I could help you, but I know nothing about programming. Still, if you need the error logs or anything, just give a shout, I'll try to help you in any way I can.
did you try the alchemist ?
btw I'm only got the Demo version ( if that has anything to do with it )
that log, yep send it to me
open the max script listener and run the script, post the error message from there plz
T.
Maybe you can learn something from the OGRE tools that already exist for Blender.
http://www.ogre3d.org/wiki/index.php/Tools:_Blender
Anyway, here is the error log:
As you can see, I have SeigeMax installed (for modding Dungeon Seige) could that be the problem?
Also, I put the ImportOgreXml.ms script into the 'Scripts' folder. Is that the right location?
Thanks again TaylorMouse. If you can get this working it's going to make a lot of people very happy, not just in the Torchlight community, but the Ogre folks as well
the script does not have to be in the scripts folder, you can select it from where you want, I didn't test it with the Dungeon Siege tool tho
try this:
instead of clicking Run Script, press the button, Open Script
then press <cntrl> + <e>, this will evaluate the script and open a dialogue box to select your xml file.
could you test this for me ?
thnx
T.
Here is the log:
Hope this helps. Let me know if there's anything else you need.
All Ogre Exporters
http://www.ogre3d.org/wiki/index.php/OGRE_Exporters
Content Creation Tools
http://www.ogre3d.org/wiki/index.php/DCC_Tools
3DS to Mesh
-> http://www.ogre3d.org/wiki/index.php/3DS2Mesh (win download here)
Lexiexporter (LEXIExporter is a native plugin for 3DSMax9)
-> http://www.ogre3d.org/wiki/index.php/LEXIExporter
and of couse oFusion Community Edition 1.8.6
for Max 7/8/9
http://www.ofusiontechnologies.com/downloads.html
anyway, did you zoom in very close, cause the model is only about 1or 2 units high !
T.
First drop a model.Mesh into OgreXMLconverter (just drag into the .exe) and it converts to model.Mesh.Xml
Then open model.Mesh.Xml with 3d Object Converter
Once open you can view the model there and convert to another file format.
(Note The Demo version of 3d Object Converter doesn't allow you to convert, you need the full version.)
File formats that worked for me:
.3ds
.ms
.prj
Im not getting the UV cords tough..
So I think TaylorMouse's script is the best way to go, especially if he can figure out how to import both the mesh and the animation files *crosses fingers*.
Just be creative
Will it be necessary to go through the process of using these user-created scripts to convert & save new meshes for use in full-content mods? Will torchEd include the plugins required for saving .MESH files straight from Max, or convering a .ase, obj, 3ds into .MESH, as well as the .ANIMATION files, etc?
You guys mentioned the content that will be included with the editor, just wanted to see if there will be plugins/scripts included with that 3dsMax content that will allow for easy saving of files for asset creation in mods.
not saying that the efforts of the community aren't something i want to capitalize on, just wondering if we'll get official tools for 3ds Max mesh exporting.
thanks!
We're also giving you all the raw max files and animations for the player classes and their wardrobes, as well as a few monsters, a full tileset, and some weapons and props.
... bit off topic for the thread, but been meaning to ask: will it be possible to download the editor without all the working-res artwork? I keep hearing "it's twice as big a download as the game" and honestly I don't know if I want the art again. I mean, can live with it, but yes. Guess it would be good reference.
You guys keep mentioning that the editor is "free" - does that mean people who don't buy the game can download it? So basically, the $20 was just for the campaign you guys made. Iiinteresting.
I'll keep you informed as soon as I got it to work there.
btw thnx travisbaldree
T.
In case Travis is gone, I heard them talk about posting the various assest in thier respective "folders" for download, separately from the download of the editor. At least that was the plan they were mentioning during one of the live streams from last weekend.
get it here http://users.telenet.be/u122561/downloads/ImportOgreXml.ms
T.
thank you sir.
This message must have been sent from above... it's... almost, too good to be true ^^
I'm gonna keep on trying to make my own classes until i succeed (: But first I'm gonna create my own weapons just to get back into 3ds max again and learn how the editor works a bit.
So I tried renaming it to ImportOgreXml2.ms (as SirDerpington suggested) but sadly, this didn't make any difference for me.
One interesting thing I did note, the 3DS Max 2010 error log highlighted this line:
Meshname = GetAttribute trimmed "material"
Could this line be the culprit? When I converted the Alchemist.mesh to an .xml file I copied the .mesh file to a different folder before converting it, I didn't copy any material files or anything else (it was just the .mesh file). Did I mess up the conversion process?
anyway, could you save the file and rename it like Derpington said ?
I don't know how it would be possible that it would work all of a sudden after saving, but hey if that would do the trick ??
T.
I'm not sure how to re-save a maxscript file (I can use 'em, but I dunno how to write 'em :roll:). Is this done from within 3DS Max itself?
I re-saved it as ImportOgreXml3.ms, but sadly it still didn't work. It gave me the same error message.
I guess just like you guys I am keen to get modding, so when I saw this thread I jumped right in and gave the scripts a blast.. I've also had the same error messages that others seem to have been getting, and I think I have found the problem.
the problem lies not with the script, but with the xml files themselves. the line
meshName = GetAttribute trimmed "material"
is sometimes getting characters such as / and # from the xml, and I dont think it likes it :P So, I went I made a copy of the xml file I wanted to open, and changed all of the lines such as
<submesh material="Material_#1/boots" usesharedvertices="false" use32bitindexes="false"
to something it might be more happier to chew on, such as
<submesh material="ohyeah" usesharedvertices="false" use32bitindexes="false"
and this seems to have done the trick. hope this helps you guys, and looking forward to seeing the crazy creations the mod community make for this fine game