[SDK 3.8.1-beta.3] - Toon Standard issues with reflectance and custom normals
available in future release
Davilos
Several of my avatars seem to not play nicely with the new Toon Standard shader, specifically the reflectance. Even when Gloss and Metallic are set to 0, as long as there's any reflectance value, areas on meshes with heavy amounts of custom split vertex normal data reflect things far too intensely. This was tested and reproducable with several models that use custom split vertex normals for eye shading.
Here is an avatar blueprint with the issue: https://vrchat.com/home/avatar/avtr_49fd3f99-59d4-47d0-be65-5f757729908d
Log In
This post was marked as
available in future release
_
_tau_
Davilos antrobot I've looked at your uploaded avatars, and it appears your tangent data is messed up. See attached screenshots. Toon Standard uses tangent data to calculate lighting, including specular, which leads to this result. Usually tangents should be smooth like your vertex normals.
I've adjusted the shader to apply the reflectance value to fresnel regardless, which did appear a bit incorrect, but the root issue comes from this.
Davilos
_tau_I’m guessing it’s probably because of Unity recalculating tangents instead of using imported ones? Being completely honest, I have known of tangents but have never understood their function or relation to normals for years
Davilos
_tau_ Okay quick update. I did change it to imported tangents but that created some more weird lighting. First is with imported tangents and second is with calculated Mikktspace
Edit: Even further digging reveals there isn't really a way to modify tangents within blender. The calculation is mostly done in Unity, which is not good at decoding custom normal tangents.
_
_tau_
Davilos: I believe tangents are calculated from a UV channel somehow?
Davilos
_tau_ They rely on a myriad of things from what I’ve learned. UV orientation is a factor, yes, but not all modeling programs generate tangent data, such as Blender. For reference, none of the UVs on this model are stacked and everything is properly unwrapped (see attached file). However, Unity is trying to generate tangent data based on the custom normals which is throwing off lighting angles greatly. I think a good fix for this would simply (if possible) to make it so that reflectance can be masked out or just doesn’t render on parts of the material that aren’t smooth. As is though, I think this could lead to issues for anyone who uses custom normals since Blender, the most commonly used program to make VRC avatars, does not support tangent editing.
_
_tau_
Davilos:
> just doesn’t render on parts of the material that aren’t smooth
That is, unfortunately, not easy or even possible in a shader. As far as I am aware, most existing community shaders would break down with invalid tangent data as well. I'm not sure this is something that we can fix on our end from a technical perspective.
Davilos
_tau_ I wonder what exactly causes it then because my models with the exact same custom normal setup have worked fine with Poiyomi, XSToon, Silent Shader, Standard (+ Lite), and others. This is the first example of reflections appearing on a mesh with a smoothness value of 0 for me.
Davilos
_tau_ Did yet a little more digging and it has something to do with realtime lights it seems. I've provided a couple of pictures, but suffice to say it seems to be adding specular highlights when it shouldn't. I've modified the custom normals of my eye mesh and while it's better, it's definitely not fixed.
The first image shows the inside of the head mesh (namely focusing on the eye cavity and the tongue mesh) with one realtime directional light. There's a specular highlight on the tongue and an erroneous highlight in the eye, where the gloss map specifies it should be completely rough.
The second image shows the exact same scene, this time with the realtime light disabled.
The third image shows how it looks with a gloss of 0 across the whole mesh and the light is re-enabled.
Something about the reflectance adds glossy highlights to the mesh based on the realtime light even when no gloss should be present at all. Does that help narrow anything down in terms of the issue's source?
_
_tau_
tracked
antrobot
Also experiencing this issue. What is odd is that i don't have any custom split normal's on the model in blender. The issue is especially apparent in the calves, with this odd wavey pattern.
Avatar ID: avtr_42b0b03b-9241-4c3f-86f9-2fef9a7561c5
World Tested: Default VRC home world.