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
1
Question by m50 · Dec 13, 2009 at 08:00 PM · shaderlightingchange

Making all instances of an object glow, and not get affected by post-processing

Hello, I am wanting to make it so that when I press the tab key, all instances of an object with the tag "enemy" get a glow.

The problem here is not the toggling, but the glow itself. A halo is too small, and I want it to look better than that anyways. So, my question being, how do I make an object glow, without it being affected by post-processing effects (aka, greyscale), and to make the glow fit around the object? Is this even possible?

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

Answer by duck · Dec 13, 2009 at 09:48 PM

If you have Unity Pro, you can use the Glow effect. You can control it so that only the desired objects glow by changing the alpha value of the material's tint colour (you can do this in code via Material.SetColor). The glow shader uses the alpha value output by materials to determine the glow amount, so set the alpha to zero on all materials except the ones you want to glow.

The ordering of the post-processing effects on your camera determines which effects are affected by which other effects. They are performed in the order that you added them to the camera, so add the glow effect last, if you wish it to be applied after all other post processing effects.

There are other methods of making objects glow such as just increasing the RGB values of their material's tint colour, or creating a larger mesh which surrounds or covers your object, and giving that a material with an additive shader. If you're just looking for any kind of special effect to highlight an object, you could even use a particle effect at the same position as the object to give it a twinkling sparkly look :)

Comment
Add comment · Show 4 · 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 m50 · Dec 14, 2009 at 05:34 AM 0
Share

Thanks very much! my question now is, how do I control the color of different objects, because when you transform into a werewolf, i want enemies to glow red, and items to glow light blue, how would i do this?

avatar image duck ♦♦ · Dec 14, 2009 at 09:59 AM 0
Share

As far as I can tell, the glow colour comes from the rendered colour of the object itself, so as well as turning up the alpha value of your object's tint colour, you'd just have to change the rgb values of the tint colour to give them a red or blue tint, too. This would tint the whole material, not just the glow, but the two things are pretty much the same anyway.

avatar image Ludde · Nov 02, 2010 at 12:10 AM 0
Share

I don't understand how this is done. When I add the glow effect to my camera everything starts to glow?

avatar image masha · Nov 12, 2012 at 04:47 PM 0
Share

@ Ludde: unless you are on ios, this would be because the materials you are using in your scene have their alpha color value set to 255. Change them to 0, keeping only the materials you want to glow at 255. $$anonymous$$aterials that are using transparency (transparent shader) will not be affected and can keep whatever alpha value they originally had.

avatar image
1
Best Answer

Answer by dkoontz · Jan 11, 2010 at 09:26 PM

M50, it sounds like you want an "aura" type effect with the model still the same color but a red/blue glow around the model indicating the werewolf special vision. For that effect I'd echo Duck's suggestion of a secondary model scaled up slightly with a semi-transparent material or adding a mesh particle emitter to your models. If you can make it work with a post-processing effect that will probably minimize the amount of logic you need in each character that needs to have the glow, but then you need Pro.

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 Ludde · Oct 26, 2010 at 04:54 PM 0
Share

I want a button to glow, but I have no clue about scripting. Can you help me?

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

No one has followed this question yet.

Related Questions

How to change type of shading? 1 Answer

Lighting breaks when zooming in 1 Answer

The name 'Joystick' does not denote a valid type ('not found') 2 Answers

Transforming Lightmaps at Runtime 1 Answer

Can someone help me fix my Javascript for Flickering Light? 6 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