Editing Arcane University:NIF Data Format

Jump to: navigation, search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 16: Line 16:
 
* '''BSDismemberSkinInstance:''' only present in skinned meshes like armor. It contains the vertex weighting to handle limbs being dismembered from the base mesh, and deform during animation.
 
* '''BSDismemberSkinInstance:''' only present in skinned meshes like armor. It contains the vertex weighting to handle limbs being dismembered from the base mesh, and deform during animation.
  
'''BSTriShapes''', used in Skyrim Special Edition, combine the NiTriShape and NiTriShapeData into a single block. They are not widely supported by nif import and export tools, and cannot be manipulated as easily within NifSkope. They can be converted back and forth by nif converter tools like Cathedral Assets Optimizer or SSE Nif Optimizer. However, LE nifs work fine in Special Edition, and do not need to be converted. In fact, SSE nifs use less precise values, so LE nifs are recommended regardless of which version of the game you are modding.
+
'''BSTriShapes''', used in Skyrim Special Edition, combine the NiTriShape and NiTriShape into a single block. They are not widely supported by nif import and export tools, and cannot be manipulated as easily within NifSkope. They can be converted back and forth by nif converter tools like Cathedral Assets Optimizer or SSE Nif Optimizer. However, most LE nifs work fine in Special Edition, and do not need to be converted.
  
'''BSLODTriShapes''' are the same as NiTriShapes, except that they fade out some distance away. This is used in LE to make small details on architecture nifs fade out ''before'' it is replaced with an LOD model. This block has no effect in SSE (no parts fade out individually).
+
'''BSLODTriShapes''' are the same as NiTriShapes, except that they fade out some distance away. This is used in LE to make small details on architecture nifs fade out ''before'' it is replaced with an LOD model. This block has no effect in SE (no parts fade out individually).
  
 
==Texture Slots==
 
==Texture Slots==
[[File:TextureSlots03.png|thumb|right|upright=2|NifSkope uses [[wikipedia:zero-based numbering|zero-based numbering]], so the first slot is Slot 0, the normal map slot is Slot 1, etc.]]
+
[[File:TextureSlots03.png|thumb|right|upright=2]]
 
All textures used by Skyrim are [[AU:DDS Data Format|DDS]] (Direct Draw Surface) files (with a few exceptions, such as menu art). These textures are typically referenced in the <code>BSShaderTextureSet</code> block, as shown at right.
 
All textures used by Skyrim are [[AU:DDS Data Format|DDS]] (Direct Draw Surface) files (with a few exceptions, such as menu art). These textures are typically referenced in the <code>BSShaderTextureSet</code> block, as shown at right.
  
