Cycles OSL toon shader setup updated for 2.78

  • August 11, 2017
  • 1,364 Downloads
  • 14 Likes
  • Blender 2.7x
  • Render: Cycles
  • Creator: L0Lock
  • License: CC-0
You must be logged in to download.

Description:

Updated version of irie's Cycles OSL toon shader, working on Blender 2.78 and 2.79

Example of toon shader for Cycles + OSL.

This includes two OSL scripts:

Toon shader using diffuse_toon() and specular_toon() closures Single sided black surface used for toon edge You can see some test videos in Youtube:

http://www.youtube.com/watch?v=WcQFs1opokI

http://www.youtube.com/watch?v=coYggqUHwDc

Comments:

  • brickyboy99 profile picture
    brickyboy99

    You're a saviour. Thank you so much.

    Edited August 16, 2017
  • SeranadeFX profile picture
    SeranadeFX

    So nice ^^

    Written August 28, 2017
  • elibaba profile picture
    elibaba

    Hey Im trying to run the scripts is there any documentation on how to use these shaders? Im running the scripts and all i get is invalid syntax errors???

    Edited August 28, 2017
  • trigza profile picture
    trigza

    @elibaba

    Written September 04, 2017
  • HollowGraphic profile picture
    HollowGraphic

    Black in 2.79, any ideas? It has no compilation errors at all.

    Written October 21, 2017
  • Daveblender profile picture
    Daveblender

    @HollowGraphic Perhaps check if you have GPU rendering on. OSL scripts only work in CPU rendering.

    In the" Properties" area, go to the "Render" tab, in the "Render" dropdown, under "Device:" change it to CPU and ensure "Open Shading Language" is checked on.

    Edited October 23, 2017
  • FrostDrive profile picture
    FrostDrive

    This is awesome! Love it.

    Is there any way to thicken the outlines or make them another color? (I'm trying to go for a low sat dark purple outline)

    Written February 19, 2018
  • Azagwen profile picture
    Azagwen

    is there any way to use the toon alone without edges ?

    Written May 11, 2018
  • ruwo profile picture
    ruwo

    Great work, thank you!

    Written August 04, 2018
  • GrimAnims profile picture
    GrimAnims

    Great job, but for anyone looking to modify and recompile this script, note that in the "else" statement under the skin shader, "glossytoon" needs to be changed to "glossy_toon".

    Written November 17, 2018
  • AtotheB profile picture
    AtotheB

    Just wanted say that the 'Edge' shader can easily be implemented with Cycles nodes so you can also use it with GPU. Just use a Mix shader with 1 transparent and 1 emission shader. Connect one Geometry node and set the Backfacing input to the factor input of the mix node. Also set a math node in between that connection and with 'Greater than' and then 0.5 on the other value. That should work. Also uploaded an image, but just wrote this text in case the image is not available anymore at some point. https://ibb.co/6bJxFjx Of course also do the Solidify modifier stuff like before.

    Written May 22, 2019