Downscaling resampling tutorial

Sprites, textures, sounds, code, and other resources belong here. Share and share-alike!
Forum rules
Before posting your Resource, please make sure you can answer YES to any of the following questions:
  • Is the resource ENTIRELY my own work?
  • If no to the previous one, do I have permission from the original author?
  • If no to the previous one, did I put a reasonable amount of work into the resource myself, such that the changes are noticeably different from the source that I could take credit for them?
If you answered no to all three, maybe you should consider taking your stuff somewhere other than the Resources forum.

Consult the Resource/Request Posting Guidelines for more information.

Please don't put requests here! They have their own forum --> here. Thank you!
Post Reply
User avatar
Cage
Posts: 471
Joined: Sun Jan 08, 2006 2:47 pm
Location: San Escobar
Contact:

Downscaling resampling tutorial

Post by Cage »

Hello, just a little bit of (maybe) useful info, if you're scaling down textures. For Photoshop, might be translatable to other software.

Here's my texture I've picked up on http://www.texturemate.com/
Image

Liked the colours and details. Let's make a Doom texture out of it! We can use the full texture, it doesn't need croping. 3888x2592 is a bit too much for our needs so let's scale it down.

Image

I've highlighted the resampling droplist. Here are the results:

Image
Nearest neighbor
Whoever scaled down photo textures for use in oldschool stuff like Duke/Doom/whatever, probably tried using this resampling method since.. it's not doing any resampling. While it should work in theory, with things looking nice and pixelly, the end result is just too rough and details start to look like noise.

Image
Bicubic. Oooh, smooth. Too smooth. Almost being blurry :P It's like the opposite of the above result - instead of being noisy it's blurry.

Image
Bicubic sharper. OH GOD PLEASE NO. The result looks like the above bicubic result but with ugly SHARPEN filter aplied. NO.

Image
Bilinear. It's - it's smooth while a bit better at preserving the details than bicubic. I think it's the best solution for scaling down textures to oldschool sizes ;) While you're difference may be subtle for you, non-graphic-nerds, it just feels right in my opinion.

After making it tileable and some tablet and brush tool voodoo you can get something like this:
Image

Cheers and hope this helps in anyway.

GIMP:
ETTiNGRiNDER wrote:Just did a quick poke around with GIMP, which, disregarding "None", has "Linear" "Cubic" and "Sinc". Sinc appeared to have the best effect, but oddly, Linear and Cubic seemed to have reversed effects from what you had with Photoshop (Linear was the blurry one and Cubic was better looking).
Thanks!
Last edited by Cage on Fri Feb 17, 2012 5:23 pm, edited 1 time in total.
User avatar
Tormentor667
Posts: 13530
Joined: Wed Jul 16, 2003 3:52 am
Contact:

Re: Downscaling resampling tutorial

Post by Tormentor667 »

Awesome :)
User avatar
ETTiNGRiNDER
Posts: 766
Joined: Sat Jan 30, 2010 7:02 pm
Contact:

Re: Downscaling resampling tutorial

Post by ETTiNGRiNDER »

Cage wrote:For Photoshop, might be translatable to other software.
Just did a quick poke around with GIMP, which, disregarding "None", has "Linear" "Cubic" and "Sinc". Sinc appeared to have the best effect, but oddly, Linear and Cubic seemed to have reversed effects from what you had with Photoshop (Linear was the blurry one and Cubic was better looking).
User avatar
Cage
Posts: 471
Joined: Sun Jan 08, 2006 2:47 pm
Location: San Escobar
Contact:

Re: Downscaling resampling tutorial

Post by Cage »

ETTiNGRiNDER wrote:
Cage wrote:For Photoshop, might be translatable to other software.
Just did a quick poke around with GIMP, which, disregarding "None", has "Linear" "Cubic" and "Sinc". Sinc appeared to have the best effect, but oddly, Linear and Cubic seemed to have reversed effects from what you had with Photoshop (Linear was the blurry one and Cubic was better looking).
Since a lot of people here use Gimp (or seems so) I've added that to the first post. Thanks!
User avatar
Enjay
 
 
Posts: 26517
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Re: Downscaling resampling tutorial

Post by Enjay »

The options in Paint Shop Pro:

Image

"Smart size", I think, just seems to pick bilinear if the image is 24 bit or greyscale and pixel if it is 256 colours or less. Pixel resize does no filtering/resampling.
Gez
 
 
Posts: 17833
Joined: Fri Jul 06, 2007 3:22 pm

Re: Downscaling resampling tutorial

Post by Gez »

ETTiNGRiNDER wrote:oddly, Linear and Cubic seemed to have reversed effects from what you had with Photoshop
They're not the same. Linear isn't bilinear; and cubic isn't bicubic, AFAIK.
User avatar
Cage
Posts: 471
Joined: Sun Jan 08, 2006 2:47 pm
Location: San Escobar
Contact:

Re: Downscaling resampling tutorial

Post by Cage »

Another method of downscaling is to scale your texture x4 of your destination size ((x2, x3, work too) and use a Pixelate -> Mosaic filter or equivalent - it changes your picture into pixels.

Image

Then scale it to desired size with NEAREST/no resampling/pixel resize/whatever

This nets the same results as bilinear in PhotoShop, though.
User avatar
printz
Posts: 2648
Joined: Thu Oct 26, 2006 12:08 pm
Location: Bucharest, Romania
Contact:

Re: Downscaling resampling tutorial

Post by printz »

I like all downscaling variants, they make the texture look different enough depending on application.
User avatar
NeuralStunner
 
 
Posts: 12325
Joined: Tue Jul 21, 2009 12:04 pm
Preferred Pronouns: He/Him
Graphics Processor: nVidia with Vulkan support
Location: capital N, capital S, no space
Contact:

Re: Downscaling resampling tutorial

Post by NeuralStunner »

I have something to add!

3x3 tile your texture before you scale it down, then crop the center back to intended final size. This makes sure that any blending will be tilable, and avoid sharp edges at the texture boundaries.
Post Reply

Return to “Resources”