MilesV (6/10/2021)
I was starting to dive into the documentation Unity has for Shader Graph and was getting a little overwhelmed. Its great to know I can switch to the hair and eye shaders from the inspector and not have to go down the rabbit hole of the node editor just yet.
But down that Rabbit hole, you must go.
It has taken me a while to figure all this out but, consider this character in CC3:
She is of the quality you would expect from Character Creator, but when you export into Unity (I'm using Unity 2020.3 / HDRP Pipeline here) you get this:
Which is obviously awful, Mainly due to the FBX format, which does not support the PBR texture set. (At least not the version of FBX that CC3 exports and Unity imports.). In fact, all it understands is the Diffuse texture, the Specular mask texture (which Unity doesn't actually support), the Opacity texture and the Normals. Which is why it looks terrible, because most of the textures are missing.
The next order of business is to populate the HDRP/Lit materials with the appropriate base textures, of which we have the Diffuse, Mask (named with the suffix '_HDRP' in the files.) and Normal maps.
Here I have plugged all these textures in, changed the hair material shader to HDRP/Hair, and given them some appropriate settings:
(I'm using the eye occlusion texture from the OBJ export to Blender as the alpha channel in an all black diffuse map, for some reason it doesn't come with the FBX export. The tearline material is 100% transparent, max smoothness material with no textures.)
And this is probably as good as it gets with the base textures and default HDRP material shaders, but it all looks flat and lifeless compared to the CC3 image above, particularly the eyes.
To truly recreate the character with all the details and layers and effects of the CC3 shaders, you
have to dive into Shader Graph. Additionally we also have the problem that there is no 1:1 mapping of CC3 to Unity. They use different lighting, different shader models, different colour mapping and who knows what else. I had the same problem in Blender when I was making the Material setup add-on for that, the only real solution being to provide enough parameters and controls to the users so that they could make the characters in Blender look like the characters in CC3.
The same is true of Unity, so to achieve similar results to CC3 we need more control over the material shaders in Unity than the default HDRP/Lit and Hair shaders can provide.
The shader nodes in Blender materials and Unity's Shader Graph are
very similar. Similar enough that I could reproduce the same shaders in Unity that I made in Blender, even improve on them a bit. And they look something like this:
These shaders are using all the textures for the blend layers, micro normals, normal blending, shadow layers, hair root, id and flow maps, vertex deformation for the eyes and all the parameters to control how each texture is used and layered into the final results. The eyes are refactive with iris depth control and pupil size control. The skin, hair and eyes have min-max remapping and power curve mapping for the smoothness and alpha channels and it has all the controls of the smart hair shaders too.
There's still more work to do on the shaders and they are going to take a serious amount of explaining, but so far, I'm quite pleased with the results.
More to follow when I get the chance...