Sprite background color showing
by James Daniel · in Torque Game Builder · 02/13/2007 (2:16 pm) · 10 replies
Hi;
I just got through the tutorials and I've run into a problem with my sprites. I created a set of sprites in Paintshop Pro 8 and then ported them to my Mac and put them into a TGB project. The sprites are png files. The problem is that when I create the sprites in the TGB project I still see the sprite background color. What am I doing wong?
I just got through the tutorials and I've run into a problem with my sprites. I created a set of sprites in Paintshop Pro 8 and then ported them to my Mac and put them into a TGB project. The sprites are png files. The problem is that when I create the sprites in the TGB project I still see the sprite background color. What am I doing wong?
#2
02/14/2007 (7:19 am)
There dosen't seem to be any "options" with the save in TGB. Are you talking about Paintshop Pro? Looked there and found nothing either.
#3
Also, if you made your background a set color, like Cyan (255,0,255) and expected TGB to see that as a 'transparent' color, it won't work ... I assumed the background color option in the imagemap creator screen was for doing that, but it apparently is not ...
02/14/2007 (8:11 am)
@James -- when you are working with PNG's, at some point, there is an option to make the background transparent ... I'm not familiar with PSP, so I can't say for sure ... but I bet a quick google search would do the trick ...Also, if you made your background a set color, like Cyan (255,0,255) and expected TGB to see that as a 'transparent' color, it won't work ... I assumed the background color option in the imagemap creator screen was for doing that, but it apparently is not ...
#4
02/14/2007 (8:48 am)
I do mean in PSP. I am a long time PSP user but 8 (it's at 11 now) is kind of an old version and I can't remember how to get to the PNG options. I can tell you this, if you never saved the PNG with transparency then it will never show up with transparency. I can't give you any other advice at this point than to A) scour PSP8 for the PNG transparency options, B) upgrade your PSP license, C) look for some other software or freeware that will allow you to save the PNG with transparency.
#5
I've upgraded PSP to PSPX (that PSP 10) and I'm still having problems getting the transparency to work. I have a great deal art to convert to use with TGB and I can really use some getting thins set up to work. I need to find out how to change a non palletized art to have the background set as transparent. The old art was setup so that I could use any color (rfb setting) I wanted to indicate that it was transparent so I need a way to change the color to be transparent. So any ideas?
02/14/2007 (2:19 pm)
Thanks for the ideas, guys. I've upgraded PSP to PSPX (that PSP 10) and I'm still having problems getting the transparency to work. I have a great deal art to convert to use with TGB and I can really use some getting thins set up to work. I need to find out how to change a non palletized art to have the background set as transparent. The old art was setup so that I could use any color (rfb setting) I wanted to indicate that it was transparent so I need a way to change the color to be transparent. So any ideas?
#6
With artwork retrieved from numerous 'sprite' websites, which usually have a cyan or similar color indicating 'transparency' for the engine they were meant for, i usually create a new image in photoshop, tell it to make it a transparent image, open the image I want to make transparent, then copy/paste it into the new image, then I proceed to do a 'magic wand' on the color, then I tell photoshop to select all similar colors and I restrict the color match to be 'pixel perfect', and then I just hit delete ...
How this works ... when I paste the image into the new blank transparent canvas, it creates a new layer... the bottom layer being 'empty' (or fully transparent) ... when I remove pixels from the newly added layer, they become transparent pixels to allow for the layer below to show through ... as the below layer is transparent, I get my desired effect -- I then proceed to 'merge' the layers, and save the file as a PNG with transparencies.
Hope this helps --
If you have ALOT of artwork that requires this 'trick', you could probably find some tools on-the-web that will do it for you, such as ImageMagik (which may or may not have a tool for this job) ... I know photoshop supports batch processing, perhaps PSP does as well?
02/14/2007 (4:49 pm)
@James, what I do in photoshop is the following,With artwork retrieved from numerous 'sprite' websites, which usually have a cyan or similar color indicating 'transparency' for the engine they were meant for, i usually create a new image in photoshop, tell it to make it a transparent image, open the image I want to make transparent, then copy/paste it into the new image, then I proceed to do a 'magic wand' on the color, then I tell photoshop to select all similar colors and I restrict the color match to be 'pixel perfect', and then I just hit delete ...
How this works ... when I paste the image into the new blank transparent canvas, it creates a new layer... the bottom layer being 'empty' (or fully transparent) ... when I remove pixels from the newly added layer, they become transparent pixels to allow for the layer below to show through ... as the below layer is transparent, I get my desired effect -- I then proceed to 'merge' the layers, and save the file as a PNG with transparencies.
Hope this helps --
If you have ALOT of artwork that requires this 'trick', you could probably find some tools on-the-web that will do it for you, such as ImageMagik (which may or may not have a tool for this job) ... I know photoshop supports batch processing, perhaps PSP does as well?
#7
1. open your art file
2. press F12 (or file menu -> save as)
3. choose .PNG from the file type dropdown
4. click the "options" button (under where the save button is)
5. click the "run wizard" button (might be called something else, but I think that's it)
6. choose the "transparency" tab
7. use the options on that tab to set your transparency
you can choose a color, set it to background or foreground, turn it off, or use existing palette transparency
8. Hit ok/save/apply enough times to save the file.
9. Done.
02/14/2007 (5:02 pm)
In PSP X1. open your art file
2. press F12 (or file menu -> save as)
3. choose .PNG from the file type dropdown
4. click the "options" button (under where the save button is)
5. click the "run wizard" button (might be called something else, but I think that's it)
6. choose the "transparency" tab
7. use the options on that tab to set your transparency
you can choose a color, set it to background or foreground, turn it off, or use existing palette transparency
8. Hit ok/save/apply enough times to save the file.
9. Done.
#8
Once again, thanks to you all for your help.
02/21/2007 (4:58 pm)
Thanks for the help. I finally figured out that the image I was using was not a palletize image. Once I lowered the images to a 256 pallet everything worked just great.Once again, thanks to you all for your help.
#9
02/21/2007 (10:38 pm)
Glad you got it working but your PNG files don't have to be at 256 colors for this to work.
#10
I started out with Paint Shop Pro 9 (I'm now at version X), it's a great program. I don't know if it's already been mentioned, but when you start out with a new project, are you making sure that Transparent is checked (below the color box)? I believe you've got to be on either RGB 8bit, or RGB 16bit for it though. Not sure if that's a help or not (only helpful for new projects).
@ Ben; another route would be File>Export>PNG Optimizer. Although I've always had problems with getting rid of some artifacting on the edges; usually I attempt to match the background color I'm going to be placing the sprite on (this deals mostly with building web pages, and may be a browser problem only).
I may be moving to Photoshop one of these days (when I can fork out the cash for it), but PSP can do most of what PS can do. I found a nice little (free) application that will convert Photoshop brushes (such as the free grunge brush sets that are scattered about the internet) for use in Paint Shop Pro, if anyone's interested in the link.
-Keith
02/22/2007 (6:35 am)
Hey James,I started out with Paint Shop Pro 9 (I'm now at version X), it's a great program. I don't know if it's already been mentioned, but when you start out with a new project, are you making sure that Transparent is checked (below the color box)? I believe you've got to be on either RGB 8bit, or RGB 16bit for it though. Not sure if that's a help or not (only helpful for new projects).
@ Ben; another route would be File>Export>PNG Optimizer. Although I've always had problems with getting rid of some artifacting on the edges; usually I attempt to match the background color I'm going to be placing the sprite on (this deals mostly with building web pages, and may be a browser problem only).
I may be moving to Photoshop one of these days (when I can fork out the cash for it), but PSP can do most of what PS can do. I found a nice little (free) application that will convert Photoshop brushes (such as the free grunge brush sets that are scattered about the internet) for use in Paint Shop Pro, if anyone's interested in the link.
-Keith
Torque Owner Ben R Vesco