NifSkope Tutorial 1: Nif No Glow
Version 0.3
Introduction
The 'plastic wrap' look of enchanted items has often dissatisfied both players and modders for years.
Numerous 'no-glow' and 'reduced glow' mods have been produced over time. Though good solutions they often
have unwanted side effects and limitations.
Firstly, a mesh maker cannot mandate the use of such mods, and thus cannot control the look of their work under all conditions. Worse, an unfortunate choice of No Glow along with a lack of comprehension can expose the modder to brickbats from less tech-savvy users.
Second, Enchantment can interact badly with some meshes that use alpha effects or NiTextureEffects. Setting enchantment points to 0 prevents such problems but can feel less than satisfying.
Finally, I'm told some No_glow solutions disable the ability of detect enchantment to work, an unfortunate limitation.
The technique I detail here is not a replacement for these solutions, but another weapon that modders
can use when appropriate to control the desired appearance of a mesh asset.
Mod savvy players can also use this technique if creating personal custom equipment.

Background
This technique came about from trying to use the techniques pioneered by (amongst others) Axel and Bjam, in 'Freedomforce' by Irrational games. Although not very similar to Morrowind in play, it uses the same graphics engine, Nif 4.0.0.2. We quickly discovered that Freedomforce was quite happy to display 'bump maps' but in doing so they suppressed gloss maps that are used extensively in Freedomforce.
My suspicion has always been that the much detested 'magic glow' of Morrowind was a gloss effect, albeit a very unsubtle one. It occurred to me that if I was right, then we could suppress magic glow at the Nif level, by making it impossible for the game engine to display any other NiTextureEffect dependent effects. Better yet, we could set the bump map effect to 'no effect', suppressing many of the changes to a meshes appearance when it was enchanted. While there is a school of thought that is not convinced that magic glow is an NiTextureEffect coupled with a primitive gloss map, the discovery that bump maps DO suppress the magic glow certainly adds weight to the argument. Note that to display any observable effect, a bump map requires a valid NiTextureEffect and enchantment does cause the game engine to add one.
If my theory is correct, the mechanism is that enchanting the item adds an NiTextureEffect and this activates the bump map. The bump map has luma settings of 0 and so exhibits no effect. It's presence, even though inactive, suppresses the gloss effect of 'magic glow'.

NifSkope Surgery
For this example we will convert a 'pair' of Better Bodies boots to 'Nif-No-Glow'. I'll assume you already have these boots added in the CS as 'xx_myboots', that they have a suitable enchantment and you dislike the look of the enchanted boots.
Be aware that it is very difficult to give a foolproof recipe for this. The exact steps you will take depend very much
on the actual Nif You are amending. I'm also assuming you are no neophyte when it comes to NifSkope and the internals
of Nif files. I'd reccomend not tackling work of this nature until you are comfortable with basic Nif operations such as
changing texture paths and similar.

Open the Nif in NifSkope and examine the tree of nodes. I'll assume you see a parent node, 'Scene Root', with two children. Open 'Bip01', which also has two children. We are interested in the NiNode 'Right Foot' with four child nodes, 'Tri Right Foot 0' through 'Tri Right Foot 3'. We need to amend these four nodes to add a bump map texture to each, preventing the game engine from adding a gloss effect.
First we need to copy the existing base texture. Open the first node, 'Tri Right Foot 0' at 'NiTexturingProperty' and click the plus to display the base texture.
Right click on the 'NiSourceTexture' and select 'block, copy'. Then right click on the 'NiTexturingProperty' node and select 'block, paste'. You will see a new node appear. Depending on your version of NifSkope, it may or may not have a parent. If it does have a parent, unparent it by setting the children ref to '-1' and reducing the number of children if appropriate.
Note the node number of this new node.
As we intend to suppress the bump map, the actual texture used is not relevant, so we re-use the base texture the copy has.
Now we want to declare this new texture a bump map. Returning to the NiTexture node, scroll down to the section
'bump map' and click on 'no' and change it to yes. Then click on the plus sign on the section below, 'bump map texture'.
Click on the 'source' field and change '-1' to the value noted previously of your new texture node. Be sure the new texture 'snaps into place' in the tree view.
Now we need to change a few default settings. Change 'Clamp Mode' to WRAP_S WRAP_T, 'Filter Mode' to FILTER_TRILERP and though it's doubtless not relevant, change 'PS2 K' to 65461 (NifSkope 1.0.6 has identified this as a short, so the entry should be -75 instead).
Finally and most importantly, ensure the settings 'Bump Map Luma Scale' and 'Bump Map Luma Offset' are set to 0. These settings completely suppress the bump map effect.

