YesNoOk
avatar

Rotating and Scaling sprites - the easy way (Read 21515 times)

Started by O Ilusionista, April 17, 2013, 09:51:06 PM
Share this topic:
Rotating and Scaling sprites - the easy way
#1  April 17, 2013, 09:51:06 PM
  • ******
  • Part of the OpenBOR dev team
  • 22 years of Mugen and counting...
    • Brazil
    • www.brazilmugenteam.com
This info is so useful that needs to be shared with everyone. Thanks to nedflandeurse for finding this gem.

There are some times that we want to scale or rotate sprites to make new ones, and most graphic programs will just ruin the sprites - by blurring then or by messing up the pixels.

The solution is a free program called RotSprite, which have unbelievable results.

What it is?


Quote
RotSprite is a sprite rotation and scaling utility developed by Xenowhirl. It outperforms most professional graphics software (such as Photoshop or Paint Shop Pro) when rotating sprites through an angle other than 90° or one of its multiples. Typically, other graphics editors will apply anti-aliasing or use a primitive nearest-neighbor method when rotating images, which produces results that are ugly or unsuitable for sprites.

As Xenowhirl has himself said, this utility has been released because "the walking and running frames in Sonic 1, 2, and 3 all need 45 degree rotated equivalents" and "making rotated versions of sprites is usually a pain in the ass, because most programs that rotate a sprite will antialias it (which blurs it and messes with the colors)". RotSprite uses a special algorithm instead which tries to preserve the original sprite's feature by "guessing" pixel patterns.

As an additional feature, RotSprite can also resize sprites (and it does a very good job also for this task).

Several major sceners found this utility very useful.

How it works?


The program interface is very simple. You choose which image you will use (accepts many formats), the output name (just outputs BMP) then you will see this:


First box: you will enter the angle of the rotation (if you don't want rotation, just put 0). Try to use integer numbers, and remember graphic programs works better in 15º subdivision, so any multiple (15º, 30º, 45º and so on). Remember that is in counter-clockwise, so if you wanna rotate 45 CLOCKWISE, you need to enter 315º or use a negative value (-45º).

Second box: Its the scale value. If you doesn't wants a scale, leave it alone (do not use 0). Again, the same 15 multipies will work here, but multiples of 10 will work too. 1.000000 means 1 (normal size), 2.000000 doubles it, 0.500000 half size and so on.

Scale down works better than scale up. But the result is better than any other tool.

Third box you can enter how much frames do you want, and the final rotation and it will made as much frames as needed.

Examples

Rotating




Scale (zoomed for better view)


DOWNLOAD here: http://info.sonicretro.org/RotSprite
Alternate host: http://www.sendspace.com/file/xdoeyq
Re: Rotating and Scaling sprites - the easy way
#2  April 17, 2013, 10:53:00 PM
  • ***
  • Wataaaaahhhhh
    • France
Wow, great tool, I just tried it, thanks to share it with us O Ilu  :yippi:
http://mugenguild.com/forum/iron-muscle-bomber.400
Rahhhhhhh, AI is so hard to deal with !!!!
Re: Rotating and Scaling sprites - the easy way
#3  April 17, 2013, 10:54:50 PM
  • ******
  • Part of the OpenBOR dev team
  • 22 years of Mugen and counting...
    • Brazil
    • www.brazilmugenteam.com
thanks.
Seams that there was an old topic about this here already, but it doesn't shows what the program does.
Maybe this is more useful :)
Re: Rotating and Scaling sprites - the easy way
#4  April 18, 2013, 03:18:27 AM
  • ******
  • Video Game Veteran
  • Can you do it? SUREYOUCAN!
    • USA
    • gcnmario.free.fr
May I ask how is it being rotated? I mean does it rotate the sprites at the center, or at the foot? From the animation, it looks like they are rotating at the center of the image.
I don't know if it matters where the axis is, I take it it would give the same rotation results if it were being rotated from which ever offset?

Anyway, the alternative would be rotating sprites in Mugen, and getting the new sprite form from there. Though I guess everyone has their own unique way of doing it, and that's fine. I was just giving an alternative. Like most of us here are MUGEN creators anyway. But if not, then it's good for others to have a program like this. :)

"You must defeat my flaming
dragon punch to stand a chance."
Re: Rotating and Scaling sprites - the easy way
#5  April 18, 2013, 03:54:06 AM
  • ******
  • Part of the OpenBOR dev team
  • 22 years of Mugen and counting...
    • Brazil
    • www.brazilmugenteam.com
it rotates the whole image using the center point. That animation was made using PS, ignore it
Quote
Anyway, the alternative would be rotating sprites in Mugen, and getting the new sprite form from there.

It doesn't have the same quality, plus you get a 2x bigger sprite. Try to resize it to the normal size and you will see what happens.
Re: Rotating and Scaling sprites - the easy way
#6  April 18, 2013, 02:38:40 PM
  • ******
  • Part of the OpenBOR dev team
  • 22 years of Mugen and counting...
    • Brazil
    • www.brazilmugenteam.com
Re: Rotating and Scaling sprites - the easy way
#7  April 18, 2013, 03:13:44 PM
  • *****
  • Spriter. back to coding, just like in 2001.
  • A.K.A. NED
One more time:
Thanks for speading it Ilu, Since I was too lazy to do it for the moment :P

Hope it will help all of you to make sprite work far easier.

This is an exemple of the kind of edit I've done in the past weeks.
When upscalling, I highly recomand you to edit small details like face to have descent results.
Last Edit: April 18, 2013, 03:18:04 PM by Nedflandeurse
Re: Rotating and Scaling sprites - the easy way
#8  April 18, 2013, 05:34:58 PM
  • ****
    • USA
    • Skype - dainfinite
    • infiniteff.forumotion.com/
Thank you O Ilusionista, for sharing this  :yippi:. I have been looking for something similar for a while for when I have to edit sprites.
Re: Rotating and Scaling sprites - the easy way
#9  June 21, 2014, 06:28:57 AM
  • **
  • The need situation makes the man
    • Mexico
    • www.facebook.com/mike.funkyman
Hey buddy ilusionista , and this tool works for scaling cvs to sfa/mvc sprites without pixelation ??
Re: Rotating and Scaling sprites - the easy way
#10  June 22, 2014, 12:42:47 PM
  • ******
It doesn't make the work for you (it doesn't convert CvS sprites to SFA style), if that's what you're asking for. You always need to edit the sprites to look good.

But it scales images better than other image editing programs. So you have a good base to edit your sprites (you have very little work to do).
Re: Rotating and Scaling sprites - the easy way
#11  November 30, 2014, 10:30:41 PM
  • **
  • Part time Creator!!!
  • Need motivation...
    • Germany