Jump to content

AI Navigation on large (multi-)terrains


jorikito
Go to solution Solved by Bryan,

Recommended Posts

I've been playing around with Gaia and it is a great tool to create large, beautiful worlds with! I was recently trying to bake a navmesh on this terrain I've been working on, but since it's 4x4, 2km² by 2km² terrains, this basically just freezes the editor and from what I've read takes up too much memory anyways in such big terrains. 

I've heard from people that the only viable option for these size terrains is to have a dynamically changing navmesh around the player. Such as this: A* Project: RecastGraph.

Would love to hear your thoughts on this; do you think implementing this is the best idea for large terrain navigation?

❤️ jorikito

unitypls.JPG.9b8ec9bc05c0a8372f654ff5636db4ce.JPG

bigmommaterrain.thumb.JPG.8a47b77e554ef3da8cdf613a4dd7e361.JPG

  • Like 1
Link to comment
Share on other sites

Yes generally build a graph around the player. If you do a google there are Unity tools for using the regular navmesh as well if you're using assets that need it, but im also a big fan of a* pathfinding project, makes this stuff way easier.

  • Like 1
Link to comment
Share on other sites

  • Solution
4 hours ago, jorikito said:

I've been playing around with Gaia and it is a great tool to create large, beautiful worlds with! I was recently trying to bake a navmesh on this terrain I've been working on, but since it's 4x4, 2km² by 2km² terrains, this basically just freezes the editor and from what I've read takes up too much memory anyways in such big terrains. 

I've heard from people that the only viable option for these size terrains is to have a dynamically changing navmesh around the player. Such as this: A* Project: RecastGraph.

Would love to hear your thoughts on this; do you think implementing this is the best idea for large terrain navigation?

❤️ jorikito

unitypls.JPG.9b8ec9bc05c0a8372f654ff5636db4ce.JPG

bigmommaterrain.thumb.JPG.8a47b77e554ef3da8cdf613a4dd7e361.JPG

Are you doing any streaming if not I do highly suggest this. 
One test I would do is make a test build and check your ram usage. You would want to check this in the editor as well to get an idea of what you editor performance is at. 

Streaming reduces the costs of editor performance and build performance. 
You would want to create scenes with the terrains as well. 
What this does is allow you to reduce the ram to per terrain / scene instead of the entire world / scene. 

This will greatly improve your performance in editor and build. 

As far as terrain nav I honestly suggest into looking into another option for nav mesh. 
Unity did not release this on the asset store (to me I dont understand as its very useful and more performant) but its on git hub by Unity. 
https://github.com/Unity-Technologies/NavMeshComponents

Hopefully this helps you! 
Please let me know how it goes I am very curious to see if it helps other like it did for me! 
 

  • Like 2
Link to comment
Share on other sites

19 hours ago, Bryan said:

Are you doing any streaming if not I do highly suggest this. 
One test I would do is make a test build and check your ram usage. You would want to check this in the editor as well to get an idea of what you editor performance is at. 

Streaming reduces the costs of editor performance and build performance. 
You would want to create scenes with the terrains as well. 
What this does is allow you to reduce the ram to per terrain / scene instead of the entire world / scene. 

This will greatly improve your performance in editor and build. 

As far as terrain nav I honestly suggest into looking into another option for nav mesh. 
Unity did not release this on the asset store (to me I dont understand as its very useful and more performant) but its on git hub by Unity. 
https://github.com/Unity-Technologies/NavMeshComponents

Hopefully this helps you! 
Please let me know how it goes I am very curious to see if it helps other like it did for me! 
 

Thanks for the reply!

I tested the performance, it takes up 16GB of textures alone! Guess 2k textures + some microsplat maps take up a lot!
(Edit: Most of the Memory was not from the terrain at all, but assets and tools that were in the background)

I think I really will have to start streaming and fake perspective of mountains etc. I will start looking at Gaia Pro's terrain streaming. I take it it's also in the documentation, but what terrain sizes and resolution would you recommend for something like 30-40 km²?

