Domanda

I'm new to using Ogre and especially Recast/Detour, and I need a little help.

I'm loading a terrain in Ogre and creating a navigation mesh over the top of it with Recast/Detour. I wanted to loaded more complex terrains because as of right now, I can only load .mesh files which as far as I know can't contain other objects, like buildings, etc. I have two ways that I can think of to do this:

1) Export the .obj files with Blender to .scene files. Then use a third party .scene loader, like DotScene, to load these into Ogre. Then I'd have to figure out how to get Recast to create the navigation mesh on top of a whole scene.

2) Or use Ogre's new terrain loading system, which I haven't read much up on yet.

So if you've worked on a project that uses Ogre and Recast/Detour, how did you accomplish the loading of your terrains and creation of your navigation meshes?

EDIT: I found a third option that will allow me to keep my current solution but to also load complex terrains. I figured out a way to combine Ogre meshes into one giant mesh file using Blender. I can still load the terrain as a .scene but the navmesh creation procedure does not work with the entities loaded that way, whereas a giant mesh loaded can use the same functionality I already had.

È stato utile?

Soluzione

I have no experience with Recast or Detour, hence cannot really comment on your question, but I can point you to OgreCrowd which is a project that works with Ogre::Terrain + Recast/Detour and is open-source. So it might provide some inspirations/ideas/pointers:

Ogre Forum Thread: OgreCrowd - a crowd component for Ogre using Recast/Detour

This corresponding video shows that it can handle Terrain plus additional objects on top of it, so it matches your scenario.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top