Difference between revisions of "Making Parts of a Mesh Transparent"
imported>Qazaaq (moving the transparency part to a new tutorial) |
(No difference)
|
Revision as of 07:14, 23 August 2007
This article has been marked by editors or authors as incomplete. Please see the Talk page for details. Discussion and collaboration can improve an article and lead to a better Wiki.
Transparency Time
Sometimes when you put different armor pieces together you will get parts clipping through other parts. You can use transparency to hide those parts poking out. To apply transparency to pieces that you either want to avoid poking through other pieces, or you just want to make a V-Neck Sweater or something silly.
First use the method above to add a body mesh underneath, if your armor should have some skin under the parts you are going to cut out. Otherwise you're going to be able to see through the person in those areas.
First click on the piece you want to add transparency. The left list expands to show it's NiTriShape. Right click that and choose 'Node > Attach Property' and pick NiAlphaProperty. Boom! A new block appears called NiAlphaProperty.
http://img200.imageshack.us/img200/1032/tut99nw.jpg
Right click NiAlphaProperty and choose 'Flags'. Set that so that 'enable testing' is checked off and 'Alpha Test Function' is changed to 'greater' or 'always'.
http://img167.imageshack.us/img167/7696/tut101gc.jpg
Now that piece has transparency properties which are controlled by it's texture map's alpha channel. It's best to duplicate that texture map the piece is using and rename it. Then point to the new texture by opening up the block NiTexturingProperty within the NiTriShape of that piece. You'll see a place to point to a new file name there.
Now to apply transparency. One good thing to do is right click on the pieces NiTriShape and choose 'Texture > Export Template'. That will give you a template map you can overlay onto the texture map to make it a little easier to figure out where to add transparency.
http://img186.imageshack.us/img186/5205/tut116ib.jpg
Now open up the texture map and the template map (if you made one) in photoshop. Put the template map over the texture and set it's 'Layer Style > Blending Properties' to Overlay. You may need to resize the template map to the same dimensions as the texture first. You'll get an image like this.
http://img224.imageshack.us/img224/3967/tut128fx.jpg
Now you can select the areas you want to be transparent. Use whatever tool you like, I prefer the polygonal lasso, but I'm a nut case. When you've selected the areas you want to be transparent, click on channels and go to the alpha channel. It should be all white, you want to make just the areas that you want transparent black, so use the selection you made to blacken those areas (you can use shades of gray to make parts semi-transparent too). Here's my alpha channel to cut the chest part out (I've overlapped it onto my texture map to show you better what parts are where...
http://img170.imageshack.us/img170/3899/tut123ib.jpg
Here's what my dude looks like with no chest piece on his ebony armor!
http://img204.imageshack.us/img204/6834/te...garmour29yj.jpg
It can be very tricky to do, but it takes practice and patience. Stick with it and it can be really fun!