• 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
7
Question by KnightsShadow · Jun 25, 2013 at 10:36 PM · androidlighting

Why do I have such light problems with Android?

If I let run the game on my pc it looks so:

http://www.youtube.com/watch?v=gbQiUxRYB-A

but if i run it on an android device it looks so:

http://www.youtube.com/watch?v=7ojnqPPCat4

If I move arount the corner it will get darker and darker and at the next corner it will get brighter and brighter.

Light is ambient, the end of sight in front of the player is made by fog and the shadows at the screen are made by blob-shadow-projector.

How can that be?

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

6 Replies

· Add your reply
  • Sort: 
avatar image
12

Answer by Bunny83 · Jun 25, 2013 at 10:56 PM

This is because "pixel lights" (light is calculated per pixel in the fragment shader) are quite expensive especially on mobile devices. Depending on your quality settings the pixel light count is set to 1,2,3 or 4. So the same geometry can only be affected by that much pixel lights. Unity will determine the lights at the current position and use only the brightest ones.

As alternative Unity will use vertex lighting. Vertex lighting doesn't calculate the light per pixel but per vertex. If your geometry is huge with only a few vertices the result is quite bad. A long wall can only be lit at it's corners, so in between it has to average the 4 corners.

Your options are:

  • Increase the pixel light count in the quality settings (or just choose a higher default level)

  • increase the vertex count in your geometry. For example the default plane object that comes with Unity has 11x11 vertices and works way better with vertex lit shaders as a 2x2 quad

You can also search the web for lighting solutions for mobile devices, there's a lot of information out there.

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
  • ‹
  • 1
  • 2

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

29 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 avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Manually configure light bounds? / Optimising lighting for dynamic batching 0 Answers

Lighting and Graphics for low GPU (mobile VR)? 0 Answers

I can't see light effects in Android AVD 0 Answers

NGUI objects black color after build into phone 1 Answer

Mobile Build Spotlight Problem 1 Answer


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