Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Toon Shader Free

Discussion in 'Assets and Asset Store' started by Ippokratis, Aug 27, 2014.

  1. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Hi,
    I released a new family of shaders called Toon Shader Free.
    It offers Toon Shading, like Toon Shader Mobile and Toon Shader Desktop.
    And it is free.

    Screen Shot 2014-09-07 at 17.16.30.png
     
    Last edited: Sep 7, 2014
    Gozdek, sjm-tech and moure like this.
  2. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
  3. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Hey, it is on the first page :p
    If you want to include Toon Shader Free with your paid or free models on the asset store, contact me at ippobour@gmail.com
     
  4. Play_Edu

    Play_Edu

    Joined:
    Jun 10, 2012
    Posts:
    722
  5. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Hey, almost 700 people downloaded this asset in September !
    Not bad :)
    A new version 1.1 is available, it contains fixes for Unity 5.
    If you like using it, please live a "Like" on the facebook page, here https://www.facebook.com/toonshader
    Also, you can have a look at Toon Shader Mobile and Toon Shader Desktop for more fun :)
     
  6. MrBalin

    MrBalin

    Joined:
    Sep 6, 2014
    Posts:
    8
    Hey! I'm having trouble with the outline with any model but yours. I have to increase the width to over 150 to see anything, and clearly shows separation. What is it that I should be doing to have it look like the one on your model?
     

    Attached Files:

  7. MrBalin

    MrBalin

    Joined:
    Sep 6, 2014
    Posts:
    8
    This also occurs when I try adding MatCap texture to shade.
     

    Attached Files:

  8. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Hi, it is simple : 1. Use appropriate scale and 2. Smooth normals
    1. You should play with scale factor in the import settings of the mesh you are using, using a standard cube as reference, so 1 unit = 1 meter. This way, you get correct rendering and physics.
    2. Again, under the mesh import settings, at the normals and tangents field, use normals - > Calculate - 180 degrees.
     
  9. idovingx

    idovingx

    Joined:
    Jul 16, 2014
    Posts:
    8
    I saw that someone else reported this same bug on the asset store page. I'm having the shade texture repeat in a grid, which doesn't change when I adjust the tiling. Here's a picture so you can check it out. I'm using Unity 5.2.1. Unfortunately it makes it un-useable. The mesh is UVed unwrapped just fine. The details texture displays properly, but not the shade texture.
     

    Attached Files:

  10. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Hi,
    Thanks for contacting me. Unfortunately I cannot reproduce the problem. Please send me a small scene that reproduces the problem and I ll do my best to fix it.
    As you might know, publishers do not get notified if we receive a review on the asset store. The only way to solve problems is to contact here. I had another person contacting me before about this issue but he / she could not send me a sample scene to reproduce it.
     
  11. idovingx

    idovingx

    Joined:
    Jul 16, 2014
    Posts:
    8
    sure, where should i send you something?
     
  12. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    My email, ippobour at gmail dot com.
    Thanks
     
  13. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    Is there a way to use a flat mesh to simply draw an outline. I only need to draw an outline and it doesn't work if my mesh doesn't have width.

    EDIT: I see now why that obviously wouldn't work. Do you know of making an outline without resorting to rendering backfaces.
     
    Last edited: Dec 16, 2015
  14. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    staffanEk : Yes, there are many methods available, one I recommend : put the outline on the texture. Cheap, efficient, can be tweaked as much as you wish with pixel perfect results. If you need an example, send me a simple scene with an asset to show you the technique.
    Other solutions like image effects - backfaces ( you can duplicate the flat mesh, enlarge it, place it behind the front mesh and paint it black via shader or DCC app ) etc are pretty much useless in this particular user case because they are expensive in terms of resources consumption and difficult to tweak.

    idovinx, MrBalix : Take your time, if you found a workaround please let me know. If you need support, send a small scene that reproduces the problem at ippobour at gmail dot com.
     
  15. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    No thanks Ippokratis, I was just looking for a one click solution. Thanks anyway.
     
  16. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    It is not a one click solution but is quick and easy - take a look
     
  17. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380
    Ippokratis.

    I'm very familiar with Photoshop. Thank you though.
     
  18. caesar_one

    caesar_one

    Joined:
    Dec 3, 2015
    Posts:
    5
    Hello,

    I was trying to add this shader to a cylinder, but i can't get the outline. I'm using orthographic view (with 2D mode) and the basic Unity cylinder mesh (so I cannot play with import settings!).
    If I try to see the cylinder from the base (so in 2D you see a circle), you only get base color without outline (image below)
    Schermata 2015-12-28 alle 23.15.44.png
    If I try to disable 2D view, you just get a strange result (image below).
    Schermata 2015-12-28 alle 23.16.25.png

    What can I do to fix this? Thank you in advance :)

    Sorry for bad english :oops:
     
    Last edited: Dec 28, 2015
  19. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Hi, thanks for contacting me.
    Would you like to post an image that shows what is the desired effect ?
    Also, try the following : under the mesh import settings, at the normals and tangents field, use normals - > Calculate - 180 degrees.

    Kind regards,
    Ippokratis
     
  20. caesar_one

    caesar_one

    Joined:
    Dec 3, 2015
    Posts:
    5
    Hello,

    the result that I want to get is just to add a white outline effect in 2D orthographic view on the primitive cylinder, with a red base color. The result that I got is in the first image above, as you can see: no outline is visible, just red base. In the second image, just a "glitched" outline effect. I cannot play with mesh import settings because I'm using Unity's primitive cylinder. What can i do to fix this?

    expected result, something like this:

    note: this must be a cylinder watched from the upper-side

    result got:
    Schermata 2015-12-28 alle 23.15.44.png

    Thanks,
    Caesar_One
     

    Attached Files:

    Last edited: Dec 29, 2015
  21. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    In this case, just use any modelling application and create a cylinder.
    Then, you can apply the normals trick.
    I just did it in the following picture : cylindersExample.png

    If you need more help, let me know.
     
  22. caesar_one

    caesar_one

    Joined:
    Dec 3, 2015
    Posts:
    5
    Thank you very much! Got it!
    Just 2 little questions:
    1) The effect i got is not really straight, as you can see in the image below, how can i let it became less "jagged"?
    Schermata 2015-12-30 alle 12.57.29.png
    i think that the reason is the mesh I used: the mesh edges are like this:
    Schermata 2015-12-30 alle 12.57.12.png
    I am not very familiar with 3D software.

    2) To obtain this effect, I set the outline width to 25. As the image is not so big (at least 0,7cm on the screen), am I missing something? Consider that the 3D mesh and all the UI is attached to a Canvas.

    Thank you another time for your patience :)
     
  23. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    1. I am very curious to see this cylinder, if you don't mind send it at my email : ippobour at gmail dot com
    The outline is determined by cylinder's faces, so something tricky that involves them took place. You do not need to become a 3d expert since every modelling program has a cylinder primitive. On the other hand, being able to understand and create 3d models is necessary to use shaders in their full potential.

    2. It is not something uncommon, it really depends on the model's scale. No worries.
     
  24. caesar_one

    caesar_one

    Joined:
    Dec 3, 2015
    Posts:
    5
    You have a new email :)
     
  25. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    I managed to reproduce it and found a fix for it.
    The updated version will appear soon in the Asset Store.
    I also posted a hotfix here

    Kind regards,
    Ippokratis
     
  26. caesar_one

    caesar_one

    Joined:
    Dec 3, 2015
    Posts:
    5
    Problem solved!

    the way the cylinder was created gave it the jaggy contour, and i just had to recreate the cylinder in another way to fix that.
    Thank you very much, it is an amazing plugin!
     
  27. Roman_KH

    Roman_KH

    Joined:
    Oct 1, 2016
    Posts:
    1
    Hi!
    I have a strange problem with TSF.
    The outline, displayed in editor does not correspond to outline displayed in "Game" tab or in built project. (See picture)
    However, if I start the game in editor and switch to "Scene" tab outline get correct.
    The problem disapers in other project.
    I assume some options of used meshes cause it.
     

    Attached Files:

  28. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Hi Roman_KH,
    Perhaps some outline values reset from some scripts - or are not properly set.
    I could help you more if you send me a sample minimal scene that reproduces this issue at my email
    ippobour at gmail dot com
    Kind regards.