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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Toon Shader [ Released ] IOS compatible, fast and beautiful

Discussion in 'Assets and Asset Store' started by Ippokratis, Apr 16, 2012.

  1. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    imariagano : I m trying to implement such functionality for a desktop version of the shader, which I plan to release as a separate package. The current version is oriented towards mobile. Features like self shadows are too resource hungry for mobiles atm.

    corey.agp : Try to modify the toon shade texture in photoshop. By rotating it you can achieve different light orientations. By modifying its grayscale values, you change the amount of lighting. You can have more greyscale values to achieve smooth results as the example above or less, for a "toony" feel. Specular needs more experimentation (and looks "plastic" usually). If you go this way, you can achieve oriented lighting using far less resources than using a light source.
     
  2. corey.agp

    corey.agp

    Joined:
    Mar 23, 2012
    Posts:
    18
    Hey Ippokratis,

    Gotcha! I didn't realize that the internal cell shading effect was achieved with the matcap system. :) I was thinking it was a more traditional cell shading (ramp like) effect being applied to the model. So my concept with the dual diffuse maps (the cactus example) wouldn't really work in this situation and would require something a bit different huh?

    Once again, thanks for the support and really enjoying the possibilities with this shader. :)
     
  3. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    $Screen Shot 2013-01-23 at 10.19.09 PM.png
    Not bad :)
    Thank you for the support.
     

    Attached Files:

  4. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,043
    Hi, I read through the thread but wasn't sure if this shader is Batching tools compatible yet? Looks really interesting - off to the asset store

    <Edit> Never mind i see that your still working on it in the batching tools thread.


    iByte
     
    Last edited: Jan 27, 2013
  5. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Toon Shader Desktop is under active development.
    A new dedicated thread will appear soon in WIP.
    Some results :
    Inking via Normal maps

    $Screen Shot 2013-02-02 at 10.11.20 PM.png

    Matcap with normal maps :
    $Screen Shot 2013-02-02 at 10.13.32 PM.png

    Inking plus Detail map :

    $Screen Shot 2013-02-02 at 10.13.48 PM.png

    The character used is Axton from Borderlands 2
     
  6. the_greenlig

    the_greenlig

    Joined:
    Feb 5, 2013
    Posts:
    29
    Hi Ippokratis,

    I have just purchased your shader pack. Early signs show it will be a good fit with our project. I've skimmed through the last 11 pages of this thread, but have a quick question:

    Can the shader be used with a lightmap generated in Unity?

    Any help with this would be really good.

    Regards,
    Greenlig
     
  7. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Hi,
    No, it is not possible.
    Unless you take the lightmap texture and multiply it with detail map. But I really cannot imagine the benefits.
    Would you like to explain how you believe NPR can be combined with light maps - artistically ?
    Some pics would really help too.
    Thanks,
    Ippokratis
     
    Last edited: Feb 5, 2013
  8. Andrew_atl

    Andrew_atl

    Joined:
    Sep 21, 2010
    Posts:
    103
    That inking via normal maps looks awesome.
     
  9. midworld

    midworld

    Joined:
    Feb 12, 2013
    Posts:
    19
    Can I use this outlined shader on Flash player? It doesn't seem to be working.
     
    Last edited: Feb 15, 2013
  10. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Hi,
    Andrew : It does indeed :) Thanks for the kind words !
    Midworld : Flash platform is not supported, I tried but most programmable shaders simply do not work.

    Update : I had an accident that almost destroyed my right arm. It is getting better, but it will take months to fully recover. I try to work with the left arm but it goes slow. I will try to publish toon shader desktop in about a month, but, it might take longer. Or I might publish it as is, without light probes and shading support, sooner. If you wish, share your opinion on this here. Thanks.
     
  11. Fenrisul

    Fenrisul

    Joined:
    Jan 2, 2010
    Posts:
    617

    Omg... I hope you heal perfectly! However long it takes. Take it as slow as ya have to.

    I sense a good story behind this - what happened?? o_O
     
  12. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    A motorcycle accident - another motorcycle came from behind, driver lost control, fell over me, resulting in 3 fractures, one at the elbow and two at the foot fingers.
     
  13. chabala

    chabala

    Joined:
    Apr 30, 2012
    Posts:
    19
    I was wondering what the licensing is on this product. If you have an already written version that would be best I think. Please send it to my email: charlie@tallchair.com

    Thanks,

    Charlie Volpe
    Production Engineer
    Tall Chair Inc
     
  14. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
  15. Levitate

    Levitate

    Joined:
    Nov 6, 2012
    Posts:
    2
    Hello,

    Sorry to hear about your arm! Hope it gets better soon.

    I've brought your shader and it's working great however I have one question...

    I was wondering if you had any creative ways for handling team colors?

    What I'm doing is making very simple texture files with solid colors and UVW Mapping my models parts to those solid colors with the exception of some 'detail' parts on the texture (eg. eyes) However every model has parts that I want to be either Red OR Blue... I can't offset the UV map as that would make the detail move... I don't want to use seperate materials because I'm using skinned meshes for 8 characters and that would mean upwards of 16 draw calls just for the characters.

    Can you think of anyway I could use your shader with perhaps a variable or something that I can change to make parts of the model either Red or Blue?

    Let me know if you don't understand what I'm saying and I can upload some pictures or something to help.

    Cheers
     
  16. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Hi,
    Yes, it is an interesting approach indeed.
    I can create a custom shader with the desired behavior, for a reasonable price.
    Please send the necessary project files - images to ippobour at gmail dot com, so I can estimate the price.
    If you wish, perhaps we could lower the draw calls even more ( 4, 2 or one for 8 characters ) with some effort, depending on the triangle count. Actually, I can probably cut down the rendering time of your project considerably, if you wish. It will take some time though, because of my health issues ( min 1-2 weeks ).
    Kind regards,
    -Ippokratis
     
    Last edited: Feb 21, 2013
  17. Snowblack

    Snowblack

    Joined:
    Feb 22, 2013
    Posts:
    13
    Mr Ippokratis, just one question, please. I like your shader a lot, but as illustration for new one, you have picture of model from already toon shaded game, with hand drawing and inked texture. Is it possible for you to show some other implementation of ink shader, so we can see exact difference between shaded and non shaded model?
    Hope it isn't to much to ask?
    (I hope you will be well soon.)
     
  18. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Hi
    Thanks for the interest,

    The first image in this post http://forum.unity3d.com/threads/132446-Toon-Shader-Released-IOS-t-fast-and-beautiful?p=1154379&viewfull=1#post1154379 demonstrates exactly what you are asking, it is the result of shading plus normal map without any contribution from the diffuse texture. The idea is that the toon shade takes care of the lighting and normal map adds the creases, resulting to "inking", if we use the comics terminology.

    Speaking of comics, I am quite confident that aside Borderlands style, traditional comic styles like Moebius ( many curved thin lines ) and Frank Miller's Sin City ( black backgrounds and white outlines - inner details ) styles can be reproduced, using reasonable GPU resources. Remains to prove it :)

    I really wish to showcase this shader appropriately, my current health situation makes this task difficult though. I see improvement, but it will take some time to heal.
    Kind regards,
    -Ippokratis
     
    Last edited: Feb 22, 2013
  19. Snowblack

    Snowblack

    Joined:
    Feb 22, 2013
    Posts:
    13
    Thank you very much for quick answer. I was hoping that you will answer in a way you did. This first image is far better then anything I saw in wannabe ink rendering. :)
    You got yourself a customer. Greetings from Croatia.
     
  20. Dzyu

    Dzyu

    Joined:
    Feb 25, 2013
    Posts:
    4
    Hi,
    We have a problem when using your shaders in our school project game: It is a platformer that features a lot of squares and flat surfaces, and when these surfaces are near a 90% angle relative to the camera "lens", the outline is clearly shown as a black plane hovering over the model, not connecting with the other planes, so we can see the background between the outline and the object, and it looks really bad. Corners look bad from most angles. Is it possible to tweak the shader outline to "connect" on edges and corners so the outline becomes whole on these objects? We're using an outline width of 0.05, and 0.03 is the bare minimum of what looks good for our game, and this problem still occur even at 0.02 width, so reducing the width is not an option.

    Kind regards from Norway
     
  21. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Dzyu,
    Greetings from Athens :)
    All you need to do is to round the corners a little, by adding a couple of vertices.
    If you are still having trouble, send a sample scene and I will try to fix it.
    You can send it at ippobour at gmail dot com.
     
  22. midworld

    midworld

    Joined:
    Feb 12, 2013
    Posts:
    19
    I'm trying to make the shader shows outline(Unity3d default toon shader can show outline in Unity3d 4.0.1 flash build).

    But your shader code seems like compiled one. Can I get the original Toon shader code?

    $toon.png

    and live demo:

    http://dl.dropbox.com/u/42560088/outlined/test.html
     
  23. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Hi,
    Thanks for asking,
    As noted before, this shader does not support flash. Perhaps you could use another platform or another shader.
    If you are interested in source code of the shader, it can be arranged, for an obscene amount of money. Chances are however, that you will not find it that useful, since shader implementation of flash platform from unity makes it impossible for this shader to compile on that platform.
    If you need further help, let me know,
    Ippokratis
     
  24. Dzyu

    Dzyu

    Joined:
    Feb 25, 2013
    Posts:
    4

    That worked great. Thank you. :)
     
  25. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Glad to hear,
    I would love to see some pics btw :)
     
  26. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    A big thanks to dogzer for allowing me to use his Base Male asset in the upcoming Toon Shader Desktop !
     
  27. chillypacman

    chillypacman

    Joined:
    Oct 1, 2011
    Posts:
    71
    I'm using your shader and it's really awesome, was just wondering though, will you be adding support for unity's fog? Right now anything with your toonshader applied to it (detail/outline) has no fog effect on it.
     
  28. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Hi,
    chillypacman :
    I intentionally disabled fog for speed on all shader variants.
    The upcoming Toon shader desktop will not have this restriction.

    Update :
    At last I am able to sit and work, without the disturbing pain, for limited time. I slowly resumed freelance work on shaders, as well as toon shader desktop development. But something bad happened.

    First batching tools and now toon shader are hacked.

    I 've already seen a significant drop in batching tools sales and I expect a similar drop to the Toon shader sales as well. We are talking about two assets that started with a price as low as 15$. I kept the price down, so the majority of people can legally benefit from my works, even though I believed they worth more. I even encountered people telling me that they didn't tried the products until someone else suggested them because of the low price. It was a mistake.

    From the moment Toon shader desktop appears, all of my products will be priced at 50$. This will happen in the next three weeks.

    Thanks for your support,
    -Ippokratis
     
  29. chillypacman

    chillypacman

    Joined:
    Oct 1, 2011
    Posts:
    71

    Oh right, how bad is it for performance? I ask because I'm forced to use Unity's toonshader for outlines in my game on buildings because i need the fog to work on them and they don't look as good as your shader
     
  30. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Hi,
    I have choose to create this shader family as a mobile solution and therefore I took care of making many optimizations, one of which is not supporting fog.
    I understand that you consider fog essential to your game. On a similar vein, other users wish toon shader to allow normal maps, shadows, light probes, lightmaps.
    This is why I am making Toon Shader Desktop.

    You can either
    -wait for Toon shader desktop to appear
    -seek other solution
    -hire me / somebody else to create a shader for your game needs
    -create it yourself

    Please let me know if I can further help you. I am also curious to see some screenshots.
    Kind regards,
    -Ippokratis
    $toonShaderDesktopPromo.gif
     
    Last edited: Mar 21, 2013
  31. chillypacman

    chillypacman

    Joined:
    Oct 1, 2011
    Posts:
    71
    I agree that performance is paramount especially for mobile devices, if you feel performance would suffer significantly if the fog is enabled then I should find a compromise as my game is targeted at mobile devices, so I should just accept the situation as it is.

    You can see screenshots here (scroll down for video als): http://jabberworx.net/?page_id=398 :) (the buildings use unity toon shader to work with the fog, the characters use your shader).
     
    Last edited: Mar 21, 2013
  32. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    I like the bike, used to ride one chopper like that.
    You could use 2d planes for the buildings and transparent gradients in front of them to simulate fog.
     
  33. LeHaine_

    LeHaine_

    Joined:
    May 27, 2012
    Posts:
    44
    Is this shader supported by your batching tools? I am in need of a toon shader and if it is compatible with batching tools then there is no need to look any further! Thanks.
     
  34. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Hi,
    No, I am afraid it is not.
    Kind regards,
    Ippokratis.
     
  35. SSS_50

    SSS_50

    Joined:
    Mar 25, 2013
    Posts:
    1
    Hi,

    We like your great job in these shaders and also the flexibility for us to customize those shaders.
    We want to make a character with multi-material, using alpha channel from png file to make a mask to change colors of the clothes.

    $toon1.jpg
    this is the screenshot for using default shaders in unity.

    However, we found that Toon shader v1.5 detail tint alpha can only change the alpha of the whole mesh, doesnt support alpha channel from the detail texture.
    $toon2.jpg

    As our project is in a tight schedule, we may need to consider using other shaders.
    Will there be any chance for an early update about this issue?
    Btw, it will be excellent if the shader can also support double-side detail texture.

    Regards :)
     
  36. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Hi SSS_50,
    Thanks for your kind words.

    Anybody who wishes a custom shader based on toon shader can contact me via pm, with the following data :
    -a clear description of the desired result, along with some images ( ideally )
    -a sample scene
    -specification of the platform(s) that need to be addressed.

    I charge 50-100$ depending on shader(s) number and complexity.

    Whatever solution you choose, I wish you good luck with your project,
    -Ippokratis
     
  37. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,043
    Hi quite some time ago you stated

    Will it happen?

    iByte
     
  38. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Hi iByte,
    Definitively, in the upcoming Toon Shader Desktop.
     
  39. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,043
    Hi Ippokratis, any chance it will be back ported to the current package?

    Thanks

    iByte
     
  40. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    The current package (Toon shader) is under development and the new update will add :
    - vertex color support ( very fast )
    - flash support ( thanks to unity compiler and graphics upgrade )
    - speed optimizations reflecting unity new shader abilities

    The pitch of this package is speed, hence no normal maps enter.

    Toon shader desktop focuses on a richer experience, that is on par with desktop graphic abilities (and some might be suitable for last gen mobiles too ).

    -normal maps
    -shadows on Pro, including self shadowing
    -alternative lighting models ( blending of light and toon )
    -light probes integration
    -better alpha support, with alpha clip ( yes, hair edge defined by texture transparency is now possible )
    -special fx ( dissolve etc )
    -all of the above, as fast as possible ( gpu friendly eye candies ).

    I am trying my best to bring all those features, my health condition impedes me (after 45 minutes I have to stop) but I am very determined.
     
  41. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Implemented shadows and normal maps support in the upcoming Toon Shader Desktop.
    An example closer to realism, for change :smile:
    On the left, Toon shader Desktop, on the right the built in shaders.
    Model from unity stealth project.
    The Toon shader desktop is not intended to be used for "realistic" effects but with some tweaking can give acceptable results.
    $Screen Shot 2013-04-03 at 10.42.07 AM.png
     
  42. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Quick update : Implemented Light Map support.
     
    Last edited: Apr 8, 2013
  43. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    The shaders for Toon Shader Desktop are ready, I created a new forum thread here
    http://forum.unity3d.com/threads/177878-WIP-Toon-Shader-Deskrop

    Toon Shader Desktop is fully integrated with Unity buit-in lighting system and supports :

    -matcaps
    -lights (dynamic, point and spotlights)
    -shadows *
    -bump maps
    -lightmaps
    -light probes*
    -outlines with control over size and color, that change thickness with distance and work with perspective and orthographic cameras, as well as in Editor.
    - alpha cutout
     
  44. bachai96

    bachai96

    Joined:
    Feb 7, 2013
    Posts:
    1
    Hi Ippokratis,

    Thank you for your great effort in Toon Shader! We have encountered some issue on using this shader in iOS platform.

    We tried to apply the Toon Detail/Detail Tint shader on a model. However when we bring it to iOS the texture looks darker than expected… Please see the attached screenshot taken from iPhone 5. screenshot $head.png The model on right is using Detail Tint, while the left one (using Basic Tint), is the expected color. We're using Unity 4.0.

    The Detail Tint shader works completely fine on Android, so I guess the problem is not on your shader. Is there anything that need attention, or what are the best settings for textures and materials when using Detail Tint shader? Your help will be greatly appreciated.

    Regards,
    Raymond
     
    Last edited: Apr 29, 2013
  45. imariagano

    imariagano

    Joined:
    Dec 20, 2012
    Posts:
    25
  46. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Hi,
    Please send your invoice number at ippobour @ gmail dot com, as well as a small scene that reproduces the problem and I will have a look at them.
    I find very strange the fact that you have issues on IOS and no issues on Android. It does not make sense, but it worth to have a look.
    As a side note, the Tint parameter can be tweaked to achieve a brighter result.

    imariagano : I will pm you as soon as Toon Shader Desktop comes out, it does exactly that.
     
    Last edited: May 5, 2013
  47. Baskyn

    Baskyn

    Joined:
    Feb 17, 2013
    Posts:
    67
    Could lighting to the affect of a haunted house and night time graveyard/forest be made using this shader? It looks very good, but if I use it, it needs to be able to do those things.
     
  48. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
    Hi,
    Baskyn : I just submitted Toon shader desktop that does exactly what you asked for. I expect to be approved in the following days

    Update:
    Toon shader desktop submitted, it will receive a new thread when it gets approved and will cost 50$.
    Toon shader is renamed to toon shader mobile, price changed to 50$, pending approval.
    Batching tools price changed to 50$, pending approval.

    Kind regards,
    -Ippokratis
     
  49. Ippokratis

    Ippokratis

    Joined:
    Oct 13, 2008
    Posts:
    1,521
  50. InitoryDad

    InitoryDad

    Joined:
    Jul 3, 2012
    Posts:
    21
    Great, wii it support ink shader effect like okami game?