Reducing RAM usage

Started by N-drju, November 29, 2016, 04:55:41 AM

Previous topic - Next topic


Well, afaik (;)) overwriting the "maximum" quality JPEG file into "high" quality file did reduce RAM usage by about 100MB total, with three textures overwritten. Terragen has no chance of loading full size because after overwriting there isn't any full size anymore! :) This step however is not quite as effective as I expected it to be. And yes, I have the size reduction experiment scheduled for today's afternoon.

Besides, DAZ Studio has an option to collect all textures and save their copies in the "Maps" folder within the folder the object is saved to. So you can easily edit the textures any way you want and the original will not be affected even with the wildest adjustments. Also, I have my original DAZ library stored on an external drive.
"This year - a factory of semiconductors. Next year - a factory of whole conductors!"


You're right, they're copies anyway.


The reason JPG compression shouldn't have an effect on *in memory use* is that once the texture is loaded, it is loaded into memory *decompressed*. That way we don't have to do decompression on the image every time the texture is accessed during rendering (which would create needless rendering overhead). Instead we just have direct access to the per-pixel color, with no decode step. That's my understanding anyway. In other words, no matter how compressed an image is (even if you use max JPG compression), the *in memory* size should be basically the same.

- Oshyan


But I keep telling you it does have an effect and I checked it five times... :P Though it needs at least four textures resaved to see 100MB reduction in RAM use. I mean, at least this is what I can see on my machine.

I made a "full" (so to say) object preparation consisting of:

1. Passing the object through Poseray, cutting unnecessary object parts (like nipples, genitals, I mean who needs them anyway? :P)
2. Attaching all parts that use the same texture to only one default shader with the correspondent texture (i.e. forearms, arms, hands, fingernails ---> limbs.jpeg)
3. Reducing the quality of the JPEG images used for textures (from 12 to 8, sometimes 9)
4. Reducing the size of the JPEG images used for the model (from 2000px to around 1250px)

As a whole I managed to reduce RAM usage for the tested object by 50%! Great. :) However it seems that removing invisible parts from the object (works very well with internal walls in case of buildings) is the most effective "gain" during this kind of pre-processing.
"This year - a factory of semiconductors. Next year - a factory of whole conductors!"