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
2
Question by Martinx09 · May 20, 2017 at 09:21 AM · 2dlights

How to make point lights not overlap

Hi, I'm using sprite/diffuse and I have a question regarding point lights, is there a way to make them not add their brightness when overlaping? I made an image as example:

alt text

So case A is how it works normally, light is brighter where both lights overlap.

Case B is what I want to achieve. Any ideas on how I could make this?

(Sorry for my poor english)

luz.png (4.3 kB)
Comment
Add comment · Show 4
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 Namey5 · May 21, 2017 at 05:48 AM 0
Share

$$anonymous$$y assumption would be to use the $$anonymous$$ax blend operation when writing the forward additive pass for the shader, rather than Add. This wouldn't necessarily work, and requires a fair bit of knowledge about writing shaders the old fashioned way, however.

avatar image Pangamini · May 21, 2017 at 08:51 AM 0
Share

Well, lights are additive; they ADD; You could however write some very customized shaders for lighting; But maybe ins$$anonymous$$d you should try to describe what exactly are you trying to achieve as there might be a better way than using lights

avatar image Martinx09 · May 21, 2017 at 10:19 PM 0
Share

I don't want my sprites to look brighter than their original color when there's more than one light nearby, I have a day/night system, for "day" I have a directional light with intensity of 1 (using sprite-diffuse) and it looks pretty much like if I was using sprite-default (so the original sprite colors). Then I decrease the intensity of that global light to 0 for night and it looks pretty dark. $$anonymous$$y problems are 2: when it is daytime (so directional light is 1) and I have other lights (like torches or whatever) and then the player walks by and gets brighter, which looks bad (too white), I want that intensity of the directional light to be the max possible light intensity for the sprites. The second problem is when it's dark and there like 4 "torches" side by side and the same happens.. it's just too bright.

avatar image Pangamini Martinx09 · May 22, 2017 at 10:52 AM 0
Share

Torches are generally much less intensive than sun, and this case would normally be solved by rendering in HDR, having the sun much much brighter than the torches, and using some exposure adaptive postprocessing (the effect that simulates the eye iris getting used to the light level). That way, torch lights would be practically ignored during day (because sun is so much brighter) and become significant when the sun doesn't shine (because the eye adaptation would icrease exposure until the torchces become significant). But that would require you to use potentially expensive techniques. So why not simulate it yourself? Have some light script that you attach to every light, control the global 'intensity' multuplier from there (as a replacement for the eye exposure). When the night comes, you increase all lights globally, but tune down the sun, making everything else brighter.

Or, if you really just want to get exactly what you are saying, and you are not using any kind of directional information (specular lights, normal maps), you could just render lights to some kind of g-buffer, clamp the intensity there, and then render your scene not with lights but with this buffered lighting information

0 Replies

· Add your reply
  • Sort: 

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

5 People are following this question.

avatar image avatar image avatar image avatar image avatar image

Related Questions

How do I get the positions of lights in the scene in 2D shader graph? 0 Answers

Why do 2D Lights render past shadowcasters. 1 Answer

How to make lights overlapping not to add their intensity? 0 Answers

Extrange Behaviour with 2D Lights in Universal RP 0 Answers

Why my 2D shadows have low resolution? 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