Help - Search - Members - Calendar
Full Version: Decaling question
Hash, Inc. Forums > Technical Direction and Development (Learning Animation:Master) > A:M Rendering, Compositing and Special Effects > Materials Laboratory
Chad_Hunt
Is anyone have an idea why key color for jpegs and alpha chanels for targas are not working? I am in v13j I have tried both with mt texture and I still get the black or white around the edges of my texture.
Chad_Hunt
So nobody can help here.......
rusty
QUOTE(Chad_Hunt @ Oct 6 2006, 04:58 PM) *

Is anyone have an idea why key color for jpegs and alpha chanels for targas are not working? I am in v13j I have tried both with mt texture and I still get the black or white around the edges of my texture.


just tested this in V13.0j by doing this:
1. importing a 32bit tga file with alpha and another file
2. creating two layers with above image files
3. placed both in chor

[attachmentid=21263]

All worked as advertised. Attached is the tga file with alpha I used so you can try it if you wish. You said that the key color didn't work -- no key color is offered when an alpha channel is present. I noticed you said 'around the edges'; this happens with key colors when the color around the edges is slightly off.

Here is tga alpha channel image I used.
[attachmentid=21264]

Hope this helps!
Rusty
Chad_Hunt
Thanks rusty, ya the key color sucks when it comes to blured edges. For some reason my alpha just does not have clean edges as well. I did here something like illistrator prduces better images with alpha than photoshop. ever heard that?

I guess I will keep trying, it's just probably my headspace and timing. They always seem to be off smile.gif
rusty
Dear Chad,

Illustrator is vector based which will always have sharp edges while Photoshop is raster based which means that it can and in fact will usually have blurred or feathered edges do to anti aliasing if nothing else so… yes Illustrator would as a general rule produce sharper edge alpha channels. If you make a selection in PS based on color, chances are that the edges will be a little blurred. The selection’s edges may look sharp but you can not tell by looking at them. In PS you might do selection->Feather and make sure this is set to 1.

Create an alpha channel in PS by selecting a color in some image and then doing Selection->Save and name it alpha. Now <control>click (selects all the pixels on a layer or channel) on the alpha channel in the channel pallet then, select the image in the layer pallet (assumes you have all of the image on one layer) keeping the selection alive then do <ctl>J (this copies what you have selected to a new layer). At this point your selection should be gone (nothing outlined by a blinking dotted line). Now hide the layers below this new layer so that only the new layer is visible. Create a new layer below this layer and select it. Now select a color that will contrast well with the selection (show its edges well) and do <Alt><Backspace> (fill the current empty layer/selection with the foreground color). Now you will see how sharp your alpha channel edges are (i.e. how sharp the edges of your original selection were).

By contrast select an area using one of the lasso tools instead of doing it by color and repeat the above steps. This edge will always be sharp.

I always use PS for creating alpha channels but you need to know that edges can be blurred (AKA feathered). I rarely have problems with this really.

As for key color, it works perfectly as long as the color is exactly set to key color. If the color varies by just one point on the RGB scale from the selected key color then it is no longer the key color and will not be transparent. This situation occurs in same manner as the edge of the alpha channel discussed above.

PS alpha channels 101 LOL. I Hope this helps,
Rusty
Chad_Hunt
Thanks man, it helps alot!
zandoriastudios
.jpeg uses an image compression that will alias what you intend to be a hard edge in an image. Since KEY COLOR is an exact RGB number, you will get a halo for the pixels that aren't exactly the key color.

Use .tga or .png

Even then, you need to insure that the alpha channel is only of the pixels that you want to see...
For example, lets suppose you have some text that is red, which you want to decal onto a model. But the red text was drawn on a white background.
If you make an alpha channel based on selecting the text, you will end up with a white halo (because of the tolerance of your selection)...
But if you make the alpha channel for the text, then fill the whole image with red, your alpha channel will clip the text out of the red background giving you no halo.

Hope that clears it up a little smile.gif
Chad_Hunt
[attachmentid=21388]it is helping some where I am having a problem is with images like this one. this is not a clean picture this is a test one just to see if I can get anything to work, I think this was my key color test.
zandoriastudios
well, you can see that there is no way to key out the white in an image like that, except by "choking" the selection.

In Photoshop, select the white with the magic wand, with a high tolerance like 50. Invert the selection. Then shrink the selection by 10-20 pixels. save that selection as an alpha channel. then save as a .tga
John Bigboote
QUOTE(zandoriastudios @ Oct 13 2006, 06:39 PM) *

well, you can see that there is no way to key out the white in an image like that, except by "choking" the selection.

In Photoshop, select the white with the magic wand, with a high tolerance like 50. Invert the selection. Then shrink the selection by 10-20 pixels. save that selection as an alpha channel. then save as a .tga



Here's a 'nuther way...dare I say 'better'. Don't use the magic wand! That image pretty much is ready to go as an alpha...in PS select ALL/COPY...make a new channel...PASTE that image into the alpha channel...it will lose any color info...then adjust levels or brightness/contrast on the alpha channel till your blacks are zero and your whites have nice gradients...also invert if necessary (cntrl-I) save as 32-bit targa file
Chad_Hunt
Awesome! thanks! I am going to have to try that right now!

Chad
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.