Example of toon shader for Cycles + OSL.
This includes two OSL scripts:
<ol>
<li>Toon shader using diffuse_toon() and specular_toon() closures</li>
<li>Single sided black surface used for toon edge</li>
</ol>
You can see some test videos in Youtube:
<ul>
<li>http://www.youtube.com/watch?v=WcQFs1opokI</li>
<li>http://www.youtube.com/watch?v=coYggqUHwDc</li>
</ul>
So maybe I just dont get it. There are two scripts. The Toon.osl, and the Edge.osl. How does one utilize both of those to create a simple "Cell Shaded object within blender?
When I opened up the example .blend file it has both in two separate text editor windows and one 3d view, and then the node editor.
I guess im confused on what the apply the "edge.osl" script to? Thanks ahead of time.
I didn't figured out, how he apply the edge texture so the edge becomes dark?
Hi,
The object has 2 materials assigned, one with the toon script and another with the edges script, since the edge script is only affected backfacing, you only see it on the polygons added by the solidifiy modifier.
By the way, these scripts aren't working on the current build : 2.67.1 r57177 the output is totaly black :/
More details : in fact only the toon shader isn't working, the error message is :
ERROR : Closure 'specular_toon' is not supported by the current renderer
Hi Alesk,
specular_toon() closure has been renamed to glossy_toon() in r56980, so you have to modify the OSL script and re-compile it if using latest trunk build.
specular_toon() closure became available again in svn r57362, so this .blend file should work with latest trunk build.
This is really awesome! Great work with this and thank you for sharing!
Hey I need a little bit of help I never done scripts before can someone walk me through on how to use his scripts and apply them to my character.
Thank You
specular_toon() was renamed to glossy_toon() (6 comments above) Just rename inside the script and reload inside of the script node.
If you can't get it to work even after renaming specular_toon() to glossy_toon(), follow the directions two paragraphs down at http://www.blendswap.com/questions/view/1705
Not sure if it's just me, but I also had to use CPU rendering rather than GPU rendering. Also make sure that the 'Open Shading Language' box is checked. Guess it's kind of obvious in retrospect.
Gorgeous results! This saved me a serious headache when time was an issue. Thank you!
I've downloaded the blend file, but it doesn't seem to show me the results in Blender 2.78c. Everything's black.
Any ideas?
EDIT: NVM got it working. :)
Hey Tushantin can you tell me what you did in 2.78? I replaced the glossy instead of specular. 2.77a works but still not working in 2.78.
It doesn't work for me, the edge shader seems to work well but the toon shader doesn't work and give me an error when I try to "reload" it
How did you add the second material (outline) over the first (diffuse)?
EDIT: Ah, ok. You just add solidify modifer with inverted normals
It does in 2.93 - Make sure you've enabled Open Shading Language in your render settings under Device: GPU Compute. You should be able to enable even if greyed out.
What a fantastic post! It's always great to see content that sparks conversation and encourages engagement. The insights shared here are truly refreshing! I particularly loved the part about 토토사이트 홍보 howcommunity can impact our growth. It's so important to connect with others and learn from their experiences. If anyone's interested in exploring more about 토토사이트 홍보 personaldevelopment, I highly recommend diving deeper into this topic. Also, did you notice how 토토사이트 홍보 collaboration can lead to innovative ideas? It's amazing what we can achieve together! Keep up the great work, and let's continue to share our thoughts on 토토사이트 홍보 inspiration and 토토사이트 홍보 motivation. Looking forward to seeing what’s next from you! Don't forget to check out 토토사이트 홍보 resources that can help enhance our discussions. Cheers to more enlightening conversations! 토토사이트 홍보 communityengagement 토토사이트 홍보 learningjourney.
Absolutely loving this! 토토사이트 추천 The creativity here is just inspiring. It’s incredible how much thought goes into each detail. 토토사이트 추천 Keep pushing those boundaries! It’s posts like these that really motivate us all to think outside the box. 토토사이트 추천 I can’t wait to see what you come up with next. 토토사이트 추천 The energy radiates through your work! It’s always a pleasure to follow your journey. 토토사이트 추천 Let’s continue to share ideas and uplift one another in the process. 토토사이트 추천 Here’s to more amazing content like this! 토토사이트 추천 Don't forget to tag your friends so they can join in on the fun! 토토사이트 추천 Looking forward to more updates soon! 토토사이트 추천
wow a scripted shader very good!