Jump to content

How-To: Add Transparency to an Outfit


NIND (jimmyyu)

3,804 views

This tutorial goes over how to add transparency to a mesh in an existing .NIF file.

Tools Needed:

 

*There is also a DDS plugin for Photoshop

 Methods:

  • There are currently two methods I know of for applying transparency to armors ingame:
    • Mesh Segment-based:
      • Easy and straightforward 
      • Transparency is based on the mesh segment in the NIF
      • Cannot make a non-transparent retexture of a transparent mesh segment
    • Texture-based:
      • Highly Customizable
      • Can be used to make cutouts without removing mesh (or when removing the mesh would give you an ugly cutout)
      • Can be used as a retexture
      • Takes more time and iteration

 

I will go over both methodologies in this post using transparent outfits made with the same method:

 

 

 

Before doing either of these methods, however you will require a working copy of nifskope setup to work with your textures.

Please take a look at this video for setup instructions if needed.

 

 

 Mesh Segment Transparency:

 

Spoiler

Opening a NIF file in Nifskope results in the standard UI like so:

 

image.png.0a622a317e8e1d93935e9bbea882e44a.png

 

This has the bones and Mesh Segment (NiTriShape)s Listed along the left explorer window.

 

To implement Transparency on a certain mesh segment, all you have to do is expand the mesh in question until you get to BSLightingShaderProperty and set the value to some value between 0.0 (Invisible)->1.0 (Fully Visible)

 

image.png.da39c5e0640cb16e91e69cf6ab71a636.pngimage.png.b19b5f6a2e62efa9bcfae1525779681b.png

 

As with all bodyslide edits, this should be done to the .NIF file within the ShapeData folder for  your project if you want all built meshes to keep the transparency.

Using this method will also mean that all subsequent retextures applied to the mesh segment (the leotard in this case) will also be transparent to the same degree.

 

 

Texture-Based Transparency:

 

Spoiler

For this method, set up of an image editing program and its respective DDS plugin is required.  (I personally use these):

 

I'll go through how to replicate the previous method's transparency using this method, and its extensions.

 

Before we can get started in GIMP, we need to do some things in nifskope......

 

First enable the Alpha node on the Mesh Segment that you want to edit the texture for (in this case the leotard).

Do this by right-clicking either the mesh itself or its entry in the left explorer window.

Click :  Node->Attach Property->NiAlphaProperty

 

image.png.1c1827a14f6e45cf02a8fbad7ed89d56.png

 

Select the new NiAlphaProperty under the mesh in the left explorer, and double click on the flag icon in the lower panel.

 

At this point you want to check the Enable Blending option and set Alpha Test Threshold to zero.

(Blending allows for partial transparency rather than visible/invisible, and Alpha Test Threshold is the transparency value that should be counted as transparency in the texture)

image.png.2437b21d3b025b14df60902e0e4a0dea.png

 

At this point we save our nif and locate the  (DIFFUSE) texture file being used in the mesh:

 

image.png.d6c7f45e32e875eea69698a71a210b81.png

 

Navigate to this file in your explorer and open it in GIMP.

(This can be easily done from NIfskope by double-clicking the purple icon next to the texture to open the directory and right-click opening the texture in gimp from there)

 

Make sure that this top option is uncheck when it is opening in gimp:

image.png.d6ebc55e06db059dbec1f955d93ae28e.png

 

or you'll get a bunch of unneeded extra layers in the program.

 

While your layout will be different you should see something like this in GIMP:

 

image.png.e34042789f97d49c2dc3d91ef64423f8.png

 

We'll next be adding a mask to hide and show parts of the texture.

 

Right-Click on the layer and Select Add Layer Mask

 

image.png.ed932c6c73970ec113a9fd4f6fa00767.png

 

Select White (full opacity)

image.png.d183f969dd1deb2931e51ea47f3432c0.png

 

You'll now see the mask (the currently white square) to the right of your actual layer.

image.png.f2b46c0b781575c7268eb7e8b9b1d102.png

Note that it is greyscale, and no matter what color you try to draw on it with, it will be converted to its equivalent grey.

 

Now, to recreate our transparency in the first method, we're going to want to draw a grey (50% of the way between white and black) coating over the area covered by the leotard.

While this can be done by hand, there are other methods you can use in gimp (which is a little too in depth for this tutorial).

 

Make sure that before you start drawing, you left click on the MASK SQUARE.

If you see grey paint on your screen, you have the wrong square selected.

 

As we normally want hard cutoffs for our edges, select the pencil tool and make sure the Hardness value is set to maximum.

 

image.png.d742ac5440547bff22641057cb2ff9ed.png

 

As we want 50% transparency, we want the mask paint to be 50% of black:

 

image.png.4b7914b951371d7e15862a678df4999f.png

 

Proceed to paint in the desired area (which should be appearing transparent on your screen):

Note that in  the mask square you can also see the shape of the grey paint you put down, but if you even need to visibly check it you can right click and Show Layer Mask.

image.png.abd28d3eff9c442511860fbbfcaf5af8.png

 

Finally its time for export!

 

Make sure to back up your unedited textures somewhere!  If you've been following my conversion guides, you already have a safe location though?

 

For this we go to file->Export As

 

The file should still have the same name as when you opened it, but if not, you need to make sure the name of the file ends with .DDS as the extension to get access to the options.

Make Sure You select BC3/DXT5 (This is the only compression that allows Alpha transparency) and Generate Mipmaps when you export.

 

image.png.f82e25208195971a077feac444dcbf40.png

 

You should now see the updated model in Nifskope and you are good to go!

 

 

image.thumb.png.fc1935560fb32e5fe354839ca4b3e222.png

 

 

(OPTIONAL): A tip for Increased Accuracy (Exporting UV Lines)

 

Spoiler

By Right Clicking in Nifskope you can export a PNG of the UV (Mesh lines) layout on the texture for a given Resolution!

 

First figure out the resolution of the texture in question by right clicking it and going to properties.

 

In NIfskope, right click on the mesh you want to export the UVs for and type in the dimensions (They will always be a square, base 2 number)

image.png.7b56d0f454688f4acbae1d582b6c967b.png

 

Set the FilePath and line color:

 

image.png.7301d6361f43da63b2e73cdd6eb92015.png

 

Now after dragging this into gimp you have the lines representing the mesh!

Make sure to drag it to the top so it is on top of your texture, and that you click on the Layer mask before you start editing again!

 

 

image.png.518cc33cdba3ca827c601e1bf64798b0.png

 

 

(OPTIONAL): A tip for Easier Prototyping  ( Ctrl +E ) Hotkey

 

Spoiler

It should be noted that Ctrl+ E is the shortcut for export in gimp, and that extraordinarily helpful for texting quick edits !

Once your texture has been exported with correct settings, and the NIF in nifskope linked to it, you can press CTRL+E in GIMP to export the texture and Nifskope will automatically update the way it looks!

 

As an example I have all of the transparent retextures for the cammy follower here..... if I enable each layer and export it while nifskope is up, this magic happens:

 

 

Honeycam_2021-01-28_11-10-59.gif

 

 

2 Comments


Recommended Comments

Tried both methods on Snakel101's Love Me outfit and none worked: BC3/DXT5 just plain hides the texture ingame, I also tested other compressions methods like the Alpha Exponent DXT5 but it hid black colors instead of making everything semi transparent

Link to comment

I'm wondering if there's something that I missed here in your guide.

I'm able to make the outfits more transparent but I think what I'm looking for is how to edit/slutify the outfits like you've done with your mods. 

i.e. removing/cutting out bits of clothing to be more revealing.

Link to comment

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use