When trying to compress a 16k texture etcpack exits with the error:
Error: Could not allocate memory for image. File: tmp.ppm
Error: Could not read tmp.ppm file.
What's the best way to compress very large textures?
Hmm, it is block based so you can potentially write something to divide the texture into sub-textures, etcpack those and then stitch them together again afterwards. I'll raise this as a bug against the texture compression tool anyway and see if we can get this supported in future versions. That said, what device are you using that supports 16K textures?
Thanks,
Chris
I'd be very curious to know what your use-case is for a 16K texture if you are willing to share.
As Chris mentions this is "large" - even when compressed down to 4bpp with ETC that's still 128MB of texture data (~192MB with mipmaps), assuming 16kx16k. You may well run into memory footprint issues on many mobile devices even if you solve the compressor issues. Whenever I see a texture which is substantially above likely screen sizes warning bells go off in my head =P
Cheers, Pete
Thanks for the replies!
I was doing some tests with a large texture atlas. The atlas actually ended up being 16k x 8k when etcpack ran out of memory. For testing purposes I put together a 64-bit compression tool, taking advantage of one of the ETC open source implementations out there. Even though I had to implement support for ETC2 with alpha, it was a quick enough exercise. My test may not be a valid use case for most devices but I didn't see any documented maximum texture size for etcpack so even if etcpack won't see an updated to support large textures then it may be good to document the maximum texture size it can handle.
JP