Repeat these steps for the remaining three nodes, creating and positioning new bump map textures.
Save your work, fire up the game, open the console and give your character the boots with player->additem xx_myboots 1. Put them on. You might notice some breakthrough effects as parts of the mesh that were previously invisible now show.
If so, quit the game and go back into NifSkope. Open up and examine the nodes that cause problems. You'll probably see
the nodes have an NiAlphaProperty. Further inspection of the 'flags' section may reveal the mesh is using Alpha Testing. This seems to produce issues with NiTextureEffects (which both gloss and bump use). The solution seems to be to disable alpha testing but retain or enable 'sort triangles'. You can use the menu or just type in the settings. I find the following settings in flags often work well: 4333, but you may need to experiment.
To be tidy, change the threshold setting to 0. Save again and test in game once more.
Marvel as the enchanted boots now have no glow at all, overriding the default game glow or any custom 'no-glow' mod.

An added bonus. Items including ground meshes that is treated in this fashion will show up to detect magic unless another mod disables this.

Limitations
You cannot use this technique if you are relying on an NiTextureEffect to enhance the appearance of a mesh as the bump map
will suppress it. It may be possible to substitute a correctly applied bump map for the effect you are currently using to
reproduce the desired appearance. This use WILL suppress magic glow, meaning the appearance will be the same enchanted or not.

Version History
0.1 Initial release
0.2 Added version history and confirmation re:detect magic.
0.3 Noted different format of PS2 K for NifSkope 1.06+
Very nice, thanks, and certainly useful.
Gr8, Symon!

Thanks a lot.

But can you write a “regular” bump tutorial?

I am not able to understand all details of the Russian one:

http://tesall.ru/morrowind/bumpmapping/1#introduction


smile.gif
@ A1x2e3l: What, you can't read that? It's simple. You just "которую называют bumpmap", then you "главный инструмент", but make sure that comes before any "«МЕТАЛЛ»"ing. tongue.gif

Yes, a regular bump-mapping tutorial would be nice, if you have the time, Symon.
QUOTE(A1x2e3l @ Jan 29 2008, 02:20 AM) *
But can you write a regular¯ bump tutorial?
I am not able to understand all details of the Russian one:
http://tesall.ru/morrowind/bumpmapping/1#introduction
smile.gif

Glad you like it.
OK, I'll turn babel fish loose on the Russian and see what I can do.

EDIT: Yes, I think I can puzzle this out. On the whole it hasn't revealed anything I don't think we already know, except perhaps one thing I find a little doubtful. I think they are saying if you combine a glow map and a bump map in the same Nif, Morrowind (Morrovinda!) will crash to desktop! FF doesn't for sure. I'll have to try that combination to see if they are correct.

EDIT2: The Russians also seem to think that enchantment is a gloss effect!
EDIT3: There is a hint that using bumpmaps with an Alpha layer might suppress the bump effect in the alpha'd (or non-alpha'd) section. This might be VERY interesting. The secret of good reflection and bump maps is precise control.
QUOTE(Symon69 @ Jan 30 2008, 07:50 AM) *
EDIT: Yes, I think I can puzzle this out. On the whole it hasn't revealed anything I don't think we already know, except perhaps one thing I find a little doubtful. I think they are saying if you combine a glow map and a bump map in the same Nif, Morrowind (Morrovinda!) will crash to desktop! FF doesn't for sure. I'll have to try that combination to see if they are correct.

The glow map and bump map can be applied at the same time - I did it on this spear (pic)

QUOTE(Symon69 @ Jan 30 2008, 07:50 AM) *
EDIT3: There is a hint that using bumpmaps with an Alpha layer might suppress the bump effect in the alpha'd (or non-alpha'd) section. This might be VERY interesting. The secret of good reflection and bump maps is precise control.

I don't understand this exactly, but if you use the bump map on a mesh that has an alpha'd texture, the alpha'd texture will turn out like this (pic) - you can see it makes the whole texture shiny, or it will make the alpha completely black. On the mesh the square part is meant to be a transparent halo around the tip of the spear.

I tried everything in nifskope to seperate it from the rest of the mesh within the one nif, but I couldn't find a way around this problem.


There is one other problem I've found:

As seen on this picture, all the pieces of the armour (except the helm) had the effect applied, however the cuirass doesn't work, as it's skinned - the effect doesn't work on creatures either. I really want to fix this, Axel suggested the only way to fix it was to make it enchanted, and it works, but it looks ugly. So I could edit or remove MW's stock enchanment reflection map, but then that would edit the look of every enchanted object in the game for whoever used the mod...


Any ideas?
QUOTE(Vality7 @ Jan 30 2008, 07:39 AM) *
The glow map and bump map can be applied at the same time - I did it on this spear

Good! Thanks for that, saves me having to test it. I suspect the Russians apparent problem might be due to their preference for older versions of NifSkope. Perhaps they are keen on baked textures which are (IIRC) supported by their preferred version?
QUOTE(Vality7 @ Jan 30 2008, 07:39 AM) *
I don't understand this exactly, but if you use the bump map on a mesh that has an alpha'd texture, the alpha'd texture will turn out like this

