Shade


97a5

For some time I’ve been meaning to do a post, or rather a series of posts, where I explain how I do what I do.

Not all of it, because a girl has to have some secrets, and I guess that goes for me, as well. Because these are my rules. I make ’em up.

I haven’t done it, not out of fear or anything, but simply because my workflows are the opposite of tidy. I could dash off a few snaps or post a sample file, but most of my stuff would be next to impossible to read. I have to think pretty hard to remember what things do when I tinker.

Recently, I saw a neat video playlist on Physically Based Rendering, which is just fancy talk for trying to emulate the way light actually goes about bouncing off stuff. Great for Photorealism,  but I am (obvs) not into photo reality.

But that’s true of all artists, in a sense. The idea of art is understanding how to do the reals, and understanding how to cheat in the unreal, or how to make your unreal look satisfying to the viewer.

One thing that’s fairly common in NPR rendering, with its general attempts at anime/cell-shading is finding the elements that are not done well, in traditional art and finding ways to emulate them. This is not that. This is the opposite of that. It’s looking at how things can be made to look realistic and then seeing what happens when you apply unreal to the method. If the idea is good, it will naturally look like other forms of art. I’ll leave it to you to decide how close it came (except to say, I’m pretty sure the glass didn’t work out).

Enough stalling.

PhysicalBasedToon.blend 1.07M

Here’s the basics of my Cycles proof of concept for using Physically Based Rendering workflows for toon shaders.

I highly recommend watching the CynicatPro playlist linked below if you want to understand how these shaders are made. The toon versions provided are, essentially, just the Cynicat shader workflows with a few things I know about toon applied.

You may even have better ideas about how to apply Cycles toon, and I’m super interested to hear them. The Tutorial on my site is focused on how to use these node groups, not the bones of how to make them. Feel free to pick them apart, remix them, reuse them. Assume totally CC0 by the most permissive standards applicable, because I really don’t care what you do with these. I would love if you gave credit and drove attention to my website and comic, but meh. Mostly, I just want people to have fun with it.

And it’s not “I don’t care because throwaway.” I’d do the same with my current shader set up, if it wasn’t 18 months of kludge with nodes that probably don’t do anything anymore. Everything I know about Cycles, Blender and 3D in general is the result of people being willing to aggressively share what they know. So, I’m gonna try to do the same.

Inspired by CynicatPro (https://www.youtube.com/playlist?list=PLlH00768JwqG4__RRtKACofTztc0Owys8)
Using concepts in toon shading from:
Shinsuke IRIE (https://www.youtube.com/watch?v=WcQFs1opokI)
Nicolas Robitaille/NixArt (https://nixart.wordpress.com/2012/05/19/blender-cycles-toon-material-node-setup/)

How to use:

The Metallic PBT and Base PBT shaders are used in the same Manner as BSDF node. You can plop one down, add color, connect it to material output and render.

For best results, however, you don’t want to do that. You want to use a Shadeless node. Make sure the color inputs on the shadeless node are using the same colors as your base shader.

There’s actually no huge reason you couldn’t do differently, and use totally different colors, but I have no idea if that would look good at all. It is important to use the same Color and Rim settings with Shadeless for predictability.

Basic run down of what Shadeless is doing, it’s an Emission shader clamped to be largely Camera visible only. It will, illuminate Glossy, which allows it to work with mirrors. To most other rays and surfaces, however, the Emission shader isn’t there. The Emission shader washes out some of the shadows and shading from the toon shader. It prevents the toon shader from picking up some diffuse coloring. Not all, but some. You can control how strong the effect is. The slider doesn’t entirely turn it off or on, because being totally off make it wasted node, and being totally on defeats the purpose of the node It’s just a fancy lamp.

This is a separate node for a reason.

If you haven’t watched CynicatPro’s vids on PBR, do so now, so that you have a sense of the why behind the next step,

Basically, where he uses reflection group, this system has Reflection and Gloss PBT. The groups do the same job, but a different levels of detail. Toon glossy IS glossy. Which means it gives back a reflection of what’s around based on the smooth value. A lot of NPR doesn’t want that kind of detail on a glossy coat. So that’s what the Gloss PBT does. It uses the same ideas, but with Toon diffuse instead of toon Glossy.

Of particular interest, no doubt, is going to be glass. (The “GlassOriginal” material being the one I was asked to share… everything else is bonus hubris.) There’s a sample glass node set up in the file. I generally am not happy with it. It’s good effect, and easy to make, but it’s not really all that “toon.” Non-CGI people, upon seeing it at glance, thought it was a real object.

Glass is a good example of why Shadeless is not built into the Base, Metallic, Reflection or Gloss node groups. In most cases, Shadeless works best between the source node and the reflection or gloss node. In glass, it seems to work best after the reflection or gloss. I expect this is general effect. Where shadeless gives the best results is going to be a matter of material and taste, so it’s best left separate. Also, you may decide you don’t want shadeless up in your render. Having it set up in a node group with a switch to turn on/off would actually be a waste of render resources (unconnected nodes are not calculated, but node connected to mix switch that turns it off IS calculated, and the results are discarded).  Overall, Shadeless makes more sense as block you drop in where needed, if needed.

The blendfile has all kinds of (a handful) of sample materials. They are pretty much dead simple. All credit to CynicatPro because I’d have never seen the potential with his videos.

Lastly, to get effects like those in the render, your scene is generally going need something for the reflection groups to reflect. I’ve left my “watercolor sky” environment in the file, so things should be fine and dandy in there. Remember that your own scenes will always look better with the “Physically Based Toon” system if there is some kind of environment.

The Scene tab is set up with the minimum good settings I’ve found. This doesn’t mean these are lowest useable settings, but they are as low as I’ve gone. Take note that the Sun in the scene is pretty bright, set at 12. You can get by with lower values for lower lighting scenes, but this method works best with Suns between 12 and 15 for full daylight.

Spots, points, and other lamps are tricker. The best way to figure out the right value for a non-sun is to put the main subject and sun on a separate layer (for indoor scenes) and swap the lamp between Sun and whatever other mode you want, while changing the energy until the values look close to the Sun at 12.

Suns don’t care how far away they are. Everything else does. That’s why there’s no range of energies for using other lamps. For a medium sized indoor scene, I run my points between 400 and 1200 depending one how far away they are. For this scene, with the Sun a fair good distance away, the equivalent point energy was ten. Thousand. Yes, 10,000.

As always, shadows are made sharper by making the lamps smaller. While you can use mesh lamps, it’s generally not a good idea for basic toon, as they tend to diffuse the hell out of shadows.  The same applies to this materials set.

If you have questions, you can hit me up on Facebook, Tsu, or in the comments.

Happy rendering.

Leave a comment