Toon Shader [ Released ] IOS compatible, fast and beautiful

894624--33384--$Screen Shot 2012-04-16 at 4.05.22 PM.png

Hi,

Thanks for your interest in Toon Shader !
Toon shader produces fast and beautiful toon shading.
It is compatible with Android, IOS, web, PC and Mac platforms*.
I hope that you will find it useful in your projects !

The package includes a user manual, also available for online browsing at scribd.
Here is a sample page :

Some web players that demonstrate this shader :

Link1
Link2
Link3
Link4

*Android and IOS devices should support OpenGLES 2.0

Kinda empty atm, will fill it soon :slight_smile:

Excellent work. I notice a texture for the shape of the toon shading on the scribd help files. Perhaps if you were to talk about this more, people may see even more of what your toon shader can do. I have high hopes for this one.

I also think showing an un-tooned head beside a tooned head would be great to show what it can do.

Looking forward to it. Great to hear you got the iOS love working.
Great job.

I agree on showing an untooned head beside a tooned one. Great job.

Greetings,

I am now trying out your toon shader. It does indeed look good. My only concern is that you seem to be taking into consideration the camera viewpoint when applying the shading texture. The problem with that is that the lighting becomes inconsistent as the camera moves around. Specular highlights are camera depedent, but diffuse lighting shouldn’t be! If you could get rid of the camera centric shading that would be great, Thanks a lot!

Hi,

Thanks for your kind words :slight_smile:

hippocoder : This little “Shade” texture permits many shading models to be encoded in a texture, I will expand more on this at the next version, near May 15.

24pfilms, OmniverseProductions : The head model is a modified version of this one. Its polycount is high ( 6200 verts, 34200 tris) and I used it because I cannot model yet.

psylife : What you describe is the intended behavior. I do not use lights ( you can place lights = 0 for extra speed at settings btw ), the left side of the model gets brighter and the right part gets darker. As objects move around the camera, their “shading” changes accordingly. I do not understand how would you like it to work, could you please expand a little your explanation ? I could consider implementing your suggestion in a future release, once I fully understand it.

Here is another example : A screenshot from my Ipod Touch 4 running an animated skinned model offered by BirdaoGwra, with 4x antialiasing, at 60fps. The model is available at the link ( thanks :slight_smile: ), has 2400 verts and 3300 tris :

And here is how a 88 tris head with a texture looks like :
( Thanks to Evan Greenwood for releasing for free a model of Blade Master 2, it is available at the asset store )

894746--33392--$attachment-1.png

Thanks for the support,
-Ippokratis

A good video to advertise your shader would be to do Sailor Moon in mat/claymation style for old iOS devices and swap the shaders out during runtime to your toon shaders similar to what this link is talking about I believe:

http://unity3d.qatohost.com/questions/232284/changing-shaders-for-all-children-some-with-multi.html

I’ve attached a quick sketch to try and clarify. Would you mind taking a look at it and see if it makes sense?

894837--33397--$toonShader_drawingExplained.jpg

Hi,
Thanks for the feedback.
The sketch on the right does not correspond with the results from Toon Shader for the proposed angles. I wish to point out that the “lighting” provided is not from top to bottom, is from right to left.
Different angles can be achieved, I will provide support for this in an upcoming version though.
You will notice that right to left lighting is very common in manga comics. The lighting direction is better demonstrated in the following pictures, that follow your proposed camera angles :



If you have any questions or suggestions, I 'll be happy to hear them,
-Ippokratis


Thanks for your prompt responses Ippokratis,

My team and I are working on a title that calls for a degree of flexibility regarding the shading of our dynamic obects. We are interested in a outlined three tone shading such as yours but with the added advantage of having more control over the directionality of the “lighting” itself.

Bear in mind that even though mangas and comics alike have a degree of stylization, they are still subect to a degree of lighting consistency which is not the case here. The appearance of lighting provided by the shading texture map should not be altered by the movement of the camera. A practical example of that would be a human walking in a room equipped with a single lamp as a lightsource source would not expect to see the implied location of the light scource changing as he/she moves across the room and his/her angle of view gets altered. Lighting and camera should at least appear to be completely independant.

I am aware that the default map you provided is from left to right. I have made my own because the environment I am working on has an established light source located above the obects I want to fake the lighting on.

Try orbiting the camera left to right and you will have further exemplification of the issue I have pictured in my previous post.

I hope this made some sense.

@Ippokratis, I think I’ve understood the requirements of psylife, so I will try to explain the situation with other words:

  • Your current implementation doesn’t have into account the position of the lights in the scene, the part of the character closer to the right border of the screen will always look brighter and the part of the character closer to the left border of the screen will always look darker.

  • psylife likes your toon-shading algorithm (me too) but he wants the shader to take into account the scene illumination. For example, if you have a static light in a wall and you rotate the character and the camera, sometimes the part of the character closer to the right border of the screen will be brighter and sometimes it will be brighter the part of the in the middle or the part of the character closer to the left border of the screen. It doesn’t matter the position of the character relative to the camera or his position relative to the borders of the screen, but only his position relative to the lights in the scene.

Both options are incompatible because, when you decide which parts of the character should be illuminated, you only take into account the position of the character relative to the camera, ignoring the lights in the scene. On the other hand, psylife wants the shader to ignore the position of the character relative to the camera and take into account only the lights in the scene.

I think you should create both shaders (and sell them in the same package) because depending on the art-style of the game, there will be situations where your current implementation is better and there will be situations where the psylife’s feature request would provide a better result. Another possibility would be implementing a single shader with a slider so you can change smoothly between both implementations, but I don’t know if such shader would be too slow for mobile devices.

Just bought your shader to use in my next game, and I have to say it is awesome! I actually achieved many more effects with it than just toon shading, using different gradients I managed a really cool metal type texture that gives the illusion of being slightly reflective, and some other awesome effects.

Hi,

I really want to thank everybody who bought the shader for the support ! I am very interested to hear your feedback and see how you use the shader on your models :slight_smile:

psyfile :
Thanks for the feedback.

There are many styles out there, I believe that what you describe is used in some approaches and what is achieved with this shader in others. The “artistic freedom” includes a huge variety of “toon” styles. E.g. I really love the style of Moebius ( recently R.I.P ), I cannot reproduce it with this shader either.

I have completely understood what you are trying to create from the moment you used the term “directionality”, but thanks for describing with even more detail. I understand that this is a requirement for the style you try to achieve.

What I would like to clarify is that I totally respect your artistic taste and what you try to achieve. It is clear that it is not going to be achieved using toon shader. I can consider this feature for a future update, if there is enough demand. You should also know that it is quite improbable to achieve a desired artistic vision result with an 15$ investment. Instead, since you have a concrete image of what you wish to achieve, your team should approach a person with the skill to fulfill what you vision, or create it yourself. Usually the rates for such persons are in the 100$ per hour range. If your team is interested in a freelance collaboration, please contact me via PM with a concrete proposal and we can further discuss the details.

If you feel that I have described the shader’s abilities in a way that mislead you, my sincere apologies. I can totally respect this. Unity Asset Store has a refund system which you can use. If you find any problems receiving the refund, please contact me describing the problem ( I do not think that you might have any problems to get a refund, but, say, just in case ) and I will happily refund you personally.

I am very interested to know any other questions - suggestions you might have, please feel free to contact me here, or via PM, as you prefer.

davidgutierrezpalma : Hi, the Pro Racing AI seems very interesting. Do you have any plans to expand it for motorcycles as well ?

Thanks for the explanations and suggestions, I will take them seriously into consideration.

Astrauk: Hi there, I remember the implementation of mesh and texture combination you did, I found it very clever : )

Hehe, pictures or it never happened :slight_smile: My plan was to create a “as flexible as it gets” shader, a “swiss army knife” shader that lets you create as many effects as possible and can be batched. Fast - beautiful. There are more features to be added but still is too early ( first day actually :slight_smile: ) and I do not want people invest on what this shader might become. I guess I have a strange way to market my products. I would really love to see some pictures from your models using this shader :slight_smile:

Thanks for the feedback and the support,
-Ippokratis

I’ll get a short video of the metal-ish effect I had going on and post it here, and also some pics of my character using the shader.

Here’s the video

Looks great. Bought it earlier today. Do you plan to add flash support soon though?

Hi,
Astrauk : Thanks for posting the video :slight_smile:

ParaLogic : Thanks for your kind words :slight_smile: I have no plans for flash support at the moment, the platform requirements are too restrictive at the moment. I wait until it matures more.

Kind regards,
-Ippokratis

I love the cartoonish look of your shader and I haven’t bought it yet only because it wouldn’t be appropriated for the project I’m working on at this moment. However, I will probably purchase it for my next project, so I hope you will keep improving your product in the meanwhile :wink:

As you seem to take into account customer feedback, I will say that I would also like to see the shader being affected by scene lights. I like your idea of creating a very flexible shader, but that flexibility could hurt performance on low-end mobile devices, so I think you could get a better performance if you provide several different shaders instead of trying to build the “most-flexible-cartoon-shader-in-the-world”.

At this moment I’m supporting “Edy’s Vehicle Physics”, “UnityCar” and the “Unity Car Tutorial”, but I can add support for a new Vehicle Physics in less than 10 minutes… as long as such Vehicle Physics has a method for reading the user input and another different method for everything else (for example: applying the forces to the vehicle).

My system is so flexible that it can be used to control a crazy experiment with a flying car, so I bet it will be able to control a motorcycle without any problem. However, you must take into account that my product only includes the AI, not the Vehicle Physics, so you will need to find (or develop yourself) the Motorcycle Vehicle Physics… by the way, which Vehicle Physics would you use? I’m only aware of the “Two-Wheeled Addon for RapidUnity Vehicle Editor”, but I wrote a Private Message to the author to ask him if his product meets my requirement and he didn’t reply. If you are aware about any other product which supports Motorcycle Vehicle Physics, let me know because I’m very interested.

Hi,

davidgutierrezpalma :

My “ideas” value nothing unless they get materialized in products. I believe it is little early to discuss about the evolution of this shader in the first day it got published :slight_smile: Right now it has some features : If people think they justify its cost - great, if not - it is ok. When new features are added, it will be judged again. It will take some time, maybe a month to see something new ( my day job is very demanding ). I do appreciate people’s suggestions, Batching Tools and Toon Shader are profitable because I took people’s suggestions into account.

I know only about “Two-Wheeled Addon for RapidUnity Vehicle Editor” as well. Haven’t tried it. I love motorcycles ! Thing is, to develop a decent vehicle physics setup and couple it with a clever AI from scratch is a big investment in time and money, thus products like yours or “Two-Wheeled Addon for RapidUnity Vehicle Editor” can be very useful.

Kind regards,
-Ippokratis

That’s unfortunate, was hoping to use it for one of my current projects. Thanks for you answer and good luck with this shader :slight_smile: