[Solved] Having trouble with border on sprite images. [Goal Changed]

Started by Kain_V, Thu 12/02/2009 16:12:01

Previous topic - Next topic

Kain_V

Hi everyone, I am new to AGS forum and I was wondering if someone can help me with a problem I have.

I'm trying to make an adventure game in Gabriel Knight 2 style, so here's the thing:
I took a picture of a person to make an annimation, edited on photoshop to clear the background environment and
tried to import it on sprite section on AGS. I have tried everything but my image keeps coming up with a white
border... I tried to edit it (with default image editor) and then got a pink border...

I searched the manual and the forums but didn't find anything that could help me.
I set the game up to run in 1024 resolution, think this might be the problem?

Please if anyone can help me, I would really appreciate it.
Hope i didn't bore you, and thank you in advance!    :D

Gilbert

This is the common edge aliasing problem. Try to change your game to 32-bit (if you haven't done so) and save your image as PNG with alpha-channel and re-import them.

Kain_V

Hi, thank you for the quick reply!

My game is already set to 32-bit, and I have already tried to save the image in PNG format.
The thing is that the "Alpha chanels" check box is greyed out...
Don't know what i'm doing wrong... :(

Matti

What program are you using? Sometimes you have to create an object to set an alpha-channel and sometimes you just have to select a transperancy color..

Also, make sure the image you're saving is set to 32-bit (and not only the game).

Jakerpot

aren`t the transparency option in AGS import sprite window selected as no transparency? Change it to botom right or whatever you want.



Kain_V

#5
I am using Photoshop CS (begginer, i don't know to use it very well).
So I open the original image with photoshop and cut the character from it, then I save it on bmp format or PNG. (at PNG format the alpha chanels are greyed out)
As for the AGS, when i import the newly created image as sprite I still have a tiny white border around my character...

At AGS the transparency is set to top left.

beomoud

Try to edit the photos in your graphic program to make sure that the space around the character is all one color. It probably just picks one pixel as transparent. You said it turns it to pink? Maybe it is already transparent, that's how it looks in ags, have you tried testing it in the game? playtest it and see... 

Trent R

Try using the 'Export Transparent Image...' option underneath Photoshop's Help pulldown.

Also, I'd be willing to look at it if you upload your file.


~Trent
To give back to the AGS community, I can get you free, full versions of commercial software. Recently, Paint Shop Pro X, and eXPert PDF Pro 6. Please PM me for details.


Current Project: The Wanderer
On Hold: Hero of the Rune

Kain_V

Trent R you're the best!
I didn't know about the 'Export Transparent Image...' option, and after i used it my image still has a very tiny with border around it, but i thing that's how it should be.
My main problem is solved!
Thank you Trent and everyone for your time, help and quick responces!
Long Live AGS  ;D

Kain_V

Ok now I can import the sprites without any problem.
But I have an other question...
After importing the sprites, is there any way to change the width and height from within the AGS?
From the Script section maybe?
Anyone can help?

Jakerpot

what exactly you want to do? Animate it? Change it height by script`s? It will distort it if it`s possible. But, why you want to do that?  ???



Kain_V

I want to annimate the character, but it seems the sprites I import for lets say the Left Walk annimation, the character doesn't have the same Width and Height. (ex. sprite 2 is bigger from sprite 1)
So I was wondering of there's a way to adjust Width and Height from within the AGS instead than adjusting them from the default image editor...

Khris

Could you post the relevant sprites? It seems odd that they'd be of different sizes.
Did you create them yourself?

Kain_V

I can't find out how to paste an image file to the post... (stupid me)
So I'll try to explain it. I took two pics of a person with my digital camera. Edit them on photoshop, but when i was done with them, the first image had dimensions: 267x449 and the second one had 133x423.
So my question is this: can we edit these dimensions with AGS, or do I have to re-create them more carefully from photoshop?

SMF spam blocked by CleanTalk