JPG vs PNG difference in VRAM consumption?
SpectralFrames
Posts: 7
Hello everyone!
Is there any difference in VRAM consumption if you compare the same maps encoded in PNG and JPG? Does the renderer actually load the images itself into VRAM, or does it convert them to some sort of internal binary format so that the file type doesn't matter?
Post edited by Richard Haseltine on
Comments
The images are loaded into VRAM uncompressed, or with the compression Iray itself does, if the image size is higher than the set thresholds. So whether jpeg or png it will take up the same in VRAM.
If both images are identical, then no, for the reason that felis stated already. However, for a full color image, a JPEG is limited to 24bits (8 bits per layer, which are RGB) and a PNG file is limited to 64bits (16 bits per later, including the alpha layer). Even if the JPEG is saved from the PNG and the PNG is 64bits, the JPEG will still be 24bits. So then, in that case, the JPEG will use less vram and the PNG will use more.
If you are making your own textures, it is always good to make the originals in PNG and then test those against JPEG versions to see if there is a difference when rendered. Usally the JPEG uses less hard drive space and is a good choice for reduced file size in products. But it there is no visual difference and the size difference is not much, might as well leave it in PNG format.
Thanks for all the answers!
Substance painter also saves 8-Bit PNG's by default so if I understand correctly, the only VRAM difference will occur if the PNG file uses alpha, right? Because JPEGs do not have the alpha channel.
Also, is there a file type requirement for Published Artists? I'm making a product right now I'd like to submit for review for the DAZ store and I'm not sure whether I should use PNGs or JPEGs.
I don't think it quite works like that. The system probably works with 4 component vectors, even if only 3 of the components get swizzled into the shader when its read (the hardware will set the 4th component to 1.0).
The GPU itself can store them in any format, even skip some color channels without problems, it is resolved on the fly to a 4 component vector for the shader, but no idea if iRAY support that
No requirement. Just whatever works best for your product.