x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Streaming Level Tiles with Nav Mesh

Hi all,

I have a problem. I have created a series of sublevels I spawn procedurally at runtime to create a large grid world. These sublevels are modular, and are instanced many times at different positions and rotations. While doing this I assumed I could create a Nav Mesh Volume per sublevel and precalculate the Nav Mesh of each tile - however this does not seem to be working.
I read in this thread from 2015 that the only option is to have a large Nav Mesh Volume in the persistent level and Recast Dynamically at runtime. However for my world this takes upwards of five minutes. Is there no other way?

I am thinking as a fallback I could load levels in dynamically so it doesn't have to calculate the nav mesh of the entire world, however I think this is not even viable as I imagine there will be a huge frame drop when a new level is loaded in.

Hoping someone has answers, I would be super grateful.

TLDR
How can I load previously built, modular Nav Meshes into a level???

Regards,
Jimmy.

Product Version: UE 4.19
Tags:
more ▼

asked Oct 08 '18 at 07:35 PM in Blueprint Scripting

avatar image

troydSPAMBOT3000
31 1 6 10

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

There is another way. You could use the Nav Invoker component on your AI.

This requires a few changes though, and not documented very well.

First you will need to change some settings inside your project settings.

  1. Project settings -> Navigation Mesh -> Generation -> Advanced Dropdown -> Change Max simultaneous tile generation jobs count to 1.

  2. Project settings -> Navigation Mesh -> Runtime -> Runtime Generation to Dynamic.

  3. Project settings -> Navigation System -> Data Gathering Mode to Lazy.

  4. Project settings -> Navigation System -> Generate Navigation Only Around Navigation Invokers.

Then you will need to add the nav invoker component to your AI Pawn, there is some tile distance settings you can play with inside the component if you need. Defaults are good start points though.

You will also need to put a nav mesh bounds volume over your entire world (Do not worry, it will not get calculated.)

Now if you place an AI with the nav invoker component into the world you will see the nav mesh only gets calculated a certain radius around the AI Pawn. Move the AI around and you can see it update its nav mesh by calculating more tiles and removing old tiles depending on the nav invoker component settings.

Hope this helps!

more ▼

answered Oct 12 '18 at 11:40 AM

avatar image

Steve SybrSyn
1.5k 4 5 10

avatar image troydSPAMBOT3000 Oct 14 '18 at 05:11 PM

Wow I had no idea about this feature!
In the end I changed the way my modular world tiles spawn so they load in dynamically based on a radius around the player, and then had a dynamic nav mesh updating as this was happening.
However, my solution combined with what you are describing sounds even better.
This will help a lot - thank you!

avatar image troydSPAMBOT3000 Mar 04 '19 at 04:28 PM

Hi @Steve SybrSyn, I am revisiting this after working on other parts of the project. I was just wondering, why is it necessary to change max simultaneous tile generation jobs count to 1?

avatar image Steve SybrSyn Apr 06 '19 at 12:21 AM

You can increase the number, but there is a chance that it will cause the engine to crash. It's just a bug that they are suppose to fix eventually, and it has been awhile now so it may be fixed, but I am not sure. Try changing it if you want, then test, if it crashes then you know you just gotta keep it set to 1 until the AI team fixes it. (Could be a long time.)

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question