RetouchPRO

Go Back   RetouchPRO > Technique > Photo Restoration
Register Blogs FAQ Site Nav Search Today's Posts Mark Forums Read


Photo Restoration Repairing damaged photos

Help with .tga file and alpha channel

Reply
 
Thread Tools
  #1  
Old 09-01-2005, 12:10 AM
Nanls's Avatar
Nanls Nanls is offline
Senior Member
 
Join Date: May 2005
Location: REDONDO BEACH, Ca
Posts: 567
Help with .tga file and alpha channel

I am trying to recreate an effect in a targa file, using an alpha channel to mask. I don't have access to the designer or PS files to figure this out and I am stumped. Here are the steps I am taking. In my layer I make a selection then use the Channels tab and 'Load selection as channel'. I then select it and inverse and use the gradient tool. This accomplishes matching the alpha channel of the image I am trying to duplicate the effect in the targa file and the alpha channels look very similar, however, when I go back to the layers with the RGB and alpha channels all turned on, the images look different. In his there is a large section of red, where it is masked... I don't know how this happens when I don't see it in the alpha channel. I'm hoping somebody understands .tga files and what I need to do to get the same effects to use as a mask.
thanks in advance,
Nancy
Attached Images
File Type: jpg targa_why.jpg (68.3 KB, 23 views)
Reply With Quote top
  #2  
Old 09-01-2005, 12:24 AM
Craig Walters's Avatar
Craig Walters Craig Walters is offline
Senior Member
 
Join Date: Apr 2005
Location: somewhere over there
Posts: 8,786
Blog Entries: 4
Quote:
I am trying to recreate an effect in a targa file
hi nancy,

what's the effect you're trying to create? what's the end result you're looking for here? also, i'm having trouble following what you're doing here.

Quote:
In my layer
in what layer?
Quote:
I make a selection
a selection of what?

a targe file, or .tga, is a composite. it's made up of two or more images all placed within one image. programmers use targas in things like games and other applications. in games they are quite often used for animating sprites. all the various parts of say, a person, are put in the targa individually and then the various parts are called up as needed all from the one file. so, you might have a person's head and torso as one image, his left arm, right arm, legs in one position, legs in another and so on. it's basic advantage is speed. since you're always referencing the same file, you never have to change your path or load new reference images into ram. so, it saves time and memory.

Craig
Reply With Quote top
  #3  
Old 09-01-2005, 12:50 AM
Nanls's Avatar
Nanls Nanls is offline
Senior Member
 
Join Date: May 2005
Location: REDONDO BEACH, Ca
Posts: 567
answer

In Photoshop, the layer that I am going to save as a targa file with an alpha channel mask.
Sorry for the weak explanation.The file is for a photographer who has a green screen camera and program. The background image is saved as a jpg file and the forward image which mostly is a title and screen credits (the credits are on a black background) is saved as a targa file. His subject is photographed and then the photographer loads all three images into his program which sandwiches the subject between the back .jpg and the front .tga file. The targa files needs and alpha channel for the mask that allows the subjuct to fade into the credits.
Make more sense I hope?
Nanyc
Reply With Quote top
  #4  
Old 09-01-2005, 05:56 AM
screenfx screenfx is offline
Junior Member
 
Join Date: Aug 2005
Location: Burnlington NC
Posts: 24
I don't really understand the question, but I can tell you that I use targa files in my job and they are not handled any differently than any other 24 bit file format.

So it might help in this conversation to eliminate the targa issue from the equation. I don't think the fact that it's a targa has anything to do with the problem.
Reply With Quote top
  #5  
Old 09-01-2005, 12:01 PM
Nanls's Avatar
Nanls Nanls is offline
Senior Member
 
Join Date: May 2005
Location: REDONDO BEACH, Ca
Posts: 567
Help tga help needed

