But they are HUGE…
All good things have dark sides and 3D volumetric textures
have one very very dark side in that they are HUGE.
I would even say FAT. The table below gives the sizes of 2D and
3D textures of various resolutions. The mathematics to find the numbers
are simple: multiply the number of pixels with the color depth (in bytes
so 2 bytes is 16bit while 4 bytes is 32bits color).
Size | 16-bit 2D | 32-bit 2D | 16-bit 3D | 32-bit 3D |
2 x 2 ( x 2 ) | 8 bytes | 16 bytes | 16 bytes | 32 bytes |
4 x 4 ( x 4 ) | 32 bytes | 64 bytes | 128 bytes | 256 bytes |
8 x 8 ( x 8 ) | 128 bytes | 256 bytes | 1024 bytes | 2048 bytes |
16 x 16 ( x 16 ) | 512 bytes | 1024 bytes | 8192 bytes | 16384 bytes |
32 x 32 ( x 32 ) | 2.048 KB | 4.096 KB | 65.536 KB | 0.125 MB |
64 x 64 ( x 64 ) | 8.19 KB | 16.384 KB | 0.5 MB | 1 MB |
128 x 128 ( x 128 ) | 32.7 KB | 65.536 KB | 4 MB | 8 MB |
256 x 256 ( x 256 ) | 131 KB | 262 KB | 32 MB | 64 MB |
Now, we all know that high resolution 2D texture maps are much cooler (and better looking) than low resolutions ones. We all know that low resolution maps can look blurry. The same thing holds up for 3D textures. Roughly said, anything below 64x64 usually looks bad, but what do we notice in the table? 3D textures at 64x64x64 are huge. We are already using MB to indicate their size. Its obvious that a 256x256x256 32-bit texture is a no-go, after all “one†such texture gobbles up 64 MB of memory!