swordlegend / recastnavigation

Automatically exported from code.google.com/p/recastnavigation
zlib License
0 stars 0 forks source link

don't work for large terrian #59

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.choose Sample:Solo Mesh Simple
2.choose Input Mesh:a large terrian obj
3.click "build" button

What is the expected output? What do you see instead?
expected ouput: nav mesh will show,small terrian will show nav mesh
instead:crash at this line:
rcScopedDelete<unsigned short> tmp = new unsigned short[chf.spanCount*4];
in function rcBuildRegions in RecastRegion.cpp
it want to new 280M memory...

What version of the product are you using? On what operating system?
version:1.4
operating system:windows xp

Please provide any additional information below.
i changed new to VirtualAlloc,but still no enough memory...

Original issue reported on code.google.com by sandy...@gmail.com on 2 Apr 2010 at 8:23

GoogleCodeExporter commented 9 years ago
You should use "solo mesh tiled" for large terrains. if the above will need 
280M,
then the whole system will use a couple of gigabytes of memory.

There is a limit of 65536 navmesh polygons per mesh. If your terrain is really 
big,
then you should use tile mesh and only load the tiles you really need.

Original comment by memono...@gmail.com on 2 Apr 2010 at 8:27

GoogleCodeExporter commented 9 years ago
thanks for your answer:)
when i use "solo tiled",there's error too,but in different place
then i turn to "tile mesh",but i only build half of the whole terrian,i take it 
down 
to the attached file

Original comment by sandy...@gmail.com on 2 Apr 2010 at 10:15

Attachments:

GoogleCodeExporter commented 9 years ago
Try using larger tile size, for example 256 or maybe even a bit larger.

Original comment by memono...@gmail.com on 2 Apr 2010 at 10:44