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
0
Question by AnatolyDream · Apr 07, 2016 at 10:43 AM · lightingshadowsoffset

How to solve Peter Panning (shadow offset) problem?

Hi, everyone!

I use Blender to model assets for my game and everything used to be good except for the last two models. Their shadow looks like it has an offset. I've found out that it's called "Peter Panning" and it makes object look as if it was hovering above the ground even though it's not. I've searched the forum and tried different ways to get rid of this effect but none of them solved the problem. I'm going to post a few screenshots of a bucket model which has this problem.

alt text

alt text

I tried the following things:

  • Checked if some normals were flipped in Blender

  • Set Normal Bias to 0

  • Played with Bias values

  • Played with Shadows Distance

I've got same problem with a shovel model.

sc1.jpg (19.1 kB)
sc2.jpg (18.4 kB)
Comment
Add comment · Show 2
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 meat5000 ♦ · Apr 07, 2016 at 10:44 AM 0
Share

Post the Blend file. Lets have a gander.

avatar image AnatolyDream meat5000 ♦ · Apr 07, 2016 at 10:56 AM 0
Share

Here it is.

link text

buckettest.zip (81.5 kB)

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by meat5000 · Apr 07, 2016 at 11:53 AM

The bottom of your bucket is not connected. Ensures you have a leaky bucket.

Deselecting your whole mesh in Blender edit mode, select Vertex Select mode and select Non-Manifold under the Select menu. Non manifold is when you have holes in your mesh and internal geometry. The goal is that selecting Non-manifold shows you nothing.

So, I Connected the base, 'Removed Doubles' under the vertex menu, made the internal base a little smaller (thicker sides cant hurt) re-seamed and re-unwrapped.

alt text

This is not 'Peter Panning'. Just a holey mesh.

As your problem still persists it comes down to two things : Hard Shading in conjunction with your chosen geometry.

I made my own little barrel thingy for you to look at. If you export it with hard shading you will see that flecks of light some through the shadow, but if you select smooth shading these defects all disappear. You will see that in either mode, no light shines through the bottom of my barrel. This is from the way I have set up my geometry and also avoided vertices with large numbers of connected edges.

alt text

https://www.dropbox.com/s/zvukgmnrglpdfsj/buckettest3.zip?dl=0

Decreasing the Shadow Distance in the Quality Settings will help decrease the pixellation of the shadows. Scale this value based on camera distance.

http://docs.unity3d.com/ScriptReference/QualitySettings-shadowDistance.html


bucket.jpg (257.8 kB)
buckets.jpg (152.2 kB)
Comment
Add comment · Show 10 · 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 AnatolyDream · Apr 07, 2016 at 12:09 PM 0
Share

I imported your version of the model into Unity and the problem is still there even though the gap between shadow and the model looks kind of smaller. I don't have any ideas about what is causing this...

P.S.: I also tried merging all vertices together until "Select Non-manifold" wasn't showing any results and that also didn't help. I just didn't save that .blend file since it didn't make a difference.

Here is a screenshot of the bucket from your .blend file. Texture looks wrong since UV islands were moved.

alt text

scr4.jpg (19.5 kB)
avatar image meat5000 ♦ · Apr 07, 2016 at 02:09 PM 0
Share

https://www.dropbox.com/s/zvukgmnrglpdfsj/buckettest3.zip?dl=0

avatar image AnatolyDream · Apr 07, 2016 at 02:24 PM 0
Share

So what exactly am I doing wrong? Because even in your last screenshot my bucket's shadows still look kind of wrong. While modeling this bucket asset, my workflow was exactly like with all the previous models yet those are looking good while this and the other one are having the shading problem.

avatar image meat5000 ♦ AnatolyDream · Apr 07, 2016 at 02:31 PM 0
Share

In the last shot I didnt modify the bucket, I put $$anonymous$$e in to show the difference. You can look at the geometry in the Blend file i added.

avatar image AnatolyDream meat5000 ♦ · Apr 07, 2016 at 02:43 PM 0
Share

If in Unity I set your bucket's scale to 30, to kind of match the size of my bucket, then same problem appears. $$anonymous$$aybe it's because of the object's size? On the other hand, I had even smaller objects in my scene and they didn't have this problem...

Show more comments
Show more comments

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

6 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Shadows produced by non-static objects are lighter than baked shadows 2 Answers

Scene lights flickering 0 Answers

Custom shader has no shadow 0 Answers

How to hide a sprite when they are in shadow using Unity 2D Light System? 2 Answers

No shadow at the intersection of objects 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