The NavMeshComponents seem very interesting! So that would mean baking navmeshes in runtime, cool.

I will play around with streaming and navigation more coming days, appreciate the tips!

Edited by jorikito
Link to comment
Share on other sites

1 minute ago, jorikito said:

Thanks for the reply!

I tested the performance, it takes up 16GB of textures alone! Guess 2k textures + some microsplat maps take up a lot!

I think I really will have to start streaming and fake perspective of mountains etc. I will start looking at Gaia Pro's terrain streaming. I take it it's also in the documentation, but what terrain sizes and resolution would you recommend for something like 30-40 km²?

The NavMeshComponents seem very interesting! So that would mean baking navmeshes in runtime, cool.

I will play around with streaming and navigation more coming days, appreciate the tips!

I would also agree that streaming may be a viable option for you, given the fact that you are working with so much world area. Memory on devices that your building your games to could be in a variety of usage states so its always best practice to reduce memory and framerates where ever you can. Optimization is important and honestly that's one of the benefits of the software made from procedural worlds, as it is meant to optimize, and help with that 🙂 Examples would be SECTR COMPLETE 2019 but you also could simply signup for a professional subscription here and get all the performant software for your open world game that Procedural Worlds offers, and more. I hope this helps 🙂 

  • Like 1
Link to comment
Share on other sites

There's also that whole floating point breaking physics etc. stuff if you just walk away over an open world, gotta have some of that fake moving the world under you instead of you over the world stuff that I dont understand but have read about.

  • Like 1
Link to comment
Share on other sites

7 hours ago, jorikito said:

Thanks for the reply!

I tested the performance, it takes up 16GB of textures alone! Guess 2k textures + some microsplat maps take up a lot!
(Edit: Most of the Memory was not from the terrain at all, but assets and tools that were in the background)

I think I really will have to start streaming and fake perspective of mountains etc. I will start looking at Gaia Pro's terrain streaming. I take it it's also in the documentation, but what terrain sizes and resolution would you recommend for something like 30-40 km²?

The NavMeshComponents seem very interesting! So that would mean baking navmeshes in runtime, cool.

I will play around with streaming and navigation more coming days, appreciate the tips!

I would either do a 30x30 at 512x512km size or 1024x1024km at 15x15 terrains.
I would 100 percent use Gaia Pro 2021 terrain streaming with this as well. 
Add your floating point fix is a must, and enable garbage collection. 
Create terrain scenes and unload them (depending on your hardware you might need to unload them). 
This is quite a massive world you making.  

  • Like 2
Link to comment
Share on other sites

7 hours ago, Bryan said:

I would either do a 30x30 at 512x512km size or 1024x1024km at 15x15 terrains.
I would 100 percent use Gaia Pro 2021 terrain streaming with this as well. 
Add your floating point fix is a must, and enable garbage collection. 
Create terrain scenes and unload them (depending on your hardware you might need to unload them). 
This is quite a massive world you making.  

Yeah, and I was planning on creating at least a couple of these open worldish maps, I think it will be better if I make them smaller and create the illusion that they're bigger. That's what most games do anyways.

  • Like 2
Link to comment
Share on other sites

1 hour ago, jorikito said:

Yeah, and I was planning on creating at least a couple of these open worldish maps, I think it will be better if I make them smaller and create the illusion that they're bigger. That's what most games do anyways.

At worse. You could prototype the concept of making it appear bigger and see how that works for you. If it doesn't then you can extend what you have already created to be bigger.

Personally less is more and you may get a better return on your time if you use technics where you make the world appear larger then it is. Good luck regardless would be amazing to see what you make.

  • Like 1
Link to comment
Share on other sites

38 minutes ago, Vexstorm said:

At worse. You could prototype the concept of making it appear bigger and see how that works for you. If it doesn't then you can extend what you have already created to be bigger.

Personally less is more and you may get a better return on your time if you use technics where you make the world appear larger then it is. Good luck regardless would be amazing to see what you make.

Exactly what I was thinking! 😀

I'll make sure to post some screenshots here in due time.

Edited by jorikito
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

×
×
  • Create New...