Update: Max2Ctor 1.0.1
by Ryan Mounts · 01/24/2008 (3:07 pm) · 13 comments
The Max2Ctor macroscript for 3dsmax users has been updated and can be found at the following link:
Max2Ctor_103.zip
(Thanks to Orion for hosting this!)
None of the core functionality of Max2Ctor has changed... the code is now more robust, a minor bug was fixed (it would crash if a Multi/Sub-object did not have a material for each face ID of the object it was applied to), the default save folder is no longer the "Constructorscenes" folder but the last folder you used, and an export feedback dialog was added.
Now after the scene is exported you will see a list of warnings to provide feedback on where problem areas might be in your scene. None of the warnings will keep the scene from exporting, but if you encounter problems in Constructor, you might go back and try to fix the warnings and re-export.
If you have previously installed Max2Ctor, simply save the new Macro_Max2Ctor.mcr file over the old one. Restart 3dsmax and click the Max2Ctor button. The floating dialog should read "Max2Ctor 1.0.1" at the top. If it doesn't, max is using an old copy saved somewhere else. Right-click the Max2Ctor button and select "Edit Macro Script". Look at the path in the window title bar. Track that file down in explorer and replace it with the new one. That should be it!
Max2Ctor_103.zip
(Thanks to Orion for hosting this!)
None of the core functionality of Max2Ctor has changed... the code is now more robust, a minor bug was fixed (it would crash if a Multi/Sub-object did not have a material for each face ID of the object it was applied to), the default save folder is no longer the "Constructorscenes" folder but the last folder you used, and an export feedback dialog was added.
Now after the scene is exported you will see a list of warnings to provide feedback on where problem areas might be in your scene. None of the warnings will keep the scene from exporting, but if you encounter problems in Constructor, you might go back and try to fix the warnings and re-export.
If you have previously installed Max2Ctor, simply save the new Macro_Max2Ctor.mcr file over the old one. Restart 3dsmax and click the Max2Ctor button. The floating dialog should read "Max2Ctor 1.0.1" at the top. If it doesn't, max is using an old copy saved somewhere else. Right-click the Max2Ctor button and select "Edit Macro Script". Look at the path in the window title bar. Track that file down in explorer and replace it with the new one. That should be it!
About the author
#2
01/26/2008 (6:09 am)
I cant download, can someone host it somewhere else? or send it to my email?
#3
for k = 1 to 3 do
(
uv = polyop.getMapVert geometry[i] chan mapverts[k]
U[k] = (width/32.0)*uv[1]
-- V-coordinate is mirrored because 3dsmax defines texture origin in upper left (DirectX)
-- while Constructor defines texture origin in lower left (OpenGL)
V[k] = (width/32.0)*(1-uv[2])
)
...which makes texture mapping break when using textures that are not squares, like 512x256. This is fixed by changing width to height on the line that assigns V[k]:
V[k] = (height/32.0)*(1-uv[2])
02/12/2008 (4:56 am)
This script uses the texel width when it should be using the texel height here:for k = 1 to 3 do
(
uv = polyop.getMapVert geometry[i] chan mapverts[k]
U[k] = (width/32.0)*uv[1]
-- V-coordinate is mirrored because 3dsmax defines texture origin in upper left (DirectX)
-- while Constructor defines texture origin in lower left (OpenGL)
V[k] = (width/32.0)*(1-uv[2])
)
...which makes texture mapping break when using textures that are not squares, like 512x256. This is fixed by changing width to height on the line that assigns V[k]:
V[k] = (height/32.0)*(1-uv[2])
#4
02/25/2008 (10:24 am)
That's a good catch Petteri. I assumed that the bitmap was square power of 2, and there is even code to warn you if your textures do not match this requirement. Since then, I have been looking into the mipmapping code for other reasons and realized that the texture manager will pad non-square-pow2 bitmaps out to the proper size... something I was not aware of. In any event, I remember putting width in that part of the code, assuming width == height, but I really still should have put height simply for completeness. Sorry if that caused you too many problems. Thanks for the fix!
#5
04/05/2008 (9:54 pm)
For any users who prefer to model in Maya you can still take advantage of this great tool if you export your geometry from Maya as a .fbx and import it into 3dsmax.
#6
08/21/2008 (8:34 am)
This resource has been updated with Petteri's fix (and a couple of other minor changes) and also now contains the tutorial pdf. This is officially max2ctor 1.0.2. I just didn't feel like the update was big enough to warrant a new blog.
#7
GREAT concise tutorial.
You help everyone kill 3 birds with one stone:
Max - to - GI
GI - to - Constructor
Thanks so much for your work - the community really appreciates it,
and free tools ta 'boot!
10/29/2008 (11:56 am)
Wow - GREAT concise tutorial.
You help everyone kill 3 birds with one stone:
Max - to - GI
GI - to - Constructor
Thanks so much for your work - the community really appreciates it,
and free tools ta 'boot!
#8
11/12/2008 (7:20 am)
This resource has been updated to correctly handle bitmap tiling and offsets made in the Material Editor. This is officially Max2Ctor 1.0.3.
#9
great work . but we have a problem ,
when we export a concave brush from max to constructor , it showed with some red line and that brush with red line did not export and did not show in engine . please help ,
and i have problem with my map2dif_plus_tse exporter can you send your exporter from constructor to tgea 1.7 to me ?
11/25/2008 (12:49 pm)
hi Ryan , great work . but we have a problem ,
when we export a concave brush from max to constructor , it showed with some red line and that brush with red line did not export and did not show in engine . please help ,
and i have problem with my map2dif_plus_tse exporter can you send your exporter from constructor to tgea 1.7 to me ?
#10
I can send you my map2dif_tgea, but I'm sure it's the same one you have. I never use it, so I don't even know if it works...
11/25/2008 (1:58 pm)
Ken, that's not a problem with the exporter. Max2ctor does not enforce CSG rules like Constructor does. It simply exports the geometry directly from 3dsmax "as is." You have to make sure you create convex geometry in 3dsmax if you want it to show up without red lines in Constructor and export properly.I can send you my map2dif_tgea, but I'm sure it's the same one you have. I never use it, so I don't even know if it works...
#11
You see when I exported from Max I always set the scale from the default of 32 to 1. (I am guessing that you have the default at 32 because you have a basic unit of 1 inch in Max... which when you multiple that by 32 gives you close to a yard while still being a power of 2, which is close to the basic 1 metre unit in torque? but anyway... )
I went back into Max and did an export with the default value of 32 and now everything looked the way it should in constructor. So it seems that when the scale is changed on the export the material/texture offset isn't being changed along with the model size and everything else.
The workaround, for us using a max unit of 1 metre, of course is to just make a smaller model so that when it is multiplied by 32 it will be the size we want. But it would be nice if the script could be fixed.
Thanks for the nifty tool!
03/04/2009 (5:50 pm)
I found another bug. I couldn't figure out why the material never looked right once I exported it into constructor. Once in constructor I played with the "Texture: Position" values (on a face by face basis) and found that everything was ok except for the offsets, or "Shift" as it is called in constructor. When I shifted the texture to the proper position I made a note of the new value as compared to the value when the file was first loaded... and just as an experiment I tried dividing the original x,y values by 32... and sure enough the textures slide right into place. You see when I exported from Max I always set the scale from the default of 32 to 1. (I am guessing that you have the default at 32 because you have a basic unit of 1 inch in Max... which when you multiple that by 32 gives you close to a yard while still being a power of 2, which is close to the basic 1 metre unit in torque? but anyway... )
I went back into Max and did an export with the default value of 32 and now everything looked the way it should in constructor. So it seems that when the scale is changed on the export the material/texture offset isn't being changed along with the model size and everything else.
The workaround, for us using a max unit of 1 metre, of course is to just make a smaller model so that when it is multiplied by 32 it will be the size we want. But it would be nice if the script could be fixed.
Thanks for the nifty tool!
#12
03/26/2012 (12:12 am)
can't download....
#13
03/26/2012 (4:46 pm)
You might try it again... it didn't work for me either, but after I tried to download it a couple of times without success, it asked if I wanted to repair the link. It worked after the repair. 
Torque Owner H.W. Kim
Thank you. =)