• To improve security, we will soon start forcing password resets for any account that uses a weak password on the next login. If you have a weak password or a defunct email, please update it now to prevent future disruption.

Daz Tutorial Daz and disk space.

RVNSN

Drunken Pirate Skirtchaser
Game Developer
Jan 17, 2019
757
455
Jpeg doesn't support 16 bit, so you will lose colors, if the png was in 16 bit in the first place.
I've mainly been using 8 bit, but should check to see if any were 16 bit. And thank you, will try to keep that in mind if/when I switch up to 16 bit.
 

osanaiko

Engaged Member
Modder
Jul 4, 2017
2,149
3,501
On the note of texture files, I have a question. First, I had been using png for all of my files, and finally, for the last version converted to jpg (no, I'm not planning to use webp at this time) to (massively) reduce game file size. I make a lot of my own shaders, or customize a lot of them, and as a result, I have a custom textures folder in my daz library that is over 7GB. Have been converting all of those png files to jpg (all or almost all are converted at this point), and trying to go through scenes (subsets, etc) to replace the image maps when I have time to save storage space.

So far, those I have replaced appear to produce matching renders, but is there information contained in the png files that gets read which would not be there in jpgs and thus result in lower quality (whether it's for base, bump, normal, etc)?
Technically there is a going to be a slight degradation when compressing a PNG to a JPG: saving an image to PNG is essentially "lossless" in that the output should be identical to the raw bitmap. JPG uses a bunch of techniques to build a representation of the input image that can be dramatically smaller than the input, but it does this by throwing away some data that is below the "perceptual limit". Unless you use extreme (or repeated!) compression levels, an image that had high entropy (lots of surface detail) should be near indistinguishable to the human eye before and after JPG compression.

Not that there are some cases that JPG does not handle very well but PNG does, such as flat-color line art.

As far as textures for rendering go, there is very little reason to use anything other than JPG for your final assets. One caveat is that while you are still working on creating the texture image, it's better to use a lossless format because repeated save/load/edit/save cycles does degrade the image quality.

As you said yourself, there's no visible difference in the render output from assets which are based on PNG texture or JPG textures, so why not save the disc space?
 

Empiric

Throbbing Member
Respected User
Game Developer
Jan 13, 2020
2,230
30,677
I've mainly been using 8 bit, but should check to see if any were 16 bit. And thank you, will try to keep that in mind if/when I switch up to 16 bit.
I was actually dealing with it today, because I got really overblown asset, it was almost 1.5gb in total and textures alone were 1.4, but there were 4 material options for everything. I thought that was where the size was coming from, but after deleting all the options I didn't need, the remaining textures still had almost 800 mb. They were all PNGs, there was a lot of them, so I didn't want to bother manually replacing them with jpeg after converting, but PNG is lossless so you can't simply reduce quality as jpeg.
What I did was convert all of them from 16 to 8bit and the size went from around 800 mb to 179 mb.. Which is basically the same you are doing by converting them to jpeg and where most of the file size reduction is probably coming from.
 
Last edited:
  • Like
Reactions: RVNSN

RVNSN

Drunken Pirate Skirtchaser
Game Developer
Jan 17, 2019
757
455
I was actually dealing with it today, because I got really overblown asset, it was almost 1.5gb in total and textures alone were 1.4, but there were 4 material options for everything. I thought that was where the size was coming from, but after deleting all the options I didn't need, the remaining textures still had almost 800 mb. They were all PNGs, there was a lot of them, so I didn't want to bother manually replacing them with jpeg after converting, but PNG is lossless so you can't simply reduce quality as jpeg.
What I did was convert all of them from 16 to 8bit and the size went from around 800 mb to 179 mb.. Which is basically the same you are doing by converting them to jpeg and where most of the file size reduction is probably coming from.
I will definitely need to check this. The largest space consumption, or at least some of the most notable, came from custom bump and normal maps I made to improve appearances. A primary example was with PW Cave Island, where bump/normal were either non-existent or did not match the base color image. My custom image maps made a huge improvement, but (think particularly for the nomal maps) file sizes were huge. On the quality side, I would rather take up what space is necessary, as the interior originally produced an extremely blocky, almost 1980s graphics appearance for torchlight reflection on the walls due to the lack of bump and normal maps (or just normal, can't really remember right now).

Actually, since it was in my head, just checked the largest of the custom Cave Island image maps, a normal map for the cave ceiling. The original png I made is 121.9 MB, the jpg 38.9. However, I did the jpg conversions at quality 10, not 12, as I had previously not found jpg qual 12 be significantly smaller than png.

Edit: forgot to mention this, as it is what i was primarily checking - those custom image map pngs were 8 bit
 
Last edited: