What with the old tangent generator?
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
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…
@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: http://polycount.com/discussion/148303/of-bit-depths-banding-and-normal-maps
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.
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(); bounds.setRadius(1);
final BoundingSphere bounds = (BoundingSphere) lightProbe.getBounds(); bounds.setRadius(100);
Do you have a reference image so I can compare?
Reference image? Of what kind?
I mean the same render with substance painter or sketchfab. With the same env map and same conditions.
Look closer at the white stripe on the enviroment map, in substance it make strong reflection over the back of mesh, and in JME it is rarelly visible
Look how it creates specular on red ring and how should create in flat beveled edge, I suppose it is normal map and tangent problems.
p.s. I tryed to correct exposition as in substence, but it is pretty hard
So I’ve made some tests
I merged Perjin’s fix with the classic lighting shader and I used a classic cube like in this post:
Here is the result : left is the old tangent generator, right is the mikktspace generator.
Not much better. There are still dark areas on the faces.
Note though… that there is no visible difference between the generators…
I looked on the interwebz on how substance painter computes its tangent space. They apparently use mikktSpace, but since few version there is a new option when you create a project:
“Compute tangent space per fragment”
I searched and it seems that if you want to export to Unity you need that unchecked, but if you export to UE4 you need that checked… so I tried as if we were UE4…
This is standard lighting so there may be other issues with PBR and reflection, but I want to tackle this…
I’m going to try with your gun model an see if it’s better (with lighting first). Then we’ll see for PBR.
I guess I need to try different baking softwares to see if theygive some different (accurate) results
Ho cool the reflection looks a lot better…