• 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
Question by Kitcheone · Nov 12, 2016 at 05:17 PM · androidgeometryhard shadows

Hard shadows glitching geometry in Android

I've noticed in my recent builds that when I enable hard shadows on a point light, all of the geometry in the scene goes a bit crazy. However, this only happens in Android.

Here's a screenshot of the game running on Android with real time shadows disabled:

No shadows

And here's a screenshot of the game running on Android with real time shadows enabled:

Broken shadows

As you can see, all of the geometry is completely messed up when hard shadows are enabled.

Things to note:

  • In the Unity editor (and on iOS), the real time shadows work completely fine.

  • I've been building this game for a while. In the past, the real-time shadows worked on Android completely fine. I've only noticed recently that they cause this glitch, as I haven't turned the shadows on in a long time. So I'm unsure when this glitch started happening, but I can confirm that it did used to work OK at some point in the past.

  • This is on Unity 5.5b11, but I've also tried building in 5.3 and 5.4, and it has the same issue.

  • EDIT: After doing some more testing, I can confirm this problem doesn't affect directional lights. A directional light in this scene with shadows set to "Hard" casts shadows properly, and it works OK. As soon as I switch it to a point light, it starts showing the same messed up geometry as in the picture.

Any ideas what's wrong? Any suggestions on how I might fix this?

Thanks in advance.

shadowsbroken.jpg (520.9 kB)
noshadows.jpg (457.6 kB)
Comment
fourthWallArtist

People who like this

1 Show 0
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

Answer by IgorAherne · Nov 12, 2016 at 07:37 PM

couple of guesses:

1) check the distance of light, it might get glitchy shadows if it's very big (above 500)

2) see if enabling cascades helps in Project->quality settings of the game

3) play with "Bias", "Normal Bias" and "Shadow Near Plane" settings of the light

3.5) shadow distance in Project->quality settings shouldn't be above 1000

4) perhaps the material's shader is broken after the update

5) check camera's near and far clipping planes, they shouldn't have a difference larger than 500 ish

Comment
Kitcheone

People who like this

1 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 Kitcheone · Nov 13, 2016 at 11:16 AM 0
Share

Thanks for the help and all the ideas. Unfortunately I couldn't fix the problem through any of your points. Here's an update on each one:

1) The range of the light sits somewhere between 10 and 20 (varies depending on how close to the ground it is). But it never goes above 20.

2) Cascades are already enabled, and set to "Two cascades". I've also tried it with no cascades and four cascades, but that didn't fix it.

3) I've played around with the "Bias" / "Normal Bias" / "Shadow Near Plane" settings, but the problem still occurred regardless of what settings I picked

3.5) The shadow distance is set to 20. I've also tried it on 50 and 100, but it made no difference.

4) The material is just the standard Unity material. I will try some others and see if it breaks similarly or not.

5) The camera planes were set to 0.3 and 1000 for near and far respectively. I lowered the far plane to 100, but it didn't fix it.

Thanks again for your input.

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

3 People are following this question.

avatar image avatar image avatar image

Related Questions

Android: No geometry appears? 0 Answers

Too much triangles and more doubts performance-related 1 Answer

application file path (android) 1 Answer

Instantiating Prefabs Lags in Android 0 Answers

Detect if music is playing in other apps on Android 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