Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 14 Next capture
2021 2022 2023
2 captures
13 Jun 22 - 14 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
3
Question by DisRup · May 15, 2014 at 12:10 PM · shadowtreedisappear

Realtime tree shadows disappear on camera movement

I searched the internet about this issue for countless hours with no results. So here's the situation:

I have a classic terrain setup, 2000 x 2000, trees, one directional light as sunlight, graphics on fantastic, average tree rendering settings...

Now here's the point, I have a pretty low position of the sun so that it makes long shadows of the trees and gives the scene the mood I'd like to achieve. The problem I have with this is that if I rotate my camera view some trees behind my frustum don't render anymore (which is the normal frustum culling behaviour I guess?) and therefore their shadows disappear even if they should be visible in the camera view.

Here are two screenshots with slightly different camera rotation: alt text

alt text

I played arround with all kind of tree, quality and shadow settings with no result and I just can't believe that no one ever made a scenery with long shadows and came across this problem...

Comment
Add comment · Show 8
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 NickP_2 · May 15, 2014 at 12:49 PM 0
Share

Are you using the free version of unity? They recently launched shadows for free which were previously only accesable from the pro version. Anyways, On 2 different computers with another unity editor free, the shadows are very buggy. They dissapear as you said, I hope there's a solution, and not a unity bug.

avatar image DisRup · May 15, 2014 at 01:18 PM 0
Share

I'm on Unity Pro...

avatar image _dns_ · May 15, 2014 at 01:24 PM 0
Share

Hi, just an idea: if it's really due to the culling and there is nothing to tune/fix it, maybe you can increase the bounding box of the trees by adding some vertices or faces to the geometry (vertex without face or faces with only 2 vertices so it's not rendered). There would be a small performance cost though as the culling would be less effective.

avatar image DisRup · May 15, 2014 at 02:19 PM 0
Share

I just found out some things by messing around:

  • It definitly only happens with trees placed by the terrain system

  • It's always a hole chunk of shadows that pop up or disappear and not individual ones

  • It does not just depend on whether I look at those trees but also on my distance to them. I can look at the opposite direction but if I'm close enough, the shadows don't disappear

So this brought me to the theory, that the culling or the shadows of terrain trees are calculated in some kind of groups based on camera distance AND rotation.

So I tested if I can somehow "extend" or at least fake to extend this group or the distance. I have some fern which I loaded as a tree ins$$anonymous$$d of detail mesh and if I place only one little fern where no shadow is rendered, exactly this extension happens. So it basically extends the "render border" or what ever.

The shadow chunk disappears now, if I get far enough from the fern. I can work around this issue this way, but it doesn't make me happy...

alt text

alt text

avatar image Andres-Fernandez · May 15, 2014 at 02:25 PM 0
Share

If it has to do with the distance from the camera to the trees it might be the LOD of the trees. When they are enough far away, they are probably being switched to the billboard versions, and those probably don't cast shadow.

Show more comments

4 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by team_eden · Dec 16, 2014 at 07:55 PM

I am having the same problem. When trees get to close to the camera field of view, they suddenly disappear when the trunk of the tree gets out of view. All of a sudden, the leaves disappear, just because the trunk is gone. This is a poor attempt at culling, simply because the position of the object is not directly in camera view, does not mean, the rest of the object is out of view.

So far this applies only to trees on the terrain system.

BUMP This is annoying, watching trees suddenly disappear on a mobile game, where it is glaringly obvious because there are only few trees in the scene.

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

Answer by danielrugu · Feb 20, 2017 at 09:38 AM

alt text

Change the shadow distance to a higher number, my case 500 worked


capture.jpg (43.8 kB)
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
avatar image
0

Answer by skymeson · Jun 24, 2020 at 06:07 PM

Changing shadow distnace did not work in my case. Still having issues with shadows being culled from trees in Unity 2018.4. Hoping someone has a solution to this.

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

Answer by OTRegashi · Aug 30, 2020 at 11:16 AM

I changed "Shadow Near Plane" to a higher value. Fixed in my case.

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.

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

Shadows in terrains 1 Answer

Tree shadow problem / billboard trees 3 Answers

Lightmapping shows lighter areas cast by tree shadows 1 Answer

Trees have no shadows (baked shadow) 1 Answer

Why terrain shadows are gone when using a few more point lights in the scene? 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