Announcement

Collapse
No announcement yet.

How to work with NavMesh and big Landscapes?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to work with NavMesh and big Landscapes?

    I'm slowly crawling towards AI and NavMesh stuff in my game aaand I'm not sure how to handle NavMesh in big location built with World Composition.
    With little dynamic levels you don't even think about this stuff - everything is smooth, rebuilding and etc, but what is current workflow for... let's say 2km x 2km location divided in 4 sublevels? And landscapes in general
    Should I create huge 1km x 1km nav mesh in each sublevel and then they will blend or what?
    I never worked with huge navmeshes and I don't even know is it okay to have such big NavMesh or not - there is zero documentation about recommended size policy and etc
    SuperGrid: Marketplace Page | Feedback Thread | Demo | Website
    Level design and prototyping for newbies

    #2
    Anyone?
    SuperGrid: Marketplace Page | Feedback Thread | Demo | Website
    Level design and prototyping for newbies

    Comment


      #3
      I am intgerested in this as well. Another big problem I see with the navmeshes currently is that I have to generate them again every time I restart the editor. On small maps this may work, but for an open world game, this takes quite some time. Why aren't navmeshes saved properly?

      Comment


        #4
        Originally posted by HammelGammel View Post
        I am intgerested in this as well. Another big problem I see with the navmeshes currently is that I have to generate them again every time I restart the editor. On small maps this may work, but for an open world game, this takes quite some time. Why aren't navmeshes saved properly?
        1) You can turn off navmesh generation either in Project or Editor Settings
        2) Make your navmesh volume tiny unless you are testing gameplay. Or move it into the area you are testing.

        Comment


          #5
          NavMesh is just one object that can cover your whole world. It's basically almost infinite regular grid. In each grid cell it can hold several mesh tiles (usually just one).
          Do you need dynamic navmesh, that can rebuild itself when geometry in the world is changed? In this case I would suggest enable new option (4.6 version) in ARecastNavMesh actor - bFixedTilePool. Adjust TilePoolSize property with expected number of tiles that can be in navmesh at any moment, usually about "navigable area size / tile area size". If pool will overflow it will give you a warning in the log. This will allow add/remove NavMeshBounds volumes at runtime without invalidating whole navmesh. Only part that was added/removed will be regenerated. So you can put NavMeshBounds volumes into sub-levels.

          In general: place NavMeshBounds volumes only where you need navmesh and use smallest possible number of volumes. Also disable NavMeshRelevant flag on actors/components which will not affect your navmesh, this will decrease memory usage by navigation system. Also make sure that you have at least one NavMeshBounds volume in the persistent level, otherwise navigation system could delete ARecastNavMesh actor

          Static (bRebuildAtRuntime==false) navmesh supports streaming. When you place NavMeshBounds volume in the sub-level tiles that intersect that volume will be saved in sub-level. So when sub-level is streamed in/out tiles will be attached/detached to navmesh.

          Also take a look at AI support stream, it explains some of navmesh build options. http://www.twitch.tv/unrealengine/b/594984384
          Last edited by ddvlost; 12-18-2014, 01:46 AM.

          Comment


            #6
            Originally posted by ddvlost View Post

            Static (bRebuildAtRuntime==false) navmesh supports streaming. When you place NavMeshBounds volume in the sub-level tiles that intersect that volume will be saved in sub-level. So when sub-level is streamed in/out tiles will be attached/detached to navmesh.
            So I try to put NavMeshBounds volume on ContentExample "StreamingLevel1"

            Click image for larger version

Name:	NavMesh StreamLevel.png
Views:	1
Size:	563.5 KB
ID:	1082931

            But when i play "Level_Streaming" its does't show NavMesh when "StreamingLevel1" is loaded (With console "show Navigation" turn on)

            Click image for larger version

Name:	NavMesh StreamLevel - play.png
Views:	1
Size:	612.7 KB
ID:	1082934

            And This my Setting:

            Click image for larger version

Name:	Setting.png
Views:	1
Size:	37.9 KB
ID:	1082935

            Comment


              #7
              Same problem as n0sam3, does anyone know how to solve this?

              Comment


                #8
                Originally posted by Invius View Post
                Same problem as n0sam3, does anyone know how to solve this?
                Look at the videos of the kite demo they sould give some more info.
                Kevin
                Sorry for my English i'm Dutch

                Comment


                  #9
                  If it is anything like fallout 3. Which I am sure is much better. It will depend on what type of game it is and it must recycle back to original state if proper triggers arnt met.. Need a plan of what you have next to occur. Navmesh are like a lines of patrols that you send out and repeat even if pattern isnt precieved as in a basic guad patrol. Or a NPC who if isnt asked ther right questions triggers the next sequence within a location an mission (usually havin an item to trigger). Look at the basic patrol of npc in the geck if you have it and are familure with it. It will give u ideas of what you can do. Take time get fallout3 (not through steam I have always had issues with them when modding). But get it learn the geck and basic patrols from there it will save u time of what you will not have learned.In other words you will come out with faster knowledge than freestylin of not know what to do period. If u need help with the geck I will help. Navmesh I cant wait to get in. I am stuck with cheesy fbx and obj,lol.
                  Last edited by antoniobradiano; 09-27-2015, 12:55 AM.

                  Comment


                    #10
                    Hey guys,

                    We are building an open world game using the world composition editor and we are having some similar issues and having tried what ddvlost suggested we are not able to save the RecastNavMesh into sub maps. I have placed a NavMeshBounds volume in the persistent map (it intersects with nothing) and another in the sub map which intersects the terrain for which we want to generate a RecastNavMesh. When we generate the RecastNavMesh it is placed in the persistent map not the sub map even when I enable bFixedTilePool. We are using UE4.9 and we really just want to achieve nav meshes that stream in client side when requires rather than constantly loaded which is what I assume will happen if the RecastNavMesh is in the persistent map. Any advice on this is appreciated. bRebuildAtRuntime is DEPRECATED so I set the runtime generation field to static.

                    Thanks.

                    Comment


                      #11
                      I've been testing setting our navmesh to DynamicModifiersOnly( I would assume static would work in a similar way) and using bFixedTilePool size. I put nav bounds volumes in both our persistent level, our environment level (streamed sub level), and our gameplay level(streamed sub level) and rebuilt paths. The key thing that messed me up was that nothing worked will testing the streaming inside the editor. However once running a cooked and packaged build, the nav was there. The volumes in all three of those levels were able to generate nav even though the static mesh they were generating nav on was in our environment level.

                      Comment


                        #12
                        put navmesh on persistent, not streamed levels

                        Comment


                          #13
                          put navmesh on persistent, not streamed levels
                          but the case is to have navmesh in sublevels and stream the static data when needed.

                          I'm trying to achieve this as well and without any luck.
                          How to create first person shooter game from scratch. Lots of tutorials: http://www.shootertutorial.com - celebrating 50th Tutorial!

                          My Marketplace Assets

                          Comment


                            #14
                            I have done a tutorial on this subject using navigation invokers.
                            https://youtu.be/DMe536X4IT0

                            Comment

                            Working...
                            X