• 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 /
  • Help Room /
avatar image
2
Question by DanielErhardt · Aug 11, 2016 at 05:45 PM · lightshadows

Point light shadow - Character appears to be floating, but it's not

I have been overlooking this problem for many months now, as I have not been able to find solutions for this specific issue anywhere.

alt textCharacter looks like it's floating

As you can see in the screenshot, the character seems to be floating, but it's not. His feet are touching the ground - even passing through it a little bit.

I'm aware that by increasing the option "bias" below "shadow" on a light, the shadow starts appearing farther away from the objects.

Unfortunately, that's not the case. Even with bias at Zero, the shadow is still not projected exactly where the object touches the ground.

You can achieve this floating effect by putting any thin enough object far from a Point Light. In the screenshot above, the point light has a range of 7.

For walls and pillars, which are thicker, the shadow still starts under the mesh, so this is not a problem. For the feet of the character, however, that is quite disconcerting. It makes the illusion that the character is always above the ground when walking, never touching it.

Has someone else gone through this? I'd like to know if there's a solution or a workaround.

Thanks!

Ps.: For the Spot Light shadows that doesn't happen (shadows begin exactly where the meshes are placed), but I can't use a Spot Light to simulate a torch light.

floating-character.png (73.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

2 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by StayThirsty · Jan 03, 2018 at 06:13 AM

EDIT: You can "fix" the problem by setting the bias via a script to a negative number. Keep in mind the shadow acne so you can use the culling mask to choose which objects are affected by the point light. Use the [ExecuteInEditMode] attribute to see results in the editor.

Not sure if this is a bug with point lights but I believe it's related to the thickness/thinness of the model...

alt text

I have modeled a cooking pot and it suffers from the same problem. The point light doesn't work even at 0 bias / minimum near plane. I've changed the quality settings and nothing helped. It is the model itself paired with the Point Light. The thicker model begins to correct the issue but the model should be thin as in the real world. The problem could be because it is a concave mesh however the Directional light and Spot light work as intended...Standard 1x cube for spacial reference.

Any ideas ? I don't know any users to @ notify of this issue

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 Hooligan-Labs · Oct 07, 2018 at 08:31 PM 0
Share

Yes, a negative bias fixes it up nicely. I ended up using a value of -0.4f.

 [ExecuteInEdit$$anonymous$$ode]
 public class LightImprove : $$anonymous$$onoBehaviour {
 
     public float setBias = -1f;
 
     // Update is called once per frame
     void Update () {
         GetComponent<Light>().shadowBias = setBias;
     }
 }
avatar image
0

Answer by Yoshgunn · Aug 07, 2017 at 04:08 AM

I also really need help with this... did you ever find the answer? I need very tight shadows for my game.

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

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

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

Related Questions

Scene extremely dark when directional light shadows are enabled. 1 Answer

Weird shadows when camera is in the right position 0 Answers

Make directional light not cast shadows of objects behind it 1 Answer

Problem with light or textures! Black and reflections HELP ME!!! 1 Answer

Why is the lighting making these tree shadows so DARK 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