Jump to content
Official BF Editor Forums

Basic Navmesh Editing In 3ds Max 9


Outlawz
 Share

Recommended Posts

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" :P

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. :)

3ds1.jpg

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:

3ds2.jpg

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 :P

However you don't want to mess everything up, so select the preopt, right-click on it and click Freeze selection.

3dsnew5.jpg

The preopt will turn dark gray and you'll be unable to select it :) select the navmesh to bring it up on top.

3dsnew4.jpg

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.

3ds3.jpg

Right-click on your selected navmesh and go Convert To>Editable Poly

3ds4.jpg

You may have noticed a toolbar on the right side before. Once you have converted the object, go there and under Selection, pick Element.

3ds5.jpg

Select the main part of your navmesh, the one you want to keep ;)

3ds6.jpg

Now go to Edit>Select Invert

3ds7.jpg

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 :D

3ds8.jpg

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.

3ds9.jpg

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.

3dsnew1.jpg

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.

3dsnew2.jpg

The materials are carried over into the Material editor.

3dsnew3.jpg

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.

3dsext1.jpg

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.

3dsext2.jpg

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,

3dsext3.jpg

then under Edit Vertices click Connect,

3dsext4.jpg

and you're done.

3dsext5.jpg

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.

3dsext6.jpg

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:

3dsext7.jpg

And Face-Center does this.

3dsext8.jpg

I prefer the latter, as you only need to connect the two opposing vertices in the middle quad and you're good to go.

3dsext9.jpg

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:

3ds10.jpg

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.

3ds11.jpg

This is to add back the materials, since they get lost by 3ds Max. Yeah I don't quite understand everything yet. :P

You can now go and run fixNavmesh.bat :)

Edited by Outlawz
Link to comment
Share on other sites

Wow.. look at that! Great tutorial!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 weeks later...

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. :)

Link to comment
Share on other sites

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 by mschoeldgen[Xww2]
Link to comment
Share on other sites

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!

Link to comment
Share on other sites

  • 2 years later...

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 by Dnamro
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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!!!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...