Making Parts of a Mesh Transparent

From the Oblivion ConstructionSet Wiki
Revision as of 13:07, 29 December 2007 by imported>Qazaaq (done, except for the images)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Introduction[edit | edit source]

This tutorial explains how to make parts of a mesh transparent. This is primarily used when hiding parts of a mesh is necessary, but deleting those parts is not possible or too much work. In this tutorial photoshop is used to edit DDS files, to follow his without photoshop knowledge of another program capable of editing DDS files is required.

Tools[edit | edit source]

NifSkope[edit | edit source]

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.

Open the NIF file in NifSkope and click on the piece (in the 3d view) you want to add transparency to. The left list expands to show it's NiTriShape (or NiTriStrip). Right click that and choose 'Node > Attach Property' and pick NiAlphaProperty. 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's alpha channel. It's best to duplicate the texture the piece is using and rename it, instead of overwriting the original texture. 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 piece's NiTriShape and choose 'Texture > Export Template'. That will give you a template map you can overlay onto the texture to make it a little easier to figure out where to add transparency.

http://img186.imageshack.us/img186/5205/tut116ib.jpg

Photoshop[edit | edit source]

Now open up the texture 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 to show you better what parts are where).

http://img170.imageshack.us/img170/3899/tut123ib.jpg

Here's the result of making the chest piece of ebony armor transparent:

http://img204.imageshack.us/img204/6834/testingarmour29yj.jpg

See Also[edit | edit source]