How to rotate pixel art without blurring
Moderator: Forum Moderators
Forum rules
Before posting critique in this forum, you must read the following thread:
Before posting critique in this forum, you must read the following thread:
How to rotate pixel art without blurring
I've often seen people say that you shouldn't try to use the rotate function of graphics programs to rotate pixel art, because that results in blurriness. I suppose in some cases some programs can rotate images without blurring, but even with one that blurs, you can still do pretty clean rotations. Here's how:
Let's pretend I have this sword and a hand here that I wish to rotate about 30 degrees for an animation:
If I just go and use the rotate tool, I end up with a somewhat blurry mess (don't comment on how this one doesn't actually look all that messy):
How to go around this? Simple. I scale the sword up, rotate it and scale it back down, using pixel resize (the resize method which doesn't try to blur or anti-alias anything).
So, first I scale the sword up enough (I prefer to scale to 4x the original size):
Then, I apply the rotation tool normally. Since the image is higher resolution, the sword doesn't get blurred:
Then, I just scale the image back to the original size using pixel resize, and ta-da, we have a pretty well rotated sword:
It might need a little manual clean-up of a handful of pixels, but that's quick and easy to do, compared to actually redrawing the sword in a different angle. I myself have found this very useful and use it all the time when working on animations. Do note that not every rotation angle results in a clean result, so you might have to try slight variations of the angle to find one which, when scaled back down, results in clean edges. Again, I've found this to be worth the minor trouble.
Let's pretend I have this sword and a hand here that I wish to rotate about 30 degrees for an animation:
If I just go and use the rotate tool, I end up with a somewhat blurry mess (don't comment on how this one doesn't actually look all that messy):
How to go around this? Simple. I scale the sword up, rotate it and scale it back down, using pixel resize (the resize method which doesn't try to blur or anti-alias anything).
So, first I scale the sword up enough (I prefer to scale to 4x the original size):
Then, I apply the rotation tool normally. Since the image is higher resolution, the sword doesn't get blurred:
Then, I just scale the image back to the original size using pixel resize, and ta-da, we have a pretty well rotated sword:
It might need a little manual clean-up of a handful of pixels, but that's quick and easy to do, compared to actually redrawing the sword in a different angle. I myself have found this very useful and use it all the time when working on animations. Do note that not every rotation angle results in a clean result, so you might have to try slight variations of the angle to find one which, when scaled back down, results in clean edges. Again, I've found this to be worth the minor trouble.
- Attachments
-
- sword_rotated.png (684 Bytes) Viewed 6776 times
-
- sword_4x_standard_rotation.png (6.64 KiB) Viewed 6776 times
-
- sword_4x.png (1.96 KiB) Viewed 6777 times
-
- sword_standard_rotation.png (909 Bytes) Viewed 6778 times
-
- sword.png (599 Bytes) Viewed 6786 times
-
- Posts: 719
- Joined: December 9th, 2003, 9:31 pm
- Contact:
Very clever, and very simple. Suprising I've not heard of this before, seems like it would be a well know technique, certainly deserves to be. It may be helpful to after scaling up the image, to reduce the pallete to only the colors already uses (especially if you are using team color) since it might be possible for additional colors to be created when scaling down.
Signature dropped due to use of img tag
I wonder if it's possible to apply the same technique to EGA color images.
Author of the unofficial UtBS sequels Invasion from the Unknown and After the Storm.
No, because...Woodwizzle wrote:It may be helpful to after scaling up the image, to reduce the pallete to only the colors already uses (especially if you are using team color) since it might be possible for additional colors to be created when scaling down.
... makes that problem expressly impossible.zookeeper wrote:How to go around this? Simple. I scale the sword up, rotate it and scale it back down, using pixel resize (the resize method which doesn't try to blur or anti-alias anything).
- Sgt. Groovy
- Art Contributor
- Posts: 1471
- Joined: May 22nd, 2006, 9:15 pm
- Location: Helsinki
I find it intriguing if you haven't come across this before. I didn't really think I was really inventing anything especially new.Jetryl wrote: Intriguing...
I shall have to try this out, later.
Nope. I don't have any programs that can do that. I think GIMP might have been able to do (or maybe it was some other program) it if you set some semi-global interpolation options correctly, but I'm not sure. I think the result would be almost identical, but I wouldn't really know.Sgt. Groovy wrote:Have you compared this to rotation without interpolation?
- Sgt. Groovy
- Art Contributor
- Posts: 1471
- Joined: May 22nd, 2006, 9:15 pm
- Location: Helsinki
Here's a comparison of the different methods. First row is 10 and second 45 degrees. From left to right: the scaling method, rotation without interpolation, rotation with linear, and rotation with cubic interpolation.
- Attachments
-
- sword_739.png (4.64 KiB) Viewed 6622 times
Tiedäthän kuinka pelataan.
Tiedäthän, vihtahousua vastaan.
Tiedäthän, solmu kravatin, se kantaa niin synnit
kuin syntien tekijätkin.
Tiedäthän, vihtahousua vastaan.
Tiedäthän, solmu kravatin, se kantaa niin synnit
kuin syntien tekijätkin.
- Redeth
- Art Contributor
- Posts: 338
- Joined: January 21st, 2006, 5:08 pm
- Location: Buenos Aires, Argentina
Re: How to rotate pixel art without blurring
It's a good method. Or you can be a lazy bum like Redeth and simply sharpen the object that is going to be rotated before and after the rotating process takes place. It won't look the same, but with some cleaning up it will do, because a little blurriness is desirable when viewing a moving object. Leave the TColored pixels out of it, though.zookeeper wrote:I've often seen people say that you shouldn't try to use the rotate function of graphics programs to rotate pixel art, because that results in blurriness. I suppose in some cases some programs can rotate images without blurring, but even with one that blurs, you can still do pretty clean rotations. Here's how:
- Rojo Capo Rey de Copas -
-
- Retired Developer
- Posts: 2633
- Joined: March 22nd, 2004, 11:22 pm
- Location: An Earl's Roadstead
Personally, I like the following method: Never make an object at exactly 90 degree rotations. First, it is a little unlikely and generally looks odd. So, what to do instead, make all straight objects at ~30 degrees. Then, through reflection and rotations of 90 degrees, you get 8 different rotations (instead of the 4 you get if you put the object at 90 degrees or 45 deg)
"you can already do that with WML"
Fight Creeeping Biggerism!
http://www.wesnoth.org/forum/viewtopic. ... 760#131760
http://www.wesnoth.org/forum/viewtopic. ... 1358#11358
-
- Posts: 719
- Joined: December 9th, 2003, 9:31 pm
- Contact:
- irrevenant
- Moderator Emeritus
- Posts: 3692
- Joined: August 15th, 2005, 7:57 am
- Location: I'm all around you.
Really handy tute! Any chance of adding it to the wiki?
I was going to do it, but I wasn't sure how to import the graphics...
I was going to do it, but I wasn't sure how to import the graphics...
Want to post a Wesnoth idea? Great! Read these:
Frequently Posted Ideas Thread
Giving your idea the best chance of acceptance
Frequently Posted Ideas Thread
Giving your idea the best chance of acceptance
Graphics can't be stored on the wiki, they have to be linked from somewhere. Like this forum.irrevenant wrote:Really handy tute! Any chance of adding it to the wiki?
I was going to do it, but I wasn't sure how to import the graphics...
Look at some of the other tutorials for good examples, and thanks for doing it.