project reality header
Go Back   Project Reality Forums > PR:BF2 Mod Forums > PR:BF2 Community Modding > Modding Tutorials
20 Nov 2018, 00:00:00 (PRT)
Register Forum RulesDeveloper Blogs Project Reality Members List Search Today's Posts Mark Forums Read
Modding Tutorials Information and tutorials related to modding BF2.

Reply
 
Thread Tools Display Modes
Old 2010-05-06, 05:19   #1
[R-DEV]​Outlawz7
PR:BF2 Developer

Outlawz7's Avatar
Default Navmesh Editing in 3dsMax 9

This tutorial requires you to have a finished navmesh to work with. If you are new to adding AI support to maps, head over here:
http://bf2.e-plaza.de/index.htm

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

Removing faces
If you want to remove parts of the mesh you don't want to use, 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.

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

Outlawz7 is offline Reply With Quote
Old 2013-03-13, 17:17   #2
Dukuu_npanop
Default Re: [Tutorial]Navmesh editing in 3ds Max 9

Hi! I have loaded my navmesh to 3ds max but it looks mirrored? Is that usual or what should I do? Thanks.
Dukuu_npanop is offline Reply With Quote
Old 2015-12-27, 07:11   #3
[R-DEV]​Outlawz7
PR:BF2 Developer

Outlawz7's Avatar
Default Re: [Tutorial]Navmesh editing in 3ds Max 9

Quote:
Originally Posted by Dukuu_npanop View Post
Hi! I have loaded my navmesh to 3ds max but it looks mirrored? Is that usual or what should I do? Thanks.
Better late than never, but yes, it'll import it mirrored and that's ok, it exports the right way around.

Outlawz7 is offline Reply With Quote
Old 2016-11-04, 23:13   #4
dnamro
Default Re: Navmesh Editing in 3dsMax 9

Updated version of the tutorial with images can be found on the Battlefield Modding Wikia:
Navmesh Editing with 3dsmax | Classic Battlefield Modding Wikia | Fandom powered by Wikia
dnamro is offline Reply With Quote
Reply


Tags
3ds, 3dsmax, editing, max, navmesh, tutorialnavmesh
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT. The time now is 13:43.