Jump to content

Best way to downsize textures without quality loss?


You are about to reply to a thread that has been inactive for 156 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

The UV/base texture I'm using is 1027x1027 so I'm trying to downsize high-quality textures down to around 256x256. 

The textures themselves are 1027 or higher. When I shrink them I lose all quality. I've tried using websites to shrink them as well as going 'slow' and decreasing size little by little.

Using Clip Studio Paint at the moment. 

Is there something I'm missing?

Link to comment
Share on other sites

42 minutes ago, MuffinUnsane said:

I've tried using websites to shrink them as well as going 'slow' and decreasing size little by little.

"Going slow" is the worst thing you can do. The rule is to scale once as the final step in the creation process.

  

35 minutes ago, MuffinUnsane said:

Is there something I'm missing?

You might be missing paint.net. Paint.net is a free mid range image editor and it's the only image editor I know of that supports the fant scaling algorithm. Fant is usually the algorithm that gives the best result for textures. But min you, I say usually. There is no rule without exceptions and this one has a lot of them. Ideally you want to try as many different algorithms as possible and see which works the best.

It will also help if you can crop the texture down to a product of the target resolution (for 256: 512, 768, 1024, 1280, 1536 etc.) before you scale although that's not always possible of course.

 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

On 11/23/2023 at 10:52 PM, MuffinUnsane said:

I've tried using websites to shrink them as well as going 'slow' and decreasing size little by little.

As Chinrey said, "going slow" just adds layer after layer of quality loss, you want to resize ONCE.

If you don't want to change the paint package you use to make the originals, and want a reasonable way to resize those down, quickly and easily, DON'T mess with online resizers, they often keep copiies of your work.

Get a specific image utility, preferably free, that's been around for over 20 years, is regularly updated, has a solid reputation as malware & virus free, and is very useful.

Where can you find such a miracle?

07_batch_dialog.jpg

https://www.irfanview.com/

 

Edited by Zalificent Corvinus
  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Something else to consider: all(*) textures uploaded to SL are recompressed internally into a lossy JPEG 2000 format (which is different from JPEG!) regardless of what format you upload it in(**). This compression can introduce blurriness or artifacts in high-detail areas. If you shrink your images using any kind of sharpening algorithm, like Photoshop's "bicubic sharpen" or GIMP's "Lo-Halo", you can get a result that looks great in its original form but bad in SL after JPEG 2000 is applied. Don't be surprised if the best final SL result comes from shrinking with linear interpolation.

 

* You might be given the option of uploading without compression if the image is very small.

** "the format you upload in" should always be PNG or TGA, since those use lossless compression

  • Like 2
Link to comment
Share on other sites

I use mostly Gimp to do my textures nowadays. When I want to scale a texture down I try different pre and post processing to retain the crispness of a texture. Filters such as edge detection and contrast enhancements will help with that. Of course detail will be lost when you scale down the resolution of an image but you can improve a bit on the texture looking blurry and smudged this way.

Link to comment
Share on other sites

Aside from the fact that you are reducing the graphic to an SIXTEENTH of a the original size (hopefully your original graphic was ACTUALLY 1024 x 1024 and not what you mentioned as that is important to) it may be the quality of your graphics program.   ALSO you should be uploading as a PNG (usually) and not a JPG.  If you upload as a jpg it starting out blurrier than needs to be.   

 

A bunch of us did some tests a few years ago and found out that the uploader (then anyway) did a better job downsizing textures than our various graphics software.  This only works for larger textures though. I typically bake (for furniture) my textures at 2048 and let the uploader change them to 1024 (the maximum (in theory :D). 

 

I did a test with PaintshopPro 2023.  Note that the web upload will compress MORE than what I did so they will be less clear than (possibly) what you upload to SL. 

 

1024.thumb.png.be06d9cca754b100412885d1277c4997.png

 

256pomg.png.a677043bea269019d87175581933e3ab.png

 

So there is a bit of a reference for you.  You COULD try sharpening your 256 photo before uploading but I am not sure that would help much.  

Link to comment
Share on other sites

If you *really* want to go hard at getting the best downscaling possible, I'd suggest ImageMagick but it's a command-line tool and not a graphics suite, so it's not as approachable. On the plus side, it can rescale a directory full of images in one command.

It doesn't have Fant scaling which is quite nice for downscaling (I absolutely second using paint.net, it's an excellent tool), but Fant seems to be a Microsoft secret sauce algorithm, and ImageMagick has some 20 different algorithms available.

The reason there are so many is because scaling algorithms are very much a "whatever looks best to you, in this specific situation" thing. Some modes apply more sharpening, some less, some handle different patterns better, etc.

If you scale your image to a resolution SL supports and use lossless compression, you're in control of the results unlike when letting the uploader decide how to mangle resize your texture.

Link to comment
Share on other sites

2 hours ago, Chic Aeon said:

A bunch of us did some tests a few years ago and found out that the uploader (then anyway) did a better job downsizing textures than our various graphics software.  This only works for larger textures though. I typically bake (for furniture) my textures at 2048 and let the uploader change them to 1024 (the maximum (in theory :D).  

this

Kakadu is what Linden use to encode/decode (compress/decompress) jpeg2000. Firestorm also

Kakadu (its principal people) had a significant role in developing the jpeg2000 standard. And the Kakadu software suite followed on from their role in developing the standard. For general purpose encoding (the set of all images) to jpeg2000 it doesn't get better than Kakadu, which is why Linden use it

so for OP, is all about how you paint your textures for a specific encoder. in the SL case (Kakadu) KDU v7.10.4. Is not how do I find a lossy pre-processor to compress my texture which is then re-processed by the KDU lossy encoder

and then as you become more familiar with what KDU does, then our tool/brush selections improve for different kinds of paintings

as Quarrel mentions, always upload your images in a lossless format (TGA or PNG). We should paint for the lossless format, now having a better understanding of what will happen when is processed by the KDU encoder

Link to comment
Share on other sites

15 hours ago, elleevelyn said:

For general purpose encoding (the set of all images) to jpeg2000 it doesn't get better than Kakadu, which is why Linden use it

Well... no, not based on what I see in the source.

The encoding happens in the viewer and it does a basic bilinear i.e. blurry scaling, implemented in LL code. The JPEG2000 library isn't involved (indra/llimage/llimage.cpp (223)). JPEG2000 compression certainly cause extra artifacts if there's sharp elements in the texture (text, sharpened downscale, etc.) but "blur the image by bilinear scaling" probably is not the end-all solution to that.

I'd still recommend doing the scaling yourself, then you're at least *more* aware of the actual texture you're sending to SL even if the J2K compression will mess it up further.

  • Thanks 1
Link to comment
Share on other sites

15 hours ago, Frionil Fang said:

Well... no, not based on what I see in the source.

yes you right about this

i went down a garden path all of my own making in replying to Chic. Chic was talking about letting the Linden viewer reduce oversized (> 1024 x 1024) downto 1024 x 1024, which I agree with

a path tho which is a different path to what OP was actually asking: How do I (OP) best reduce a 1027x1027 template down to 256x256 so that I can upload it (after working with it) to SL as 256x256

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 156 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...