Nif Overlapping Shaders

Post » Thu Jun 21, 2012 7:36 am

I discovered something very strange while nif hacking today overlapping shaders yield strange results... Originally I could not for the life of me figure out how to place both a "BSLightingShaderProperty" and a "BSEffectShaderProperty" on the same NiTriShape without the game crashing, turns out I now believe it just isn't possible as there can be many other properties that would apply to an ambiguous number of sibling nodes.

So, since I am completely incapable of meshing as I have no idea where to start I figured I wouldn't be able to make a complex NiTriShape node for the shape I was going for. Instead, I decided I would duplicate an already existing NiTriShape node and fiddle with the shaders.

The goal was to obtain a glowing tattoo on an NPC's face,

Starting off with duplicating the entire shape of the face
Replacing the BSLightingShaderProperty with a BSEffectShaderProperty
Adding an alpha property and linking it to the NiTriShape to make the alpha texture show only the desired portion
Fiddling with the Shader Flags to get the right combination to make the tattoo supersede the other texture

Success!
http://i.imgur.com/aMcnM.jpg

Now to see what it looks like in-game...

IT WORKS
http://i.imgur.com/KtVvY.jpg

Lets get a closer look... WAIT... WHAT THE HECK IS THAT?!
http://i.imgur.com/qyioJ.jpg

Apparently the closer I got the more chunks of UV started to disappear. Never completely disappeared, just got really ugly, the side it was on made a difference to how much disappeared.
Layer render confusion?
Alpha problems? (I suspect the alpha property from the hairstyle may have been the culprit as the amount missing differed when I changed sides of the tattoo, as does the amount of texture on the hair that goes down the head)

I increased the scale of the duplicated head to see if the problem would persist when the textures were not literally on top of each other and apparently it did, floating glowing tattoo with UV chunks missing when I was close up.
User avatar
John Moore
 
Posts: 3294
Joined: Sun Jun 10, 2007 8:18 am

Return to V - Skyrim