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
2
Question by douglasg14b · May 15, 2015 at 07:53 AM · lightingshaders

How do you go about making a dynamic object emit light in Unity 5?

I've spent the last day googleing to try and find out how you can make an object emit light, I found that the standard shader is capable of that but only when the object is static.

Lets say I want to make a long tube, and I want it to emit light evenly across it's entire body (like an overhead fluorescent light). How would I go about doing this in such a way that the glowing object can freely move around the scene? I do not want to use point lights, since those would not provide a uniform amount of light over the length of said tube.

I apologize if this is a "stupid" question, I'm burnt out on searches and am hoping one of you can point me in the right direction. Does this require custom shaders, or can it be done with the capabilities Unity provides?

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
2

Answer by apple92 · May 29, 2015 at 08:38 PM

There are actually a few ways to do it, but none of them is a perfect solution.

I'll just start with what I can think of right now:

  1. Use the Emission Map and Value in Combination with a Bloom Image Effect (a very good package can be found in the Asset Store, but to test it, the Unity Bloom effect is enough). This will let the moving mesh look like it emits real light. Bad thing about it? There is no GI. So Other Objects won't get lit by it. But if it just navigates through space it's fine. If it navigates along a road or ground, you could make use of Projector to project the same Color with a texture onto the ground.

  2. Create a reflection Probe as Child of this moving Object and let it update frequently. Set it to an really low size so it gets captured fast and is really blurry (also deactivate/set to 0) all the performance eaters like ShadowDistance, etc.). If an Object gets within the Distance of the Reflection Probe it should (depends on the settings) become colored. This actually works better if you'd want to Bleed color from the environment onto the moving object, but should work the other way around too.

  3. Or just use Projectors in all directions. Don't know how well this would work as I didn't test it. See here for Projector

If nothing works let me know, I'll try to figure out something else.

Regards Michael

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
0

Answer by Cherno · May 15, 2015 at 03:50 PM

I had the same problem, I wanted to make the surface of a lava mesh that is procedurally generated emit light. It seems like this is not possible with the so-called "real-time" global illumination :(

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 douglasg14b · May 15, 2015 at 04:02 PM 0
Share

That doesn't sound good. But that then brings up the question of how people have dynamically moving objects emit light from their surface. How would you have an RPG character carry a glowing staff that casts some light on him, or a "beam" that casts light on the ground as it passes over it.

Curious what solutions they use for this if dynamic objects cannot emit light without using the pre-made untiy lights. Especially in 2D, where you don;t have a 3D object to contain a light source.

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

21 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity URP black outline on my mesh polygons 0 Answers

Can you get how much light is on the surface in a shader? 0 Answers

In a shader designed for Forward rendering, unity_Lightmap seems to be correct in the base pass and incorrect in the add pass. Am I doing something wrong or is this a bug? 0 Answers

Toon shader light culling shadow issue 0 Answers

How can I get spot light direction in forward add pass? 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