Some slots are reused for multiple different purposes. For example, when a mesh uses the Glow shader, slot 3 is used as an emissive map. But when a mesh uses the Skin shader, the same slot is used for skin tint. Be sure to select the proper [[#Shader types|shader type]], and activate the desired shader flags, for your model to be displayed correctly.
+
Some slots are reused for multiple different purposes. For example, when a mesh uses the Glow shader, slot 3 is used as an emissive map. But when a mesh uses the Skin shader, the same slot is used for skin tint. Be sure to select the proper shader type, and activate the desired shader flags, for your shader to be displayed correctly.
  
 
Textures are applied based on the [[AU:UV Unwrapping|UV map]] created during 3D modeling. Following [https://www.notion.so/UV-Mapping-Best-Practices-eefa3731217c4c65a907d1990939974f UV Mapping Best Practices] will help to prevent errors in your model.
 
Textures are applied based on the [[AU:UV Unwrapping|UV map]] created during 3D modeling. Following [https://www.notion.so/UV-Mapping-Best-Practices-eefa3731217c4c65a907d1990939974f UV Mapping Best Practices] will help to prevent errors in your model.
  
{| class="wikitable" style="clear:both; width:90%; margin:1em auto"
+
{| class="wikitable" style="clear:both; width:75%; margin:1em auto"
|+ Texture Slots Overview
+
|-
+
 
! Texture Slot !! Name !! RGB Channel !! Alpha Channel !! Texture Suffix !! Suggested [https://www.reedbeta.com/blog/understanding-bcn-texture-compression-formats/ Compression] !! Suggested creation method
 
! Texture Slot !! Name !! RGB Channel !! Alpha Channel !! Texture Suffix !! Suggested [https://www.reedbeta.com/blog/understanding-bcn-texture-compression-formats/ Compression] !! Suggested creation method
 
|-
 
|-
| SLOT 1 || Diffuse map || Diffuse map (base color and ambient occlusion) || (optional) transparency map  || (no suffix) || BC1 (no Alpha), BC7<sup>[[#Notes|[a] ]]</sup> for RGBA || Base Color and additional contrast, darkness, desaturation
+
| SLOT 1 || Diffuse map || Diffuse map (base color and ambient occlusion) || (optional) transparency map  || (no suffix) || BC1 (no Alpha), BC7 for RGBA || Base Color and additional contrast, darkness, desaturation
 
|-
 
|-
| SLOT 2 || Normal map || Normal map || Grayscale specular map || _n.dds || BC7<sup>[[#Notes|[a] ]]</sup> || normal map similar to PBR, for specularity in your alpha channel invert a roughness map or insert a PBR specularity. Black is zero reflection, White full.
+
| SLOT 2 || Normal map || Normal map || Grayscale specular map || _n.dds || BC7 || normal map similar to PBR, for specularity in your alpha channel invert a roughness map or insert a PBR specularity. Black is zero reflection, White full.
 
|-
 
|-
 
| SLOT 3 || Glow map / Skin Tint || Emissive / Skin Tint || none || _g.dds / _sk.dds || BC1 || Color map.
 
| SLOT 3 || Glow map / Skin Tint || Emissive / Skin Tint || none || _g.dds / _sk.dds || BC1 || Color map.
 
|-
 
|-
| SLOT 4 || Bump map || Grayscale height or parallax || none || _p.dds || BC4<sup>[[#Notes|[b] ]]</sup> || Used for depth levels in parallax shader (broken in vanilla Skyrim) and Multilayer Parallax.
+
| SLOT 4 || Bump map || Grayscale height or parallax || none || _p.dds || BC4 || Used for depth levels in parallax shader (broken in vanilla Skyrim) and Multilayer Parallax.
 
|-
 
|-
| SLOT 5 || Cube map || Cube map || none || _e.dds || BC1 || Ambient metallic color reflection of light.
+
| SLOT 5 || Environment map (Cube map) || Environment map (cube map) || none || _e.dds || BC1 || Ambient metallic color reflection of light.
 
|-
 
|-
| SLOT 6 || Environment Mask || Environment mask || none || _m.dds or _em.dds || BC4<sup>[[#Notes|[b] ]]</sup> || Environment map mask. Black is no environment map and white is full intensity environment map (refer to SLOT 5 for environment map).
+
| SLOT 6 || Environment Map Mask || Environment or reflection map || none || _m.dds or _em.dds || BC4 || Environment map mask. Black is no environment map and white is full intensity environment map (refer to SLOT 5 for environment map).
 
|-
 
|-
| SLOT 7 || Inner layer map || Inner layer diffuse || Inner layer depth / none || _i.dds || BC7<sup>[[#Notes|[a] ]]</sup> || For inner layer depth, black is minimum depth, white is maximum depth.
+
| SLOT 7 || Inner layer map / Backlight map || Inner layer diffuse / Backlight map || Inner layer depth / none || _i.dds / _b.dds || BC7 / BC1 || For inner layer depth, black is minimum depth, white is maximum depth. The backlight map is RGB.
 
|-
 
|-
| SLOT 8 || Subsurface Tint / Specular / Backlight map || Subsurface tint outer color / Specular map / Backlight map || none || (no convention) / _s.dds / _b.dds || BC1 || Subsurface tint adds a tint to the outer layer (an effect similar to rim lighting). This slot is also used for the specular map for meshes that use model space normals (NPCs). It can also be used for an RGB backlight map.
+
| SLOT 8 || Subsurface Tint / Specular || Subsurface tint outer color / Specular map || none || (no convention) / _s.dds || BC1 || Subsurface tint adds a tint to the outer layer (an effect similar to rim lighting). This slot is also used for the specular map for meshes that use model space normals (NPCs).
 
|}
 
|}
<div id="Notes" style="font-size:89%; text-align:center">
+
 
: <small>[a]</small> - BC7 is not supported by Oldrim/LE. If modding for LE, use BC3 here.
+
{{note|NifSkope uses [[wikipedia:zero-based numbering|zero-based numbering]], so the first slot is Slot 0, the normal map slot is Slot 1, etc.}}
: <small>[b]</small> - BC4 is not supported by Oldrim/LE. If modding for LE, use BC1 here.
+
</div>
+
  
 
===Diffuse Map (Slot 1)===
 
===Diffuse Map (Slot 1)===
 
This texture is the base texture of the mesh and contains the main coloring your texture will use as well as the transparency information in the alpha channel. All other textures will only be detail additions and effects.
 
This texture is the base texture of the mesh and contains the main coloring your texture will use as well as the transparency information in the alpha channel. All other textures will only be detail additions and effects.
 
* Compression:
 
* Compression:
** Use BC1 if transparency is not needed, or if only full transparency is needed.
+
** Use DXT1 if transparency is not needed, or if only full transparency is needed.
** Use BC3 or BC7 if the texture needs smooth partial transparency.
+
** Use DXT5 or BC7 if the texture needs smooth partial transparency.
  
 
* Required properties:
 
* Required properties:
Line 80: Line 76:
  
  
* Compression: Use BC3 or BC7 because of the importance of the alpha layer in this file. Bethesda uses BC3 in all tangent space normal maps.
+
* Compression: Use DXT5 or BC7 because of the importance of the alpha layer in this file. Bethesda uses DXT5 in all tangent space normal maps.
 
* Required properties:
 
* Required properties:
 
** NiTriShapeData > BS Num UV Sets = 4097
 
** NiTriShapeData > BS Num UV Sets = 4097
Line 101: Line 97:
 
This slot can either be used for an Emissive Map or for a Subsurface Color Map which is used in the MultiLayer Parallax section below. The Emissive Map texture will add lighting to the mesh based on a few settings being set. The game will glow any color that you use / add but ignore black making this a very easy texture to apply. However, because you need to use Emissive Color for the glow base it may wash out the texture color.  You may need to try different settings for this color but it will most often work fine if you use similar colors or set Emissive Color to a greyscale color. Soft Lighting, also called wrapped diffuse adds a glow through the object to simulate light being diffused and passing through the object. Good for simulating semi-transparency on objects such as leaves. Rim lighting is only visible when light is on the opposite side of the mesh and simulates light bending around the object and lighting it at the edges.
 
This slot can either be used for an Emissive Map or for a Subsurface Color Map which is used in the MultiLayer Parallax section below. The Emissive Map texture will add lighting to the mesh based on a few settings being set. The game will glow any color that you use / add but ignore black making this a very easy texture to apply. However, because you need to use Emissive Color for the glow base it may wash out the texture color.  You may need to try different settings for this color but it will most often work fine if you use similar colors or set Emissive Color to a greyscale color. Soft Lighting, also called wrapped diffuse adds a glow through the object to simulate light being diffused and passing through the object. Good for simulating semi-transparency on objects such as leaves. Rim lighting is only visible when light is on the opposite side of the mesh and simulates light bending around the object and lighting it at the edges.
  
* Compression: BC1
+
* Compression: DXT1
 
* Required properties:
 
* Required properties:
 
** BSLightingShaderProperty > Shader Type: Glow Shader
 
** BSLightingShaderProperty > Shader Type: Glow Shader
Line 121: Line 117:
 
This slot is used for a true Height/Parallax Map, different from the MultiLayer Parallax shader. It does not function in vanilla SSE, so it requires the [https://www.nexusmods.com/skyrimspecialedition/mods/31963 SSE Parallax Shader Fix] SKSE Plugin, or ENB. This is a greyscale image in RGB format. Height is determined by the darkness or lightness of each pixel as follows:
 
This slot is used for a true Height/Parallax Map, different from the MultiLayer Parallax shader. It does not function in vanilla SSE, so it requires the [https://www.nexusmods.com/skyrimspecialedition/mods/31963 SSE Parallax Shader Fix] SKSE Plugin, or ENB. This is a greyscale image in RGB format. Height is determined by the darkness or lightness of each pixel as follows:
 
* Mid grey (RGB 127,127,127) is zero depth and height, Black is maximum depth, White is maximum height.
 
* Mid grey (RGB 127,127,127) is zero depth and height, Black is maximum depth, White is maximum height.
* Compression: BC1
+
* Compression: DXT1
 
* Required Properties:
 
* Required Properties:
 
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Parallax
 
** BSLightingShaderProperty > Shader Flags 1: SLSF1_Parallax
Line 130: Line 126:
 
Environment/Cube Maps more or less add another layer of textures and can help get a more detailed look to your mesh. Cube mapping is preferred over other methods of environment mapping because of its relative simplicity. Also, cube mapping produces results that are similar to those obtained by high quality, slow rendering, but takes much less processing power – the moderate reduction in quality is compensated for by large gains in efficiency. Also, cube mapping provides a much larger capacity to support real-time rendering of reflections relative to other mapping methods because the combination of inefficiency and viewpoint dependency severely limit the ability of these mapping techniques to be applied when there is a consistently changing viewpoint. These maps are a bit different than other one layered textures: A cube use 6 faces, counting 2 faces for each axis, xyz. Each face can be calculated with positive and negative x, y and z. They are sorted from +x, -x, +y, -y, +z and lastly -z. Each of these would be their own layer in an image editor, for instance, Gimp or Photoshop.
 
Environment/Cube Maps more or less add another layer of textures and can help get a more detailed look to your mesh. Cube mapping is preferred over other methods of environment mapping because of its relative simplicity. Also, cube mapping produces results that are similar to those obtained by high quality, slow rendering, but takes much less processing power – the moderate reduction in quality is compensated for by large gains in efficiency. Also, cube mapping provides a much larger capacity to support real-time rendering of reflections relative to other mapping methods because the combination of inefficiency and viewpoint dependency severely limit the ability of these mapping techniques to be applied when there is a consistently changing viewpoint. These maps are a bit different than other one layered textures: A cube use 6 faces, counting 2 faces for each axis, xyz. Each face can be calculated with positive and negative x, y and z. They are sorted from +x, -x, +y, -y, +z and lastly -z. Each of these would be their own layer in an image editor, for instance, Gimp or Photoshop.
  
* Compression: BC1
+
* Compression: DXT1
 
* Required Properties:
 
* Required Properties:
 
** BSLightingShaderProperty > Shader Type: Environment Map
 
** BSLightingShaderProperty > Shader Type: Environment Map
Line 141: Line 137:
 
=== Greyscale / metallic cube mask (Slot 6) ===
 
=== Greyscale / metallic cube mask (Slot 6) ===
 
Environment/Cube Mask is a Greyscale Image. Simply a lighting control texture sometimes referred to as a specular map with the purpose to soften or diminish the level of light affecting the mesh reflection. Brightness of individual pixels determines the effect: white will reflect all light and black will reflect no light.
 
Environment/Cube Mask is a Greyscale Image. Simply a lighting control texture sometimes referred to as a specular map with the purpose to soften or diminish the level of light affecting the mesh reflection. Brightness of individual pixels determines the effect: white will reflect all light and black will reflect no light.
* Compression: BC1
+
* Compression: DXT1
 
* Required Properties:
 
* Required Properties:
 
** An environment/cube map is required.
 
** An environment/cube map is required.
Line 153: Line 149:
 
=== Subsurface Tint Map (Slot 7) ===
 
=== Subsurface Tint Map (Slot 7) ===
 
This slot is also used for Inner Layer Diffuse and Inner Layer Depth maps in MultiLayer Parallax which will be detailed below. Subsurface tint maps are used for subsurface scattering. This is a rendering effect that simulates the diffusion of light inside a translucent medium. The effect can be seen as an extension on the principles of translucency and is appropriate for realistically simulating a wide range of materials including wax, marble, liquids (like milk), plant leaves, fruit, snow, and most importantly, human skin.
 
This slot is also used for Inner Layer Diffuse and Inner Layer Depth maps in MultiLayer Parallax which will be detailed below. Subsurface tint maps are used for subsurface scattering. This is a rendering effect that simulates the diffusion of light inside a translucent medium. The effect can be seen as an extension on the principles of translucency and is appropriate for realistically simulating a wide range of materials including wax, marble, liquids (like milk), plant leaves, fruit, snow, and most importantly, human skin.
* Compression: BC1
+
* Compression: DXT1
 
* Required Properties:
 
* Required Properties:
 
** BSLightingShaderProperty > Shader Type: Skin Tint
 
** BSLightingShaderProperty > Shader Type: Skin Tint
Line 163: Line 159:
 
=== Backlight Map (Slot 8) ===
 
=== Backlight Map (Slot 8) ===
 
Back lighting fills in the surface opposite a light. This is useful for faking translucency, like showing the bones in a dragon’s wings yet letting light bleed through the skin. The texture can be colored but like glow maps a high emissive value will wash that color out.
 
Back lighting fills in the surface opposite a light. This is useful for faking translucency, like showing the bones in a dragon’s wings yet letting light bleed through the skin. The texture can be colored but like glow maps a high emissive value will wash that color out.
* Compression: BC1
+
* Compression: DXT1
 
* Required properties:
 
* Required properties:
 
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Back_Lighting
 
** BSLightingShaderProperty > Shader Flags 2: SLSF2_Back_Lighting
Line 175: Line 171:
 
Slot09 – Currently Unused.
 
Slot09 – Currently Unused.
  
== Shader types ==
+
== Shader Types ==
 
[[File:BSshadertypes01.png]]  
 
[[File:BSshadertypes01.png]]  
  

Please note that all contributions to Beyond Skyrim are considered to be released under the Creative Commons Attribution-ShareAlike (see Beyond Skyrim Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel | Editing help (opens in new window)

Templates used on this page: