Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411581 Posts in 69386 Topics- by 58445 Members - Latest Member: Mansreign

May 05, 2024, 08:47:52 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Do Trilinear/Anisotropic filtering and pixel art combine well?
Pages: [1]
Print
Author Topic: Do Trilinear/Anisotropic filtering and pixel art combine well?  (Read 3739 times)
Ina Vegt
Level 1
*


Girl Game Developer


View Profile
« on: February 19, 2009, 04:46:50 PM »

For my game project (Project Dreams), I'm working on designing the graphics engine, but I need to know whether pixel art and Trilinear/Anisotropic filtering combine well.

Anybody tried this, and if so, did it work well?
Logged
David Pittman
Level 2
**


MAEK GAEM


View Profile WWW
« Reply #1 on: February 19, 2009, 05:41:19 PM »

Not sure in what way you want it evaluated. I mean, it'll be filtered, and pixel art is all about looking sharp and crisp, so no, it wouldn't work well? But then, some people like playing SNES roms with filtering, which I think is blasphemy. To each his own.

But it might look something like this, anyway (hotlinked!):
Logged

Kaelan
Level 1
*


Malcontent


View Profile WWW
« Reply #2 on: February 19, 2009, 06:16:52 PM »

Filtering can be useful in the context of pixel art but only if you apply it extremely carefully. If you just slap it on everything, it's going to look awful, because filtering introduces artifacts if you aren't extremely precise about things like texture coordinates and sizes all the way through your pipeline.

Downscaling pixel art will look significantly better with anisotropic/trilinear filtering than without (or with bilinear), IF you do it correctly. (Premultiply your alpha, use mipmaps, have border pixels around your frames, etc). Upscaling will almost universally look worse with filtering.

Rotation is a separate case where filtering may be extremely helpful, but it's again dependent on not 'doing it wrong', so you have to make sure your input textures are formatted just so and you have your filtering configured just right. This is mostly because rotation universally looks shoddy with or without filtering, so properly configured filtering is more likely to improve the result than make it worse.

In some cases you may need to write a shader to get good results, which can be a significant time investment depending on the nature of your rendering code.
« Last Edit: February 19, 2009, 06:20:29 PM by Kaelan » Logged

mcc
Level 10
*****


glitch


View Profile WWW
« Reply #3 on: February 19, 2009, 09:39:39 PM »

Hi, I don't have any personal experience to apply here, but have you ever come into contact with 2xSai or EAGLE? (Wikipedia lists a couple other scaling algorithms designed specifically for use with pixel art also). Some emulators I have used use these and they are the only kind of scaling I as a player am able to put up in emulators. It seems like pixel art invariably winds up incorporating sharp edges, and so then if you scale in any traditional manner it makes these edges look muddy. (Of course I imagine if you designed the art to look good with some kind of trilinear/asintropic scaling then it would indeed look good?)

Anyway the neat thing about the 2xSai/eagle algorithms in specific is that since they seem to sort of straighten out lines and smooth areas of color:



...they actually sort of look better the more heavily you apply them, if you apply 2xSai on top of 2xSai on top of 2xSai you wind up with this really interesting stylized look that makes everything look like everything's been drawn with a sharpie and a straightedge.
Logged

My projects:<br />Games: Jumpman Retro-futuristic platforming iJumpman iPhone version Drumcircle PC+smartphone music toy<br />More: RUN HELLO
nihilocrat
Level 10
*****


Full of stars.


View Profile WWW
« Reply #4 on: February 20, 2009, 11:37:40 AM »

I'm very curious about the alternative scaling algorithms used by emulators (as well as remake projects like The Ur-Quan Masters). I haven't actually seen them used in original indie games.

Kaelan says it all. Pixel art is all about jaggies, filtering is not, thus they don't normally combine well.
Logged

null & void
Level 1
*


View Profile
« Reply #5 on: February 20, 2009, 12:09:27 PM »

I could see heavy, heavy filtering work if you want everything blurry and out of focus, which means it might be good for a really cinematic game, like, in the background. It also might be good to use more standard filtering on alpha masks for sprites, e.g. for flashlight/spotlight effects.

Otherwise, nonononono. It completely and totally destroys the point of pixel art. Well, at least unless you're using 2xSaI or similar... which it's pretty clear isn't the case.
Logged
Chris Whitman
Sepia Toned
Level 10
*****


A master of karate and friendship for everyone.


View Profile
« Reply #6 on: February 20, 2009, 01:45:51 PM »

I don't think it's that 'pixel art is all about jaggies,' per se.

Bilinear filtering specifically has a bunch of things that look none-to-good for upscaling pixel art. For one thing, it isn't just that stuff gets blurry; sprites end up with clean, jagged edges but internal blurring, which looks jarring. Secondly, the bilinear filtering produces that weird, diamond-shaped smearing effect on each source pixel, which tends to look really awful.
Logged

Formerly "I Like Cake."
Core Xii
Level 10
*****


the resident dissident


View Profile WWW
« Reply #7 on: February 20, 2009, 02:08:17 PM »

The idea of pixel art is that every pixel was placed manually by the artist.

Using a filter of any kind produces pixels that were not manually placed. Thus, no, they don't combine well.
Logged
Nitro Crate
Level 3
***



View Profile
« Reply #8 on: February 20, 2009, 07:25:43 PM »

I prefer the hqnx family, also mentioned in the wikipedia link.  Wink
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic