I am following the tutorial to create a custom scene. Some points I want to add.
I am using 3dsMax 2010 and Maya 2009. Some settings can be specific to these versions.
A. Easier Max scene setup: (update for http://wiki.xmoonproductions.org/index. ... _the_scene - bottom of the page)Maya units are seen as metters in XSP3 (1 Unit = 1m). Obj export will be in units so 3dsMax unit scale need to be set the same.
- set display units as centimeters, meters, inches, whichever you like to use (Customize->Unit Setup).
- set system unit scale 1 unit = 1m (your obj export size/scale doesn't need to be set, it will be 1)
- use the scene as template to merge/import.
If you open an older document you will surely receive an "Unit Mismatch" error. Pick the correct option that reads "1 Unit = 1.0000 Meters" so you don't have to set up the above again. Then verify if the models are at real size: simply create a box at desired size, center and scale the model to fit the box.
Note: if you want to create a new model sometimes is better that you start with a different scale (1 Unit = 1 or 10cm). After you finish, change the system unit setup and scale the model down to 1% respectively 10%. This is because 3dsMax doesn't work well with small objects (best seen when you try to create a new box and it disapears if made too small).
B. Exporting Obj (update for http://wiki.xmoonproductions.org/index. ... ng_Obj%27s)3dsMax 2010 has an import/export plugin called gw:obj exporter. It has a Maya preset.
To export a scene as .obj (optional steps below are to remove the 3dsMax Material settings):
- Activate "Maya" preset once. It remains saved.
- (optional) For single material objects (and colliders) uncheck "Export Materials"
- (optional) Uncheck "Create Material Library" - the material settings will not be exported to a .mtl file. Alternatively just delete the .mtl file before import the .obj to Maya.
Prepare the obj to export. Attach the poly objects you want to join in standalone shapes (do not attach collider objects :p ).
I don't recomment grouping objects in 3dsMax. I think my current settings ignores them when imported but this can mess with the shape names like
box_Box01Shape or maybe
group1:box01Shape (this issue happened to me as well
http://wiki.xmoonproductions.org/index. ... _the_scene). This may happen when there are more than one group in the scene. If you really need your groups then select each, Ungroup - Export selection - Group again (or UNDO).
Maya 2009 will keep the original object names and add "Shape" to their shape names.
C. If you make standalone objects, keep in mind 4 important steps you may not miss:1) Obj importer seems to ignore the normals, turning into Hard Edges. For curved shapes:
- select your shapes
- hold SPACE and select Normals->Soften Edge
This is equivalent to Autosmooth 45 in 3dsMax.
2) Set up the shadow casting ingame (this is explained better in the tutorial
http://wiki.xmoonproductions.org/index. ... d_lighting)
- Select object, CTRL+A -> you see a few pages appearing in the right tab. Look for RENDER STATS in the second page (Shape) and UNCHECK Casts Shadows and Receive Shadows
3) The game may ignore Maya transformations. If you rotate/scale an object you need to lock the changes before saving the .ma file. Select the object and go to menu: Modify->Freeze Transformations. This operation is good for rescaling a shape but be careful: it sets the pivot point to the scene origin. Before freezing you may need to move the shape to the scene origin.
4) An important step when you intend to texture your model:
A project workspace helps you keep all the files in the same place, using relative paths. Set it up right from the start and you will not have missing files issues later with filemaker.
Let's keep the same structure as the tutorial files. I created a folder MyXSP\Sources\scenes\ where I have 2 subfolders:
- object_template
- textures
Pick File->SAVE AS...
Press the "Set Project..." button. Pick up folder "sources".
Then save the file in the object_template folder.
In Maya in Material Attributes pick up the maps from "textures" folder.