IPB

Welcome Guest ( Log In | Register )

working navmesh for frontline
Web
post Sep 2 2012, 12:15 PM
Post #1


Major
****

Group: Soldiers
Posts: 156
Joined: 4-January 11
From: Monheim @ Rhine, Germany
Member No.: 7,791



Hi,

i found an old nice short inf. only map "frontline" from the nsg mod.

After fixed some things in it and playing with this map version in coop - it should be have an new navmesh (the older one has some joking hints in it). So i generate an new one, but this crashs ever at map loading (15%). Can any one help me and fix this (i do not have any prog.s to to this at my side) ???

p.s. the old navmesh is not included yet - only the new one incl. the work directory from the navmesh.

I put an dl link therefor here .

Tia web



--------------------
Go to the top of the page
 
+Quote Post
3 Pages V   1 2 3 >  
Start new topic
Replies (1 - 14)
bobthedinosaur
post Sep 2 2012, 01:09 PM
Post #2


Dictator
******

Group: Soldiers
Posts: 2,229
Joined: 4-March 11
From: A Cold Place
Member No.: 7,896



I'll take a look at it.


edit:


Here is the crash log:
D:\DiceCanada\BoosterPack2\Code\BF2\AI\AIDLL\AI\AIPathFinding\NavMesh\QuadTreeManager.cpp(149): Assert: NavMesh: (m_treeCount < 2) More than one island in the navMesh!!!

if you upload your most recent vehicle and infantry mesh I will clean them up for you. But you will have to recompile them because my computer doesn't like to do that part for some reason..

This post has been edited by bobthedinosaur: Sep 2 2012, 02:12 PM


--------------------
Not doing modding right now, so please don't ask.
Go to the top of the page
 
+Quote Post
Web
post Sep 2 2012, 11:01 PM
Post #3


Major
****

Group: Soldiers
Posts: 156
Joined: 4-January 11
From: Monheim @ Rhine, Germany
Member No.: 7,791



QUOTE (bobthedinosaur @ Sep 2 2012, 09:09 PM) *
I'll take a look at it.


edit:


Here is the crash log:
D:\DiceCanada\BoosterPack2\Code\BF2\AI\AIDLL\AI\AIPathFinding\NavMesh\QuadTreeManager.cpp(149): Assert: NavMesh: (m_treeCount < 2) More than one island in the navMesh!!!

if you upload your most recent vehicle and infantry mesh I will clean them up for you. But you will have to recompile them because my computer doesn't like to do that part for some reason..


Hi bob,


thank for looking inside...

