Texture asset doubles in size once uploaded

Anyone know why a texture asset would double in size when uploaded in the editor? It’s true size is 606 KB, when it uploads it initially says 606 KB for a second or two, then updates to 1.22 MB. Looking at the network requests in the previewer the asset really is 1.22 MB. How does that happen?

Relevant info: The file is a 2048x2048 PNG

Edit: I downloaded the PNG from the previewer, and then reuploaded the now 1.22 MB image, the new image stays at 1.22 MB in the editor. I’m assuming some information is getting added to the image or there’s some asset block size, but adding another 600 KB is a lot!

Figured it out. Disabling automatic POT behavior prevented PlayCanvas from doubling the asset size. Seems like PlayCanvas is resizing textures even though they are already POT, for pre-optimized PNGs this is causing some major inefficiencies.

1 Like

That’s quite interesting @Chris to know!

Most likely it’s an oversight/bug on the editor side, I would expect to not reprocess POT textures, submit this in the editor repo if you like.

Yeah, looks like it. Wasn’t sure if POT entailed some processing related to the asset size. I went ahead and made an issue for this behavior.

1 Like