chunky-dev / chunky

A path tracer to create realistic images of your Minecraft worlds.
https://chunky-dev.github.io/docs
GNU General Public License v3.0
643 stars 76 forks source link

Add a 3D world texture implementation. #1639

Closed ThatRedox closed 8 months ago

ThatRedox commented 11 months ago

Closes #1607. image 2,115 chunks of my Terralith test world with the max heap set to 1 GB.

This is a 3D biome implementation that uses significantly less memory than TRIVIAL_3D. It is similar to WorldTexture2D where it only stores 8 bits per channel and deduplicates textures.

Testing with 1024 chunks of my Terralith test world: Implementation Biome Texture Size (bytes) Loading Time (sec) Chunks loaded with 512mb heap
World Texture 3D (this) 61,735,768 56.772 942 / 1024
Trivial 3D 7,250,510,208 50.801 31 / 1024
World Texture 2D 345,600 2.898 1024 / 1024
Trivial 2D 28,434,816 2.816 1024 / 1024

Other changes: