Working With Nifs 301 : Properties Breakdown

From the Oblivion ConstructionSet Wiki
Jump to navigation Jump to search

A breakdown of nodes, properties and datas[edit | edit source]

Hot diggity, Which property should I use? There's so many options! I'm gonna do this alphabetically, let's go! Properties first, then Nodes, and remaining survivors last:


AlphaProperty[edit | edit source]

Defines Alpha blending, or Transparency.

Controller - You can attach an alpha controller for animating the transparency of the mesh here.

Flags - It's generally a good idea to use triangle sorting, only turn this off if your mesh is displaying artifacts.

Blending - Defines the source and destination logic for alpha blending.

Src alpha / Inv Src Alpha - This is your general use transparency. Think of a flag with holes in it, and you want to see through the holes.

Src Alpha / One - Viewing through this transparency will render brighter. Think of the mist clouds seen in many dungeons or Aelyid ruins, where more and more viewed in line become very bright.


Testing: I recently broke what I thought I knew about alpha testing, But I do know that you can use it to Mask off portions to prevent artifacts. Say we have a zig-zag pattern along the bottom of a flag, and it's a pretty steep fade along the zigzags; but there's still some blending that we'd like to eliminate for a sharp cutoff. Enable testing, and start with a value of 50 or so and increase to taste(range is 0-255). In this mode, Anything with an alpha value less than the threshold won't be rendered.


Using testing and blending may introduce artifacts, or may help solve them, like in cases where you have multilayered transparencies to manage.


You can control Alpha blending via the material slider, or the alpha channel of your color map (base texture) Black=transparent and White=opaque, with a linear fade all points in-between. Make sure you're using the right DXT format for your .dds! If you only need to totally block off something with no fade, choose a 1 bit alpha to save on filesize.


MaterialProperty[edit | edit source]

Defines material and/or shading properties of a given mesh.

Name - Generally may be named anything, except for when calling one of these special use shaders:

