Search Unity

Toon Style Shader Pack

Discussion in 'Assets and Asset Store' started by Moisio, Feb 22, 2013.

  1. Moisio

    Moisio

    Joined:
    Jul 3, 2012
    Posts:
    5
    A pack of toon-style surface shaders is now available at Asset Store!

    Asset Store link



    Currently weights in at 44 shaders included, and more to come if there's any interest. All shaders are lighted, and optimized for performance.
    • 6 distinct toon styles
    • Outline that can be used with any opaque model and material, and that works for both perspective and ortographic cameras
    • SimpleFluid variants offer lighted, transparency supporting simple water
    • Assortment of toon ramps included

    Check out a short video demo:
    http://youtu.be/ODiowbkX3d0

    Check the online documentation

    WebPlayer Demo

    Some of the shaders (Threshold Style) have already seen action in a published game Sword Glory for iOS and Android.
    Check out gameplay videos.

    Also include THE CONTRAPTION, an object of no sensible use with both sharp and rounded corners, high and lowpoly curves and a moving part! (I use it to test and to demonstrate materials...)

    If you have a particular toon style you'd wish to be included, a modification in mind, a combination of effects or other ideas, I'd be happy to hear you out! And don't hesitate to ask for help if you have problems with the pack, or to give feedback of any kind.
     
  2. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    Great !!! I like the threshold one a lot.

    6R
     
  3. StaticNova

    StaticNova

    Joined:
    Feb 23, 2013
    Posts:
    60
    Wow, this is some great stuff!
     
  4. napster

    napster

    Joined:
    Jun 15, 2012
    Posts:
    313
    Looking nice !
     
  5. EmeralLotus

    EmeralLotus

    Joined:
    Aug 10, 2012
    Posts:
    1,462
    Great asset, can you specify how many and which shaders are optimized for IOS/Android?
     
  6. Moisio

    Moisio

    Joined:
    Jul 3, 2012
    Posts:
    5
    Thanks, all of the shaders work for mobile, but actual performance of course vary per project. I just run a set of benchmarking test on an iPhone 4 if you want to see some stats:
    https://docs.google.com/spreadsheet/ccc?key=0AhtnfqqH7hswdE12VmhpalJsUjNpSDdTOTdHZnZWYnc&usp=sharing

    Summary:
    • Outlines add some overhead, but are really dependent on the amount of polygons. Avoid use on huge meshes, and you should be alright.
    • All Diffuse variants are quite fast, and should be safe to use on mobile platforms.
    • Details variants are slowest of the bunch. Use sparingly.
    • SimpleFluid shaders are quite slow as well, but only if you throw dozens of them at the screen at once. Use only a few fluid objects and you'll be alright.
    • On 200 draw calls and 152k tris, shaders that had 30 fps or more were:
      • Threshold/Diffuse
      • Contrast/Diffuse
      • Contrast/Transparent
      • Contrast/Cutoff
      • LevelsA/Diffuse
      • LevelsA/Transparent
      • LevelsA/Cutoff
      • LevelsB/Diffuse

    See the linked document for more details. The actual performance will of course depend on what else is on the project and how the shaders are used, but so as not to give a weasel answer, I'll say that diffuse shaders for Threshold, Contrast, Levels A and Levels B styles are well optimized for mobile, and the others are less optimized, but work.
     
  7. THRILLHOUSE

    THRILLHOUSE

    Joined:
    May 22, 2013
    Posts:
    6
    what is the secret to making ramps for the lookup shader? whenever I try to make my own it is just blown out white and hard to control. I am using the ones there as a template but just changing the colors.
     
  8. Moisio

    Moisio

    Joined:
    Jul 3, 2012
    Posts:
    5
    A bit hard to say what's wrong without seeing your ramps and the material settings, but here's a couple of thoughts:
    - If the result is too white, you either have a ramp that has too much white in it, or the problem is not in your ramp texture.
    - Set Offset to 0 and Scale to 1 in the material inspector to see the "full" effect of the ramp.
    - Make sure the lighting in your scene isn't too dim or too powerful.
    - You can test your ramp in the Ramps demo scene by replacing one of the ramps with your own.
    - Remember that Lookup replaces the color in the texture while ColorRamp multiplies it.
    - A nice looking Lookup ramp usually has a lot of contrasts.
    - The left hand side of the ramp texture is the color that replaces the darker parts on the model, and the right hand side is the color that replaces the brighter parts of the model. So a ramp that has a gradient going from white on the left to black on the right would color the model so that the poorly lit parts would be white, and the parts that are well lit would be black.
     
  9. bes422

    bes422

    Joined:
    Sep 18, 2013
    Posts:
    1
    Is it works on WP8?
     
  10. 00christian00

    00christian00

    Joined:
    Jul 22, 2012
    Posts:
    1,035
    Awesome pack, should deserve much more attention! As soon as I saw it, I bought it.
    Love the fact that you give us the source, I'm learning shaders and this is really helpful.

    I noticed that the outline is a separate shader. Doesn't having 2 shader on the same mesh affect performance? Woudln't be better to merge the outline code into one shader ?
     
  11. Play_Edu

    Play_Edu

    Joined:
    Jun 10, 2012
    Posts:
    722
  12. Bentoon

    Bentoon

    Joined:
    Apr 26, 2013
    Posts:
    98
    Hello
    Is this working well with Unity 5?
     
    CCStudioUnity likes this.