Forum rules - please read before posting.

How to use Terrain Mesh as a NavMesh?

edited April 2014 in Technical Q&A
can Anyone Help me,, as the title says. i have a big terrain.. and making navmesh segments would be quite time consuming.. is there a way to use the mesh of the terrain be used as a navmesh? if there is,, can you teach me how to:

a) get my Terrain Mesh from unity?

b) make it a navmesh?

Comments

  • I had the same question and by Trial and Error I came up with this:

    First of all, my Player control is 3rd Person Point & Click like in the AC 3D demos...

    I've created a simple Terrain, with some Grass and Trees. Added the Terrain Collider component with the "Create Tree Colliders" checkbox enabled (This should probably work for Terrain details such as Rocks). 
    Then I've baked the NavMesh for this Terrain. The Terrain is on the _SetGeometry Folder/parent by the way.
    Added an AC Navigation Mesh Script to the Terrain.

    In the AC Settings Menu the "Nav mesh layer name" is set to NavMesh.
    In the AC Scene Menu "Pathfinding Method" is set to Unity - actually I don't know if this is right but it seems to give better Navigation. But there's some limitations about having Unity deal with the Pathfinding in the AC documentation. Something like you can't switch NavMeshes which is not a problem for my game.



  • For full control over a terrain-based NavMesh, you're better off exporting it using this script.  You can then edit it as a mesh in, say Blender, which will allow you to alter your mesh for obstacles, without affecting the original terrain.
  • thanks for the replies guys,, Sadly i cant get OlavoXXX's solution to work for me,,

    @ChrisIceBox,, Im stumped at the part on editing my Terrain.obj as a mesh, i've already imported it in blender.. and i dont know how to use blender #-o ., could you help/teach me how to do it? 
  • edited April 2014
    There's plenty of tutorial sites out there that could do a far better job than I.  I suggest this one.
  • andie18: I tried It works wonderful. You just need to open the mesh in Blender and in "edit mode" delete the faces. Then you can use it in Adventure Creator.
  • I used this script

    from

    http://wiki.unity3d.com/index.php?title=TerrainObjExporter

    .js version did nothing.

    The modifier must be applied in Object Mode, however you can't see the results in real-time in blender 2.7
    you have to hit 'Apply' after you type in your target number of faces, in Blender it was 6666

    blender file of a 65,000 tri terrain
    https://dl.dropboxusercontent.com/u/102638093/bogwood_reduced.zip
    308k

    Not sure if 10% is the right number for a navmesh. Keep in mind I'm making a 1st person, don't really
    care about where the player/npc's can and can't go, I want them to go everywhere.

    r in Meshlab I made it 6553 faces 10%

    http://meshlab.sourceforge.net/
    Meshlab was much easier to use, just 'export as.'.an .obj

    This forum doesn't do pictures



  • Forgot, you want to put a 'Decimate' modifier on your mesh, theyre in the 'wrench' icon of your properties
    panel, mesh must be in object mode.
  • I feel your pain, Andie18.  I'm also unable to get anything done in blender (don't need this for anything else so it should have been an easy go in/get out procedure.)  Terry probably nailed it with his explanation, but for a novice seeing just text ain't going to do it.  Everything in Adventure Creator is a dream come through for me, but this has been its achilles' heel since day one.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.