Author Topic: Reducing RAM usage  (Read 909 times)

Offline N-drju

  • Member
  • *
  • Posts: 791
  • Changes, changes, changes...
Re: Reducing RAM usage
« Reply #15 on: November 30, 2016, 12:47:59 PM »
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.
"I don't know what 'pokygon' is but I like it."

Offline Dune

  • Member
  • *
  • Posts: 12403
  • Corkscrew Bird
    • www.ulco-art.nl
Re: Reducing RAM usage
« Reply #16 on: November 30, 2016, 02:33:53 PM »
You're right, they're copies anyway.
In case you still haven't seen enough of my work: www.ulco-art.nl

Offline Oshyan

  • Planetside Staff
  • *
  • Posts: 11556
  • Holy snagging ducks!
Re: Reducing RAM usage
« Reply #17 on: November 30, 2016, 11:56:45 PM »
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

Offline N-drju

  • Member
  • *
  • Posts: 791
  • Changes, changes, changes...
Re: Reducing RAM usage
« Reply #18 on: December 01, 2016, 12:36:40 PM »
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.



Update:
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.
« Last Edit: December 02, 2016, 08:45:51 AM by N-drju »
"I don't know what 'pokygon' is but I like it."