in the archive are all files included (look inside the "server.zip" there is an another archive (frontline_navmesh_source.rar) with all files from the mesher (the whole work dir of "frontline"). I have not more for this map.

Or can you excatly describe what for files you mean / want and who i can find them ? I upload this then - no problem.

And i can recompile the navmesh again without the second (the shorter 2) islands but the results are the same - it crashs.

I take also an look in the editor with both mesh versions and all things look like on the right places and this should work....

Tia web






--------------------
Go to the top of the page
 
+Quote Post
bobthedinosaur
post Sep 3 2012, 10:01 AM
Post #4


Dictator
******

Group: Soldiers
Posts: 2,229
Joined: 4-March 11
From: A Cold Place
Member No.: 7,896



Wait... did you ever clean up the navmesh once it was compiled? If you dont clean it up then it will always cause errors.


--------------------
Not doing modding right now, so please don't ask.
Go to the top of the page
 
+Quote Post
Dnamro
post Sep 3 2012, 11:42 AM
Post #5


CinC (for now)
Group Icon

Group: Mr. Admin
Posts: 6,933
Joined: 28-December 03
From: Fort Hood, TX
Member No.: 46



Do you have vehicles in the map? If so, the vehicle navmesh will also need to be cleaned up. I recommend, remove vehicles form the map, until you have the infantry navmesh working, otherwise you won't know which navmesh is causing the problem. Even if the map doesn't use vehicles, the vehicle navmesh still can not have any island meshes.

The only maps that I have been able to generate a navmesh that works as is are city maps. Maps with open land areas don't navmesh properly without some help. The trick that I use is to place a lot of spawners every so often in the open areas where the bots will cross. If the map has vehicles, you need to use infantry and vehicle spawners. This helps reduce the problem with over optimizing on the navmesh. What this means is that the navmesh doesn't follow the ups and downs of the ground very accurately. Think of the spawners as navmesh thumbtacks that force the navmesh generator to stay close to those areas with spawners. Rhino from Project Reality uses small thin statics, like a fence post, to as his navmehs thumbtacks - however, this produces holes in the navmesh, that he says he goes back to fix. So the spawners are better because you don't have to close up all the holes afterwards.



--------------------
No, my Avatar is not my dog.
Go to the top of the page
 
+Quote Post
bobthedinosaur
post Sep 3 2012, 02:51 PM
Post #6


Dictator
******

Group: Soldiers
Posts: 2,229
Joined: 4-March 11
From: A Cold Place
Member No.: 7,896



hmm.. that's a good idea. I would try what dnamro said and remove the vehicles and vehicle nav untill the infantry is fixed.


still, ill take a look at them and try to clean them up for you.

web.. try this:
http://www.sendspace.com/file/glpxhk

This post has been edited by bobthedinosaur: Sep 3 2012, 05:51 PM


--------------------
Not doing modding right now, so please don't ask.
Go to the top of the page
 
+Quote Post
Web
post Sep 4 2012, 10:52 AM
Post #7


Major
****

Group: Soldiers
Posts: 156
Joined: 4-January 11
From: Monheim @ Rhine, Germany
Member No.: 7,791



QUOTE (bobthedinosaur @ Sep 3 2012, 06:01 PM) *
Wait... did you ever clean up the navmesh once it was compiled? If you dont clean it up then it will always cause errors.


Hmm i use this batch for navmeshing :
QUOTE
@echo off
:start
cls
echo --------------------------------------
echo Battlefield Single Player Navmesh Generation
echo 2005 Digital Illusions CE
echo --------------------------------------

REM make sure work dir exists
if not exist work md work
set mod_name=bf2
set level_name=
set cl_userinp=
set fixnavmesh=

rem SET UP CHOOSE LEVEL OPTIONS AND TAKE USER INPUT
:choose_level
echo.
echo ----------Map List------------------
echo.
echo A) desert_storm
echo B ) berlin_ii
echo C) Rising_City
echo D) frontline


set /p cl_userinp=Which level would you like to create/fix navmesh for? (A...Z):
set cl_userinp=%cl_userinp:~0,1%
if "%cl_userinp%"=="A" goto level1
if "%cl_userinp%"=="a" goto level1
if "%cl_userinp%"=="B" goto level2
if "%cl_userinp%"=="b" goto level2
if "%cl_userinp%"=="C" goto level3
if "%cl_userinp%"=="c" goto level3
if "%cl_userinp%"=="D" goto level4
if "%cl_userinp%"=="d" goto level4

echo ---- invalid response --------
pause
goto choose_level

:level1
set level_name=desert_storm
goto fix_or_create
:level2
set level_name=berlin_ii
goto fix_or_create
:level3
set level_name=Rising_City
goto fix_or_create
:level4
set level_name=frontline
goto fix_or_create

rem SET WHETHER TO FIX OR CREATE NAVMESH
:fix_or_create
echo.
echo --------------------------------------
echo Start by creating a new navmesh
echo Only fix a navmesh after you have created one
echo.
echo C) Create new NavMesh
echo F) Fix NavMesh
echo L) Launch editor

set /p cl_userinp=Choice? (C/F/L):
set cl_userinp=%cl_userinp:~0,1%
if "%cl_userinp%"=="C" goto create
if "%cl_userinp%"=="c" goto create
if "%cl_userinp%"=="F" goto fix
if "%cl_userinp%"=="f" goto fix
if "%cl_userinp%"=="L" goto Editor_choice
if "%cl_userinp%"=="l" goto Editor_choice


echo invalid answer
pause

goto fix_or_create



:create


echo Set up navmesh work area if it does not exist

rem create the work\level name folder needed
if not exist work\%level_name% md work\%level_name%

rem check for GTSdtat\meshes - and delete if they exist
if exist work\%level_name%\GTSData\ goto del_GTSdata

rem create GTSData folder
echo setup navmesh\work\%level_name%\GTSData\
md work\%level_name%\GTSData\

goto copy_GTSdata

:del_GTSdata
echo Cleaning up navmesh work area: navmesh\work\%level_name%\
del /Q /F work\%level_name%\GTSData\Meshes\*.*

:copy_GTSdata
rem copy the GTSdata from the map to the work area
echo Copying GTSdata files from the %level_name% to the work area
xcopy ..\mods\%mod_name%\levels\%level_name%\GTSData\Meshes\*.* work\%level_name%\GTSData\Meshes\


REM call python script to create the navmesh
echo Generating navmesh files in: navmesh\work\%level_name%\GTSData\Meshes\
GenerateNavmeshBFSP.py %mod_name% %level_name%

echo Navmesh generated - edit navmesh now and remove islands
pause


:fix
if not exist work\%level_name% goto levelerror

REM remove read-only flag
echo remove read only flag from work\%level_name%\GTSData\debug and \meshes folders
attrib -r work\%level_name%\GTSData\debug\*.* /s
attrib -r work\%level_name%\GTSData\meshes\*.* /s

echo copy work\%level_name%\GTSData\Output\infantry.obj and vehicle.obj to work\%level_name%\GTSData\
copy work\%level_name%\GTSData\Output\infantry.obj work\%level_name%\GTSData\
copy work\%level_name%\GTSData\Output\vehicle.obj work\%level_name%\GTSData\

echo cd work\%level_name%\GTSData
cd work\%level_name%\GTSData

echo delete the infantry and vehicle _fix obj files
if exist infantry_fix.obj del infantry_fix.obj
if exist vehicle_fix.obj del vehicle_fix.obj

REM rename files to what navmesh.exe expects
echo rename infantry and vehicle obj files to [name]_fix
rename infantry.obj infantry_fix.obj
rename vehicle.obj vehicle_fix.obj

cd..
cd..
cd..

echo ready to start navmesh process


navmesh.exe -dir work\%level_name%\gtsdata -cmd export -mode infantry -in infantry_fix.obj
navmesh.exe -dir work\%level_name%\gtsdata -cmd export -mode vehicle -in vehicle_fix.obj

echo navmesh process complete


echo restore read only flag: work\%level_name%\GTSData\debug\ and \meshes
REM restore read-only flag?
REM attrib +r work\%level_name%\GTSData\debug\*.* /s
REM attrib +r work\%level_name%\GTSData\meshes\*.* /s

echo copy navmeshed files to map
echo from: work\%level_name%\GTSData\Output\
echo to: ..\mods\%mod_name%\levels\%level_name%\GTSData\Output\
ROBOCOPY work\%level_name%\GTSData\Output\ ..\mods\%mod_name%\levels\%level_name%\GTSData\Output\


echo delete temp work files
REM delete temp files
del work\%level_name%\GTSData\infantry_fix.obj
del work\%level_name%\GTSData\vehicle_fix.obj



echo navmesh optimization completed
echo load the map in the editor now, load GTSdata and save quadtrees
echo aipathfinding.loadGTSdata and then aipathfinding.savequadtreees
echo and generate the air height map if needed
echo ai.createheightmap

echo =========================
echo Hit any key to load editor
echo warning - the map's Aipathfinding files will be deleted
echo the editor will attempt to create new ones
echo ==========================
pause

cd ..
echo Deleting old pathfinding mesh...
set FILE=mods\%mod_name%\levels\%level_name%\aiPathfinding\*.*
if exist %FILE% del /Q /F %FILE%