I already thought about that, unfortunetly the software the photographer uses requires a taga file for the process. This is hard to explain, however if you look at the new file I sent, it is easier. The first .jpg file (far left) will be used by the software as the background file. The second image, (movie credits),saved as a tga. file, isused by the software as the front image. The third images (some randon actress) is used by the software as the middle image. The software merges these files together. The alpha channel, created in the taga file, is used to mask the actress, so she will fade behind the credits. Now if you compare the alpha mask done for this file and the second alpha mask, that I did for my file, they look relatively alike, however, when you look at the two files from layers view with all channels on, (rgb and alpha) so you can see the outcome of the mask, you can see the difference in the files. My question is this... where is the difference and what step is he taking to get the file this way? ARGGG... this is soooo frustrating...
Thanks again, any help is appreciated.
Nancy
Attached Images
File Type: jpg tga_example.jpg (88.1 KB, 13 views)
Reply With Quote top
  #6  
Old 09-01-2005, 12:52 PM
creeduk's Avatar
creeduk creeduk is offline
Senior Member
 
Join Date: Feb 2005
Posts: 297
what software is the photographer using? If you are trying to rectreate something in PS then the fact it is a traga file does not matter just as screenfx stated. Maybe by knowing the software we might understand better what you are trying to achieve.
Reply With Quote top
  #7  
Old 09-01-2005, 01:40 PM
Craig Walters's Avatar
Craig Walters Craig Walters is offline
Senior Member
 
Join Date: Apr 2005
Location: somewhere over there
Posts: 8,786
Blog Entries: 4
hi nancy,

ok, first a correction on my part. i think i was thinking of .lbm files, not .tga's. totally different beast. so, my mistake.

second, if i remember correctly, targa files save the alpha channel as part of the file, which is probably why your photographer is using them.

the alpha channel is being used as a mask, or to apply a mask. and it looks like it's set up in your example as a part hide all mask and part show all, possibly with a gradient between the two to get the fading effect.

to understand what's going on you have to understand masks and alpha channels a bit. a mask, any mask is always in grayscale, meaning totally black to totally white in steps comprising 256 gradations. a mask when applied to a layer is like a transparency within that layer. this 'transparency' can be completely opaque (totally black) or completely transparent (totally white), or any step in grays inbetween. the blacker it is, the more opaque it is. the whiter it is, the more transparent it is. thus, a 'hide all' mask is completely black and a 'show all' mask is completely white.

this mask can be altered also. you can change any of the shades of gray to lighter or darker.

the alpha channel is just a fancy way of saying 'some dedicated space in memory that holds information for a specific purpose'. in your examples the purpose is to hold information about a mask. the alpha channel is NOT the mask. but the alpha channel can hold the information that can be used as the mask.

when you apply the alpha channel holding the mask data, it then becomes the mask. in your case you could either mask the 2nd image (the model) or the top image (the credits). depending on which one you masked, you'd use the information in the alpha channel to create either a show all or a hide all, primarily. i say primarily because it appears as if you are using a combination of a hide all and a show all with gradations of grays to get the gradual fading effect.

ok, i looked at your attachment again. it appears that the mask is being applied to the top layer, the one with the credits. it's primarily using a hide all mask. that means the mask is mostly black. remember, the mask isnt the image of the credits; it's just an overlay ON the credits image. this overlay when black HIDES the information on that layer. when it's white, it lets the information show through. and when it's some shade of gray it lets it partially show through depending on the shade of the gray. so, with the top part of the mask as black, it hides the information on the top part of the credits layer and lets the model show through. as it goes gray and lighter and lighter towards white, it allows more and more of the credits layer shine through thus masking more and more of the model layer. remember, the credits layer is on TOP of the model, so it has precedence in what you actually see as the final combined image.

let's simplify this a bit now. you have three images you're trying to combine into one. think of these three as pieces of paper stacked on top of each other. and let's say you have all the images in one photoshop file, so, you have 1 image on each layer of the file. now, think of the mask as an adjustable transparency ON THE SAME LAYER as your credits layer. you can adjust the overall opacity of the mask or any part of it separately. that means every pixel of the mask can be adjusted for opacity by simply making that pixel, into any one of 256 shades of black/gray/white. and, because that mask ONLY applies to that layer, the shade of the pixels on the mask will either hide to some degree or show to some degree, the image that is also on THAT layer. thus, with the credits layer, some parts of that image will show through to the overall combined effect and some will not and some will partially show through.

the same also applies if the model is being masked to allow the background to show through. so, you might have another mask on the model layer, but the same rules apply.

if you already know all of this, then i'm not really sure what the problem is. so, i hope this helps.

Craig
Reply With Quote top
  #8  
Old 09-01-2005, 02:03 PM
Nanls's Avatar
Nanls Nanls is offline
Senior Member
 
Join Date: May 2005
Location: REDONDO BEACH, Ca
Posts: 567
Yes, I do already know this, but thanks for the very good explanation. I guess what I am trying to figure out is that if I am using the apha channel to hold the mask information, and it looks similar to the original, that I am trying to use as a guide, than why, why, why, when you look at the two files, with all channels turned on, including the alpha chanel, do they look so different, or in other words, why do the representations of the mask lookd so different, when the alpha channels look so much alike!

Can you see the difference I am talking about?

Thanks again,
Nancy
Reply With Quote top
  #9  
Old 09-01-2005, 07:47 PM
Racc Iria's Avatar
Racc Iria Racc Iria is offline
Senior Member
 
Join Date: Apr 2005
Location: Rockville, MD USA
Posts: 252
I recreated your problem with a little experiment. I use .tga and alpha channels all the time.

I don't think there's anything wrong with your alpha channel. I think you are just confusing yourself by displaying the RGB and the alpha channel at the same time.

When you do that, that alpha channel(s) are displayed as semi-transparent red over the RGB image. This does NOT represent what the mask is going to do! It just shows you where there IS a mask in your image. What you are seeing is the semi-transparent red "overlay" being affected by the black box (which does have a sharp edge) in the image. What you need to look at is the alpha channel by itself. When you do, there is no sharp edged box, just a smooth gradient. When that .tga file is read by your software that sharp edged black box will fade out softly over the image beneath it just as the alpha channel indicates it will.

If you really want to see how the alpha channel is going to mask the image, then make a copy of the target layer and turn all other layers off (if any). In the channels palette, Control+click the alpha channel thumbnail to load the selection. Go back to the RGB image, highligt the copied layer while the selection is still active and click the ADD LAYER MASK BUTTON at the bottom of the layers palette. If you did this correctly, the alpha channel will be applied as a layer mask thus showing how it will affect the transparency of the image. If you have multiple layers, then copy them and put them in a layer Group/Set and apply the layer mask to that.

I hope this clears up your confusion.

--Racc
Reply With Quote top
  #10  
Old 09-02-2005, 06:30 PM
Nanls's Avatar
Nanls Nanls is offline
Senior Member
 
Join Date: May 2005
Location: REDONDO BEACH, Ca
Posts: 567
thanks

Yes, thanks. It helps to see how the mask held in the alpha channel will affect the layer... that helps a lot and much easier to re-create the effect... I'm still not sure why the files with the alpha channel turned on, look so different.... but I'll just chalk it up to another mystery of the universe lol
Reply With Quote top
Reply

  RetouchPRO > Technique > Photo Restoration


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Resizing images for RetouchPRO jeaniesa Photo Retouching 19 11-05-2016 09:28 PM
Liquifying RGb and Alpha Channel sgranlund Photo Retouching 5 10-01-2007 12:57 PM
Snowboard Picture/ Selecting Snow tos5 Photo Compositing 7 01-06-2006 05:51 AM
Creating Alpha Layers and Saving Selections JGeddes Photo Compositing 3 08-15-2005 09:03 PM
[Definition] Alpha Channel Doug Nelson Photo Retouching 4 08-08-2005 09:37 AM


All times are GMT -6. The time now is 08:13 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
Copyright © 2016 Doug Nelson. All Rights Reserved