• 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 MikezNesh · Oct 14, 2010 at 11:53 PM · shaderblackborder

How to make black borders follow an object?

I have seen some games where the objects have black borders around no matter what rotation or movement occurs to the object. I don't think it is the texture. More like GUI or something?

How would I do that effect? (the border i am trying to achieve is like the one when you select an object and it has that selected border)

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
1
Best Answer

Answer by dmpaskiet · Oct 15, 2010 at 12:08 AM

One of the toon shaders allows for black borders, looks like the circles in this: alt text

Is that what you're going for?

Comment
Add comment · Show 7 · 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 MikezNesh · Oct 15, 2010 at 12:41 AM 0
Share

Yeah, that is exactly what i am looking for. How do you do that?

avatar image dmpaskiet · Oct 15, 2010 at 01:54 AM 0
Share

In Unity's standard assets (if it doesn't show up you may have to manually import it) there is a shader called Toony - BasicOutline. If you add that to your object it will allow you to give it a material, a shadow color and an outline like the pic above.

avatar image MikezNesh · Oct 15, 2010 at 02:19 AM 0
Share

trying it right now. thanks.

avatar image MikezNesh · Oct 15, 2010 at 02:25 AM 0
Share

It is doing fine in the scene view but when I turn make the Camera have an orthographic view it doesn't show up when I play the scene. Why is that? Again, Thanks Alot.

avatar image dmpaskiet · Oct 15, 2010 at 02:31 AM 0
Share

That one I actually don't know, I ran into the same problem myself. $$anonymous$$ight be worth asking that alone. I'm rather new, so a lot of the technical stuff like that escapes me sorry.

Glad I could help at least a little though.

Show more comments
avatar image
0

Answer by 3Duaun · Oct 15, 2010 at 05:30 PM

I would strongly suggest the "Flip normals, then upsize faces" trick.

Here are the steps below:

1: duplicate your mesh

2: scale the mesh just a LITTLE bit larger than your original mesh

3: FLIP THE NORMALS!

4: Make your new duplicated/upsized/normal-flipped mesh the color black(or chosen border color)

5: Now parent your duplicated/upsized/normal-flipped mesh to your original mesh(that you wanted to have a border on)


ta da! you now have a black border that will follow your character and render only as a border due to it's flipped normals.


there are many resources for many 3D-apps on this technique. here is an example of one that tells you how to do this in Blender.

http://blenderartists.org/forum/showthread.php?t=29596

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 n8 · Oct 15, 2010 at 06:42 PM 0
Share

keep in $$anonymous$$d that this trick will double your vertices/poly count as you now have 2 versions of the same mesh in your scene. As long as your original model has a low enough poly count you should be fine. Just something to think about.

avatar image 3Duaun · Oct 19, 2010 at 09:54 AM 0
Share

you are correct of course, but it IS a working solution(that many games use) that will work for the individual asking the question. AND I've had no trouble using it with ORTHOGRAPHIC mode as well.

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

No one has followed this question yet.

Related Questions

Flexible border with changeable color of line,Flexible border with changeable color 0 Answers

Custom Transparency shader occasionally losing transparency? 1 Answer

Graphics.DrawTexture with Shader not working on iOS? 1 Answer

Border around spotlight 0 Answers

Giving MatCap_TextureAdd a black outline 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