Jump to content

Need help with a strange glitch when converting a hair mod...

Recommended Posts

I've been troubleshooting and troubleshooting this issue the past few days, these weird "lights" show up on nifs in certain lighting conditions and at certain angles.  Does anyone know what causes this and better yet, how to fix it?


Examples in webm form here











Please help me fix this.  I've been working on this mod for a while, and I'd hate to see it continued to be plagued by this glitch!

I've done multiple things to try to fix it, I've faced the normals on the meshes, I've copied the trishape into a new mesh, I've messed with shader flags and altered the Bgsm a lot...couldn't find any working solutions.  :(

Link to comment

The hair's specularity is broken, it's rendering beyond the 0-1 range, which in turn breaks the HDR/Bloom post on your screen. Physically correct shaders aren't mean't to render beyond those ranges.


I don't think it's a normal map issue, unless the normal maps aren't saved in the correct format as well and are fighting the shader (although as far as I am aware, the game CK should crash if you don't have the right textures).


It's either a Spec/Metal texture issue (not correct format, not correct values, not correct masks, lacking a texture, etc.), didn't set the hair to anistropic (please reference other hair, since Anistropic shaders don't follow the same texture levels), or you set the spec value too high in the material itself (please note that if you have a weak texture and try to compensate with the materials value, it still render it incorrectly due to the Schlick-Fresnel term).

Link to comment

I tried setting Specular to 0.5 on the material, it still happened.  I've got one of the hairs here, if you want to take a look.  I dunno what to do anymore on this, I've set them up 100% identical to other hairs, in the nif shaders, and bgsm, still it does this.   :dodgy:




Here's the file if anybody wants to look into this and see if anything looks off.  I have backups of the files included of previous versions of the Bgsms, textures, and mesh.



Link to comment



Your textures where wrong.

You should only be saving the albedo/diffuse as DXT5 if it has alpha data.


Diffuse (no alpha) -----  bc1 / dxt 1

Diffuse (with alpha) ---  bc3 / dxt 5 (bc7 should also work ok)

normal map ------------  bc5

Specular map ---------  bc5


Also since the spec map (_s) is flat (for the long hair at least) you should just use that.


And there was no alpha data in the texture files (or mip map data for that matter) so you don't need to have an alpha property in the nif.

Also its rigging is shit.  :P

Link to comment

Its only at specific angles, and in certain lighting conditions.


I think its an issue in the mesh(es) themselves.


I do have Enboost enabled, but I removed it to test, still happened.  I noticed certain workshop lights causing it to happen more often, and also Bright headlamp from power armor.  I gave it to someone else to test, they also mentioned seeing the glitch as well...


But I guess I'll keep testing, now that I think about it, it might also be a Godrays thing or something.

Link to comment

Hmm just a thought but what hair line are you using? i replaced hair 4 "FemaleHair04.nif" and you can see the hair line in the pic i posted (the shadow thing on the forehead).

If you're not doing what i did and have it set up as a nonreplacer, are you doing what was done in skyrim and having the hairline and hair use the same (duplicated) mesh?


Its the only thing i can think of that i might be doing different to you 'cus no matter what lights i put it under i never get that bug.

Link to comment

I'm not using a hairline for any of the hairs.  I'm not sure how that would make a difference, but I guess I can test it.


I also tested various in-game settings, nothing seemed to get rid of it.  I did note one thing:  Once I scrapped the lights in that area, it stopped.  It seems to glitch out when she's really close to a light source.  Headlamp didn't mess with it.


Oh and if you want to test it, here's my current ESP






Another webm here, a closer up of the stuff that is happening




It seems like some sort of light thing

Link to comment

That webm kinda looks like its the fresnel effect thats playing up, witch would put the mesh as one of the problems.


after building a room and filling it with every light possible i did get it to happen to me, but only with the flying cam and never with the normal 3rd person cam.

Also it was very subdued for me the shinning was very diffused and much dimmer compared to what you had.


If it is due to the fresnel effect, and the other hairs are made the same way as this one (box geometry and no plane) then having smooth normals on it will cause it.

The fresnel effect happens when light hits an object at a glancing angle, and is calculated by you (the camera) the object and the light source so would only showup when all 3 are in the right position. 

Link to comment

Thanks for all the help.


So uh...what's a way I can fix this?  Making new normal maps for all the hairs?  Rigid normals?


I usually use this site for generating normals, but I used the default one for these:






Not sure if its Fresnel...idk.


I set Fresnel power to -1 in Bgsm and it still happened.


I'm not really that knowledgeable about textures, I can do rigging and 3d stuff, but so far on textures I guess I've been lucky...till now.

Link to comment

YOUR NIF FIXED IT!!!!!!!!   :lol:


I just need to ask you one more question...how did you fix it?  I've got Blender / 3ds / Nifskope installed already, I have a LITTLE experience with 3ds, but not much.


I need to redo whatever it is you've done around 69 more times.


Also thanks so much man, I've spent the past eight days trying to figure out why this was happening.   ;)

Link to comment

I use max (both 2016 and 2013) things i did were;



collapse stack

inspected the mesh at the area where the problem was.

Seen the terrible geometry where the bobbles are and deleted them

Made some simple replacements

Combined it to the hair mesh

Aligned normals


Fixed skin...

The prepared it for export using the official one bethesda supplied for 2013.


Made all the necessary adjustments in nifskope to match it to the one you made.



I could probably better narrow down the problem and its solution if you could send me another hair.

https://a.pomf.cat/ceixnx.webm <--- that one looks to be the worst and should give me a better idea of the problems once i see the mesh.

Link to comment

It has to be the vertex normals.







This is the mesh imported to max, you can see the shadow like effect? it matches with the webm you posted, same places.

Its due to the vertex normal facing the wrong way.







I simply unified the normals which removed pretty much 99% of the shadows.

And since they are in a smooth linear bend from one normal to the next the fresnel effect won't happen at normal angles and only at grazing one like its meant too.







The meshes also have back facing polys, you probably don't need to bother fixing them since you used the double sided flag.

But it will cause shading problems, as well as stop the normals aligning properly where the 2 polys meet, and will break smoothing at those points on export.



I'll attach the nif for you to try, i only kinda saw it on your mesh a little (unlike the webm) but on mine i never got it to happen.


Link to comment

I just tested that nif, I didn't notice any glaring glitches on it.   :D


Thanks for the help man, and thanks for the pictures.  I'll try fixing them on my own later, I actually need to go to bed now, but I'll let you know later if I can fix the rest.


I tried unifying normals before in 3ds before on the ponytail one, and it didnt seem to help, but I'll try this.  




Actually I lied about going to bed.  I may only get 4 hours of sleep today but I had to make sure I got this fixed.  Looks like I managed to get rid of the glitch!  Thanks for the tips man.  I didn't know about the vertice weld part (like I said Im a noob with 3ds) but that seemed to have made unify normals work better.  Some of the hairs were segmented into bits, but I combined them in Blender.  But they weren't properly welded, I guess.


I loaded the nif in 3ds.

Welded vertice by 0.1

Unified normals


NOW the glitched lights are gone from this hair.  Thanks for all the help, I think this is solved now!



Link to comment


This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...