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 wibble82 · Jan 22, 2015 at 06:30 PM · lightingspritelight

Sprite renderer lighting issues with just 1 sprite

Hi

I'm hitting an interesting issue with my use of the sprite renderer. It appears that with just one game object in a scene using a given sprite material (with the diffuse sprite shader), it doesn't get lit. However, if I add 2 objects using the material, they both get lit. I tested it extensively with the ambient light turned low and a directional light in the scene. Other meshes (using the mesh renderer) worked fine, however in order to get a sprite to respond to the lights I had to have at least 2 instances using the sprite material in question.

Also worth noting that as far as I can see, it can't be an issue with my code, as the issue occurs in the editor just the same as while playing - i.e. before any of my code has even run! Similarly, it occurs in an empty scene with just the sprites, a camera and a light, so unlikely to be weird interaction with any other objects.

Anybody an this? Is it a known bug?

Thanks

  • chris

p.s. here's an image of 1 sprite not working and 2 sprites working just to show the issue more clearly: alt text

badlighting.jpg (494.1 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

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by team_eden · Jan 22, 2015 at 11:13 PM

You need to go into Unity>Edit>Project Settings>Quality and increase your "Pixel Light Count" to something like 100.

Good luck

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 wibble82 · Jan 23, 2015 at 11:55 AM 0
Share

No luck I'm afraid. Same issue - one sprite in the scene doesn't get lit, 2 sprites in the scene means they both get lit. Wouldn't you expect it to be the other way round if it was a light count issue? Plus I'm using deferred rendering, so pixel light count shouldn't make much difference if my understanding is correct?

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

19 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

Related Questions

How to optimize the lighting in Android for best performance? 1 Answer

Light and 2D Sprite overlapping issue 1 Answer

How can I achieve this particular 2D lighting effect? 2 Answers

How to let Lights effect a SpriteShape 2 Answers

How to achieve this flat 2D lighting effect? 3 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