Mapping in 3dsmax
Contents |
[edit] Mapping with 3ds max
By harry
[edit] Intro
THIS IS NOT A MODELING TUTORIAL. If you don't know how to use 3ds max, this will be useless to you. This article covers the pipeline from 3ds max into the game, rather than actually making the map.
I personally don't like to use heightmap imports, as most tutorials for M&B maps seem to go. I prefer to model my scenery. I'm a 3ds max user, and it took me a bit of messing around to get a map exported from max, into M&B, working correctly.
The advantages of modelling your map by hand is complete control over the tri count. In some threads, i've seen people mention that the topology of the mesh is used in some way by the party AI for doing distance checks. As far as I can tell this is utterly untrue, and would be more resource intensive than it needs to be. From my experimentation, it seems you can structure a map just ab out however you like, distribute detail to the correct areas for best performance, and so on. You can also operate on much smaller details than default map editors.
To summarise, the up-sides to modelling your map in an external modeling package:
- Complete control over topology. Flat plains can use less tris, saving them for more detailed areas like coastlines.
- Complete control over texture blending. If you want a texture to end sharply, just cut edges into the mesh to truncate it.
- Easilly edit anything. The dudes who wrote the OBJ converter tools were thoughtful enough to allow the assigning of materials within your 3d package. This means you can go back and edit geography easilly without having to redo all your texturing, and it's a lot easier to edit individual triangles' textures in a full-fledged 3d package.
- Easilly edit scale and position, to make sure your outer borders are appropriate.
- Industry-standard 3d suites are generally more stable and bug-free than the currently available M&B map editors.
- Industry-standard 3d suites generally have more efficient tools than available map editors, as well.
[edit] Tools
- Obviously, you'll need 3ds max.
- For converting the OBJ file, I found Othr's tool to be the most effective. Link There are other tools available, but it seems they scale the mesh based on their target software packages. Othr's tool does no such thing, and co-ordinates within 3ds max will apply 1:1 with ingame town co-ordinates, which will be very useful once you start messing around with module_parties.py to place towns.
- Recommended: Thorgrim's map editor.
[edit] Considerations
- Model your map treating the "front" view in 3ds max as if you are viewing the map from above. Unfortunately, this seems to export as south being upward. You can solve the problem easilly at the end of the mapping process by rotating the map, of course.
- The engine automatically UVmaps your map. Open up map.txt and you'll see there are no UV co-ordinates what-so-ever. Edit whatever you want on the UVs, it will have no effect. The up-side of this is... we don't need to UV the map. The engine will project all the textures from directly above, which means you should pay attention to the next point.
- When you view your map from this angle, and with no lights in the scene, pay attention to very darkened areas. These usually signify faces which are perpendicular to the "earth surface" and thus, will get stretched UVmaps. Pay attention to this, and don't let your cliffs become too sheer.
- For applying textures within the 3d program, all you need to do is use the material editor (if you don't know how to do this, consult 3ds max documentation) and name materials as is described on Othr's tool's repository page. I also like to give them a colour which roughly corresponds to the texture i want them to use. They could also use the actual texture if you want to go to that much trouble, but the textures will not look as they do ingame, from within 3dsmax. I find the best way to check how the texturing looks is by loading the map in thorgrim's editor.
[edit] OBJ export settings
If you aren't using an antiquated version of 3ds max, when you export the map as an OBJ, you will have a rather complicated dialog. The conversion tool is rather sensetive, and needs its OBJ files formatted so it can easilly digest the data. Barf discovered the ideal export settings for this. To save you scrounging through forum threads, here it is.
Now, seeing as there's a chance of that image going offline, i will also list the ideal settings in text form.
- Flip Y/Z Axis (Poser like): NO
- Shapes/Lines: NO
- Hidden Objects: NO
- Faces: Triangles
- Texture Co-ordinates, Normals, and Smoothing Groups: NO
- Scale: 1.0
- Export Materials YES
- Create Mat-Library NO
- Output Target: PC/Win
- Relative Numbers: NO
- Precision: As far as i've tested, unimportant. But I recommend "6"
- Optimise: Vertex, Normal, Texture Co-ord: ALL YES
[edit] After Export
I recommend firing up Thorgrim's editor to check your textures, map borders, and party positions. Remember that you can use co-ordinates from 3ds max to place towns using module_parties.py - With this method the unit scale is 1:1.
Peace Gents, enjoy mapping -harry