sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    JPG or PNG Textures?

    Scheduled Pinned Locked Moved Extensions & Applications Discussions
    extensions
    11 Posts 8 Posters 2.0k Views 8 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • pugz1983P Offline
      pugz1983
      last edited by

      Hi Everybody,

      This may be a question I already know the answer to but just to get the facts straight. Is there a ( large ) difference between the quality of textures when rendering if you use png instead of jpeg? I was wondering because I'm working on a architectural scene where the concrete of the building is its main feature. I want the concrete the be at its best so I'm struggling with max texture size ( resolution ) and png or jpg. Hope somebody can help me on this one.

      Greetz Twan

      1 Reply Last reply Reply Quote 0
      • thomthomT Offline
        thomthom
        last edited by

        It depends.

        It depends on how high the JPEG compression is.
        And it depends on what type of textures it is.

        PNG is a safe format - since it's lossless.
        JPEG will loose some quality when saving. If you set the quality too low it'll end up blurring.

        Thomas Thomassen — SketchUp Monkey & Coding addict
        List of my plugins and link to the CookieWare fund

        1 Reply Last reply Reply Quote 0
        • M Offline
          matteo
          last edited by

          png allows you to benefit from the use of the alpha channel - in other words you can draw transparent and semi-transparent areas inside the some texture or even a transparent gradient.

          for a concrete wall or ceiling png is as good as a jpg with a low compression.

          hire me: http://www.nonsolo3d.it/ !

          1 Reply Last reply Reply Quote 0
          • Chris FullmerC Offline
            Chris Fullmer
            last edited by

            .jpg also will ALWAYS lose some data. If you save it on the highest quality setting over and over, it will degrade a little bit each time. So if you are saving out of photoshop, then into and out of the SU model, then re-photoshopping, then continuously re-adjusting, it will lose more and more quality.
            A .png will never lose quality through that process (in theory anyhow).

            Chris

            Lately you've been tan, suspicious for the winter.
            All my Plugins I've written

            1 Reply Last reply Reply Quote 0
            • pugz1983P Offline
              pugz1983
              last edited by

              Thanx for clearing this up for me 😄. Hope to post a render of the scene soon.

              Greetz Twan

              1 Reply Last reply Reply Quote 0
              • thomthomT Offline
                thomthom
                last edited by

                @unknownuser said:

                jpg with no compression

                ❓
                You mean you set the quality to high?

                @unknownuser said:

                It is my guess that the application saving the data is leaking and not the jpg itself.

                No - JPEG's lose quality due to the nature of the compression algorithm it uses. JPEG can take near-similar parts of the image and reuse it. PNG doesn't - it preserves each pixel.

                In your test - did you change anything in your image when you re-saved it? Or did you save an image identical to the one you opened?

                Thomas Thomassen — SketchUp Monkey & Coding addict
                List of my plugins and link to the CookieWare fund

                1 Reply Last reply Reply Quote 0
                • AdamBA Offline
                  AdamB
                  last edited by

                  JPEG is by definition a lossy format. Formats such as BMP,TGA,PNG are lossless.

                  However, it is also true that if the color gamut of the image you're saving is sufficiently small, you'll get almost no loss using JPEG at highest quality. So a largely grey concrete texture may well be fine. A photo with a larger range of colors absolutely will show loss using JPEG. Nothing to do with dodgy Apps losing data.

                  If you're concerned about loss of quality and you have the disk space, there is no question that you should use a lossless format that stores the exact pixel values one after another in a file. But if you're dealing with a 4000x4000 pixel image, thats 64MB of data. I'd guess JPEG - with neglible quality loss - would be able to store it in 10% of that space.

                  Adam

                  Developer of LightUp Click for website

                  1 Reply Last reply Reply Quote 0
                  • AdamBA Offline
                    AdamB
                    last edited by

                    @unknownuser said:

                    I have often wondered how a jpg with no compression loses data when it is saved. I am not sure that is the case. The fine pixel below has a set of original pixels on the left and the same set on the right after ten saves, both from a much larger image. Each time the new image has been saved, opened, then re-saved. This is not an elaborate test but as you can see if there is data loss I don't see it. It is my guess that the application saving the data is leaking and not the jpg itself.

                    Its a bit of an unfortunate choice of image because JPEG compression works by breaking out chroma and luma and storing less resolution for chroma than luma. (I appreciate concrete is mostly grey). Hence you will see color shifting of pixels as JPEG compression increases - typically grays become a little pink for example.

                    Developer of LightUp Click for website

                    1 Reply Last reply Reply Quote 0
                    • honoluludesktopH Offline
                      honoluludesktop
                      last edited by

                      I have use jpg for most of my work because it appeared to be a generally accepted standard. Posted here are more reasons to use png then jpg, but there must be good reasons to use jpg. Anyone care to illuminate?

                      Based on this discussion, while editing, I will hereafter work with png, only going to jpg with the final image.

                      1 Reply Last reply Reply Quote 0
                      • Chris FullmerC Offline
                        Chris Fullmer
                        last edited by

                        jpg is used so widely because it compresses so well. jpg has been around for a long time - back when file size was king. Remember how painful it was to download a large image on an old 2400baud modem, or even worse a 300baud modem? 😆 So compression was important. And I think jpgs just have not lost their popularity yet. I try to use png in the office when I can.

                        Lately you've been tan, suspicious for the winter.
                        All my Plugins I've written

                        1 Reply Last reply Reply Quote 0
                        • jason_marantoJ Offline
                          jason_maranto
                          last edited by

                          If you use greyscale images (with the colorize function in sketchup) then PNG's are the clear victor in compression as you can specify how many colors you wish to use, dither, etc.

                          For images that have more than 256 colors the file size tends to be in JPEG's favor.

                          The best thing about PNG is continuous-tone(256 shades) transparency.

                          Best,
                          Jason.

                          I create video tutorial series about several 2D & 3D graphics programs.

                          1 Reply Last reply Reply Quote 0
                          • 1 / 1
                          • First post
                            Last post
                          Buy SketchPlus
                          Buy SUbD
                          Buy WrapR
                          Buy eBook
                          Buy Modelur
                          Buy Vertex Tools
                          Buy SketchCuisine
                          Buy FormFonts

                          Advertisement