Advertisement

Recast navmesh with horrible building speed

Started by August 12, 2015 03:21 AM
5 comments, last by ferrous 9 years, 2 months ago

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


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.

Advertisement

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


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.

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

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

Advertisement

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.

This topic is closed to new replies.

Advertisement