Texture bad quality

Post here if you want to help developing something for FAF.

Texture bad quality

Postby Xinnony » 14 Oct 2014, 15:18

Hi, i have a problem with the textures in-game.

Example, Original :
Original.png
Original.png (1.12 KiB) Viewed 3936 times



Result In-Game :
Degrader.png
Degrader.png (1016 Bytes) Viewed 3936 times


Download the image and zoom for see the problem.
Bad quality.rar
(2.23 KiB) Downloaded 185 times
User avatar
Xinnony
Contributor
 
Posts: 551
Joined: 19 Feb 2012, 02:49
Has liked: 70 times
Been liked: 34 times
FAF User Name: Xinnony

Re: Texture bad quality

Postby Domino » 20 Oct 2014, 21:42

Hey,

Well yeah on small images you arte going to get some colour bleeding, just dropper the original colour and apply it to the converted image one pixel at a time.
colour it in so to speak.

Domino
Domino
Priest
 
Posts: 315
Joined: 14 Mar 2012, 21:07
Has liked: 3 times
Been liked: 75 times

Re: Texture bad quality

Postby Xinnony » 21 Oct 2014, 14:59

I do not understand, you have a solution ?
User avatar
Xinnony
Contributor
 
Posts: 551
Joined: 19 Feb 2012, 02:49
Has liked: 70 times
Been liked: 34 times
FAF User Name: Xinnony

Re: Texture bad quality

Postby ckitching » 24 Jan 2015, 19:31

This might be to do with the scaling the game applies to all textures it loads: IceDreamer and I recently encountered this ourselves.

Basically, make the sizes of your images divisible by four (padding with transparent pixels if you need to) and things will improve.

(You will want to right click and "view original")

Before:
https://www.dropbox.com/s/3ihwzdd9g9942 ... 4.png?dl=0

After:
https://www.dropbox.com/s/5i3d96pldyns3 ... 4.png?dl=0

Yes, they're different colours so it's slightly hard to compare. Look at the lasers: In the latter image they're 1px, but in the former the game has stretched them to being 2px, creating funky artefacts.
Perhaps that's the problem you encountered here?
User avatar
ckitching
Avatar-of-War
 
Posts: 229
Joined: 03 Jan 2015, 12:51
Has liked: 2 times
Been liked: 69 times
FAF User Name: ckitching

Re: Texture bad quality

Postby IceDreamer » 24 Jan 2015, 19:47

This is likely to be the root cause for an enormous number of oddities in textures in every aspect of the game. Absolutely anywhere you get a dimension not divisible by 4, you're going to get major problems with resampling of pixels.
IceDreamer
Supreme Commander
 
Posts: 2607
Joined: 27 Dec 2011, 07:01
Has liked: 138 times
Been liked: 488 times

Re: Texture bad quality

Postby pip » 24 Jan 2015, 22:47

Yes, I found out the same issue trying to optimize Nomads textures last year. If you don't pick 64/128/512/1024/2048 size, you will end up with borked textures.
pip
Supreme Commander
 
Posts: 1826
Joined: 04 Oct 2011, 15:33
Has liked: 191 times
Been liked: 86 times
FAF User Name: pip

Re: Texture bad quality

Postby ckitching » 25 Jan 2015, 00:21

pip wrote:Yes, I found out the same issue trying to optimize Nomads textures last year. If you don't pick 64/128/512/1024/2048 size, you will end up with borked textures.


To clarify: You're probably talking about textures for use in-game (paint for tanks and whatnot). We're specifically talking about textures used in the UI.

Mipmapping and related concerns make textures for use in the actual game a whole different kettle of fish. It seems you can get away with any multiple of four in the UI. Presumably what you're saying about powers of two is a valid constraint for in-game textures, probably vaguely related to mipmaps.
User avatar
ckitching
Avatar-of-War
 
Posts: 229
Joined: 03 Jan 2015, 12:51
Has liked: 2 times
Been liked: 69 times
FAF User Name: ckitching

Re: Texture bad quality

Postby Xinnony » 25 Jan 2015, 19:58

ckitching wrote:..
Yes, they're different colours so it's slightly hard to compare. Look at the lasers: In the latter image they're 1px, but in the former the game has stretched them to being 2px, creating funky artefacts.
Perhaps that's the problem you encountered here?

Exactly
User avatar
Xinnony
Contributor
 
Posts: 551
Joined: 19 Feb 2012, 02:49
Has liked: 70 times
Been liked: 34 times
FAF User Name: Xinnony


Return to Contributors

Who is online

Users browsing this forum: No registered users and 1 guest