Creating and Using Alpha Channels - TGA/Targa Image Creation (Adobe Photoshop)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello and welcome to another controlled elite tutorials today we're going to be focusing on creating alpha channels and how to use them and what they can be used for as far as transparency texturing materials and things of that nature for 3d applications and also for just creating them and what we're going to be doing is using Photoshop and 3d studio max I'll be creating the material in Photoshop and then I will be bringing it into 3d studio max and showing you how to set that up so first I want to talk a little bit about images so right now just to show this and how I'm going to do this I've just simply found a picture that I might want to use and remove the background and creating this alpha Channel and then I'm going to take this bring it into Photoshop remove the background so we'll just get started with that so first I had just done a simple search for the word tree branch and found this image now it is a little bit grainy but that's going to be fine for what we're doing so I'm going to save this image and I'll just save it into an area for this tutorial for in 3d studio max so let us call this tree branch alpha demo and I'll just keep the name as is for now now right now this image is a JPEG one thing about these type of images is that they've only got three map channels or three colour channels so I'm going to open this up Hey look weeping angels I'm doing a project right now with that but um anyway documents 3dsmax scenes tree branch demo and there's my tree branch now right now in photoshop we see that this has a variety of colors white Pink's kind of Gray's Browns blue if I come over to the channels tab here in Photoshop what I can see is I have a red channel and if I select that what I'm seeing is not red but I'm seeing a black and white image now what this means is if we look at the colors that we have to choose from under red we've got the ability to have a number from 0 to 255 and let me come back up here to my cues so if I bring this up the red and I come all the way down to white I can see that everything is set at 255 my red my green and my blue if I take this and a drag just the red up my red is at 255 and my other two are at 0 which means there's no green there's no blue so if I was to type in 255 here I now get yellow and I know that red and green don't make yellow but we're talking about additive color which works differently than pigment color but we have basically a number value here if I set all of these to 0 we see we get black zero is the absence of color 255 is the full spectrum of the color that we deal with with regards to our GB values so what that means is if we look at the image an area here that is black it's represented in number value somewhere around zero whereas this white area would be 255 so if there are any areas that are red they're going to be showing up basically there's going to be they're going to be lighter here in our image and we can see that there's some pink along and some red in there so that makes sense and we have our other different colors there so this is known as 24-bit color we have eight eight and eight bits per color channel so a 32-bit image is made up of red green blue and one extra channel which is called the Alpha Channel alpha is just basically used for transparency that's that's what we're going to be using it for so what I want to do is I want to make it so the background here which is just the sky in this image that's why I have chosen this is going to be removed from this image so I'm going to come back to my layers and I'm going to come to my color one I don't know what is this thing called color selection tool or magic wand tool that's it so this just allows me to select a lot of the similar type of colors that are here right now my tolerance is set really low I'm going to set it on 32 that gets me a lot closer to a 1 and I'm going to turn off contiguous so it should also select the other areas that are of a similar color value and I've got a little piece of branches that I don't want so I'm just going to select that out of there so I'm going to hit ctrl shift I which is going to select the invert so it's going to invert my selection so I'm not selecting the blue I'm going to hit ctrl J which is going to duplicate what is selected so now if I turn this layer off I see I've got this checker pattern in the background this is the this is photoshop's way of letting you know that there's nothing here it's transparent okay so if i zoom in and kind of see that i have this little bit of a halo around my image i got this kind of dark blue color so what I'm going to do is actually select this transparent area select invert again and I'm going to go to select modify and contract and I'm going to contract my selection now if I had to guess maybe about 4 pixels in okay and I'm going to hit ctrl J or actually control shift I to invert selection again and I'm going to hit delete to delete everything else that's in my image okay so now I don't have that halo anymore and that's kind of nice so I'm going to hit control D there to deselect so I'm going to take my background layer here and I'm going to simply remove that and I'm going to create a new layer underneath here let's call this background again this is currently going to be put on top I'm just going to bring that down below and I'm going to fill this with just black for now and actually what I'm going to do is rename this black and immediate control J which is going to duplicate this layer I'm going to rename this to white and I'll explain why I'm doing this in a moment I'm just going to make that layer and I'm doing this to show something it doesn't mean that you necessarily have to do this I just want to show you some things which will make more sense in a moment so currently what I have if I go back to the just the black being visible in the background here I can't create my alpha channel this way but what I can do is if I select my layer here I'm just going to name this branch just so I have things named here like to stay organized that way and I want to create an alpha Channel the way I can do this simply is by going to select load selection and it's automatically going to do it based on the layer I have selected which is this one and it's going to select based on the transparency so I'm going to say okay so right now it selects everything that is currently transparent now what I'm going to do is go to or sorry it's going to select what is not transparent I'm going to say save selection I'm not going to type anything in here I just want to make a new channel and I'm going to say okay now if I come back to the channels I'm going to see that I've got red green blue and alpha and if I select the alpha Channel what I see is black and white information now from before what I talked about in regards to these colors five black that means the absence of red or green or blue and if I had white that would mean the presence of red green or blue and this and this in this way we have the Alpha Channel and the Alpha Channel is reading that black would be transparent and white would be opaque and we can have different levels of transparency here too where we have it you know any level of gray would be different levels of transparency depending on how close they are to white or black so that's what I have if I'm in my RGB channel here I can turn on the visibility here and it's going to show red in this case it's just showing me that anything that shows up red is going to be 100% transparent while that's on so I'm just going to turn that back off so I now have my transparency that I want which is good the other thing I'm going to do is I'm going to kind of crop this image because there's a lot of dead space here so what I'm going to do is since this is currently selected I'm going to go to its anoint image and crop and I'm just going to crop this image just like this I'm going to ctrl D to deselect that so the next point that I want to make is based on the transparency that I have if I have any part here that is semi-transparent which is usually going to be the anti aliased edge that I have here anti-aliased means that the image that I have here is trying to blend into what's back here around these edges so if I switch this to white I can see that these edges now lighten up if I turn that off my edges get dark this is going to be very important when I'm very sure how this works so what I'm going to do is I'm going to say about the Photoshop file just so I have it and I'll leave it with the black background here so I'm going to do save as and I'll save that here I'll keep the same name as the original image that I had just so consistent with that and I'll just save that so now I'm going to save as I'm going to save this one is a Targa file and the targa file is what I'm going to use this is a file type that's used in a lot of game engines so it's very handy to get used to using this you can use PNG it does save transparency but this one actually saves the channel which makes it a it makes the photo itself a little larger than a PNG but it also is better quality than the PNG is going to be so I'm going to save that as Targa but I'm going to name this is underscore black and I will save that I want to make sure it's a 32 bit per pixel image which means it has RGB and 8 all 8-bit channels 8 times 432 so I know that that's correct so I'll hit OK and now I'm going to save another one with the white I'm going to go to file save as Targa and this one is going to instead of being black it's going to be white and I'll save that okay so now I'm going to come into 3d studio Max and I'm going to create a plane and just kind of drag this out I want to see what the well this is fine I'm just going to drag this out the way it is you got to go into perspective here going to move this up and rotate it I'm going to get rid of the grid just so we can see this you turn on my snap there alright so right now you may see the plane have another side to it it'll have the back face showing I by default have it so when I create objects the back face is gone polygons are only one sided and the other side is called a back face and that means that this side does not render this side does so if you want to make your image or your plane look just like mine you can select it right click go to object properties and say backface cull which means do not draw the back face but mine's already checked okay so I've got my plane here so I'm going to do is open the material editor the shortcut for that is M and that will open up the editor I'm just going to maximize this so I'm not going to have a very in-depth discussion on what the material editor is or anything like that and how to use the interface this is going to be a simple thing for just showing how to apply the image to a material and apply that material to the the plane that I have so I'm going to go to standard I'm going to drag that out and this is going to give me my standard material I'm going to double click this to activate it on the side here and at the top I've got a bunch of icons one of them is going to say show shaded material in the viewport I want to make sure to have that turned on I'll know that it's turned on because my shader or my material will now have a diagnose ection to it here so diffuse is our main color slot for our materials so I need to drag an image into here so to do that I need a image map which would be a bitmap even though our file is not a BMP file it is a bitmap image and I'm going to search for that so that was in my documents 3ds max scenes hey when you can't read things from there in front of you so I'm going to bring in the black image first I'm going to open that up now with that select and hold shift and drag I'm going to click and drag and create a second bitmap this one I'm going to grab the white image and the reason I'm doing that is so I can quickly show the difference between the two of these so I'm going to take this node and drag click and drag it to diffuse there's a little preview box you can open up here so I'm just going to do actually if you double click that I'll show it so I need to set up this this image to have the Alpha Channel here so I'm going to move this out of the way for just moment and right now this is going into the diffuse I'm going to set my alpha source to none opaque I'm just going to make the should make the black area there pop-up I'm not sure what it's not updating but but I want that part to be opaque actually I had that one selected that's why I did an update so I'm going to double click that to activate it and say none okay there's why there's the black showing up and this one's already going to be set up for that great so I'm going to duplicate this again but this one's going to be used for my opacity now right now if I just use it you can see that let me make this two-sided here just so we can see it all the way around it's going to make everything semi-transparent so what I need to do is double click this one and tell it to use the image alpha and the alpha here ok so now we can see this a lot better ok so now we can going to kind of move this off to the side here and just pan over by middle mouse clicking I'm going to drag this node onto my plane when I do that we can see our image shows up there and if we look on the other side we don't see anything alright so now I'm going to render this out but I'm going to render it out on a white background so I'm going to go to my render setup just here actually sorry I'm going to go to my render environment and my color here for my background and if set to white I'm gonna say okay close that and I know I can just close that I can use this render make this larger here so we can see and when I render it it's kind of difficult to notice and this isn't actually too bad of an example but I'm getting a black edge around here if i zoom in more I'm part of this it will get blurry but and you're not actually making it out too bad so this isn't doing it too bad based on the anti-aliasing but to give you an example of what is going on or what will go on at times is I'm going to take my alpha Channel and I'm going to have that selected I'm just going to blur this ever so slightly to make that more noticeable so I'm going to go to filter blur Gaussian blur and I'll need to do it quite that much just go four pixels and I'll come back here and I'm going to resave both of these so this will be my white and then I'll turn on the turn off the white and save this over top of the black Targa file okay the nice thing about working in Photoshop in 3d suits to do Max's as soon as I render again my image is already updated so now I'm seeing this since the Alpha Channel has been blurred now I'm seeing this dark outline kind of this halo around it which is not ideal um so I'm going to come back here maximize this and I'm going to disconnect so I'm just selecting this and hitting delete let's move these out of the way and I'm now going to use the white one instead so I'm going to put this in the diffuse I want to make sure that that's set up for none opaque I'm going to duplicate that by holding shift and dragging clicking and dragging that this one will be set up to alpha and image alpha and I'll drag that down into the opacity and that one's now set up so I'm going to take that and I'm going to click and drag this on here now when I render this I don't see the halo but that's because I'm on a white background let's say that I'm on now a different color background so I'm going to go to rendering environment and I'm going to put this on a black background and I'm going to render that and in this case I'm also seeing a halo so this is why the color that we have behind our actual image even if I turn off the transparency whenever I say this is the target it's basically going to say this checker pattern is being white so I have some control over what the color is going to be for bleeding for the bleed around here so what I can do is I'm going to duplicate my branch and I'm going to use this copy and just turn this off for a second and I'm going to blur the color around this so I'm going to go to blur Gaussian blur I'm going to go ahead and boost this up to 5 pixels another thing I'm going to do is hit ctrl J a lot basically making duplicates of this and the reason I've done that I'm going to join these all together by holding shift selecting all of them and hitting ctrl E which will merge them all together so the reason I do that is now I've got the very edge of this colour blurred around here so now the color around the flower is similar to what the color is that makes up the actual image of the branch so the edges here if there's any anti-aliasing that's going on it's going to try to blend instead of blending all to black or all to white it's going to blend to this color that's around it now I can turn on black cause it's not going matter but you can see the edges here are going to be a little more similar than just being on black I'm going to save this one out save as Targa this one I'm just going to get rid of the naming all together for black or white just call it Sun I'm going to save that 32-bit per pixel the reason I do this is because a lot of times you're using this for things like particles and the particles may go on to maybe referencing this image and when you get a lot of these together those overlapping kind of fuzzy black edges can kind of come together and it makes it look really ugly so this keeps us from kind of having that sort of problem so for instance if I was doing a fireball then my background that I would want to have would be something in the oranges dark oranges red something like that instead of having it be on black or white which is going to be the biggest stark contrast to whatever it is you're making so it's better to have it at something that's a little closer so that's why I end up doing that so let's come back into max here and hope I deal with that material edit our open maximize that so I'm going to delete the selections there I'm going to move these white ones out of the way and I'm just going to duplicate one of these to use actually I'll just duplicate both of these and I'm going to double click and I'm going to replace the image in both of them with the regular one here okay so this one's going to my opacity and this one's going to my diffuse okay so there's that so I've already got my object selected so instead of dragging this node the other option I have maybe it's not selected let me make sure it is okay so it is selected I'm going to assign material to selection this is just an easier way to do that and now when i zoom in and i rerender so now it just kind of looks like I've got this blur around it which is fine I'm going to redo the Alpha Channel so I don't have that but I merely just wanted to show that even on black or even on white I'm not going to get something that's a very stark contrast to what our images so go back to environment if I change this to white it's still going to look the same it doesn't have like a black halo around it or a white halo or anything like that so now I'm going to fix my alpha channel back here so I had my alpha channel I blurred it just so I could show why I was doing what I was doing so I'm just going to drag this down into the trashcan I'll come back I'll have to do a select branch and simply do select load selection hit OK select save selection hit OK and now I'll have a new alpha channel there that has the crisp edge to it again and I'm still going to use the one that has this background that I created this blurred it's not going to matter now because my anti-aliasing is not going to be so much noticeable so I'm going to save this once again actually I'm going to save it as a Photoshop file just to make sure I have everything there and then I'll save the targa file I'll come back to max this is automatically going to update and now I don't have that blurry kind of edge happening there and just to show you real quick one other thing whoops I'm going to duplicate this other layer here I'll call this red just to show you something that has a lot more contrast to it we'll see if it shows up and I'm just going to save it over the Sun one that I have there so it officer we do all the stuff in the material editor cuz let us undo what I had done there okay so we can already see it has this red outline to it not so much seeing it here which is a good thing let's see how it shows up on the black though and watch it won't show up and then I'll just look like a fool nope there we go so we have this red outline that's happening in the anti aliased area so again that's just one other reason that it's much better to just simply have the color that we have here around it that it's bleeding into so save that again and I'll render one more time and that red goes away which is good and so now I can use this awesome looking super fancy Bush or Bush branch it's going to move the pivot point here so let's say I was doing some sort of video game tree that you've probably seen them this way I'm sure you've seen that in video games where once you get up close on something it's just a bunch of planes that's usually in older games but this is the idea of how that's kind of done see the little line we're getting here that would be a bad thing to see especially if you're walking by it in a game that be distracting easy fix for that you just go to the image double click tell it don't tile because what it's doing is this very edge of this plane is tiling the image over again as if it was going to show it again so if I get if I render it again that goes away and oops this would be a kind of a poor tree though especially if you see my other tutorial that kind of shows this sort of stuff but gives you an idea of what it would look like and how it could be used so I hope you liked this tutorial if you do please hit the like button that helps me out I like knowing that you guys enjoy the videos if you have any requests please leave them in a comment I've been trying to get around to some of the requests that have been made please share the videos if you think there's somebody that you know that might need something like this and keep watching and please subscribe thanks for all the great feedback that I've been getting on the videos I'm glad that you guys like them thanks a lot you
Info
Channel: CtrlAultDelTutorials
Views: 107,455
Rating: 4.7233748 out of 5
Keywords: 3ds, max, 3d, autodesk, tutorial, tutorials, teaching, learning, modeling, texturing, animation, video, games, art, alpha channel, alpha, channel, opacity map, opacity, map, Truevision TGA (File Format), Alpha Compositing, Autodesk 3ds Max (Award-Winning Work), 3D Modeling (Film Job), 3D Film (Film Genre), Teacher, Lessons, Learn, School, Student, Education, Students, Free, Teachers, Demo
Id: wuouwReR_F8
Channel Id: undefined
Length: 30min 53sec (1853 seconds)
Published: Tue Jan 13 2015
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.