Modeling Trees with Alpha
by Jeff Trier · in Artist Corner · 12/05/2001 (12:24 pm) · 8 replies
Hi all, I am working on a tree model and I am having problems using the Alpha Channeling.
I am using Photoshop 5.5, but I *do* have the replacment png plug-in file that is supposed to correct the already inherant PNG Alpha problems in PS 5.5+
I am a little unclear as to the steps I should be taking to make this work. I have searched through the forums and havent found too much in the way of instruction.
What I have done is this:
1) Created a photoshop file with 2 layers.
-Layer 1 for the image with a transparent background
-Layer 0 blank (not white, but clear)
2) Then I clicked on the channels tab and created an Alpha.
3) Exported as PNG.
4) Applied it to my Milkshape model
Result:
When I load the model I made into the Torque editor, my image is fine, but instead of it having layer 0 be see-through, its a light blue.
Any help would be great. Thanks!
-Jeff
I am using Photoshop 5.5, but I *do* have the replacment png plug-in file that is supposed to correct the already inherant PNG Alpha problems in PS 5.5+
I am a little unclear as to the steps I should be taking to make this work. I have searched through the forums and havent found too much in the way of instruction.
What I have done is this:
1) Created a photoshop file with 2 layers.
-Layer 1 for the image with a transparent background
-Layer 0 blank (not white, but clear)
2) Then I clicked on the channels tab and created an Alpha.
3) Exported as PNG.
4) Applied it to my Milkshape model
Result:
When I load the model I made into the Torque editor, my image is fine, but instead of it having layer 0 be see-through, its a light blue.
Any help would be great. Thanks!
-Jeff
About the author
Originally a Classical/Metal musician, I've always been attracted to anything involving computers, including: Networking, PC Building and Repair, software design and coding. I've been involved with game design and development for over 10 years.
#2
"When you create a PNG-24 image, you can preserve variable transparency, such as that in an anti-aliased image on a transparent layer, using a feature called alpha transparency. Alpha transparency preserves up to 256 levels of transparency in a PNG image. When the PNG is displayed in a browser using a plug-in that supports alpha transparency, the PNG displays multilevel transparency, and the image’s edges will blend with any Web background."
The process is somewhat different than using background transparency. Which is what I think many people are trying to get. Background transparency is when the area around a texture is masked so that objects beneath or behind it can be clearly seen. An example would be seeing through a chain link fence.
Alpha transparency is used to "cloud" the view and allows you see see through the object to an object beneath or behind it. An example of this would be fog or Tim's health monitor in the current version of the software. You can see through the object to an object behind it.
However according to the documentation provided in Photoshop PNG-24 supports both background transparency and alpha transparency. Perhaps the engine does not support PNG-24 but some earlier version of PNG? I do see that in Tribes 2 some textures were tga and others were jpg. I suppose that the reason was that tga supports alpha transparency and jpg does not - and tga files are considerably larger than jpg so unless you need alpha transparency you should avoid it.
Could someone with more of a computer art background elaborate on this a bit more? Perhaps the differences between alpha channels in 24 and 32 bit mode? Is it the case that tga is 32 bit mode with 8 bits specifically for alpha?
12/05/2001 (2:03 pm)
I'm afraid this isn't correct. PNG files do support Alpha - to quote directly from the Photoshop help files..."When you create a PNG-24 image, you can preserve variable transparency, such as that in an anti-aliased image on a transparent layer, using a feature called alpha transparency. Alpha transparency preserves up to 256 levels of transparency in a PNG image. When the PNG is displayed in a browser using a plug-in that supports alpha transparency, the PNG displays multilevel transparency, and the image’s edges will blend with any Web background."
The process is somewhat different than using background transparency. Which is what I think many people are trying to get. Background transparency is when the area around a texture is masked so that objects beneath or behind it can be clearly seen. An example would be seeing through a chain link fence.
Alpha transparency is used to "cloud" the view and allows you see see through the object to an object beneath or behind it. An example of this would be fog or Tim's health monitor in the current version of the software. You can see through the object to an object behind it.
However according to the documentation provided in Photoshop PNG-24 supports both background transparency and alpha transparency. Perhaps the engine does not support PNG-24 but some earlier version of PNG? I do see that in Tribes 2 some textures were tga and others were jpg. I suppose that the reason was that tga supports alpha transparency and jpg does not - and tga files are considerably larger than jpg so unless you need alpha transparency you should avoid it.
Could someone with more of a computer art background elaborate on this a bit more? Perhaps the differences between alpha channels in 24 and 32 bit mode? Is it the case that tga is 32 bit mode with 8 bits specifically for alpha?
#3
The cheif reason why Targa files are larger than JPEG files is the fact that Targa files are uncompressed data and can store the alpha channel if necessary.
Logan
12/05/2001 (2:27 pm)
Typically all of the images that we see and use on the computer are comprised of 3 8-bit color channels (Red, Green, and Blue), when these three channels are combined together we get over 16 million possible colors. This is a 24-bit texture file. Some file formats include support for a 4th 8-bit channel, the alpha channel, this gives us a 32-bit texture.The cheif reason why Targa files are larger than JPEG files is the fact that Targa files are uncompressed data and can store the alpha channel if necessary.
Logan
#4
Thanks for the other info though, it was very interesting. :)
-Jeff
12/05/2001 (3:14 pm)
Have either of you successfully made a PNG with Alpha transparency using Photoshop 5.5? I would greatly appreciate instructions on how to achieve this.Thanks for the other info though, it was very interesting. :)
-Jeff
#5
1) Make a new bitmap
2) Make a new layer, keeping the first one emtpy
3) Paint you tree/bush/whateven on the top layer
4) Add more layers if need and paint them
5) Merge all teh layers, execpt the first emtpy one
6) Hold down ctrl while selecting the top layer (with your tree/bush/whatever)
7) Now you got a selection of whatever you painted
8) Goto channels and click "Save selection as channel" at the bottom
9) This will make a new alpha channel with your tree/bush/whatever in black/white
10) Goto Layers and flatten image
11) Save as PNG
12) Go use in other programs
13) Buy me a beer
// Clocks out
www.flashthunder.com
12/05/2001 (3:37 pm)
Yes I have, many times even :)1) Make a new bitmap
2) Make a new layer, keeping the first one emtpy
3) Paint you tree/bush/whateven on the top layer
4) Add more layers if need and paint them
5) Merge all teh layers, execpt the first emtpy one
6) Hold down ctrl while selecting the top layer (with your tree/bush/whatever)
7) Now you got a selection of whatever you painted
8) Goto channels and click "Save selection as channel" at the bottom
9) This will make a new alpha channel with your tree/bush/whatever in black/white
10) Goto Layers and flatten image
11) Save as PNG
12) Go use in other programs
13) Buy me a beer
// Clocks out
www.flashthunder.com
#6
/passes over a virtual beer
-Jeff
12/05/2001 (4:05 pm)
Thanks a ton, I will try it when I get home! :)/passes over a virtual beer
-Jeff
#7
So in a nutshell, does anybody anticipate I'll have problems when I start trying to export these models?
Thanks -jw
05/16/2003 (10:23 am)
Hey all, I don't know if this thread is still active, but I have a general question relating to the discussion. I have already done my models in max using opacity maps. To be clear, I load in a diffuse JPEG, and on a different channel I load an opacity map which is the black and white version of the image for knockout. It looks great in max, perfect transparency. I thus far have had no problems exporting JPEG textured models to Torque. So in a nutshell, does anybody anticipate I'll have problems when I start trying to export these models?
Thanks -jw
#8
Matt
05/16/2003 (7:56 pm)
Yep. You need to convert your jpegs to pngs and designate the alpha channel transperancy. Stencils don't work in TGE. There is a way to use the alpha for transparency in MAX but it eludes me at the moment.Matt
Jeroen Makkinje
Save it as a TGA file & you're fine.