Navmesh with Blender

When creating a navmesh with Blender it makes a really bad work. Nothing better than some images:

The scene without navmesh is:

And the generated navmesh can be seen here:

Is anyone familiar with this Blender feature and do know how to make great automatic navigation meshes?. I don’t expect it to do the scene final mesh but a good one to take as base to edit it.

The sdk generator makes the meshes much better than the blender one but they still changes on complex scenes (that’s why I want a similar generator for blender).

1 Like

Have you tried playing with the settings? You might need to decrease cell size for example.

The best open source tool for this is “Recast”, but it’s C++ and takes a while to compute the mesh (it’s voxel-based which means that small cubes are generated instead of CSG-like operations). Other tools are available too, about jME support I don’t know. Ogre Recast/Detour demo: dynamic navmeshes - YouTube

Yes, I been playing with it but I can’t achieve what I want. I tried with almost the same values as with the critterai in-game generator but the last is doin’g it very well and blender what you can see in the image :S.

If I’m not wrong, blender uses recast to do that… “thing” :S.

What is the problem with the navmesh? You’re aware that the lines are not paths? The areas are the paths.

Yep, I’m aware of that :smiley: . The problem is that it isn’t doing the “spiral”. It is just doing the floor and not very well (as you can see, the gray fragment is overlapping the spiral. It is going on the 3D on a weird fashion).

I think I know where the error is…
Look at the huge distance to the outer edges of your gray quad.
Now look how wide your staircase is.
You need to configure a thinner walker (reduce that value to around 5 percent of what it is now).
EDIT: you can also configure the cell size for the voxels - it should be much smaller than the walker.

EDIT:
and that there is no nav mesh under the staircase may have two reasons:
a) Your walker is also very tall ( so the head bumps the underside of the stair ).
b) You know, these navmeshes are not full 3d, they are often 2d or 2.5 dimensional.

I’m not familiar with Blender’s Navmesh generator, but you probably want to be sure you’re not using ngons. Which is to say make sure your mesh has only quads and/or tris.

The problem couldn’t be the walker height, it wasn’t even creating a navmesh for the spiral.

Yeep, I know how the navmeshes work :stuck_out_tongue:

Good one, but wasn’t the problem.

The problem was that the spiral and the floor were the same object but disconnected, like two meshes. Two possible solutions?

  1. Separate them on two different objects.
  2. Connect them (ie: connect the two spiral rampage start vertex with the floor)

The resulting navmesh (a good one) is:

http://i.imgur.com/Izav5st.png

It is not optimized at all, there still some parameters play, but it’s a usable one.

2 Likes

Another thing talking about recast. I saw some time ago that @Tihomir started a project to use it on jme calling it jNavigation. The wiki talks about it usage but I think this was never finished, was it?. Is there any recast for jme project in the hoods?.

I don’t know. I did not have time to actually use much of the engine jME in the last 11 months. I was hacking new engine components to suit my basic needs because many features were poor or missing. Next time I touch a game engine things must be available and I will be a user, not a maker of engine stuff.

In your last image the distance to the border of the ground quad is zero - so something must have changed.

If Blender really uses recast, then this might not have been the problem. Recast uses voxels and doesn’t care about the connectivity of triangles in the mesh. If your action really solved the issue, maybe Blender doesn’t use Recast.

You might need to model an “underside” of your ramp, because the direction of the normals of the triangles might matter to detect where the outside is - but I could be wrong here.

I just don’t know enough at this point and every further thought is speculation.
Since you know how navmeshes work - maybe you know enough about Recast too.

I can’t remember what parameters were in that image but the point is that I tried much parameters before deciding to post one of the results (every of them were very likely).

Well, I can’t ensure it but it’s what they say at their wiki.

No, only some fast investigations about what recast is.

Okay, the wiki states that Recast/Detour is used as external libraries. I think that answers this uncertainty.

The quesion remains: What is the better workflow?
a) make your scene in Blender editor and then import the game level (the scene)
b) make your scene in jME (either SDK or via level editor or procedurally generated) + Recast

I think, if a) is possible and there is a good asset pipeline and a stable workflow for: everything Blender => into jME, then a) might be the preferred solution for all non-procedural games.

The problem is: Since I did not have time to make games and was stuck making engine stuff, I don’t know much about the best asset pipeline - only for text assets (fonts, Unicode, and some ideas about management of text assets and localization).

Well, I’m currently doing my own pipeline “engine” and is just the a) option ;).

But I must say that I would like to have the recast advantages for game runtime too. For example, the ability to update the navigation mesh based on scene objects addition/removal and many other functionalities (I think recast give this easily. I’ve been looking some information about critterai’s nmgen and recast but I can’t say I know enough to talk with real knowledge about them)

However, for static scenes, I’m going for a).

Yes, look at this video: Ogre Recast/Detour demo: dynamic navmeshes - YouTube
It’s the Ogre Engine (open source, C++) using Recast at runtime.
I think that is a must have for every game engine (except from RPG maker which is 2D and cell-based).

1 Like

Got a link to that CritterAI thing?

http://www.critterai.org/projects/nmgen_study/diffs.html

Totally agree but not in position to implement it :chimpanzee_sad:

The only other thing I have is this link: Navmesh generation in runtime

That guy called rickard is really great. I know him since jME 2 (2006). Also have his book about jME recipes.