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 zee_ola05 · Feb 06, 2014 at 10:18 AM · 2dshadertexturelightingblending

Torchlight effect in 2D

My problem is quite similar to this. But I want something that's specific to Unity. Can anyone help me how to achieve this with Unity?

What I want basically is to somehow blend my glow texture and my darkness overlay.

I'm a total noob on shaders so I would really appreciate if you could give me some code snippets. I wanna be able to control the scale of the glow and its opacity.

Or if you could help me some general direction. Or hack to achieve this without using custom shaders. Thank you so much!

alt text

xrkta.png (352.0 kB)
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

3 Replies

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

Answer by zee_ola05 · Feb 11, 2014 at 01:59 PM

Ok. This is what I got. Looks pretty nice for me.

alt text

So what I used is basically just the default 3D Light. But to get it to work with 2D, you have to use a Material with Sprite/Diffuse shader.

alt text

In this specific example, I used a combination of SpotLight and Point Light. That's all. If you have any questions, ask below. Vote up if it helps you! :D

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 EF · Feb 06, 2014 at 11:08 AM

You could create a material with Particles/Additive shader with circular gradient texture.

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 zee_ola05 · Feb 06, 2014 at 11:50 AM 0
Share

Will try, thanks!

avatar image
0

Answer by MaT227 · Feb 06, 2014 at 11:02 AM

I am not really sure but there are several ways to do that.

  • Try using light in the 2D project.

  • You can try using Light Cookies.

  • You can try using particles shader with specific blending properties with a simple quad.

  • There are great lighting solution on the Assetstore like this.

I suggest you to try those, but as I am not sure if I understood your need well, feel free to ask if you have any question.

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 zee_ola05 · Feb 06, 2014 at 11:50 AM 0
Share

Thank you for your suggestions. I will explore those. I also saw that plugin in the asset store. However, I don't want to spend $ right now.

avatar image MaT227 · Feb 11, 2014 at 07:06 AM 0
Share

Did it worked ? If so, you can validate the answer ;)

avatar image zee_ola05 · Feb 11, 2014 at 08:02 AM 0
Share

I tried the first 3 but it didn't work on 2d.

avatar image Blackfire-Studio · Feb 11, 2014 at 12:23 PM 0
Share

Did you found an other solution ?

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

shader for light replacement blending, instead of additive blending? 0 Answers

Unity 2D Shader Graph Sprite transparent when in shadow 0 Answers

Blending between arbitrary numbers of textures on the same material 0 Answers

Why Does My Scene Do This? 1 Answer

Blitting to RenderTexture does not seem to be accurate 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