Up to Date Max2Map
by Matthew Jones · 01/27/2003 (12:40 pm) · 24 comments
I just recently dicovered Desmond Fletchers changes to his site concerning Max2MAP. He now goes into making an exported .MAP file compatible with Quark. Previuosly I believe it was only compatible with WorldCraft. I will discuss setting it up either way depending on what tools your using. Since Quark is the dominate tool in my opinion I wanted to set my Max2Map file to output Quark compatible files.
The first snag I ran into, is the current version of code for Max2MAP still only compiles for use with MAX 3.1. I needed at least R4. So I looked around and asked a few question over at Tork-Dev. Stephan informed me I needed to make some linking changes to the Max2MAp project:
1. Open your torque SDK project
2. set MAX2MAP as the Active project
3. Right Click MAX2MAP and choose settings.
4. In the setting panel first go to the "C/C++" panel under project options you should find a section that says "../lib/maxsdk31". Change it to "../lib/maxsdk40"
5. Next goto the "Link" panel and under project options you'll find "../lib/maxsdk31" change it to (just like before ]"../lib/maxsdk40". Then do a clean build on at least that project and this should compile and run under MAX4 or 5.
The exporter will still only write a World craft compatible MAP file at this point. But for World Craft user GOOD NEWS your done!
For Quark Users you'll need to make some more changes.
In your Max2Map folder you'll find 2 folders called "Source" and "Header". Open the Source folder and you'll find 1 file called Main.cc
Search for this statement in your file
Next we will do the same thing in this statement:
Do a clean build on the project and you should be Up To Date.
I just did all this today but I'm blond and I had a wild youth so I very could have forgoten somthing. If anybody has a problem please let me know by posting here or emailing me at mjones7947@comcast.net
I have a compiled version of the debug (renamed max2map eporter.dle) and the Source code with these changes for people who don't really care they just want to get it done. It can be found HERE
I guess it was to big to upload to GG so its at my site for the time being.
I also am trying to find all the ins ands outs of this tool and will hopefully have the time to write a tutorial.
My programmer is also looking into the feasabilty of writing a MAX2DIF plugin. Most likely we will just write a script that will run both max2map and map2dif in the same operation. I have seen several people state they were going to give Max2Dif a try but nothing ever came of them so we don't know what the possibilities are.
We think its not such a far stretch considring MAX geometry is very similiar to Dif geometry at least when you look at it under wire frame.
Also a I would think a blender2dif and milkshape2Dif should't really be such a stretch if MAX version is possible. This would eliminate the need for a proprierty map editor. Quark is a great tool I just think it has a few problems. The recent release of Marble blast Map2Dif reduces the of the bugs like inflating and deflating of faces and edges but the problems still pop there head everynow and agian for unknown (by me, anyway) reasons. With MAX2MAP I do not get any of this and I am more flexible in the type of geometry I can build.
Enough babbling Have fun
Matt
The first snag I ran into, is the current version of code for Max2MAP still only compiles for use with MAX 3.1. I needed at least R4. So I looked around and asked a few question over at Tork-Dev. Stephan informed me I needed to make some linking changes to the Max2MAp project:
1. Open your torque SDK project
2. set MAX2MAP as the Active project
3. Right Click MAX2MAP and choose settings.
4. In the setting panel first go to the "C/C++" panel under project options you should find a section that says "../lib/maxsdk31". Change it to "../lib/maxsdk40"
5. Next goto the "Link" panel and under project options you'll find "../lib/maxsdk31" change it to (just like before ]"../lib/maxsdk40". Then do a clean build on at least that project and this should compile and run under MAX4 or 5.
The exporter will still only write a World craft compatible MAP file at this point. But for World Craft user GOOD NEWS your done!
For Quark Users you'll need to make some more changes.
In your Max2Map folder you'll find 2 folders called "Source" and "Header". Open the Source folder and you'll find 1 file called Main.cc
Search for this statement in your file
// wadname dSprintf(buf, sizeof(buf), "\"wad\" \"%s\"\n", gMapProperties.mWadName); writeString(file, buf);Comment out the writeString part
//writeString(file, buf);Next go down about 10 lines you'll find this
// ambient color
dSprintf(buf, sizeof(buf), "\"ambient_color\", \"%d %d %d\"\n",
gMapProperties.mAmbientColor.red, gMapProperties.mAmbientColor.green, gMapProperties.mAmbientColor.blue);
writeString(file, buf);Change it to this// ambient color
dSprintf(buf, sizeof(buf), "\"ambient_color\" \"%d %d %d\"\n",
gMapProperties.mAmbientColor.red, gMapProperties.mAmbientColor.green, gMapProperties.mAmbientColor.blue);
writeString(file, buf);Doesn't look like we change much. We didn't we just removed the comma after "\"ambient_color\"Next we will do the same thing in this statement:
// emergency lighting color
dSprintf(buf, sizeof(buf), "\"emergency_ambient_color\", \"%d %d %d\"\n",
gMapProperties.mEmergencyAmbientColor.red, gMapProperties.mEmergencyAmbientColor.green, gMapProperties.mEmergencyAmbientColor.blue);
writeString(file, buf);Change it to:// emergency lighting color
dSprintf(buf, sizeof(buf), "\"emergency_ambient_color\" \"%d %d %d\"\n",
gMapProperties.mEmergencyAmbientColor.red, gMapProperties.mEmergencyAmbientColor.green, gMapProperties.mEmergencyAmbientColor.blue);
writeString(file, buf);Then for astetics you can search the main.cc and the export.h files for any instance of WorldCraft 3.3 and change it to Quark 6.3 or whatever you want.Do a clean build on the project and you should be Up To Date.
I just did all this today but I'm blond and I had a wild youth so I very could have forgoten somthing. If anybody has a problem please let me know by posting here or emailing me at mjones7947@comcast.net
I have a compiled version of the debug (renamed max2map eporter.dle) and the Source code with these changes for people who don't really care they just want to get it done. It can be found HERE
I guess it was to big to upload to GG so its at my site for the time being.
I also am trying to find all the ins ands outs of this tool and will hopefully have the time to write a tutorial.
My programmer is also looking into the feasabilty of writing a MAX2DIF plugin. Most likely we will just write a script that will run both max2map and map2dif in the same operation. I have seen several people state they were going to give Max2Dif a try but nothing ever came of them so we don't know what the possibilities are.
We think its not such a far stretch considring MAX geometry is very similiar to Dif geometry at least when you look at it under wire frame.
Also a I would think a blender2dif and milkshape2Dif should't really be such a stretch if MAX version is possible. This would eliminate the need for a proprierty map editor. Quark is a great tool I just think it has a few problems. The recent release of Marble blast Map2Dif reduces the of the bugs like inflating and deflating of faces and edges but the problems still pop there head everynow and agian for unknown (by me, anyway) reasons. With MAX2MAP I do not get any of this and I am more flexible in the type of geometry I can build.
Enough babbling Have fun
Matt
About the author
Recent Blogs
• Plan for Matthew Jones• MAX2DTS for MAX 5 / Fixes the Multi-res
• Plan for Matthew Jones
#2
you can DOWNLOAD IT HERE
I made the compiled version availible as well as the source. Me personally I like to know what going on and I can seem to find anybody who has explained the changes they made to get it to compile so I submitted all my changes for a resource so they could be availible for everyone who wants to know.
If you got errors you might not have the DX8 sdk linked into your project.
in VC6 goto Tools (at the top)/ options then go to the Tab that says "directories". Make sure the top 2 spaces say "win32" and "include files" if not change them. Then Select NEW (the little folder next to the X) Then point it to "DRIVE../DXF/DXSDK/INCLUDE". when you get then move it up to the top.
You also need to do that to compile Max2DTS properly.
Matt
01/27/2003 (4:34 pm)
I did put a link up for the DLE. Its zipped up with the source code. I for just forced you to read through my BS before you could find it.you can DOWNLOAD IT HERE
I made the compiled version availible as well as the source. Me personally I like to know what going on and I can seem to find anybody who has explained the changes they made to get it to compile so I submitted all my changes for a resource so they could be availible for everyone who wants to know.
If you got errors you might not have the DX8 sdk linked into your project.
in VC6 goto Tools (at the top)/ options then go to the Tab that says "directories". Make sure the top 2 spaces say "win32" and "include files" if not change them. Then Select NEW (the little folder next to the X) Then point it to "DRIVE../DXF/DXSDK/INCLUDE". when you get then move it up to the top.
You also need to do that to compile Max2DTS properly.
Matt
#3
Thanx a lot for your help. I think I didn't read correctly to find the link. I already downloaded the DLE; many many many thanx. I'll try it out to see if finally my dream of exporting a map from 3dsmax comes true h aha ha =) .
I did check my VC6 config and, as you said, I didn't have the DX8 sdk linked. I tried to link it following your steps but I couldn't find the route: "DRIVE../DXF/DXSDK/INCLUDE".
I only found a file in torque\lib\directx8\dxsdk.inc
should I enroute it there?
thanx again, you are most kind
01/27/2003 (6:51 pm)
@MatthewThanx a lot for your help. I think I didn't read correctly to find the link. I already downloaded the DLE; many many many thanx. I'll try it out to see if finally my dream of exporting a map from 3dsmax comes true h aha ha =) .
I did check my VC6 config and, as you said, I didn't have the DX8 sdk linked. I tried to link it following your steps but I couldn't find the route: "DRIVE../DXF/DXSDK/INCLUDE".
I only found a file in torque\lib\directx8\dxsdk.inc
should I enroute it there?
thanx again, you are most kind
#4
"Export Module Failure"
Im using Max 5 by the way
Im doing a basic sphere, i have it linked together with
Base->Start->Detail_1->Sphere01
and i have all of the File information set up
01/27/2003 (7:05 pm)
I get this error when trying to export an object ... any idea what would be causing it ?"Export Module Failure"
Im using Max 5 by the way
Im doing a basic sphere, i have it linked together with
Base->Start->Detail_1->Sphere01
and i have all of the File information set up
#5
01/27/2003 (7:20 pm)
Ok i got it to export correctly but it still gives me that error
#6
01/27/2003 (7:24 pm)
I'm getting the same error. What's the proper procedure to export? Is there a tutorial on this regard?
#7
In the mean time the MAP file is still valid and should load up into Quark. If you load and see nothing then you have a problem in your linking. Besides the "Base","Start","Detail_1"(must have that underscore) you also need to make sure your object is named with the corresponiding detail marker. So your Object's name would be as follows "Object1". Note the one at the end of the name. Anything else won't work. I haven't played with LOD yet so I am not sure how the detail markers works. Probably not a good idea to pile to much into one scene.
Also you still have to texture in Quark or worldCraft. I am working on that also.
Alvaro
You need to download the DirectX 8 SDK from Microsoft and install it on your computer. If you install (for instance) on your C drive then your path will be the following C:/DXF/DXSDK/INCLUDE. But first you must have the DX8 installed.
I am not sure about the DX9 sdk. I don't know how that will work I haven't tryed it but I would think it would also work.
Matt
01/27/2003 (9:52 pm)
Ya the error pops every time I don't know why but I do know that it is not a error generated by Max2Map. I think Max kicks the error out and I am looking into it but I haven't had much luck. I will update it to a fixed version as soon as I can find the problem.In the mean time the MAP file is still valid and should load up into Quark. If you load and see nothing then you have a problem in your linking. Besides the "Base","Start","Detail_1"(must have that underscore) you also need to make sure your object is named with the corresponiding detail marker. So your Object's name would be as follows "Object1". Note the one at the end of the name. Anything else won't work. I haven't played with LOD yet so I am not sure how the detail markers works. Probably not a good idea to pile to much into one scene.
Also you still have to texture in Quark or worldCraft. I am working on that also.
Alvaro
You need to download the DirectX 8 SDK from Microsoft and install it on your computer. If you install (for instance) on your C drive then your path will be the following C:/DXF/DXSDK/INCLUDE. But first you must have the DX8 installed.
I am not sure about the DX9 sdk. I don't know how that will work I haven't tryed it but I would think it would also work.
Matt
#8
Thank you very much for your prompt answer. I already downloaded and installed DX9 but no sdk (DX8 or DX9). I'll download the DX8 SDK and install it.
01/28/2003 (9:03 am)
@ MatthewThank you very much for your prompt answer. I already downloaded and installed DX9 but no sdk (DX8 or DX9). I'll download the DX8 SDK and install it.
#10
cheers!
01/28/2003 (1:56 pm)
I downloaded and installed the DX9SDK and when I went to VC6 to add it, it was already there. You were right, I didn't have any SDK installed at all (no wonder so many things I tried before didn't compile properly!!!).cheers!
#11
01/28/2003 (4:02 pm)
Ya it makes difference. Glad to here good news.
#12
The DX9SDK made a mess of my system, it corrupted the proper work of windows media player 9. I had to uninstall it and reinstall the DX9 runtime to get it back to work properly.
I guess I'll better try DX81 sdk. Is it possible to have the 81 sdk and the ver9 runtime?
01/29/2003 (7:37 pm)
@MatthewThe DX9SDK made a mess of my system, it corrupted the proper work of windows media player 9. I had to uninstall it and reinstall the DX9 runtime to get it back to work properly.
I guess I'll better try DX81 sdk. Is it possible to have the 81 sdk and the ver9 runtime?
#13
good luck
Matt
01/30/2003 (4:57 am)
Ya I have both on my system so I don't think is should be a rpoblem. I don't understand how 9 even messed up your system. I talked to my coworker he said he had some problems with it too on his p2 450 machine. Also you don't have to install the dxsdk 9 to get at the include folder I think all you have to do is extract it. I don't use Wmediaplayer so I couldn't tell ya if it messed mine up.good luck
Matt
#14
Here's the link to the tutorial:
http://holodeck.st.usm.edu/vrcomputing/vrc_t/tutorials/max2map/
Copy and paste the following text into a new Max 4 script, then save. Your Max file should then be all ready to export Map files for Quark. If you want Worldcraft files, chance geometery_scale to 1.
-- Add some properties
fileProperties.addProperty #custom "wad" "wadname"
fileProperties.addProperty #custom "geometery_scale" "32"
fileProperties.addProperty #custom "ligthing_scale" "32"
fileProperties.addProperty #custom "ambient_color" "0 0 0"
fileProperties.addProperty #custom "emgency_ambient_color" "0 0 0"
--
02/19/2003 (9:06 am)
I was having a lot of trouble getting this plug-in to work. Our programmer found a usefull tutorial the describes how to use it. I then wrote a short Max 4 script the sets up the file properties.Here's the link to the tutorial:
http://holodeck.st.usm.edu/vrcomputing/vrc_t/tutorials/max2map/
Copy and paste the following text into a new Max 4 script, then save. Your Max file should then be all ready to export Map files for Quark. If you want Worldcraft files, chance geometery_scale to 1.
-- Add some properties
fileProperties.addProperty #custom "wad" "wadname"
fileProperties.addProperty #custom "geometery_scale" "32"
fileProperties.addProperty #custom "ligthing_scale" "32"
fileProperties.addProperty #custom "ambient_color" "0 0 0"
fileProperties.addProperty #custom "emgency_ambient_color" "0 0 0"
--
#15
My current version:
Doesn't produce duplicate faces
Doesn't produce extra internal geometry
accuratly exports to Quark
Accuratly writes entity properties for cinversion to DIF
TODOS
Texture correction
Lights need script for setup and display, Also needs coordinate properties exported.
Write Howto documentation
If you could write me I would appriciate it.
Matt
02/19/2003 (9:18 am)
Patrick Could you write me at mjones7947@comcast.net. I am winding down a complete rebuild of MAX to map. It correcly exports all types of shapes include Regular polys, detail polys, Vehicle and regular collision, and portals. It also handles lights but we are having a problem exporting to coordinates of the light at this time. Also the textures are still out of proportian. I am looking for a few people who would be interested in trying out what I have and I also could use someone with a a little scripting experience for some consulting on the interface I am trying to build that will allow for easier construction of the scene in MAX.My current version:
Doesn't produce duplicate faces
Doesn't produce extra internal geometry
accuratly exports to Quark
Accuratly writes entity properties for cinversion to DIF
TODOS
Texture correction
Lights need script for setup and display, Also needs coordinate properties exported.
Write Howto documentation
If you could write me I would appriciate it.
Matt
#16
any1 know where i can get a version of max2map for max5.1?
that link above seems to be dead,
cheers in advance!
Shane
06/28/2004 (12:55 am)
Hi,any1 know where i can get a version of max2map for max5.1?
that link above seems to be dead,
cheers in advance!
Shane
#18
You could try using the .Map Exporter that comes with Game Level Builder 2.22 for max.
You can get it at www.scriptspot.com.
Just make sure you setup QuArK properly as directed here http://www.garagegames.com/docs/torque.sdk/tools/quark/chapter3.html
Turning on "Don't Write Floating-Point Coords" is very important!
Hope this helps,
Michael.
10/05/2004 (6:27 am)
Hi All,You could try using the .Map Exporter that comes with Game Level Builder 2.22 for max.
You can get it at www.scriptspot.com.
Just make sure you setup QuArK properly as directed here http://www.garagegames.com/docs/torque.sdk/tools/quark/chapter3.html
Turning on "Don't Write Floating-Point Coords" is very important!
Hope this helps,
Michael.
#19
03/04/2005 (6:36 am)
need max2map for 3dsmax 7
#20
Anyone? :)
12/21/2005 (7:37 am)
Anyone know if there is a version out for max 6,7 or 8 out yet? i am quite a newbie with torque but a experienced max-user and would like to use these packages together without too much hassle. Right now I have some models in 3dsmax, but I don`t really know how to export them as dif`s into torque. Dts files are fine, but dif`s are difficult.Anyone? :)

Torque 3D Owner Alvaro F. Celis
I tried to do it manually and I got errors.
And to go to Max2map settings you don't use right click, you must use Alt+F7