Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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
3
Question by qJake · Apr 24, 2010 at 06:37 PM · shaderorthographictoonshading

Toon/Cel Shading with Orthographic Camera

Pretty simple question... the Toon Shader (aka Cel Shading) doesn't work with an Orthographic camera... is there some shader that does? I'm really not versed in creating shaders myself, so I'd appreciate any help. Thanks.

Comment
Add comment · Show 8
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 Cyclops · Apr 27, 2010 at 02:23 PM 0
Share

Out of curiosity, is the Toon Shader a Pro-feature? I don't see it in the manual, or the Basic drop-down (or the name Cel). And I saw a reference to Toon-Basic on the Wiki Shader section, but no actual shader: http://www.unifycommunity.com/wiki/index.php?title=Shaders

avatar image qJake · Apr 27, 2010 at 11:22 PM 1
Share

It's not part of the standard assets, it's a separate option when you create a new Unity project. There's Basic and Lighting, and each of those has an "Outline" version that reverses the mesh and fills it in black, making a cel-shading-like effect. -- Really though, noone has any idea about how to do this for orthographic cameras? :(

avatar image Cyclops · Apr 28, 2010 at 01:31 AM 0
Share

Huh... I never even paid attention to that checkbox at project creation... How about that? :)

avatar image Cyclops · Apr 29, 2010 at 09:34 PM 0
Share

@SpikeX, can you clarify what you mean by doesn't work? Out of curiousity, once I imported the Toon package, I changed the Camera to Orthographic, and the four sample Spheres (Basic/Outline/Lighted/Lighted Outline) all showed up fine. Are you having problems applying the shaders to a user-generated object?

avatar image qJake · Apr 29, 2010 at 09:49 PM 0
Share

Bah, I figured out a solution. I just stuck a LineRenderer around the edge of the object. With an orthographic camera, it looks just like an Outline Toon shader (in fact, even better).

Show more comments

3 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by qJake · Apr 29, 2010 at 09:50 PM

I just decided to use a LineRenderer as the border for the object. This actually turned out looking better than I thought it would, plus I still have control over color and thickness, and I can even texture the border if I want to.

Comment
Add comment · 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
5

Answer by LeoCeballos · Aug 14, 2012 at 06:36 AM

In case anyone still wants this, I just figured it out tonight, current with Unity 3.5

In the shader, find the line:

 o.pos.xy += offset * o.pos.z * _Outline;

It should be line 33 or so in the Basic Outline shader. Take out "o.pos.z". It should read:

 o.pos.xy += offset * _Outline;

This disables the "thicker with distance" feature of the outlines, but allows the shader to work with the ortho camera.

Comment
Add comment · Show 3 · 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 emingo · Nov 06, 2012 at 09:59 PM 0
Share

thanks that works great!

avatar image pengo · Jun 14, 2014 at 04:02 AM 0
Share

And this fix still works in Unity 4.5

avatar image Patroclo · Jan 13, 2016 at 03:51 PM 0
Share

thanks! i did that, but the outline is very small. And if i change Outline Width, its destroy the Outline :/

avatar image
0

Answer by Bob 3 · Nov 12, 2010 at 01:33 AM

@Spikex How did you add a border to an object? I've been playing around with LineRenderer but can't see how this is done.

many thanks

Comment
Add comment · 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

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

How can I ToonLitOutline shader transparent? 0 Answers

Toon shader to approximate engineering line drawing 0 Answers

Cel Shading Possible In Unity Free Version? 2 Answers

Explain Toon Shading Please 1 Answer

Toon effect combined with vertex lighting 0 Answers


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