Friday, 1 May 2020

Toon Shader Experiments

I've been working on the Toonshader a little bit and although it doesn't look perfect, I've fixed the issue of the shader only outlining the silhouette of Sketch, which lost lots of definition. I also played around with a few different texturing methods and I'm still not 100% happy with it, but it'll work for now until I can figure out something better.

I tried to apply the same texture of the book to sketch, with the toon shader outline. I wanted to try this out to see how sketch looked with a bit more definition. With this method, the shadows cast naturally from the hand onto Sketch. However, I really don't like how the added definition looks. It makes Sketch look too 3D and almost clay-like, rather than looking like a 2D drawing.

Experiment 1 with Book Texture
Next, I tried the original method I used in the minor project which was chromakeying.  I wanted to see how this would look now that my scene is properly set up. This is how it looks:

Experiment 2 Chromakey Test

This is my favourite method so far but also quite complex and can be a little overwhelming. With this method, I would have to render Sketch and the rest of the scene separately and overlay them. This might get a little complicated when Sketch interacts with other objects but my way around this at the moment is to duplicate the scene files, and when I come around the render them, I will delete everything but Sketch so the Render will look something like this: 

And when I render the Scene and the Artist, I will remove Sketch and only render the rest of the scene which will look like this:


Something that I had to figure out with this process was that I lost a lot of definition as the Toon outline was only lining the silhouette of Sketch. I fixed this by turning off ID difference, decreasing the Angle Threshold, and changing normal types to smoothed normal in the Attribute Editor. I don't know how this looks in an animated sequence though, So I'll have to try and render a small section of my animation to see if this actually works. I also don't like how Sketch's hands just seem to faze through the pencil and the Artist's hands, I tried fixing this but haven't come up with a solution yet.

Experiment 2 Chromakey with Better Definition

To try and solve this problem I also tried Rendering Sketch and the setup/Artist in the same scene, but I realized that the Toonshader is reflecting a green hue onto everything, which is distorting the colours, so when I overlay it on top of the Render of the scene without Sketch, the colours don't match up.
Chromakey test with Green Hue
Scene Render before Chromakeying

This method looks like Sketch is actually interacting with the objects and not just fazing through them, but the green hue from the toon shader changes the colour of the scene, if I could find a way to stop the Toon Shader from reflecting onto other objects in the scene then that might fix it but I can't seem to find any settings that will do that.