Add SDK NavMeshGenerator to mefisto fork

I want to add a slightly modified version of the SDK NavMeshGenerator to the MeFisto94 AI fork of the jme3AI library.

The changes to it are very minor, Line 20 and 21 go away.

I add a LOG statement at line 28,

I change line 121 to log rather than displaying a dialog,

I uncomment line 133, and comment out line 134

This would then require CritterAI and jme3-terrain libraries to use this class.

This would then make MeFisto94 fork whole where you can generate and use the navmesh for pathfinding.

I wont do a pull unless approved here.

1 Like

I am uncertain whether this would be a good addition, because usually you generate the NavMeshes before shipping the game and then have a thin library to do the path finding.

So maybe if we implement it, we could have different artifacts like jme3-ai-rt and jme3-ai or something. Which actually reminds me that the name itself is unsatisfying because it’s only navmeshing and not for instance the steering behaviors I have in MonkeyBrains…

What I did in my project is just using CritterAI directly and then generator = new org.critterai.nmgen.NavmeshGenerator(nG.cellSize, nG.cellHeight, nG.minTraversableHeight, nG.maxTraversableStep, nG.maxTraversableSlope, nG.clipLedges, nG.traversableAreaBorderSize, nG.smoothingThreshold, nG.useConservativeExpansion, nG.minUnconnectedRegionSize, nG.mergeRegionSize, nG.maxEdgeLength, nG.edgeMaxDeviation, nG.maxVertsPerPoly, nG.contourSampleDistance, nG.contourMaxDeviation);

So I am uncertain if we should add it to the AI library, but on the other hand a all-in-one library might also be handy, yeah.

I hadn’t thought about this,

I’ve been concentrating on wiki and NavMeshGenerator makes life real simple. I guess they can just copy it from the example repository once its up.

The steering behaviors included with the AI don’t really work as expected, actually they don’t work at all. Not one time did any vehicle avoid any obstacle. Every test I tried using different behaviors did exactly the same thing, i,e. just barged through the obstacles and followed the target after catching up to it.

Well there is also a fork for that: GitHub - MeFisto94/MonkeyBrains: Agent framework for jMonkey Engine
Note though that it doesn’t only contain bugfixes but major reworks and design changes.

Basic behaviors should work, I actually posted screenshots of a simple multithreading test into the Screenshot Thread Sometime. The only thing I didn’t get to work properly was following a path, but at that time I was too exhausted to continue MonkeyBrains anyway.

A demo would be here MonkeyBrains/ at myFork · MeFisto94/MonkeyBrains · GitHub

You can even make it work with the BetterCharacterControl then, however what I never figured out was combining NavMeshes and Steering Behaviors (Detour Crowd)