Navigation Mesh with jME

I have been working in a project about simulations of accidents and I've been trying to find information about how to implement Navigation Mesh with jME. I found a lot of examples on internet. But they haven't helped enough. If anybody knows or have any example and explain for steps about that I really be happy.

  :)

The example game project that me and normen currently work on already has a working navigation mesh generator and pathfinder.









Here’s a screenshot of the generator:



Hi Momoko…

I can't see the screenshot … :frowning:

or did you forget to put it? xD

I can see it just fine.



Click the link:

http://img690.imageshack.us/img690/108/toola.png



I also attached it to the post

Could you share with me how you do it? … I mean could you explain me how you do it? Or help me with any tutorial or source code…  :?

It will be available soon, included in jME3, so don't worry.

I can't explain it because it will take too long, you should read a few books instead:

http://www.amazon.com/exec/obidos/ASIN/1584500778/aiwisdomcom-20


Well, actually I only need to know how to generate the mesh… for any model…

I found a example

The code is:



Vector3f map_points[] =

{

new Vector3f(-41.4328f, 40.0000f, 24.0671f),

new Vector3f(-23.1315f, 40.0000f, 42.3684f),

new Vector3f(-23.1315f, 40.0000f, 92.3684f),

new Vector3f(-16.4328f, 40.0000f, 67.3684f),

new Vector3f(-66.4328f, 40.0000f, 17.3684f),

new Vector3f(-91.4328f, 40.0000f, 24.0671f),

new Vector3f(-109.7341f, 40.0000f, 42.3684f),

new Vector3f(-116.4328f, 40.0000f, 67.3684f),

new Vector3f(-109.7341f, 40.0000f, 92.3684f),

new Vector3f(-91.4328f, 40.0000f, 110.6697f),

new Vector3f(-66.4328f, 40.0000f, 117.3684f),

new Vector3f(-41.4328f, 40.0000f, 110.6697f),

new Vector3f(-40.4520f, 40.0000f, 82.3684f),

new Vector3f(-51.4328f, 40.0000f, 93.3492f),

new Vector3f(-66.4328f, 40.0000f, 97.3684f),

new Vector3f(-81.4328f, 40.0000f, 93.3492f),

new Vector3f(-92.4136f, 40.0000f, 82.3684f),

new Vector3f(-96.4328f, 40.0000f, 67.3684f),

new Vector3f(-92.4136f, 40.0000f, 52.3684f),

new Vector3f(-81.4328f, 40.0000f, 41.3876f),

new Vector3f(-66.4328f, 40.0000f, 37.3684f),

new Vector3f(-51.4328f, 40.0000f, 41.3876f),

new Vector3f(-40.4520f, 40.0000f, 52.3684f),

new Vector3f(-36.4328f, 40.0000f, 67.3684f),

new Vector3f(-56.5907f, 10.0000f, 67.1996f),

new Vector3f(-56.5907f, 10.0000f, 67.1996f),

new Vector3f(-81.4328f, 40.0000f, 93.3492f),

new Vector3f(-67.5715f, 10.0000f, 56.2188f),

new Vector3f(-67.5715f, 10.0000f, 56.2188f),

new Vector3f(-92.4136f, 40.0000f, 82.3684f),

new Vector3f(65.0024f, 5.7630f, -65.5516f),

new Vector3f(35.0030f, 5.7630f, -84.3647f),

new Vector3f(0.4275f, 5.7630f, -91.4832f),

new Vector3f(-33.1311f, 5.7630f, -83.8563f),

new Vector3f(-63.6390f, 5.7630f, -65.0431f),

new Vector3f(-83.9775f, 5.7630f, -36.0606f),

new Vector3f(-93.1299f, 5.7630f, -0.4682f),

new Vector3f(-88.0453f, 5.7630f, 20.3789f),

new Vector3f(-66.1813f, 5.7630f, 14.2773f),

new Vector3f(-52.4528f, 5.7630f, 18.3450f),

new Vector3f(-44.3174f, 5.7630f, 21.3958f),

new Vector3f(-60.0797f, 5.7630f, 41.7344f),

new Vector3f(-63.4004f, 5.7630f, 51.8567f),

new Vector3f(-52.4528f, 5.7630f, 62.7418f),

new Vector3f(-39.2327f, 5.7630f, 55.4629f),

new Vector3f(-19.4026f, 5.7630f, 43.2598f),

new Vector3f(-13.8095f, 5.7630f, 64.6152f),

new Vector3f(-19.4026f, 5.7630f, 89.0215f),

new Vector3f(0.4275f, 5.7630f, 92.0723f),

new Vector3f(36.0200f, 5.7630f, 84.4454f),

new Vector3f(65.5109f, 5.7630f, 66.6491f),

new Vector3f(85.8495f, 5.7630f, 34.6159f),

new Vector3f(93.4764f, 5.7630f, 0.5488f),

new Vector3f(86.3579f, 5.7630f, -35.0437f),

new Vector3f(86.3579f, 5.7630f, -35.0437f),

new Vector3f(63.9855f, 5.7630f, -21.8236f),

new Vector3f(41.1046f, 5.7630f, -18.7729f),

new Vector3f(63.4770f, 5.7630f, 3.0911f),

new Vector3f(49.2400f, 5.7630f, 25.9720f),

new Vector3f(27.3761f, 5.7630f, 36.1413f),

new Vector3f(0.4275f, 5.7630f, 35.6328f),

new Vector3f(-21.9449f, 5.7630f, 22.4127f),

new Vector3f(-33.6396f, 5.7630f, 3.0911f),

new Vector3f(-36.6904f, 5.7630f, -24.3660f),

new Vector3f(-23.4703f, 5.7630f, -45.2130f),

new Vector3f(0.4275f, 5.7630f, -59.9585f),

new Vector3f(26.3592f, 5.7630f, -59.9585f),

new Vector3f(19.2407f, 5.7630f, -37.5860f),

new Vector3f(6.5291f, 5.7630f, -38.0945f),

new Vector3f(-5.1656f, 5.7630f, -30.4675f),

new Vector3f(-11.7756f, 5.7630f, -18.2644f),

new Vector3f(-11.2672f, 5.7630f, -5.0443f),

new Vector3f(-4.1487f, 5.7630f, 7.6673f),

new Vector3f(6.0206f, 5.7630f, 14.2773f),

new Vector3f(20.2576f, 5.7630f, 14.7858f),

new Vector3f(32.4607f, 5.7630f, 7.6673f),

new Vector3f(39.0708f, 5.7630f, -3.0105f),

};



but I wonder if there is another way to generate those points without having to make them manually for any map.

Hello,



A good place to start would be the article "polygon soup for the programmer soul" at gamasutra (www.gamasutra.com/view/feature/3000/gdc_2002_polygon_soup_for_the_.php). The author explains a method for generating navigation meshes witch is simple enough to implement it within a pair of days in jme.



Good luck!



Ps: sorry for any typo, writing from a touch screen :smiley: