starandserpent / java-TerraServer

Terra - Voxel octree of chunks, made for Rituals of the old
MIT License
17 stars 2 forks source link

Something is holding down chunk generation rate #55

Closed Pilvinen closed 5 years ago

Pilvinen commented 5 years ago

Naive greedy meshing now takes 8 ms on the average, but I'm not actually seeing by eye the 1000 / 8 = 125 chunks per second generation rate which I should be seeing when I'm using only the naive greedy mesher.

There is a bottle neck somewhere down the line.

It needs to be tracked down and squashed.

Pilvinen commented 5 years ago

1941 chunks: 4 minutes 43 seconds. Measured from program start. 146 milliseconds per chunk of which meshing took ~9 ms per chunk on the average. Triangle count in the scene was 9.87590 million triangles. I'm using 343 load marker radius, which is the maximum I can use before crashing due to running out of memory when hitting ~15 GB.

We're currently losing 137 ms somewhere.

Current sentiment is that it might be gobbled up by Palette16 compression / chunk creation, ie. chunk generation can't feed the mesher fast enough. Needs to be verified, though.

Pawlost commented 5 years ago

We found that filling chunks is holding generation, should be fixed when we fully implement octrees.

Pawlost commented 5 years ago

Since we are using Larray for chunk filling, the bottleneck is now minimal