Outlawz Posted December 7, 2009 Report Share Posted December 7, 2009 (edited) I was hiding this in the Project Reality Single Player forums for some time now, correcting and adding stuff to it and I think I got to the point where the tutorial is safe to be released into the "wild" I have to thank you guys here at BFEditor.org for helping out, I'd probably be still figuring out how to import the meshes into 3ds Max properly if it wasn't for these forums That being said, I don't know much about 3ds Max 9, so this tutorial will probably never be as detailed as the one from kysterama for Maya 7, but it does the job. This is a very crude tutorial, which I'll add to later on, but for now I'll just explain the basic importing, editing (deleting islands which is our main goal) and exporting. I'll be using 3ds Max 9 and Notepad. Importing: To start, open 3ds Max and once loaded, go to File>Import. Navigate to your map's output folder. The import directory can be configured like in Maya so you don't have to browse through half your HDD to get to your files. Don't forget to select the file type to be .obj, otherwise you won't see your files. When you'll open the file, 3ds max will ask your for import settings, set them according to these: Important! Materials Library's string needs to be typed in, since it's custom. Copy it from here: materials.mtl Importing preopt (optional) If you need some orientation, you can import the preopt to get a better idea of where your mesh is situated. To do this, simply import the preopt.obj the same way as you imported the navmeshes while you already have a navmesh open, however you do not need to add the 'materials.mtl' line, I find it more practical to import it without materials as it stays gray colored and is easier to distinguish. On import 3ds Max will also ask you for a new object name, just keep the default suggestion unless you want to give it a name However you don't want to mess everything up, so select the preopt, right-click on it and click Freeze selection. The preopt will turn dark gray and you'll be unable to select it select the navmesh to bring it up on top. To delete the preopt before exporting, right-click anywhere in viewport and click Unfreeze above the Freeze selection, select the preopt and delete. Editing: Your navmesh will now open in a new scene with four views, select the Perspective (bottom right) one and go to the bottom right of the program, where there's a toolbar which contains tools that you can use to navigate around your object. Select the Maximize Viewport Toggle as shown by the arrow, then select your navmesh object. Right-click on your selected navmesh and go Convert To>Editable Poly You may have noticed a toolbar on the right side before. Once you have converted the object, go there and under Selection, pick Element. Select the main part of your navmesh, the one you want to keep Now go to Edit>Select Invert Now everything else you didn't select is selected. Press Delete and all those evil useless navmesh islands will go away. Note: this also deletes manifolds, since faces have to be connected by an edge to "qualify", not just by a vertex This concludes the basic deletion of mesh islands. You can now skip to exporting, or stick around for more (still WIP as said) Removing faces If you want to remove parts of the mesh you don't want to use like I had to, then go to Selection and select Face (next to Element from before). Select the faces you want to remove and press Delete. Moving vertices Select Vertex mode either from the icon or the list under the Edit Poly modifier. Right-click on 'Perspective in the top left of the viewport and change the view to Wireframe. Select the Move tool, then select the vertice you want to move. Extracting materials out of the mesh for later use Note: When extruding new faces in 3ds Max the materials are carried over. This might be useful if you somehow lose your materials. :confused: Press M to bring up the Material editor and click 'Get material from selection' (eyedropper tool) then click on the mesh in the viewport. The materials are carried over into the Material editor. Adding new faces Unlike Maya, materials are carried over from the extruded mesh, however if you find yourself extruding ie. deep water mesh and want it to be shallow/ground mesh, you can use the above technique for material extraction to add new materials to faces. First, convert your navmesh to Editable Mesh (not Poly) Sečect the Edge tool and pick an edge you want to extrude. Edges can only be extruded up or down or left or right for some reason, so don't panic; with the edge still selected, use the Select&Move tool to move the edge up/down/left/right to align it with the rest. Having preopt loaded is recommended, so you can better adjust the faces. Converting quad faces to triangles Again unlike Maya, there doesn't seem to be a magic 'turn quads to triangles' option, so I found a very simple solution for this one. Convert your mesh to Editable Poly, select two opposite vertices, then under Edit Vertices click Connect, and you're done. Adding detail to your faces In case you've got an enormous face and want it in smaller parts to align it better with the terrain, do the following. Convert your mesh to Editable Mesh (unless you're already it that mode) and select the face. Then scroll down in the Edit geometry to Tesselate, you can play with the amount and two options, Edge and Face-Center. Edge does this: And Face-Center does this. I prefer the latter, as you only need to connect the two opposing vertices in the middle quad and you're good to go. Exporting: Go to File>Export and save over the file you opened before as .obj, 3ds max will ask you for export settings, set them according to these: Close down 3ds Max (don't save the scene). We're not done yet. Important: Go to your output folder and open the navmesh you edited (Vehicle or Infantry.obj) with Notepad. It will open a huge wall of text, but may also open it in a nice tidy column like shown. On top you should see a word 'mtllib'. Again copy the 'materials.mtl' after it, leaving one space and save. This is to add back the materials, since they get lost by 3ds Max. Yeah I don't quite understand everything yet. You can now go and run fixNavmesh.bat Edited December 24, 2009 by Outlawz Quote Link to comment Share on other sites More sharing options...
TNE26 Posted December 8, 2009 Report Share Posted December 8, 2009 Wow.. look at that! Great tutorial! Quote Link to comment Share on other sites More sharing options...
BEEX Posted December 8, 2009 Report Share Posted December 8, 2009 (edited) thanx outlawz,cheers!...great tut...been waiting for this tut. . you just got pinned...lol...a much wanted tutorial deserves it. Edited December 9, 2009 by BEEX Quote Link to comment Share on other sites More sharing options...
mschoeldgen[Xww2] Posted December 10, 2009 Report Share Posted December 10, 2009 Thanks Outlawz ! Very nice tutorial ! Just lets repeat the rules for navmeshes, so that editing it will not destroy it : 1. An edge can only be shared by two faces. That means that any edge also consists of two vertices ( and not a third in the middle ) 2. No Overlaps . Take care that a face doesn't cover another one. It sometimes will work without violating the rule but bots tend to 'hang' in this area. It might be a good idea to import the heightmap so that the navmesh can be adjusted to follow it better than the navmesh.exe solution. Here's a little extension to the BF2 tools for Max to accomplish this: http://www.battlefieldsingleplayer.com/for...showtopic=14301 To increase detail on your navmesh the 'Tesselate' function in the face rollout comes in handy. Only make sure that you set the 'explode' factor to 0 before applying it. Quote Link to comment Share on other sites More sharing options...
Outlawz Posted December 24, 2009 Author Report Share Posted December 24, 2009 Added 'adding new faces' section, I'd say the tutorial covers all the basics now. Quote Link to comment Share on other sites More sharing options...
Catbox Posted December 25, 2009 Report Share Posted December 25, 2009 Really cool... i am going to add sp to a map now with this tutorial. nice Quote Link to comment Share on other sites More sharing options...
gamer.supreme.1 Posted December 25, 2009 Report Share Posted December 25, 2009 At what point in the map making process do you get an "Output" folder? I searched all my map folders and found nothing, which is confusing me. As for 3DS Max 9, great prog. I've been using it since "Freelancer". Probably my fav prog ever. Quote Link to comment Share on other sites More sharing options...
mschoeldgen[Xww2] Posted December 25, 2009 Report Share Posted December 25, 2009 (edited) You first have to create a new navmesh using either method: From within the editor: http://bf2.e-plaza.de/ or using the python scripts: http://bfeditor.org/forums/index.php?showtopic=3809 This will create the above mentioned OBJ files in /navmesh/work/<MyLevel>/GTSData/output Use this tutorial here to edit the navmesh and after that: You can now go and run fixNavmesh.bat smile.gif Edited December 25, 2009 by mschoeldgen[Xww2] Quote Link to comment Share on other sites More sharing options...
gamer.supreme.1 Posted December 25, 2009 Report Share Posted December 25, 2009 You first have to create a new navmesh using either method: From within the editor: http://bf2.e-plaza.de/ or using the python scripts: http://bfeditor.org/forums/index.php?showtopic=3809 This will create the above mentioned OBJ files in /navmesh/work/<MyLevel>/GTSData/output Use this tutorial here to edit the navmesh and after that: Ahh, ok, i see now. I was actually following the first link tutoria for this mapl, got to the navmeshing part and got stuck bcuz my maps navmesh wasnt showing anywhere, making it imposible to place spawn points that were green. Not really knowing if that was a real problem i decided to look for an answer. Thanks for the tip and the lnks. Merry Christmas! Quote Link to comment Share on other sites More sharing options...
Outlawz Posted December 25, 2009 Author Report Share Posted December 25, 2009 Yeah, small disclaimer, this tut only covers editing the navmesh, not generating one Follow the first link from mschoeldgen, I learned navmeshing with that tut and it's very good. Quote Link to comment Share on other sites More sharing options...
Dnamro Posted August 27, 2012 Report Share Posted August 27, 2012 (edited) Great Tut! thanks so much for creating this. Is there any easier way to fill a missing path in the navmesh, other than extruding an edge and then trying to Select and move into position and connect it to the other side. That is a pain in the @ss!. In blender, you can select 2 vertices, and use the connect key to created an edge between them. Then you can select 3 vertices and create a face with the 'F' key. Does 3ds max 9 have that capability? Maybe I am trying to conect or weld the extruded edge to the edge on the other side incorrectly? Any tips? Edited August 27, 2012 by Dnamro Quote Link to comment Share on other sites More sharing options...
clivewil Posted August 28, 2012 Report Share Posted August 28, 2012 Does 3ds max 9 have that capability? yes you can snap verts wherever you like and then draw in the faces manually by connecting the dots BUT the shift-drag method you don't like much is still the fastest way - why? because you can achieve the same result with far fewer clicks. example: face draw method to create a quad: snap draw 4 vertices where you want them. 4 clicks draw in both faces. 6 clicks select common verts and weld. 2 clicks shift drag method to create a quad: shift-drag the edge. 1 click snap each of the new verts to its new position. 2 clicks Dnamro, there's a good chance your max's snap isn't set up in a way that is useful to you and so it is impeding you. maybe try this - right click on the Snap button. in the box that opens, un-select everything except for Vertex, then close the box. next time you try to snap a vert, it will only snap to another vert. it's massively helpful for doing stuff like this, where we are working with plain ordinary meshes, as opposed to nurbs or sub-divided surfaces etc. after creating any new polys/faces, make sure you select all newly created edges and select Edge > Visible. very important. Quote Link to comment Share on other sites More sharing options...
Dnamro Posted August 28, 2012 Report Share Posted August 28, 2012 yes you can snap verts wherever you like and then draw in the faces manually by connecting the dots BUT the shift-drag method you don't like much is still the fastest way - why? because you can achieve the same result with far fewer clicks. example: face draw method to create a quad: snap draw 4 vertices where you want them. 4 clicks draw in both faces. 6 clicks select common verts and weld. 2 clicks shift drag method to create a quad: shift-drag the edge. 1 click snap each of the new verts to its new position. 2 clicks Dnamro, there's a good chance your max's snap isn't set up in a way that is useful to you and so it is impeding you. maybe try this - right click on the Snap button. in the box that opens, un-select everything except for Vertex, then close the box. next time you try to snap a vert, it will only snap to another vert. it's massively helpful for doing stuff like this, where we are working with plain ordinary meshes, as opposed to nurbs or sub-divided surfaces etc. after creating any new polys/faces, make sure you select all newly created edges and select Edge > Visible. very important. Wow! the snap to setting setup was exactly my problem. Thanks for the tip! Can you recommend any tutorials on the face draw method? I would like to learn that as well. Quote Link to comment Share on other sites More sharing options...
clivewil Posted August 29, 2012 Report Share Posted August 29, 2012 Can you recommend any tutorials on the face draw method? I would like to learn that as well. yeah, this one: in Vertex mode (preferably with Snap turned on) select Create and click to place 3 or more verts in Face mode, select Create and then click on the 3 verts you want to add a face to. selecting the verts in an anticlockwise order and the surface-normal will point upwards; in a clockwise order the normal will point downward Quote Link to comment Share on other sites More sharing options...
Dnamro Posted August 30, 2012 Report Share Posted August 30, 2012 yeah, this one: in Vertex mode (preferably with Snap turned on) select Create and click to place 3 or more verts in Face mode, select Create and then click on the 3 verts you want to add a face to. selecting the verts in an anticlockwise order and the surface-normal will point upwards; in a clockwise order the normal will point downward Thanks! I am finally able to edit navmeshes now!!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.