Texture caching... amazing improvement in memory with Cycles, could be great in LuxCore!

Discussion related to the LuxCore functionality, implementations and API.
juangea
Donor
Posts: 311
Joined: Thu Jan 02, 2020 6:23 pm

Re: Texture caching... amazing improvement in memory with Cycles, could be great in LuxCore!

Post by juangea » Thu May 06, 2021 2:30 pm

Oh no, what I mean is way simpler, or at least it's way simpler in my mind, something that it's not always true in reality LOL

What I mean is that based on distance to the camera and size of the final output resolution maybe depending on the perceived texel size.
The resolution of the textures that will be used could be changed, since it's not real time it has to be done once per render, in that situation you could calculate some "simple" mip-maps that reduce the texture size based on distance, that way if an 8k texture appears just in one pixel of the screen it could be reduced.

It sounds like a mip-map description... but it's way simpler I think since you do a pre-pass doing a calc for all the required texture sizes and then you "replace" those textures with the reduced ones, all that could be done on CPU so memory is less of a problem and the textures you upload to the GPU memory are the reduced ones, internally it would be that they are just the textures, in the end both GPU and CPU would be using those reduced textures.

It's something like the "simplify" option used in Cycles for the texture size but it works with depth.

Ok, this may be a totally silly thing, or it may be exactly what you discarded and I may have not understood your explanation, but just wanted to clarify the idea I was proposing :)

User avatar
Dade
Developer
Posts: 5343
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Texture caching... amazing improvement in memory with Cycles, could be great in LuxCore!

Post by Dade » Thu May 06, 2021 4:47 pm

That is LoD (level of details), it is different but, again, any mirror or glass can very easily mess the level of detail you have picked based only on camera distance. There are a couple of tricks you can use to alleviate that problem (by using not only the camera distance) and may be worth give it a shot.

P.S. trick = something similar "visibility map" use in PGI to estimate the radius to use (replace "radius" with "level of detail" and you have about the same stuff).
Support LuxCoreRender project with salts and bounties

juangea
Donor
Posts: 311
Joined: Thu Jan 02, 2020 6:23 pm

Re: Texture caching... amazing improvement in memory with Cycles, could be great in LuxCore!

Post by juangea » Thu May 06, 2021 5:43 pm

You mean that I can do something in LuxCore with some configuration to force something like that, or that it's something you could try to implement?

Sadly I don't have enough programming knowledge to try to touch a true line of code of lux, I can tweak paramenters or modify Python, but when it comes to real C++ code I'm not too proficient :)

User avatar
Dade
Developer
Posts: 5343
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: Texture caching... amazing improvement in memory with Cycles, could be great in LuxCore!

Post by Dade » Thu May 06, 2021 6:31 pm

juangea wrote:
Thu May 06, 2021 5:43 pm
or that it's something you could try to implement?
This, It would be a pre-processing utility, not really a rendering feature but it could be handy.
Support LuxCoreRender project with salts and bounties

juangea
Donor
Posts: 311
Joined: Thu Jan 02, 2020 6:23 pm

Re: Texture caching... amazing improvement in memory with Cycles, could be great in LuxCore!

Post by juangea » Thu May 06, 2021 7:02 pm

Awesome, this could be very helpful in many many situations to alleviate the GPU memory load, and it could open the door to use bigger scenes in situations where we were unable to do so :)

Awesome!

AndreasResch
Posts: 135
Joined: Fri Jul 06, 2018 9:32 am

Re: Texture caching... amazing improvement in memory with Cycles, could be great in LuxCore!

Post by AndreasResch » Fri May 07, 2021 6:28 am

I also wonder if render passes are kept in the GPU memory at this point and if so, if they can be move to system memory. This might allow to render higher resolution renderings.

Post Reply