Right foot, left foot (I)

It’s been a while since I’ve introduced a NEW feature in Crimild. I mean, this is not a refactor or an improvement over something already there, but a completely new thing. Exciting, right?

So, without further ado…

NAV MESHES!!

Navigation meshes are the other big feature to be included in Crimild’s next release (soon). Simply put, a NavMesh is a data structure used for navigation (duh) and pathfinding on complex spaces. It defines a set of polygons (i.e. triangles), describing areas that are traversable by agents in a simulation, simplifying things like collision detection with walls and other static objets. Basically, it defines what “the floor” means for our game.

The current implementation is pretty basic, but I implemented a tool for loading nav meshes from geometry described in OBJ files. That way, you can create a whole level and its nav mesh in a 3D editor like Blender (and I don’t have to write a level editor at this stage). Once loaded, triangles are linked together automatically based on edge sharing. It’s simple, but it’s more than enough for my secret project ;).

There’s a demo already available in the examples projects with a simple scene and a walking character. Check it out:

This slideshow requires JavaScript.

The next step is to add support for “bridges” in the geometry (as in characters walking below other parts of the level) and pathfinding tools (like A* or other techniques).

See you next time!

 

Shadow mapping improvements (I)

Just a brief update to build up some expectations for the next release (whenever that happens).

I’ve been working on improving the shadow mapping technique support in Crimild in order to make it more reliable in production environments. The current implementation had a lot of errors and artifacts and it’s not really usable in big open spaces due to incorrect light frustum calculations.

Here’s a quick look at the new Shadows demo:

 

This slideshow requires JavaScript.

Only directional and spot lights can cast shadows at the moment, but I’m planning on adding support for point lights shortly. I’m also planning on adding support for cascade shadow maps in a later release.

That’s it. See you later 🙂