Jump to content
Official BF Editor Forums

&y JOKER

Members
  • Content count

    1
  • Joined

  • Last visited

Community Reputation

0 Neutral

About &y JOKER

  • Rank
    Newbie
  1. H! all! I have some ideas and some questions for bf2 community. I'm not a BF2 guru, i just like it as game and as some kind of SDK too. We play BF2 in coop mode with friends for a long time. Usually 5-7 humans and 80-90 bots. They're stupid, but they're never use cheats and never shoot you while you're climbing in plane cockpit. We need them only to make a WAR! Of course, the first thing that i got was Kysterama's 64 bot support levels and his navmeshing tutorial. Some things did not suit me and then i began to navmesh levels by myself. Most things is from Kysterama's tutorial, of course, but some methods i have not found on BF2 forums. And I have not found some answers till now. I hate two things: when bots drops their vehicles on halfway to CP and i hate when they use the same pathway again and again. For example, Operation_road_rage level. Even at first sight it is cleary visible that this map is "hand-made" in non-DICE style. One of the worst things - is some objects have not closed thier collision meshes. So, while generating navmesh you cleary see it in log. It looks something like "Object ..... has broken data.", "Object is self-intersecting!", "Object is not a closed mesh!" It makes certain problems. For example, "xp2_interchange_02" object on generated navmesh looks like a huge cube. It's not neccessary to wait end of generating navmesh. We need only log-file with these objects. We'll extract them. We need (this example) xp2_interchange_02.con xp2_interchange_02.tweak from booster_server and xp2_interchange_02.staticmesh from booster_client. We don't need .collision mesh cause it made by curved-hands. We import it in 3ds. It looks like this. Next, we draw a shape closed line with the same number of vertices of main object edge. Convert it to editable mesh. Attach it to main object and move vertices. I just copy the x,y and z coords of main object vertex and past them in the same vertex of new poly. Next, select 2 vertices and choose Weld-Selected So, we close one of the edges When it will be fully closed, next step is add other small things to main object. Cause the interchange_02 is complex object, we need to make 2 different collision mesh for infantry and vehicle. For example, there's a couple of stones. It's not a problem for vehicle, but infantry will get stuck in some places. For vehicle collision mesh we could select and delete or detach them. Next, we need to merge main object and support poles. It can be done with ProBoolean. Example, we have a cube and cylinder. With cube selected we choose Create-Compound-ProBoolean, set Operation parameter to "Union", press "Start picking" and select the cylinder. The same thing we'll apply to our interchange object. After all, when we have fully closed collision mesh, it's time to check it out for errors. So, we 're select object and in modifier stack select "STL Check". If everything allright, we can export it into bf2. If not, the problem polys will be red highlighted. I forget one thing about polygons. After importing in 3ds, object consists of separated triangles. I have not any idea why. So, i just have select them all and weld. When all bad objects are fixed, we need to put them back (our fixed object_name.collisionmesh) into booster_server. Next step, i did the same things as in the Kysterama's tutor, except some moments. I notice, bots drops thier vehicles when they're too high above or too deep below navmesh. It happens because of wrong tessellation. To avoid this in the game, we need some handwork to fix it. A _GOOD_ navmeshed and tested level takes about 1-2 months. You will do it even while sleeping, trust me. Ohhhh, these green triangles... Well, we created all .obj files and we're need a non-tesselated ground mesh. It's simple by using navmesh.exe Something like that: navmesh.exe -dir work\operationroadrage\gtsdata -cmd gts2obj -in meshes\ground.gts -out output\ground.obj Sometimes maya can't eat hi-poly mesh, in this case we need to separate it on 2-4 parts in 3ds. Maya. I like maya. Especially for navmesh editing. In maya you're always see accumulation of triangles by their highlighted centers, which need to be explored. For comfortable editing i have bind some functions to hotkeys (Window menu-Settings/Preferences-Hotkeys): "a" for Edit Polygons-MergeVertices "s" for Edit Polygons-SubdividePolygon (Subdivision Levels: 1, Mode: triangles) "d" for Edit-DeleteAllHistory "e" for Edit Polygons-FillHole "c" for Polygons-Triangulate "r" for Edit Polygons-Split Polygon Tool Maya didn't like hi-poly meshes, especially on slow PCs. As longer you work with mesh than it's became more slow. Sometimes, Edit-DeleteAllHistory command helps to speed up, so i bind it to hot-key. But the best way is simple close maya and reopen scene. First of all, i delete all unnecessary triangles inside and outside, checking every inch. If bots will not walk here - delete them. I just like beauty navmesh. Less triangles, less size, less bugs. Especially, i hate something like this and this and this one The way to reduce num of polys: delete and merge neighbour vertices by selecting and pressing "a". Next step, i fix missed navmesh on bridges etc. Next, i look for incorrect normals. It's easy to find them using Display-Polygon components-short normals. Delete them and renavmesh area manually. Finally, toggling visible terrain, navmesh, zooming out while terrain just start to disappear and trying different angles i search "green" area. From above and below a navmesh. These areas, usually, are wrong. First time, i searched for them creating matrix of spawnpoints and move it in the editor. Now, i don't need to do thiat. It''s easy to find out problem areas in maya. There's at least two methods to line-up navmesh with ground: fill-subdivide and using Split polygon tool. Well, we found out problem area. From above: and below: For example, we need to insert a vertex on "leaf's" center. So, we select and delete them. Select any edge and press "e" to fill area. Then press "s" to subdivide. In vertex mode we move center point down to ground mesh. And don't forget to apply ground material to the "leaf". A some problem can will appear when there is some open area near and leaf has common edges. Just fill them delete leaf fill and subdivide. And delete filling of neighbours. Other example. We have a gully or our "leaf" is near the edge of navmesh and it's impossible to fill hole. In this case press "r" to switch Split Polygon Tool and cut. When it's done, click RMB. Select "leaf" and its neighbours and press "c" to triangulate. (Coz we need a triangles not a poys). And move vertexes again as we need. Finally, we have all fixed navmeshes in AIPathFinding folder. And it's time to test the map. I leave only 3 SA on map. Each for every team and one neutral. The "Unabletochangeteam" param is "on" for all. Set in AIDefault.ai aiSettings.setMaxNBots 80 and higher. So, flying above i can see who, where and how runs. If there's something wrong i take the screenshoot for further fix. If somebody drops vehicle and runs hiking i inspect this area in maya. In most cases the navmesh is too high above or too deep into the ground. So, again and again: fixnavmesh.bat, update AIpathfinding folder, test. If it's necessary, i set infantry and vehicle waypoints. And test, test... If everything allright, i save waypoints from strategicareas.ai into textfile and make help pic which SA are tested: When all combinations of SA's are tested-it's time to test them all together. And only after all of these steps it can be GOOD navmeshing. And it's not a fact, yet. And another one bug fix. When vehicles can't drive through some places (it looks like moving forward and back continuously) check vehicle and infantry navmeshes there. Veh navmesh must be inside infantry navmesh, not out of its "border" on empty space. So, i have 2 questions: 1) Are waypoints bidirectional? 2) I notice, that light vehicles like FAV have some trouble while they are trying to "climb" on static objects like bridges. They are retreat back and trying again. At the same time, tanks, AA and APCs do the same thing without any problems. It doesn't matter where the vehicle navmesh is. Above or below the static object. Another strange thing, going through the bridge FAV slows down, tanks are going on full speed. I have no idea where's a problem. WTF? Where to dig? p.s. and another one question. Why boats won't use vehicle waypoints at all? They're just ignore them.
×