Chaos Corona for 3ds Max > [Max] General Discussion

Image file format and RAM consumption

(1/5) > >>

romullus:
When talking about RAM consumption during rendering, does it matter what file format is used for textures? Will 5 MB JPEG texture take less memory than the same texture saved in 100 MB TIFF? Or they both will take roughly the same amount of RAM?

Ryuu:
Corona stores the images in memory uncompressed, so this really depends on resolution and bit depth. An 8-bit 1024x1024 JPEG will take exactly the same amount of memory as an 8-bit 1024x1024 TIFF no matter what's their size on disk.

romullus:
Thank you for the answer! If i understand correctly, given the same image dimension and bit depth, the only thing that matters, is number of channels? So 1024x1024 8 bit texture will take 1 MB RAM if it's greyscale, 3 times as much if it's RGB and 4 times as much if it's RGBA?

romullus:
Also, what is the better option - to have 3 single channel textures, or 1 RGB texture, in terms of RAM consumption, scene parsing time?

Ryuu:

--- Quote from: romullus on 2018-11-14, 11:03:43 ---Thank you for the answer! If i understand correctly, given the same image dimension and bit depth, the only thing that matters, is number of channels? So 1024x1024 8 bit texture will take 1 MB RAM if it's greyscale, 3 times as much if it's RGB and 4 times as much if it's RGBA?

--- End quote ---

Yes, that's correct.


--- Quote from: romullus on 2018-11-14, 11:19:55 ---Also, what is the better option - to have 3 single channel textures, or 1 RGB texture, in terms of RAM consumption, scene parsing time?

--- End quote ---

Good question. I never tried to measure it, but as long as we're talking about 3 files vs 1 file, there should not be any noticeable difference in memory consumption or parsing time. When we get to 3000 vs 1000, the difference might be a bit more noticeable in terms of parsing time as there is some small overhead with opening each file, etc.

The overhead is much higher when the texture files are stored in a network location, as there are higher latencies involved in opening the individual files, etc.

So, I would definitely not worry about this unless you have problems with the parsing times and have a reason to suspect that the texture loading might be the cause of those problems.

One of the key points of Corona philosophy has always been that users should not worry about technical details. So if you ever get to the point where 3 files vs 1 makes any noticeable difference, I would prefer to solve this by optimizing the texture loading code rather than forcing the users to store their assets in a certain way.

Navigation

[0] Message Index

[#] Next page

Go to full version