by Aaron » Sun Oct 26, 2014 9:11 am
Hi Tristan,
Do you get this problem when you use a smaller tile size? It seems you've been using tile sizes of 4096x4096 pixels, which is a bit on the large size when it comes to efficient memory management. If you keep your tile size down at, say, 512x512px, you shouldn't see any such memory problems. The problem is when you generate maps with large tile sizes, each core (of which you have many) needs to hold a certain number of tiles in memory at a time; typically 9 for each map layer in use. When generating the texture map, for instance, you will have approximately 12 threads each loading 9 tiles on 5 map layers with 4096x4096 pixels per tile at ~4 bytes per pixel, which works out as 32 gigabytes. This is of course an upper estimate; some of those tiles will be shared, so the number will likely be smaller, but still larger than the 4GB address space available to L3DT. If, instead, you used a tile size of 512x512 pixels, that works out as ~560MB, which will be no problems. The performance difference will be marginal at most. In fact, for some operations that involve random seeking, smaller tile sizes will be faster.
If you do need large tile sizes for your output, you can always export the maps at the large tile size. This operation only needs one tile in memory at a time, so it shouldn't have any memory problems when using tile sizes of 4096.
Best regards,
Aaron.