Normals (mesh normals) tell the gpu which way light hits a face, when normals are miscomputed this leads to shading artifacts.
Using .fbx and .gltf .. I found .fbx is simply broken for avatars .. but when using .gltf it resulted in perfect imports into Unity, the normals were preserved and exactly the same as calculated in Blender.
The old built-in pipeline would mostly hide this issue, but in HDRP shading is way more precise and normals matter.
Normals are more vivid in HDRP.
In certain lighting facecap blendshapes cause seams, spots, or lines that appear when using .fbx models.
But the same mesh exported as .gltf does not show this behaviour.
❌Broken blendshape normals (.fbx)
✔️Correct blendshape normals (.gltf)
Vtubers who want avatars perfect curves and normal .gltf is the ideal format.
.fbx works fine in HDRP, using a .gltf involves additional steps, it may not be necessary!! Most readers can skip this section!!
However if you're a vtuber wanting a flawless avatar in HDRP, or if you notice broken blendshapes issue like the image above then read on.
Why are normals broken? The way Unity imports .fbx files can result in errors, the normals calculated from Blender get lost even when set to "import", and it's worse if you set .fbx import settings to "calculate" which breaks normals entirely.
Fix this by using a .gltf base mesh
Blender supports exporting models as .gltf and Unity supports importing .gltf .. the perfect pair! 💕
First step, build a avatar using a .fbx (yes .fbx). Be sure the .fbx was exported from Blender and in rest-pose.
With your avatar slected in Blender (in rest-pose) export it as .fbx
File > Export > FBX
Enable checkboxes: "FBX All" and "Apply Transform"
Those ensure the .fbx armature scale will match the .gltf scale in Unity.
Why do you still need the .fbx??? Because it's the only way to setup the Mechanim humanoind in Unity. There isn't a built-in avatar setup tool for .gltf yet. That's why we need to use a .fbx to generate the avatar's "humanoid" rig, then we can use the .gltf as the avatar's base mesh. Same skeleton, new skin..
.gltf is just a more accurate version of the rigged mesh
After you've build a mocap avatar from the .fbx model , now export the same model as a .gltf from Blender:
File > Export > glTF
Select: "glTF Sepearte (.gltf + bin + textures)" format.
⚠️important note, Unity will attempt to convert quads to tris for any model it encounters, Unity fails at this and the normals get flipped in weird places (even when using .gltf) .
Avoid Unity's triangulation math entirely, use Blender to triangulate the mesh manually before export.
Before exporting the .gltf from Blender be sure to Triangulate all meshes (use the default "beauty" mode) your avatar will be baked in all triangles, but these are precisely sliced and each with a properly calculated normal!!
Select the mesh in edit mode.
Press F3 in the viewport.
Select "Triangulate Faces".
Use Beauty mode for all faces.
Now the mesh is triangulated in Blender , so the normals are preserved when exported to Unity!!
When glTFsat is installed Unity will detect the file forma, but you need to install the glTFast package:
⚠️important note, you must install the gltFast package in package manager so Unity can read the .gltf file type.
Click the + button and search for: com.unity.cloud.gltfast
Now you should see the gltf model is importable, you can place it in the scene and the rigged mesh appears.
⚠️Important note, when using blendshapes for hidden stuff Blender can compute wrong normals and tangents.
When working with hidden mesh that can be "shown" when turning a blendshape on or off (1 .. 0), it's recommended to export the avatar with the hidden parts shown and create a blendshape to "hide" them. This way the normals and tangents get computed correctly for all faces in their proper locations, even for things that can be hidden.
Blendshape "Shows" the face fluff.
Verts are hidden by default, normals are incorrectly computed.
This causes dark spots to appear because the verts are squeezed together and the normals get computed in random directions or floating point errors occur.
Blendshape "Hides" the face fluff.
Verts are visible by default, normals get correctly computed.
Now the verts were visible when the normals were calculated and the mesh looks smooth, the hidden mesh stuff blends perfectly, no seams or spots.
In Unity select the avatar you built using the .fbx
Look for the SkinMeshRenderers for each mesh.
Swap "Mesh" with mesh from the .glft file.
That's it!
Next Page: HDRP Recording
no - just HDRP, Built-in hides the flaws.
Yeah, but HDRP lights will show every crease--your call
Test in HDRP lit scene. If no weird glows, skip GLTF
You can - it's s;pwer and buggier on tangents. GLTFast's free, try it.