The Daily Click ::. Forums ::. Klik Coding Help ::. Importing graphics into MMF, and removing those awful grainy borders...
 

Post Reply  Post Oekaki 
 

Posted By Message

Isometric Bacon



Registered
  20/03/2005
Points
  1
20th March, 2005 at 07:26:36 -

Hi guys. I'm rather new to MMF, after making a ton of games with TGF alot about 5 years ago. Recently I had a fix to make a new game, so I downloaded the demo of MMF and am currently tinkering with it to see what I can accomplish.

However, there's one thing that stops me from using great graphics i've created in photoshop, and this same problem plagued me with TGF back in the day. The dirty white (or whatever colour the sprites background was) borders that surround the object. These happen when you import an object from photoshop, and then replace the background colour to MMF's transparent colour.

I know that this is because Photoshop allows alpha channels and transparencies, and has certain pixels as slightly "transparent" to make it look all the better depending on the background it's on. I was wondering if there's anyway I can emulate this photoshop effect, so my objects don't have ugly grainy borders. Manually deleting the white specs makes the image look much more pixelated and poor...

Any help would be greatly appreciated, thanks.

 
n/a

AsparagusTrevor

Mine's a pint of the black stuff

Registered
  20/08/2002
Points
  2364

Game of the Week WinnerHas Donated, Thank You!VIP MemberEvil kliker
20th March, 2005 at 09:11:55 -

I think you're talking about the anti-aliasing, where Photoshop blurs the edges to reduce the jagged look.

When you're doing your sprites in Photoshop, try to work in Indexed Colour rather than RGB Colour, i.e go to Image -> Mode -> Indexed Colour.

If you're needing to work with the vast palette provided with RGB Colour, then use the Pencil tool instead of the Brush tool, the pencil tool has no smoothing, and if you need to resize or rotate, make sure the Filtering/Resample is on Nearest Neighbour and not Bilenear or Bicubic.

Hope that helps.

 
Image

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
20th March, 2005 at 10:09:33 -

Like AsparagusTrevor said, you can turn off the antialias (for the outlines at least) to stop it making the blurred edges. Using a limited palette will help make your game smaller and run faster anyway - and its still perfectly possible to make games with a 256 colour palette which will look a lot better than most of the games here (just have a look at some old snes games). With small sprites, you can add more detail if you draw every pixel by hand (ie. no antialias) so it does genuinely look better. I'm not entirely sure i agree about the resizing/rotating - the results, especially on very small images (eg. game sprites) tend to be very poor and need a lot more touching up. Infact, whilst the active picture can be rotated 360 degrees, the rotation is so poor on small sprites that i personally find it looks better to just use the 32 directions of the active object and pre-rotate each frame in paintshop pro (and maybe mmfs antialiasing). It just depends on the ffect you're looking for and how much work you're prepared to do.

If your sprites are going to always be on a similar colour background, you could just set that to the background in photoshop so the blurring looks good. Sometimes antialiasing on a black background can produce decent results - a kind of cartoony outline.

Otherwise, if you go to "ink effects" in the objects properties, you can turn on mmfs own antialiasing (a bit buggy, and allegedly slow if you have many sprites on screen), which will soften the outline on any colour background.

Alternatively, you should be able to save the image as a .png and display it using the alpha extension.

 
n/a

Tiles

Possibly Insane

Registered
  06/12/2002
Points
  2339

GOTM 3TH PLACE WINNER - JANUARY 2010
20th March, 2005 at 10:13:52 -

[quote]When you're doing your sprites in Photoshop, try to work in Indexed Colour rather than RGB Colour, i.e go to Image -> Mode -> Indexed Colour[/quote]

Why should he limit himself to 256 colours ? There is no need to . As you have said, he has just to take care that he doesnīt paint over the transparent areas . And thatīs what for example antialias does , too . It melts the pixels at sharp borders between two colours . And so the neighbour pixels around the sprite isnīt longer the same colour than the background colour . Which causes this border effect when importing the picture into MMF. MMF can just set ONE colour to transparent

 
Free graphics,Free Games
http://www.reinerstilesets.de

AsparagusTrevor

Mine's a pint of the black stuff

Registered
  20/08/2002
Points
  2364

Game of the Week WinnerHas Donated, Thank You!VIP MemberEvil kliker
20th March, 2005 at 11:17:08 -

Well it's good to limit your palette to Indexed Colour because it will stop any blending completely, no worries at all. I did meniton methods while using a True Colour palette.

Also, I forgot to add, save the pictures as BMP, if you save with a compressed file format such as JPEG you tend to get artifacts that are a bitch to remove. Saving in BMP guarantees the picture is saved at optimum quality. And for the background colour, try to use an absolute colour, like a primary colour or complete green. This translates best into MMF, sometimes if you use an off-shade then MMF will try to dither the colour to make it match, which ends up making it very hard to remove.

 
Image
   

Post Reply



 



Advertisement

Worth A Click