From aac39f97bd7c8c446d1c65aa1051482b58039a89 Mon Sep 17 00:00:00 2001 From: ttl269 Date: Sun, 11 Jan 2015 23:00:10 +0100 Subject: [PATCH 1/3] BSShaderProperties update Changes made in BSEffectShaderProperty: 1. Changed "Texture Clamp Mode" storage type from uint to byte, due to Skyrim's BSEffectShaderProperty, where the byte value of Texture Clamp Mode is followed by unknown non-zero byte value - it caused a number shown in Texture Clamp Mode line instead of its named value. This unknown byte is mostly set to 255 but in many nifs there are other values. 2. "Emmisive Color" splitted to "Base Color" (named according to CK) and "Alpha". Now the variables 0 and 5 in "EffectShaderControlledVariable" list can be clearly named. Added proposal of abstract object for BSShaderProperties which must not be shared (can't be "combined") for easier excluding of these properties in Nifskope's Combine Properties spell. It is named "NonSharableBSShaderProperty". --- nif.xml | 47 +++++++++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 18 deletions(-) diff --git a/nif.xml b/nif.xml index fcf535d..620fb65 100644 --- a/nif.xml +++ b/nif.xml @@ -549,8 +549,8 @@ - - Specifies the availiable texture clamp modes. That is, the behavior of pixels outside the range of the texture. + + Specifies the available texture clamp modes. That is, the behavior of pixels outside the range of the texture. @@ -945,12 +945,12 @@ An unsigned 32-bit integer, describing which float variable in BSEffectShaderProperty to animate. - + - + @@ -959,7 +959,7 @@ An unsigned 32-bit integer, describing which color in BSEffectShaderProperty to animate. - + @@ -1365,6 +1365,12 @@ --> + + How to handle texture borders. + Unknown. In BSEffectShaderProperty of Skyrim nifs it is most often set to 255 but sometimes to other values. + + + Texture coordinates (u,v). As in OpenGL; image origin is in the lower left corner. First coordinate. @@ -1374,7 +1380,7 @@ Texture description. NiSourceTexture object index. - 0=clamp S clamp T, 1=clamp S wrap T, 2=wrap S clamp T, 3=wrap S wrap T + 0=clamp S clamp T, 1=clamp S wrap T, 2=wrap S clamp T, 3=wrap S wrap T 0=nearest, 1=bilinear, 2=trilinear, 3=..., 4=..., 5=... Texture mode flags; clamp and filter mode stored in upper byte with 0xYZ00 = clamp mode Y, filter mode Z. Unknown, seems to always be 1 @@ -1786,7 +1792,7 @@ Looks like a memory address, so probably a bool. Link to the texture image. - May be texture clamp mode. + May be texture clamp mode. May be texture filter mode. This may be the UV set counting from 1 instead of zero. 0? @@ -4151,7 +4157,7 @@ Model projection matrix. Always identity? Model projection transform. Always (0,0,0)? Texture Filtering mode. - Texture Clamp mode. + Texture Clamp mode. The type of effect that the texture is used for. The method that will be used to generate UV coordinates for the texture effect. @@ -4791,7 +4797,7 @@ Bethesda-specific property. - How to handle texture borders. + How to handle texture borders. @@ -4999,7 +5005,11 @@ - + + Only abstract for Bethesda Skyrim shader properties which must be unique (must not be shared). + + + Skyrim PP shader for assigning material/shader/texture. Skyrim Shader Flags for setting render/shader options. Skyrim Shader Flags for setting render/shader options. @@ -5008,7 +5018,7 @@ Texture Set, can have override in an esm/esp Glow color and alpha Multiplied emissive colors - How to handle texture borders. + How to handle texture borders. The material's opacity (1=non-transparent). The amount of distortion. **Not based on physically accurate refractive index** (0=none) (0-1) The material's specular power, or glossiness (0-999). @@ -5031,21 +5041,22 @@ Offset to set center for right eye cubemap - + Skyrim non-PP shader model, used primarily for transparency effects, often as decal. Offset UVs Offset UV Scale to repeat tiling textures - points to an external texture. - How to handle texture borders. + points to an external texture. + At this cosine of angle falloff will be equal to Falloff Start Opacity At this cosine of angle falloff will be equal to Falloff Stop Opacity Alpha falloff multiplier at start angle Alpha falloff multiplier at end angle - Emissive color - Multiplier for Emissive Color (RGB part) + Base color (Vertex color multiplier). + Alpha transparency (1.0 = non-transparent). + Base Color multiplier (RGB part). Points to an external texture, used as palette for SLSF1_Greyscale_To_PaletteColor/SLSF1_Greyscale_To_PaletteAlpha. @@ -5062,7 +5073,7 @@ - + Skyrim water shader property, different from "WaterShaderProperty" seen in Fallout. @@ -5073,7 +5084,7 @@ Unknown, flag? - + Skyrim Sky shader block. From 72b711de9c09c403cf45b33b5f8379322f2b7309 Mon Sep 17 00:00:00 2001 From: ttl269 Date: Tue, 13 Jan 2015 20:42:11 +0100 Subject: [PATCH 2/3] Skyrim shader property blocks inherit change Changed Skyrim specific shader blocks (BSLightingShaderProperty, BSEffectShaderProperty, BSSkyShaderProperty, BSWaterShaderProperty) to be inherit from BSShaderProperty. --- nif.xml | 178 ++++++++++++++++++++++++++------------------------------ 1 file changed, 84 insertions(+), 94 deletions(-) diff --git a/nif.xml b/nif.xml index 620fb65..36e271b 100644 --- a/nif.xml +++ b/nif.xml @@ -4782,17 +4782,91 @@ + + + Skyrim Shader Property Flags 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Skyrim Shader Property Flags 2 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Bethesda-specific Property node - Unknown. + Unknown. 0: smooth no 1: smooth yes - - Unknown (Set to 0x21 for NoLighting, 0x11 for Water) - Shader Property Flags - Shader Property Flags 2 - Scales the intensity of the environment/cube map. + + Unknown (Set to 0x21 for NoLighting, 0x11 for Water) + Shader Property Flags + Shader Property Flags 2 + Skyrim Shader Flags for setting render/shader options. + Skyrim Shader Flags for setting render/shader options. + Scales the intensity of the environment/cube map. @@ -4933,86 +5007,8 @@ Bethesda-specific node. - - Skyrim Shader Property Flags 1 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Skyrim Shader Property Flags 2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Only abstract for Bethesda Skyrim shader properties which must be unique (must not be shared). - - - + Skyrim PP shader for assigning material/shader/texture. - Skyrim Shader Flags for setting render/shader options. - Skyrim Shader Flags for setting render/shader options. Offset UVs Offset UV Scale to repeat tiling textures, see above. Texture Set, can have override in an esm/esp @@ -5041,10 +5037,8 @@ Offset to set center for right eye cubemap - + Skyrim non-PP shader model, used primarily for transparency effects, often as decal. - - Offset UVs Offset UV Scale to repeat tiling textures points to an external texture. @@ -5073,10 +5067,8 @@ - + Skyrim water shader property, different from "WaterShaderProperty" seen in Fallout. - - Offset UVs. Seems to be unused, but it fits with the other Skyrim shader properties. Offset UV Scale to repeat tiling textures, see above. Defines attributes for the water shader (will use SkyrimWaterShaderFlags) @@ -5084,10 +5076,8 @@ Unknown, flag? - + Skyrim Sky shader block. - - Offset UVs. Seems to be unused, but it fits with the other Skyrim shader properties. Offset UV Scale to repeat tiling textures, see above. points to an external texture. From 48fb46d1d6d094b4990813eb40501d17b5764898 Mon Sep 17 00:00:00 2001 From: ttl269 Date: Tue, 20 Jan 2015 13:59:45 +0100 Subject: [PATCH 3/3] XML version increment Increased niftoolsxml version to 0.7.2.0 due to changes in names in this branch. --- nif.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nif.xml b/nif.xml index 36e271b..a86823f 100644 --- a/nif.xml +++ b/nif.xml @@ -1,6 +1,6 @@ - +