Tutorial #5: Opacity Maps (They're easier than you think!)

This tutorial assumes that you have a good working knowledge of the previewer, deriving from items, and texture maps. If you do not, please complete my other tutorials first.

Now that you are comfortable with texture maps, we can move onto… *drumroll please* Opacity Maps! They are easier than you think, I PROMISE! And they open up all sorts of new possibilities in the world of IMVU developing, from shortening a skirt to creating your own hair style! We will be starting with an overview of opacity maps, going over the basics, and then we will use one of my meshes for practice, as we have in my other tutorials.

For this tutorial, switch your previewer to advanced mode. You should leave it in advanced mode for any future projects- you're not a beginner anymore!

Opacity maps use black and white to cut out shapes. This is the most basic explanation of opacity maps, and also the most important. When you are making an opacity map, you will use the same template (same size is important!) as you did for your color texture. On the opacity map, however, you will put white where you want it to be opaque, and black where you want it to disappear. Pretty simple!
Grey areas are semi-transparent, when blending is turned on. To create a sheer effect, you use shades of grey. The darker the grey, the more see-through it is, and the lighter the grey, the more opaque it is. For this to work, blending must be turned on. (This is a checkbox in the previewer, viewable in advanced mode).
Ok, so what is blending? Blending basically enables semi-transparency using greys. Without blending on, only the pure white and pure black areas of your opacity map matter. It's like a pure cutout. With blending on, greys become semi-transparent (as seen in the previous picture). Edges may also look smoother, as seen on the left.
Why NOT use blending? Well, there is a bit of a bug with blending in IMVU. When two items have blending turned on and they overlap, they do not always render properly. You may have experienced this yourself, when you're in a scene and all of a sudden you go behind a transparent object and your hair disappears! So, if you don't have to use blending for a sheer effect, you may want to avoid it, especially with items that go up near the head (because many hairstyles use blending).
If you make something disappear completely with the opacity map, be sure to UNCHECK blending!! For the reason stated above. If you make the opacity map black, and turn off blending, it will be like that part isn't even there. However if you leave blending on, you may notice body parts, hair, accessories and/or articles of clothing disappearing at certain angles!
The blending bug does not affect opacity maps applied to skintight clothing. This is the exception to the blending bug. Skintight clothing uses a special kind of transparency called "skin composite." This is another checkbox you can see in the previewer in advanced mode. Skin composite transparency replaces the transparent areas with skin (otherwise you'd have big holes in your avatar!) You can use blending freely here-the blending bug is NOT an issue with textures using skin composite.
1) Okay, now that we have covered the basics of opacity maps, let's practice! Open up the catalog page for my Full Length Skirt, download the templates, and click derive to open the previewer. I generally like to create the shape for the opacity map before I create the texture. You can really do this in any order you like, but I find it easier if I create the shape first, then fill it in afterwards… like drawing and then coloring in the lines. Anyway, for this project we will do the opacity maps first.
2) Create the first opacity map. Okay, first we will be creating the opacity map for the underwear under the skirt. Again, it is very helpful to use layers! I like to keep the template on the top layer, very transparent, so I can see where things go while I'm working, then I hide it at the last minute. Note: Your opacity map must always be the same size as your texture or it will not work. For skintight clothing, it must always be 256x512.
3) Apply the first opacity map. The opacity map goes in the second texture slot, next to your color texture. Check it out in the previewer. As always, if you are not happy with it, go back, tweak it, and reload it. It often takes me many tries to get it right! Now, just for fun try unchecking skin composite. Whoops! Invisible booty! LOL. Check it again to make your skin come back.
4) Create the second opacity map. Once you're happy with the first, move onto the second opacity map. With skirts, it is very easy to make them shorter- all white with a black line across the bottom will do it! Go ahead and put some grey in your opacity map too, so you can see how blending works.
5) Apply the second opacity map. Scroll down to find the skirt textures, and put this in the second slot. Now, try turning blending on and off to observe how the sheer area disappears. Remember if you use blending on the skirt, some items which you wear underneath which also use blending might disappear.
6) Create your color textures. Once your opacity maps are looking the way you want them to, go ahead and create the textures. Since you have created the opacity maps you can use those outlines to guide where your color textures will go. Be sure to save them as new files! Load them up next to your opacity maps, and you're all done!
Congratulations! You have now learned to use opacity maps! (I told you it was easier than you thought!)
imvux.com IMVU Credits