Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: delancie on Sun 14/12/2008 17:39:47

Title: Downscaling sprites / Is this even necessary?
Post by: delancie on Sun 14/12/2008 17:39:47
I am taking screenshots of a television show, erasing the background pixel-by-pixel to extract the people, then saving the resultant 'sprite' files as bitmaps.  It actually looks pretty good, but the problem is, when I go to import them into AGS, they're enormous and don't fit into the background at all.

I've tried scaling them down manually so they fit, but every time I do that, I have to cleanup the sprite again, because downscaling the image causes artifacts to appear on the edge of the sprite.  See the process below of zoomed in sprites (ignore JPG compression):

(http://www.thesequelpolice.com/agsdownscale1.JPG)

(http://www.thesequelpolice.com/agsdownscale2.JPG)

(http://www.thesequelpolice.com/agsdownscale3.JPG)

(http://www.thesequelpolice.com/agsdownscale4.JPG)

So, the question is ... is there a better way of doing this?  Is this even necessary?  Am I a total maroon?

Thanks for your time...
Ian
Title: Re: Downscaling sprites / Is this even necessary?
Post by: PrimitiveUser on Sun 14/12/2008 17:42:13
When your in the Sprites Tab, click that image, on the event tab you'll see 600x800x click that instead of 300x
or resize your image in paint and if you want outline it with black and make the background color WHITE, because the ags editor background
transparent color is pink!
Title: Re: Downscaling sprites / Is this even necessary?
Post by: Dualnames on Sun 14/12/2008 20:45:25
Quote from: primitiveuser on Sun 14/12/2008 17:42:13
When your in the Sprites Tab, click that image, on the event tab you'll see 600x800x click that instead of 300x
or resize your image in paint and if you want outline it with black and make the background color WHITE, because the ags editor background
transparent color is pink!

Actually..no not really. I've imported many images that had magenta color. Thing is the AGS engine, when you import a sprite you'll get a screen with an option about transparency. Top-left,Top-right,Bottom-left,Bottom-right,leave as is, palette index,no transparency.

The AGS checks the colour of the sprite that is on the top-left,top-right..and considers it as transparent.

If you choose leave as is , It considers magenta(unless I'm mistaken) as transparent colour.

In your occasion you should either consider of making the sprite images smaller, or increase the game's resolution, cause it will be very difficult to create sprites like this. The bigger the reso the smaller the sprite image will appear.
Title: Re: Downscaling sprites / Is this even necessary?
Post by: Trent R on Mon 15/12/2008 00:00:11
Quote from: Dualnames on Sun 14/12/2008 20:45:25
If you choose leave as is , It considers magenta(unless I'm mistaken) as transparent colour.
I think "Leave as is" is also used for alpha sprites... I think.


~Trent
Title: Re: Downscaling sprites / Is this even necessary?
Post by: delancie on Mon 15/12/2008 00:30:13
I'm not really wondering about what color to use for transparency (it doesn't matter, as the engine takes the pigment of the top-left pixel and applies that as the 'transparent' color for the rest of the image).

I'm more concerned with 'do i even need to do this?'

Is there some sort of built in sprite downscaling feature of AGS that I'm not aware of?

OR

Do you have to make sure that your sprites ACTUAL size measures up exactly with the resolution of the background image?

If you need to pre-scale the sprites, can anyone think of a better way to do what I am trying to do?

Thanks...
Ian
Title: Re: Downscaling sprites / Is this even necessary?
Post by: IndieBoy on Mon 15/12/2008 00:50:17
AGS doesn't squeeze your characters to fit through a 70px high door for example, you have to do this yourself. This will be difficult as you will be using non-hand made images, so the only thing you can do it make sure you stick to a set height in pixels of each of your characters when you are scaling and make or scale backgrounds accordingly. What you are trying to do seems very difficult and might take more time than actually drawing and animating characters yourself. But it is you're choice and I will be looking forward to see the outcome.
Title: Re: Downscaling sprites / Is this even necessary?
Post by: delancie on Mon 15/12/2008 01:05:01
IndieBoy -- Yeah ... I was thinking I might need to employ the help of an actual 2D graphic artist in order to make all the sprite sets that I'll need to make this idea come to life.  Until I can find/fund someone interested in helping with this, I'll have to keep tweaking the methods I use to grab these images/animations from broadcasts/DVD stills.

If I just need to know the dimensions of the screen before I grab the image, I could make the initial downscale to-scale, then strip the background.  That would make for a slightly better end-result, but I still feel like there should be a way to cleanly downscale images like these.  Perhaps I'm asking for the moon...

Ian
Title: Re: Downscaling sprites / Is this even necessary?
Post by: Khris on Mon 15/12/2008 14:03:28
I'm using PaintShopPro 7; it's image scaling dialog has four options including pixel-perfect, that's what you'll want to use.
In your case, the program uses bilinear or bicubic interpolation to make the scaled image smoother which results in the unwanted border.
Or you could try to convert the image into a layer and actually delete the surrounding pixels from it before scaling it down.