I've seen effects like that on the spear before. They are one of the unfortunate interactions of NiTextureEffects and Alpha Layers I mention in the Tutorial. You could try 'to disable alpha testing but retain or enable 'sort triangles' if appropriate and see if that produces any acceptable improvement if you haven't already.
QUOTE(Vality7 @ Jan 30 2008, 07:39 AM) *
There is one other problem I've found:
<snip>
Any ideas?

A few guesses: First It looks like the Cuirass has no NiTextureEffect. Enchantment adds one, which makes it work. It looks poor because you can't (apparently) control the look as I suspect Morrowind then ignores the mapping you have established, perhaps by adding it's own primitive, all-over, all-white one.

I'm working on trying to get around these sorts of issues. If I succeed, you'll hear my yell of Triumph on your side of the world!
QUOTE(Symon69 @ Jan 31 2008, 08:44 AM) *
A few guesses: First It looks like the Cuirass has no NiTextureEffect. Enchantment adds one, which makes it work. It looks poor because you can't (apparently) control the look as I suspect Morrowind then ignores the mapping you have established, perhaps by adding it's own primitive, all-over, all-white one.

I'm working on trying to get around these sorts of issues. If I succeed, you'll hear my yell of Triumph on your side of the world!

No the Cuirass has a NiTextureEffect, the exact same setup as all the other pieces of armour. If enchantment is off it doesn't show up, but if it's on it works, but as you can see it looks too weird, and this all only happens with the cuirass because it's skinned.

The thing is I can control the look of the enchantment map, Axel suggested changing the Caust00.tga - Caust31.tga textures - But replacing it with my own textures would mean replacing everybodies.
QUOTE(Vality7 @ Jan 30 2008, 10:06 PM) *
No the Cuirass has a NiTextureEffect, the exact same setup as all the other pieces of armour. If enchantment is off it doesn't show up, but if it's on it works, but as you can see it looks too weird, and this all only happens with the cuirass because it's skinned.

Hmm. Odd. FF meshes are all skinned and all display Gloss and Bump maps perfectly, and they are exactly the same Nif versions.
My theory (unproven) is it's not the fact the meshes are skinned, but a result of the way Morrowind composites character meshes. I know the graphics engine can display gloss and bump effects on skinned meshes, but Morrowind is reluctant to do so for some reason.
“but a result of the way Morrowind composites character meshes”

I also think that we are facing the worst-case scenario: MW game engine does not allow skinned armor, clothes, body parts to have NiTextureEffect. I assume that MW is based on MODIFIED NetImmerse 4.1.


Alpha properties and bump maps. As far as we can find in NetImmerse documentation (alpha settings in Max NetImmerse shader) there are very many possibilities (combinations) to set this property. Perhaps, one might work. I know that iit s difficult and tedious to test that (set in Max, export, analyze flags etc. in NifScope, test results in the game). This is not very interesting, indeed.


“But replacing it with my own textures would mean replacing everybodies.”

My arguments for this solution:

1.Many players/modders do like original enchantment effect. There are several mods/approaches just to kill it.
2.I am using/recommending to try “Magic Glow as Reflect Maps” by DzeI aka J:
http://planetelderscrolls.gamespy.com/View...ail&id=3557
This mod has very reasonable textures for enchantment effect/ NiTextureEffect.
3.I am not alone suggesting this solution: as far as I understand Alphax is proposing it as well.
4.And at last but not the least: there is no other way so far.

smile.gif
QUOTE(A1x2e3l @ Jan 31 2008, 11:09 AM) *
“But replacing it with my own textures would mean replacing everybodies.”

My arguments for this solution:

3.I am not alone suggesting this solution: as far as I understand Alphax is proposing it as well.


I was? rolleyes.gif Well, possibly. Ditching it entirely has the advantage that you don't need to worry about alpha'd meshes showing shiny bits on things that aren't there; the question is, can they coexist with bump maps?

Vality: When can we see Neverhalls? smile.gif
QUOTE(Alphax @ Feb 6 2008, 11:00 AM) *
Vality: When can we see Neverhalls? smile.gif

Very possibly today. Just gotta do one or two more runs through it on my other PC.

I could have released it weeks ago had I not decided to add more to it. The way it is now it feels kinda complete, but to me too short - there is so much more that could be added, it may have to be expanded in a future release...but I figure if I don't stop adding to it now I'll never get it released.
“I was? Well, possibly.”

Well, that was my understanding of your suggestion at NifTools forum.

smile.gif
An update. Tested that this effect does NOT disable detect enchantment and added a version history.
Update to version 0.3
Submit a Thread