16
$\begingroup$

Now that 2.68 has introduced a toon bdsf, is it possible to recreate the Gooch shader? Insight, links, or a nodes screenshot would be great.

$\endgroup$
  • $\begingroup$ yaldex.com/open-gl/ch18lev1sec2.html I found this resource with a shader written in GLSL. Converting the fragment shader to OSL wasn't too hard but I'm not sure how to do the vertex shader part. If I make more progress, I'll share it. $\endgroup$ – Wray Bowling Jul 30 '13 at 15:07
8
$\begingroup$

Update: Using a model similar to the one in the wikipedia article, I've come up with a complete solution. I also kept my previous attempt included in this post for the comments that refer to it. (Thanks Róbert and gandalf3!)

Gooch final version

Follow the instructions below.

Gooch Matte

Gooch Matte Node Tree

First, the surface normals from the geometry are combined with a Normal node that manually chooses the direction of the gradient. The dot product of these two vectors is normalized (0 through 1). When dot-product-multiplied against the camera's view vector, the gradient takes on the desired effect. I'm using emission to produce the color and then darkening it down to 10% strength by default (as is described in the paper). The two shaders are added together so that the blue lightens up areas that would otherwise be in complete shadow.

Gooch Matte example plain Gooch Matte example with outline

Gooch Glossy

Gooch Glossy Node Tree

To make a glossy Gooch shader, the Matte is simply added to a Glossy BSDF.

Gooch Glossy example plain Gooch Glossy example with outline

$\endgroup$
  • 1
    $\begingroup$ Why not add some gray in with another stop in the in color ramp node? (Ctrl + RMB on the gradient) $\endgroup$ – gandalf3 Aug 7 '13 at 2:07
  • $\begingroup$ Oh, the gray is there. It's just in the wrong place because Cycles sees the center of the sphere as already "100% shadowed". To write it another way, instead of seeing [bbggyy] the preview sphere is [bbbbgy]. $\endgroup$ – Wray Bowling Aug 7 '13 at 8:26
7
$\begingroup$

I have a cycles shader that behaves like matcaps. You simply plug in the matcap image to the correct slot. Is it possible that such node setup suits your needs? It renders perfectly smooth around 10 samples. The node setup is complex but I hope it is useful. You could combine it with the freestyle renderer by overlaying the outlines on the cycles render.

Here is a matcap example:

The Cam Down should be usually the real down vector.

Example

The Matcap Coords node-tree:

The multiply nodes use 0.5 and the add nodes use one.

Matcap Coords

The Cam Normals node-tree:

Cam Normals

The Cam Axis node-tree:

Cam Axis

$\endgroup$
  • $\begingroup$ Not a bad solution. That would work even outside of Cycles, and since part of the Gooch look is the outlines, Freestyle could take care of them in the same pass. $\endgroup$ – Wray Bowling Jul 30 '13 at 15:09
  • $\begingroup$ Not sure how accurate this would be, but you could set up some color ramps based on normals and maybe this or these for the outlines? $\endgroup$ – gandalf3 Jul 30 '13 at 20:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.