Plan for Simon Windmill
by Simon Windmill · 04/12/2002 (8:21 am) · 5 comments
After becoming frustrated with Photoshop's seeming inability to save PNGs with transparency, I decided I wanted to use Targa images with Torque. Before I wrote a single line of code I discovered the (IMO) unintuitive steps you have to follow to get a transparent PNG out of PS6, but by that time my mind was made up. Besides, I'm used to creating separate alpha channels in PS for Targas and TIFFs and such, rather than having to rely on layer transparency as you have to with PNGs in PS6. The other benefit is that I don't get the "Error downloading texture" issue with Milkshape with 32-bit TGA files that I almost always get with 32-bit PNGs.
After a bit of coding (and some wasted time rewriting code to flip the image horizontally before realizing the UV coords were reversed for the shape.. d0h) I got my Targa-textured shape into the test map, hoorah! But solid, not using the alpha channel.
A bit of digging in the MS exporter code turned up how to enable the Translucent flag (set the MS material to less than 0.75 transparent) but I noticed that it also always enables the Additive flag. This isn't always the behaviour I want (probably isn't 90% of the time, actually), so I modified the exporter to not set the Additive flag for the shapes it spits out.
After a bit of coding (and some wasted time rewriting code to flip the image horizontally before realizing the UV coords were reversed for the shape.. d0h) I got my Targa-textured shape into the test map, hoorah! But solid, not using the alpha channel.
A bit of digging in the MS exporter code turned up how to enable the Translucent flag (set the MS material to less than 0.75 transparent) but I noticed that it also always enables the Additive flag. This isn't always the behaviour I want (probably isn't 90% of the time, actually), so I modified the exporter to not set the Additive flag for the shapes it spits out.
#2
04/12/2002 (10:26 am)
You should be able to save your PNG's with transparency with Paint Shop Pro. Otherwise you can transfer the PNG export plugin from it to Photoshop...that should do it...
#3
04/12/2002 (10:54 am)
To get transparent PNG's in PS6 all you need to do is "Save for Web" and choose PNG...
#4
04/12/2002 (1:06 pm)
I had problems with PNGs and PS6. It would never save the alpha channel. You have to use masks to make things transparent.
#5
04/13/2002 (8:31 am)
Wasn't there a patch for png's for painshop 5/6? 
Associate Ken Finney
Tubetti World