:Editor_choice
rem determine how to launch editor
echo.
echo --------------------------------------
echo You can launch the the BF2 editor with or without scripts
echo Some mods cause the editor to crash when launching with scripts
echo The scripts will convert the navmeshes into Aipathfinding files
echo 1) Launch BF2Editor With Scripts
echo 2) Launch BF2Editor Without Scripts

set /p cl_userinp=Choice: (1 or 2):
set cl_userinp=%cl_userinp:~0,1%
if "%cl_userinp%"=="1" goto editor_scripts
if "%cl_userinp%"=="2" goto editor_Noscripts



echo invalid answer
pause

goto Editor_choice

:editor_scripts
rem *** Start editor to convert it to qtr
echo Launching editor to create aipathfinding files...
rem cd ..

BF2Editor.exe +loadMod %mod_name% +loadLevel %level_name% +runConFileAndClose "saveQuadNoP4" +forceLoadPlugin SinglePlayerEditor

rem not using +enableAsserts 0

goto editor_complete

:editor_Noscripts
rem launching the editor without scripts
echo -------------------------------------------------------------
echo The editor will be started automatically loading the mod and
echo map_name you are working on.
echo You will have to select the the following commands manually
echo from the drop down selection boxes in the lower right corner
echo of the BF2 editor:
echo (1st window) (2nd window) (3rd window)
echo ai -- create heightmap -- 16
echo aipathfinding -- load GTSdata
echo aipathfinding -- savequadtrees
echo -------------------------------------------------------------
echo This will create new files in the map's aipathfinding folder
pause

rem cd ..
rem load editor without scripts
echo launching editor ...
BF2Editor.exe +loadMod %mod_name% +loadLevel %level_name% +forceLoadPlugin SinglePlayerEditor

:editor_complete
cd Navmesh

goto end



:levelerror

echo Level does not exist!
pause

