Normal Map shading problems

If it’s the normals and not the normal maps… then it has to be the geometry. No way around it, really.

Note: you could also try adding a normals mesh to see if the lines are pointing where you expect.,%20float)

Mhmm, now we are looking what is wrong.

Solved, it was an geometry issue. Sorry for false alarm :slight_smile:

Ok, I didn’t have time to work further on this. So I just figured I’d push it in its curent state, even if it’s not perfect.
It’s available in latest master and PBRisComing branch.

Usage is :


Could you please try it on your models and report?

Thank you!!! I will try to test models as soon as it is possible for our project. We have to create model loader in our SSeditor and embed your MikkTSpaceTangentGenerator

Hm…crazy artefact crossing through whole model:

What with the old tangent generator?

Old generation does not have this “specular stroke” issue

But it is still old, broken generation :smile:

btw, why MikkTSpace dont have “split vertices with mirrored UV”, can it be a problem in this case?

Idk, I’d have to see your UV layout to tell if there are mirrored uvs :wink:

What you can do though is call first the old generator with the split mirrorred to true, then call the Mikktspace generator afterward.

ok so no mirrored Uvs. So splitting won’t help.
For the record, the mikktspace I implemented is the regular blender implementation. So I really have no clue why it’s not working with that generator…

I’ll think about it, I have to catch some sleep first…

Next try, PBR:
Standart tangent generator:


The problem was found via PBR exploring:

@nehon: I think i fixed the shading problem and made a pull request for the PBR branch.

also the ripples effect is caused by banding because of the 8 bit normal map, a 16 bit map would fix this, but the best trick to avoid banding is to bake the normal map with 16 bit channels and then convert it in Photoshop (or GIMP, Krita whatever) down to 8 bit which will introduce dithering, the dithered texture is a good compromise in quality to texture size.
Polycount has a discussion about it with nice pictures:


I can’t give you enough like for this dude… thanks a lot.
I merged the PR

Thanks! I am always using 16 bits png as my output and than I convert it to 8 bit tga in photoshop.

But the problem of shading is still in place, alas :frowning:

Model still has this specular artefacts.

Maybe I am doing something wrong. If so, here is my model:

Maybe that’s the parallax fix… does it changes when you change the lightProbe radius?

Nothing changed at all.

final BoundingSphere bounds = (BoundingSphere) lightProbe.getBounds();

final BoundingSphere bounds = (BoundingSphere) lightProbe.getBounds();

Do you have a reference image so I can compare?

Reference image? Of what kind?