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

Outlined MatCap Shader (Toon Shader) [RELEASED]

Discussion in 'Assets and Asset Store' started by midworld, Mar 8, 2013.

  1. midworld

    midworld

    Joined:
    Feb 12, 2013
    Posts:
    19
    Last edited: Mar 21, 2013
  2. kenshin

    kenshin

    Joined:
    Apr 21, 2010
    Posts:
    936
    Good idea, bookmarked!
     
  3. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,969
    Has anyone else been able to download this?

    I purchased it last week, and keep getting a stall at connecting to server. I have been working with support but haven't solved it yet. I am curious if anyone else has been able to purchase and download successfully. That will narrow down if the problem is on my side or the server.
     
  4. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    I have the same problem. It just sticks on 'waiting for server'.
     
  5. midworld

    midworld

    Joined:
    Feb 12, 2013
    Posts:
    19
    I asked this problem in Unity bugs.

    Anyway I'm sorry for that.

    ----

    zombiegorilla and elbows: I leave a message in Unity forum memo. Please check it.
     
    Last edited: Mar 13, 2013
  6. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Unity fixed the problem with this asset on the store and it now downloads for me fine :)
     
  7. Boji

    Boji

    Joined:
    Jul 10, 2012
    Posts:
    44
  8. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Hi again Boji,
    Actually, this shader pack is a modified version of this shader
    http://wiki.unity3d.com/index.php?title=MatCap
    Discussed also here
    http://forum.unity3d.com/threads/39500-I-found-out-how-to-do-Zbrush-matcap-shading-in-Unity

    It has this cost for the basic version
    Code (csharp):
    1. // Vertex combos: 1
    2. //   opengl - ALU: 15 to 15
    3. //   d3d9 - ALU: 16 to 16
    4.  
    versus the cost of the basic version of the toon shader you mentioned ( less than half ALU means faster ).
    Code (csharp):
    1. // Vertex combos: 1
    2. //   opengl - ALU: 7 to 7
    3. //   d3d9 - ALU: 7 to 7
    4.  
    Contains 8 shaders vs 23 shaders.

    Other than that is a very nice pack in a very reasonable price.
    Congrats on the release and good luck on the asset store,
    -Ippokratis
     
    Last edited: Mar 22, 2013
  9. Boji

    Boji

    Joined:
    Jul 10, 2012
    Posts:
    44
    Yeah, I optimized this shader to 8 also. Moved all the Matcap UV calculations from frag to vert and use a simpler way to grow the outline mesh :p
     
  10. midworld

    midworld

    Joined:
    Feb 12, 2013
    Posts:
    19
    Hi guys,

    Yeah, there was unnecessary codes that support the normal map.

    Now I fixed it.

    old:

    Code (csharp):
    1.  
    2. // Vertex combos: 1
    3. //   opengl - ALU: 15 to 15
    4. //   d3d9 - ALU: 16 to 16
    5.  
    6. // Fragment combos: 1
    7. //   opengl - ALU: 6 to 6, TEX: 1 to 1
    8. //   d3d9 - ALU: 6 to 6, TEX: 1 to 1
    9.  
    and now:

    Code (csharp):
    1.  
    2. // Vertex combos: 1
    3. //   opengl - ALU: 7 to 7
    4. //   d3d9 - ALU: 7 to 7
    5.  
    6. // Fragment combos: 1
    7. //   opengl - ALU: 3 to 3, TEX: 1 to 1
    8. //   d3d9 - ALU: 3 to 3, TEX: 1 to 1
    9.  
    This update has been submitted for review.

    Thanks.
     
  11. midworld

    midworld

    Joined:
    Feb 12, 2013
    Posts:
    19
    The update has been accepted. (v1.1)

    Please update!

    Thanks.
     
  12. midworld

    midworld

    Joined:
    Feb 12, 2013
    Posts:
    19
    v1.2 Update:

    Bump map support.

    Thanks!
     
  13. JohnR

    JohnR

    Joined:
    May 18, 2013
    Posts:
    1
    I purchased your shader however I can't seem to make the outlines appear on cubes when looking at them orthographically. Is this possible? Thanks in advance.
     
  14. midworld

    midworld

    Joined:
    Feb 12, 2013
    Posts:
    19
  15. sanmn19

    sanmn19

    Joined:
    Jun 30, 2013
    Posts:
    56
    I purchased this shader. It is better than unity toon shader in terms of performance. However, it does not respond to any lights in scene. Is the shader supposed work like that?
     
  16. midworld

    midworld

    Joined:
    Feb 12, 2013
    Posts:
    19
    This shader doesn't use any lights. But you can use "tint color" to emulate the light intensity. Adjust this color to white for high intensity and to black for low intensity. If you want to change the light directions then modify the MatCap texture.
     
  17. avigra

    avigra

    Joined:
    Jul 4, 2014
    Posts:
    3
    Hi, just purchased. A weird thing is happening when I import a sphere from Maya, I get the texture OK but the MatCap shows as tiles... Any ideas?
     
  18. midworld

    midworld

    Joined:
    Feb 12, 2013
    Posts:
    19
    MatCap shader takes two textures: diffuse tex and lighting one. I think you use a checker tex for the diffuse one.

    Let me know more information.
     
  19. avigra

    avigra

    Joined:
    Jul 4, 2014
    Posts:
    3
    Thanks for the fast respond. I see 2 material slots: Base (RGB) and MatCap (RGB), even when not putting anything in the Base tex, and choosing Toon 2 for example for the MatCap option, the matcaps are tiled all over the object...
     
  20. midworld

    midworld

    Joined:
    Feb 12, 2013
    Posts:
    19
    Hmm... if there is no base tex then the shader use a whole white tex. Can i get a sample unitypackage to test? My mail address is powring gmail com.
     
  21. avigra

    avigra

    Joined:
    Jul 4, 2014
    Posts:
    3
    do you mean powring at gmail dot com? Just sent a verification.
     
  22. midworld

    midworld

    Joined:
    Feb 12, 2013
    Posts:
    19
    I got your mail. I send you the reply asap.
     
  23. midworld

    midworld

    Joined:
    Feb 12, 2013
    Posts:
    19
    Problem is solved.

    Thanks.