:end
echo ---- complete -----
echo ---- press any key to exit ---
pause
with this options : "d" for frontline, "c" create new navmesh (i remove (if exist) per hand the small second islands in the "vehicle" and "infantry" dirs when the batch tell this and i hit "1" to launch the editor with scripts. With that way normaly the navmesh is working then.


Is that wrong here ?

Or what do you mean with cleanup ?




@Dnamro


yes there are ATVs in it (i play normal BomSF 1.41 and not vanilla - but i have the same result (a not working navmesh) if i remove this ATVs completly from the map setting.

This post has been edited by Web: Sep 4 2012, 11:27 AM


--------------------
Go to the top of the page
 
+Quote Post
Web
post Sep 4 2012, 11:24 AM
Post #8


Major
****

Group: Soldiers
Posts: 156
Joined: 4-January 11
From: Monheim @ Rhine, Germany
Member No.: 7,791



QUOTE (bobthedinosaur @ Sep 3 2012, 10:51 PM) *
hmm.. that's a good idea. I would try what dnamro said and remove the vehicles and vehicle nav untill the infantry is fixed.


still, ill take a look at them and try to clean them up for you.

web.. try this:
http://www.sendspace.com/file/glpxhk


Thanks again Bob...

but where should i place this files and when ?

Should this in the "work/frontline/gtsdata/output" dir and overwriting the org. files in this dir ? And should i run the fix navmesh option from the batch (see above) ?


If yes - the batch crashs for missing files at runtime - i test it.

If not - what should i do with it ?

Sorry but after some hours for testing and playing around with the navmesh i am total confused and going crasy....lol




I seams that any one of the navmesh "experts" here should take a look at this map an create an well running version for it (navmesh runtime is under an half hour on my old pc).

The vehicles can be simply removed (this are only agains long foot runs in bf2 vanilla).









--------------------
Go to the top of the page
 
+Quote Post
Dnamro
post Sep 4 2012, 11:44 AM
Post #9


CinC (for now)
Group Icon

Group: Mr. Admin
Posts: 6,933
Joined: 28-December 03
From: Fort Hood, TX
Member No.: 46



Can you post a link to the full map? I would like to take a look at it.


Nice script you got there. I wonder where you got that from.... Glad to see people using it.

Blender is a free 3dmodeling program that can import obj (wavefront) files, so you can use it check out the navmesh. I have used it to edit navmeshes without water.

Did you look at the navmesh in the editor? Did you make sure all the spawns were in the green area?


--------------------
No, my Avatar is not my dog.
Go to the top of the page
 
+Quote Post
bobthedinosaur
post Sep 13 2012, 09:42 PM
Post #10


Dictator
******

Group: Soldiers
Posts: 2,229
Joined: 4-March 11
From: A Cold Place
Member No.: 7,896



Since web didnt get back to us, here is the map he gave me that we were working on: http://www.sendspace.com/file/cv1hh5



I never did test the fixed navmeshe objs, but I also can't currently compile either.

This post has been edited by bobthedinosaur: Sep 13 2012, 09:43 PM


--------------------
Not doing modding right now, so please don't ask.
Go to the top of the page
 
+Quote Post
Dnamro
post Sep 14 2012, 12:39 PM
Post #11


CinC (for now)
Group Icon

Group: Mr. Admin
Posts: 6,933
Joined: 28-December 03
From: Fort Hood, TX
Member No.: 46



QUOTE (bobthedinosaur @ Sep 13 2012, 09:42 PM) *
Since web didnt get back to us, here is the map he gave me that we were working on: http://www.sendspace.com/file/cv1hh5



I never did test the fixed navmeshe objs, but I also can't currently compile either.



I will check it out


--------------------
No, my Avatar is not my dog.
Go to the top of the page
 
+Quote Post
Dnamro
post Sep 16 2012, 12:55 AM
Post #12


CinC (for now)
Group Icon

Group: Mr. Admin
Posts: 6,933
Joined: 28-December 03
From: Fort Hood, TX
Member No.: 46



I was able to generate what looks like a good infantry navmesh. I haven't tried it in game, but it looks good in 3dsmax. I need to check it out in the editor and then try it out in-game if all checks out.

The vehicles navmeshes will have to be edited in 3dsmax. Only half the map navmeshed. Once I confirm that I have a good infantry navmesh, that could be used to create the vehicle navmesh by deleting the areas of the map that vehicles can't use, such as narrow paths and buildings. It's a lot easier to edit down a navmesh then to try to build one up.


--------------------
No, my Avatar is not my dog.
Go to the top of the page
 
+Quote Post
Dnamro
post Sep 16 2012, 12:19 PM
Post #13


CinC (for now)
Group Icon

Group: Mr. Admin
Posts: 6,933
Joined: 28-December 03
From: Fort Hood, TX
Member No.: 46



Bob,

I can't get the map that you sent me to load even in conquest. I think I have a good navmesh for infantry, but I can't test it. I need to see the original map.


--------------------
No, my Avatar is not my dog.
Go to the top of the page
 
+Quote Post
bobthedinosaur
post Sep 16 2012, 03:21 PM
Post #14


Dictator
******

Group: Soldiers
Posts: 2,229
Joined: 4-March 11
From: A Cold Place
Member No.: 7,896



I don't have it unfortunately. I got that version from web. what is wrong with the conquest mode? is it crashing at some point?

I got it to load in conquest? Let me make a coop mode based off conquest.

This post has been edited by bobthedinosaur: Sep 16 2012, 03:26 PM


--------------------
Not doing modding right now, so please don't ask.
Go to the top of the page
 
+Quote Post
bobthedinosaur
post Sep 16 2012, 03:37 PM
Post #15


Dictator
******

Group: Soldiers
Posts: 2,229
Joined: 4-March 11
From: A Cold Place
Member No.: 7,896



I don't have it unfortunately. I got that version from spyker. what is wrong with the conquest mode? is it crashing at some point?

try this? http://www.sendspace.com/file/tonro7


--------------------
Not doing modding right now, so please don't ask.
Go to the top of the page
 
+Quote Post

3 Pages V   1 2 3 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 20th October 2017 - 05:10 PM