Jump to content
  • Advertisement
Sign in to follow this  
lucky6969b

Recast navmesh with horrible building speed

This topic is 1191 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I got a scene of about 1800x1600m If I assume the human radius is 0.4m and height 2.0m,

I use tiled mesh, It finally ends up with ~400x400 tiles,

If I build them all, it takes 170000 loops to complete

which is apparently forever for real time situations....

How do I improve this?

How come you guys get incredibly fast building speed?

Thanks

Jack

Edited by lucky6969b

Share this post


Link to post
Share on other sites
Advertisement


How come you guys get incredibly fast building speed?

Typically you try to pre-generate the mesh offline and load it at the level-start, then apply only modifications.

Share this post


Link to post
Share on other sites

The problem I keep encountering is even though I try to generate everything offline.

I still have to wait a lot of time before it's completed.

Do you guys have to wait in usual cases a couple of hours for a level to complete?

Thanks

Jack

Share this post


Link to post
Share on other sites


Do you guys have to wait in usual cases a couple of hours for a level to complete?

No, but it depends on a lot of factors. Try to profile your generation and identify the most demanding code. When I surpass a certain threshold (10 - 20 minutes), I always hunt down the bottleneck and optimize it. You often only need to optimize one or two aspects to gain a significant increase in performance.

Share this post


Link to post
Share on other sites

First thing I always check is data containers that may be reallocating, start with with large pre allocated buffers for offline work.

Share this post


Link to post
Share on other sites

I find out that I ran out of tiles when building a mesh of dimension of 1800x1600 units.

If I convert this back to meters, it just accounts to about 40x40 meters,

this is quite hairy because when I pop the .obj file into the demo, I find out it actually did run out of tiles

The visible tiles were extremely tiny and covered half of the scene.

Let's assume I had a tileSize of 32 and a cellSize of 0.3

The demo calculated up everything for me

 

Cell Size 0.30

Cell Height 0.20

Voxels 6058 x 5585

 

Agent Height 2.0

Agent Radius 0.6

Max Climb 0.9

Max Slope 45

 

Min Region Size 8

Merged Region Size 20

Monotone Partitioning not used

 

Max Edge Length 12

Max Edge Error 1.3

Verts Per Poly 6

 

Detail Mesh

Sample Distance 6

Max Sample Error 1

 

Tiles 190 x 175

Max Tiles 16384

Max Polys 256

 

Does anyone have any suggestions that might leverage this situation?

 

Thanks

Jack

 

Share this post


Link to post
Share on other sites

It looks to me like your tile size is tiny, and so it's just running out of memory trying to fill the whole level with tiny tiles.  I think you may need to adjust your settings.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!