Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by IntelligentDesign · Jun 22, 2014 at 12:36 AM · shadershaderlabtoonshadingcel shadingcellshading

Cel Shading Possible In Unity Free Version?

Hey all, I'm new to writing shaders (and Unity in general), and I'm looking to build a cartoonish shader for a game I'm starting. And while there's a wealth of information on how to create shaders with ramp-based lighting (a la Team Fortress 2), I have not yet found a good method for handling the outlines. One method I tried involved modifying the Diffuse/Outline shader on the Unity wiki, but the result is very aliased and not quite what I'm looking for. I also found out that Unity has an edge detection script, but unfortunately post processing is only available in Unity Pro and as a college student I can't really drop 1500 bucks on a whim. I'd also prefer to have the effect be shader controlled vs camera controlled anyway.

Ideally I'd like something similar to the effect outlined here: http://willychyr.com/tag/edge-detection/ (which takes inspiration from here: http://www.thomaseichhorn.de/npr-sketch-shader-vvvv/).

Is this possible in Unity Free? And more importantly, is it possible for a newcomer to Unity who only has 2 years of programming in general?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
0

Answer by Jeff-Kesselman · Jun 22, 2014 at 12:42 AM

First off, are you aware that, as a student, you can get a year license to the academic Unity Pro for $150? You cant ship a commercial game with it but you can use it for learning and for creating portfolio pieces. You can get it at www.studica.com

It used to be the case that you needed Unity Pro to do custom shaders, but Im not sure thats true anymore. Read through here and see if the features are available in Unity Free http://docs.unity3d.com/Manual/Shaders.html

(Id check but I have pro on my machine and no way to check to see what isnt in free.)

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image tanoshimi · Jun 22, 2014 at 07:37 AM 0
Share

If you ever needed Pro to write custom shaders then it must have been a long time ago! Certainly you've been able to write shaders in Unity Free from v3.5 onwards - you just can't write (nor use) full screen image effects.

avatar image meat5000 ♦ · Jun 22, 2014 at 09:42 AM 0
Share

Not just full screen, but anything that requires backbuffer access, which you don't get in free.

For example if you had some kind of transparency shader that modified what you saw behind the object, this would require pro.

avatar image
0

Answer by tanoshimi · Jun 22, 2014 at 07:55 AM

The problem, as you've already found, is that it's difficult to define what constitutes an "edge" in the scene purely at the shader level - it generally requires some form of pixel-level image analysis either of the Depth Buffer or the rendered image, for which you need a RenderTexture which is a Pro-only feature.

There are some alternative approaches, one common technique is the "expanded back faces" which I think the outlined diffuse shader uses, and is improved somewhat at http://unitygems.com/noobs-guide-shaders-6-toon-shader/

Alternatively, if you're targeting DX11, you might be able to make use of a geometry shader, as at http://prideout.net/blog/?p=54

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image IntelligentDesign · Jun 23, 2014 at 03:47 AM 0
Share

Yeah, the more I look into this, the more I realize that Pro is kind of necessary for the effect I want. I've tried the expanded back faces method and wasn't happy with how it looked. I'm also not thrilled with the standard edge detection scripts that come with Unity.

But how exactly do I do about porting the Silhouette Extraction code into something Unity can use? Would it be a script that goes on my camera?

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Cell Shading Using 2D Renderer? 0 Answers

Cel/Toon shading with multiple light sources on mobile 2 Answers

Weird lighting with cel shader 1 Answer

Single tone shadows in forward rendering 0 Answers

Custom cel shaded Unity shader not casting shadows 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges