Author Topic: Effectiveness of Corona out-of-core textures  (Read 230 times)

2025-06-30, 10:01:42

mase

  • Active Users
  • **
  • Posts: 111
    • View Profile
So this might be answered somewhere else but I always wondered whether Corona out-of-core textures works the same as manually resized textures, in terms of RAM performance? Is there any benefit to resizing textures in your scene to smaller resolution, or does this Corona option make it useless (or at least the difference is so marginal that it's simply not recommended)? Really curious whether someone has tested it out.

2025-07-01, 09:25:44
Reply #1

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13686
  • Marcin
    • View Profile
Hi, good question. Here is the answer from our dev team:

In rendering, textures undergo something called pre-filtering. Let's assume that the original texture resolution is 1024x1024. Then Corona creates variants of this texture in 512x512, 256x256, 128x128 and all the way down to 1x1px. We then select which variant to use depending on how close the camera is to this texture, is it seen through refraction, etc. The purpose of all of this is to prevent getting noisy results.

When using the Corona Out of Core textures option, we create all those variants and save them on the disk. Then we load into RAM only those variants which are needed during rendering.

If you manually make the textures smaller, for example 512x512 and disable OOC textures, you do not have to deal with the 1024x1024 variant anymore, but you still need to keep the 256x256, 128x128 and all the way down to 1x1px variants in RAM. Also, if your texture is close to the camera, it will get blurry.

So in short:
- with OOC on, we smartly pick the variant of the texture which is needed and only this variant is kept in RAM
- with OOC off, we lose the "smartly" part and all variants are loaded into RAM, even if we manually reduce the texture resolution

Note: the thing with storing multiple texture variants in RAM with OOC off is not specific to Corona only. It happens in any renderer.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2025-07-01, 11:09:15
Reply #2

mase

  • Active Users
  • **
  • Posts: 111
    • View Profile
So just to be sure - if I have 8k texture in my scene but the object in camera appears far away, OOC will create let's say 256x256 image version and will discard anything above that? Also, do we know how much RAM does this conversion process eat? As in, if the texture is 1k or 8k and it needs to be downscaled to 256x256. Does it impact render times in any significant amount?

2025-07-01, 13:46:24
Reply #3

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 13686
  • Marcin
    • View Profile
So just to be sure - if I have 8k texture in my scene but the object in camera appears far away, OOC will create let's say 256x256 image version and will discard anything above that?
Yes, and you get RAM saving from this.

Quote
Also, do we know how much RAM does this conversion process eat? As in, if the texture is 1k or 8k and it needs to be downscaled to 256x256. Does it impact render times in any significant amount?
There should be no RAM penalty at all, or nothing significant.
There can be a small hiccup at the beginning of the rendering when OOC loads the needed textures from the disk.
The creation of the different variants happens at scene opening and it happens regardless if OOC is on or off.
This is scene-dependent and we don't have any specific measurements. I guess testing it with OOC on and off is one way to find out. :)

update: fixed broken quotes
« Last Edit: 2025-07-01, 14:32:02 by maru »
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2025-07-01, 14:17:10
Reply #4

mase

  • Active Users
  • **
  • Posts: 111
    • View Profile
Thanks, that's valuable info. And yes, that's just me being lazy and not testing it out myself. Perhaps a quick test scene and a few comparison renders would yield more precise results. But otherwise it's great to know how OOC works under the hood.