Skin - The skin shader. Hair - Hair shader. EnvMap2 - Uses a reflective envirotexture, as seen on many glass items in-game. Right Eye - Eyeball shader. refractF - refraction shader as seen in the chameleon effect. Secretblack - (I think that's the spelling, it might have a space) Used for hiding a mesh from both the render scene, and the minimap. (there is a static named secret black, you place it above a cell portion to hide a secret room from the minimap) Controller - You can attach a MaterialColorController here, useful for some effects.


Clicking the Color wheel brings up the material settings.

Ambient color - The amount of ambient light hitting the model. Most useful when set to a dark shade to emphasize shadows. Has no effect in-game if the mesh has a texture.

Diffuse - The main "color" of direct light on a mesh. Has no effect in-game if the mesh has a texture.

Specular - The amount that specular highlighting will have. Has no effect in-game if the mesh has a normal map.

Emissive- The brighter the value, the more the mesh will be visible in darkness. Glow maps (DDS files that have a _g suffix before the file extension) are used as a mask to make only certain texels on the mesh glow, but are not necessary for the emissive color to work.

Alpha - Another way of controlling alpha transparency.

Glossiness - The falloff of specular highlighting.

StencilProperty[edit | edit source]

Enables Stencil testing. Can alter the way a mesh is rendered.

Enabled: Set it to 1, otherwise there's no reason to keep it around, is there? Function: The logic of testing. Stencil Mask: Don't touch this number. You'll break it :) Actions and mode: The logic to test against.

I've forgotten most everything about how to use stencil testing, so I'm admitting fault :P But here's the skinny on two modes You can use.

Function= Test_greater, fail=keep, zfail=keep, pass=increment, draw=both: Normally, a mesh is one-sided. We can get it to render-two sided here, during any case that we see the backsides. Use this instead of having a double-sided mesh.

-or- Everything set to default, except draw mode set to draw_cw. This will invert the view of the mesh. It won't draw the outside of the faces, just the insides. A creepy sort of x-ray.


SpecularProperty[edit | edit source]

Adds specularity with this property.

It has one value: Flags, and it can be 1 (on) or 0 (off) I suppose you could flicker it with a controller, but I haven't tried.

This method useful when using animated textures or just not having a normal map. When using this property, The vertex shader is used; Black vert colors are not shiny, Gray are kinda shiny, and White ones are most certainly shiny! wowzers!


TexturingProperty[edit | edit source]

Handles the texturing on a mesh.

Controller - If you're animating a texture, the first controller in a chain goes here.

Apply Mode: replace and decal aren't generally used, and it's been forever since I've tried. Modulate is standard pixel-shader that most everything uses- color/alpha/normal/specular. Highlight - Same shader, but with a shiny environment map wrapped over the mesh. Another variation on modulate, but also enables parallax shading- color/parallax/normal/specular. Now the alpha channel of your color map acts as a kind of height map. Parallax mode will "crawl" the texture over this height map to create the illusion of depth. Kind of like a displacement map, but without actually adding height to the geometry of the mesh. Texture Count - "Number of textures" according to niflib. I dunno either. Leave it at 7.


Base Texture - Here we define the source texture to be used as well as:

Clamp Mode - I've never had to switch it, but I'd reckon you could get results when animating a texture. Defaults are Wrap S and Wrap T, best stick with them.

Filter: I'm not sure if changing this will actually change rendering, I'm fairly certain that's a global setting for Oblivion.

UV Set: if your mesh has multiple UV sets, define which one to use. Again, I'm not sure this gets used.

Has Texture Transform: Yes or No, and enables the following:

Translation: Likely more useful when animating textures, but it could be another offset. Tiling: If you've enabled Has Transform you'll at least need to set these both to 1. If you want further tiling, increase the values to suit. Note: If you have a normal map, Nifskope won't render the results, but Oblivion will if you attach vertexColorProperty.

Transform Type: I dunno. Most animated textures have this set to 1. Center Offset: Useful for fine-tuning a rotational texture transform animation.

All the other such-and-such texture modes (dark, detail, glow, etc) aren't used by oblivion. Recent patches to Oblvion introduced the detail map to terrain, so it may be possible to use that mode here, but I haven't tested that yet.


SourceTexture[edit | edit source]

Defines what file to use for texturingProperty's base texture and basic options. There's no reason to use anything other than the defaults: Pixel layout=6, Mipmaps=yes, Alpha=default, and 1 for both unkowns.


VertexColorProperty[edit | edit source]

Used on meshes that have been painted with vertex colors. This method will use vertex shaders rather than pixel shaders. This mode can be used for a lot of things. Controlling specularity, masking hair meshes, or just coloring a mesh. The most common use in Oblivion is to paint crevices and corners on a mesh with dark grays and blacks, to enhance shadows.

Controller - I haven't seen it used, dunno.

Flags - Generally set to 40 for standard meshes using amb_dif, and 16 for glowing ones, amb_emissive. (setting emissive here on the vertices rather than the material setting)


ZbufferProperty[edit | edit source]

Used to trick the depth buffer into rendering things in a different order. Flags: Enable reading and writing, as well as the method. Again, I can't properly describe this one still. But it is useful for determining render order in special effects, such as particles, or transparent arrays. Something best played around with, sorry.


FogProperty Is used, but generally not useful. If I recall correctly, it did some funky depth renders to the applied mesh. All the other properties from Node>Attach Property that I haven't mentioned are either not used, or not useful.  :)

WireframeProperty is also used, it forces the game to render the shaded wireframe of the mesh.


see also[edit | edit source]

This guide is part of a series that I have written:

Working With Nifs 101 : An Introduction

Working With Nifs 101 : Basic Use

Working With Nifs 101 : Copy and Paste

Working With Nifs 201 : Meshes, Data, and you

Working With Nifs 201 : Practical Use

Working With Nifs 301 : A Checklist

Working With Nifs 301 : Nodes Breakdown

Working With Nifs 301 : Properties Breakdown

Working With Nifs 401 : Particles!


NifSkope Alchemy - This is my first guide, it's a little shorter and is a little quicker and easier to digest than the others.