Question about textures

Not a complaint but I'm wondering why texture files are always in png format. I often go into the texture files to create alternate version in Photoshop. So far the only one a came across that actually uses transparent png is Zeddicus' My Favorite book. All others I edited were not transparent, so could've been jpg. Png is supposed to be higher quality, but in reality there is no noticable difference, and jpg images have much smaller file size.

Comments

  • felisfelis Posts: 3,656

    Jpg is a lossy format, while png is lossless. So the compression in jpg could cause artifact, especially in areas with high colour difference.

    When rendering, a jpg and png will use the same amount of VRAM, so it is only a matter of harddisk space.

    When I do textures, I will also save them as png.

  • lou_harperlou_harper Posts: 1,065
    edited March 2023

    felis said:

    Jpg is a lossy format, while png is lossless. So the compression in jpg could cause artifact, especially in areas with high colour difference.

    That is technically true, but in practice png and jpg files are indistinguishable in 99% of the time. But I guess it's best to err on the safe side.

    Post edited by lou_harper on
  • nonesuch00nonesuch00 Posts: 17,929
    edited March 2023

    png stands for portable network graphics. It is designed to be portable across different OS platforms, hence the "network" part of the name, and use lossless details in compression. TIFF on the other hand, while lossless, is often as badly compatible as all those FBX standards over the years.

    Post edited by nonesuch00 on
  • lou_harperlou_harper Posts: 1,065

    nonesuch00 said:

    png stands for portable network graphics. It is designed to be portable across different OS pltforms, hence the "network" part of the name, and use lossless details in compression. TIFF on the other hand, while lossless, is often as badly compatible as all those FBX standards over the years.

    I said nothing about tiff. ;)

     

  • Tiff format is predominantly for working with graphics. Some image editors might read .psd files, some might not or not everything on them. Besides .psd is proprietary Adobe. Tiff is standard for interchangeability between image editors.

    Better compression in .png comes out with larger render sizes or higher lightning resolution. Texture painting software often saves to .png and many artists leave it as is.

  • I thought maps generally were supplied in JPG, from most PAs.

  • lou_harperlou_harper Posts: 1,065

    PixelSploiting said:

    Tiff format is predominantly for working with graphics. Some image editors might read .psd files, some might not or not everything on them. Besides .psd is proprietary Adobe. Tiff is standard for interchangeability between image editors.

    Better compression in .png comes out with larger render sizes or higher lightning resolution. Texture painting software often saves to .png and many artists leave it as is.

    For goodness sake, I said nothing about tiff. Or psd. Only jpg vs png.

  • Gif's? angel

    I thought most were JPGs. Tend to use pngs myself until distributing freebies, then convert to JPGs for size reasons and I am not going to risk loosing detail in the texture at that point.

    Regards,

    Richard.

  • lou_harperlou_harper Posts: 1,065

    richardandtracy said:

    Gif's? angel

    I thought most were JPGs. Tend to use pngs myself until distributing freebies, then convert to JPGs for size reasons and I am not going to risk loosing detail in the texture at that point.

    Regards,

    Richard.

    Bmps! devil

    Honestly, It makes no difference to me if jpg or png...well download takes longer with the latter and they take up more hard drive space, but I have 10TB for it, so I'm fine for a while. I was just curious.

  • GordigGordig Posts: 9,143

    lou_harper said:

    Not a complaint but I'm wondering why texture files are always in png format. I often go into the texture files to create alternate version in Photoshop. So far the only one a came across that actually uses transparent png is Zeddicus' My Favorite book. All others I edited were not transparent, so could've been jpg. Png is supposed to be higher quality, but in reality there is no noticable difference, and jpg images have much smaller file size.

    For Iray, it doesn't even matter whether a texture file has PNG transparency; however, it is useful in other rendering engines, where you can use the alpha channel as an opacity mask. That said, you can use photoshop to get PNG file size way down without any noticable (at least by me) loss in quality.

  • lou_harperlou_harper Posts: 1,065

    Gordig said:

    lou_harper said:

    Not a complaint but I'm wondering why texture files are always in png format. I often go into the texture files to create alternate version in Photoshop. So far the only one a came across that actually uses transparent png is Zeddicus' My Favorite book. All others I edited were not transparent, so could've been jpg. Png is supposed to be higher quality, but in reality there is no noticable difference, and jpg images have much smaller file size.

    For Iray, it doesn't even matter whether a texture file has PNG transparency; however, it is useful in other rendering engines, where you can use the alpha channel as an opacity mask. That said, you can use photoshop to get PNG file size way down without any noticable (at least by me) loss in quality.

    Yeah, that's what I do when I need to customize a texture file. I save it out as jpg file and put it in the same folder. Then I click on the original in surfaces, "Browse" and select the new file.

  • StonemasonStonemason Posts: 1,160
    Whenever you save as jpg you're creating a degraded version of the image, the more edits and saves you do the more degraded the image becomes.. PA's are just giving you the best possible starting point. Some of those png's might also be displacement maps provided in 32 or 16bit which makes a dramatic difference in the visual quality of the surface being rendered, jpg only comes in 8bit.
  • GordigGordig Posts: 9,143

    lou_harper said:

    Gordig said:

    lou_harper said:

    Not a complaint but I'm wondering why texture files are always in png format. I often go into the texture files to create alternate version in Photoshop. So far the only one a came across that actually uses transparent png is Zeddicus' My Favorite book. All others I edited were not transparent, so could've been jpg. Png is supposed to be higher quality, but in reality there is no noticable difference, and jpg images have much smaller file size.

    For Iray, it doesn't even matter whether a texture file has PNG transparency; however, it is useful in other rendering engines, where you can use the alpha channel as an opacity mask. That said, you can use photoshop to get PNG file size way down without any noticable (at least by me) loss in quality.

    Yeah, that's what I do when I need to customize a texture file. I save it out as jpg file and put it in the same folder. Then I click on the original in surfaces, "Browse" and select the new file.

    No, I mean that you can reduce the size of a PNG file to JPG level and keep it as a PNG.

  • lou_harperlou_harper Posts: 1,065

    Stonemason said:

    Whenever you save as jpg you're creating a degraded version of the image, the more edits and saves you do the more degraded the image becomes.. PA's are just giving you the best possible starting point. Some of those png's might also be displacement maps provided in 32 or 16bit which makes a dramatic difference in the visual quality of the surface being rendered, jpg only comes in 8bit.

    Gotcha!

  • Seven193Seven193 Posts: 1,064

    When someone releases a product that uses .png files for everything, it's most likely because they used a program like Substance Painter that exports everyhing as .png files. And well, people can be lazy, so they don't convert them to .jpg. So, there's no great jpg vs png debate here. I think it's just simple laziness.

  • Oso3DOso3D Posts: 14,887

    Uh, no, I quite specifically choose png over jpg because I would rather deliver higher quality textures.

    No laziness involved.

    Also Substance Painter can export as jpg and many other formats.

  • nonesuch00nonesuch00 Posts: 17,929

    lou_harper said:

    PixelSploiting said:

    Tiff format is predominantly for working with graphics. Some image editors might read .psd files, some might not or not everything on them. Besides .psd is proprietary Adobe. Tiff is standard for interchangeability between image editors.

    Better compression in .png comes out with larger render sizes or higher lightning resolution. Texture painting software often saves to .png and many artists leave it as is.

    For goodness sake, I said nothing about tiff. Or psd. Only jpg vs png.

    It stands for tag interchange file format.

    At any rate you have your answer. Use PNG.

  • Matt_CastleMatt_Castle Posts: 2,337

    Seven193 said:

    When someone releases a product that uses .png files for everything, it's most likely because they used a program like Substance Painter that exports everyhing as .png files. And well, people can be lazy, so they don't convert them to .jpg. So, there's no great jpg vs png debate here. I think it's just simple laziness.

    This is definitely not the reason - Substance Painter can export to a wide range of formats.

    The reason why, if I ever get around to releasing products, that I will use PNG as a format is that JPG is a lossy format that reduces quality of the product right from the start - users cannot "un-JPG" an image to get the quality back. JPG also does not save VRAM usage (everything is decompressed from its original format before being sent to VRAM, and then maybe recompressed with Iray's own compression standards).
    The only downsides to PNG over JPG are that A) it takes longer to compress in the first place (but that only matters to the original creator) and B) possibly disk space - but it depends a lot on what you're compressing (for certain images, PNG can actually be smaller than JPG)*. And frankly, when a user can fit tens of thousands of dollars of assets onto a drive that costs a few hundred, disk space is not a particular concern.

    * For most of the images you're using for textures, many of them will only be considerably smaller in JPG format if you're using settings that really are going to produce obvious quality loss.

  • lilweeplilweep Posts: 2,234

    what i want to know is why can Substance Painter export a .png file in a second while Photoshop takes minutes to resave one...

  • fred9803fred9803 Posts: 1,559

    Some PAs do use .png files for skin texture maps such as Sangriart. The benefit is if you're someone who likes to tweak the maps a lot you can make multiple .png variations without quality loss. 

  • ChumlyChumly Posts: 793

    What I don't understand is why they use .png for things they could use other formats for.

    for example.
    ThisAsset.duf.png  & ThisAsset.tip.png  - I hate daz's "standard" (small) tip size... I usually replace the .tips with full size image.png.  
    That seems like a great place for daz to allow .webp or jpg or something where it doesn't really matter and the image doesn't need to be 3.4mbs.

  • lilweeplilweep Posts: 2,234

    Chumly said:

    What I don't understand is why they use .png for things they could use other formats for.

    for example.
    ThisAsset.duf.png  & ThisAsset.tip.png  - I hate daz's "standard" (small) tip size... I usually replace the .tips with full size image.png.  
    That seems like a great place for daz to allow .webp or jpg or something where it doesn't really matter and the image doesn't need to be 3.4mbs.

    91x91 for the main icon is fine, and 256x256 is fine for most tip icons (you can even fit quite a bit of text on that and still have it legible at high res screens).  There is no limit to tip size as far as i know, and i see vendors going to 512x512 and larger.  Anything above 512x512 is a bit obnoxious though.

    Most icon .png files are only a few kb and the tips are only 10s of kb.

    .png was probably considered a good option because it has alpha channel for transparency.  Jpg does not have this.  Webp has transparency i believe but a lot of programs still have problems with Webp format though. Photoshop couldnt open them until recently.

  • Seven193Seven193 Posts: 1,064

    lilweep said:

    what i want to know is why can Substance Painter export a .png file in a second while Photoshop takes minutes to resave one...

    PNG export speed is all about compression. PNG Exporters can set a custom compression level, which can slow down or speed up export. But, less compression means bigger files, so most just use the default settings.

  • Seven193 said:

    lilweep said:

    what i want to know is why can Substance Painter export a .png file in a second while Photoshop takes minutes to resave one...

    PNG export speed is all about compression. PNG Exporters can set a custom compression level, which can slow down or speed up export. But, less compression means bigger files, so most just use the default settings.

    This is what the performance option for Layered Images addresses - by default DS was compressing, to save space at the expense of speed, but now we can choose.

Sign In or Register to comment.