Re: Alpha channel tutorial?
There are some light source examples in the file-forum.
I think they use alpha. Just take a look.
Re: Alpha channel tutorial?
Let's see if I can explain it. The idea of an alpha channel is really very simple. Basically, it is an image that tells MMF2 how opaque to make each pixel of your object. The lighter a pixel is in the image, the more opaque MMF2 will make your sprite.
Suppose you want to make a light that fades out from its origin. First you could make a yellow circle:
[]http://img62.imageshack.us/img62/567/alphacolorxz9.gif[/]
Now click on the alpha symbol (looks like a fish) or press 'Y'. Look in the little box on the right, and select "Alpha channel." Click Yes to create an alpha channel. Then check "edit" and "show."
You want the light to be most opaque in the middle, and least opaque on the edges. Therefore you want the alpha channel to be brightest in the middle, and darkest on the edge. You could draw one like this:
[]http://img54.imageshack.us/img54/7501/alphaalphatl1.jpg[/]
That's all there is to it. Now you'll wind up with an alpha-channeled object like this one:
[]http://img57.imageshack.us/img57/9530/alphaobjectjb0.jpg[/]
Here's an example file.
Re: Alpha channel tutorial?
Thanks, the example was great.
I've managed to get the effect I want now, but I have a question that might save me a lot of work in the future: Is there an easy way to get a gradient-like effect without having to draw it by hand? I managed to get one using photoshop, but I felt like I was doing more work than I had to.
Re: Alpha channel tutorial?
Manually? By soften maybe. You have to take the border in account though that appears by that.
Grab your sprite picture, remove the sprite, change your background colour to black, reduce selection of the white area, fill this border also with black, and soften. The more soft you need it the smaller the white area has to be.
Maybe there is a way to build an app with MMF2 for that task when you need to do this for lots of pictures.
Re: Alpha channel tutorial?
With photoshop, you can draw the alpha channel too if you want.
In a new layer you fill the image with a color and after to draw alpha channel you go to "colors layers" and you add one color layer. The name of the new color layer is "Alpha 1". Select it and after you can draw in it (like MMF2). use gradient tool to make a gradient opacity.
After your work is done, exporte your picture in PNG(with transparency) or TGA32bits
Re: Alpha channel tutorial?
If you have Photoshop just draw your art on a layer with all the translucency you want, and save it as a 24 bit png with a transparent background! (You should see the gray and white checkerboard behind your art) You don't need to hand draw an alpha channel! It creates it automatically. Then just load in your png and BOOM, you've got all your nice translucency. No extra work, no hand drawing an alpha channel.
I'm guessing you can do the same thing with gimp or any 24 bit art program.