• 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
1
Question by JCalwaysbeatsErick · May 31, 2015 at 08:15 AM · shadows

How to fix Shadows being visible through grass

Hello everyone i would rally appreciate if anyone could tell me how to fix this issue im having in Unity 5.Im working on my project and i placed some LOD trees.They cast shadows on the terrain.However when i add details and grass and play the game my character is at ground level and im able to see the trees shadows through the grass which should be obstructing my view of them.

Comment
Add comment · Show 3
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 NerdGameStudio · May 31, 2015 at 12:32 PM 0
Share

How did you make the grass in your scene? Did you use the terrain --> detail option or did you drag a 3D model in your scene ? Perhaps you need to add some kind of collider to your grass model.

avatar image JCalwaysbeatsErick · Jun 02, 2015 at 10:55 PM 0
Share

I used the terrain detail option

avatar image PixelFireXY · Sep 23, 2015 at 02:18 PM 0
Share

Bump, please I have same issure. When i add grass texture from terrain component end i look through this is the result...

shadow through grass

cattura-di-schermata-6.jpg (207.4 kB)

3 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by TotteAndersson · Dec 27, 2015 at 04:51 PM

@penna91 @JCalwaysbeatsErick

Hey! I found a way to solve the problem. I had the same problem, where it would look like this:alt text

THE SOLUTION, or what makes it look normal at least is to add a cookie texture to your directional light. I just went into the directional light and selected a texture in the "cookie" thing. Now, what cookie does is to (kinda) act like the light was going trough your texture of choice which creates shadows in the shape of your texture. However, if you select a texture without alpha you don't get that effect, the scene is unaffected BUT the weird grass problem is magically fixed. I don't know why, but this just seems to work. I just took a random texture I found in my scene without alpha that was also used for barrels in my game and used as cookie.

With a cookie texture it looks like this: alt text

I hope this will fix the problem for you too!


objectsvisibletroughgrass.png (246.4 kB)
problemsolved.png (231.1 kB)
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 JCalwaysbeatsErick · Dec 27, 2015 at 08:07 PM 0
Share

Thank you so much

avatar image
0

Answer by JCalwaysbeatsErick · Dec 27, 2015 at 08:06 PM

Wow i would have never guessed the solution wouldve been in a directional light texture.i thought it lied in the grass itself or maybe in the shadows options in the properties panel.thanks for the help

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 DenesN · Feb 14, 2016 at 05:57 PM

The ACTUAL fix is to open the terrain's options (cog button) and increase the Detail Resolution Per Patch value from the default 8 to, say, 16. If your grass density is higher, you might need more, but it definitely fixes the problem.

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

6 People are following this question.

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

Related Questions

Realtime point light + transparent shadow problem? 0 Answers

Pre-baked shadow maps 0 Answers

Shadows not showing on plane 0 Answers

How to create a 3D object that has the dimensions (shape) of a shadow 2 Answers

Is there any way to mask global illumination? 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