I added an antialias to the camera because the edges between the light and dark areas are rough. The background in this example is just the normal Unity toon shader (works well with textures). It’s easy to add but I’d need to manually paint the vertex colors. This is required for closeups of the face or for spikey hair. I still need to change the outline thickness using another vertex color channel. I found manually painting the vertex colors had better results. Blender has an option to make a meshes vertex colors dirty e.g blacken the areas between gaps. This is required for things like folds in clothing or muscles as the normals have been simplified (smoother surfaces). I also added the vertex color to make areas darker (adjusts the light normal threshold / ambient occlusion). One interesting thing is that the specular area can be light or dark depending on the specular size texture channel. This light source is animated during special attacks. Each character also has its own directional light source. It handles inner lines using a special layout as mentioned in the documents. In this case I just used Blender and transferred the normals from simplified meshes. The most important thing is probably getting the normals right. The outline is just a basic expanded mesh with inverted normals.The vertex colors of the outline mesh are a darker version of the character e.g coat = dark orange. If it is, use the light color (main texture) otherwise use the shadow color (main texture * tint texture). Basicly you just check if the surface normal is facing the light. The links at the footer cover it in more detail.
#Guilty gear xrd revelator character types code#
This is my first Unity shader and I haven’t cleaned up the code at all. Just posting a shader based on Guilty Gear Xrd.