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 Ichender · Dec 03, 2017 at 11:04 PM · terrainlightingshaderstreeslighting bug

Why doesn't built-in Nature->SoftOcclusion->Leaves/Bark support spot lighting?

Using a spotlight with the built-in soft occlusion leaves/bark shaders gives very problematic results which basically make it impossible to do night scenery with these built-in shaders in case you want to use spot lighting (for stuff like car headlights or flashlight etc).


This question has been asked several times in the past, I think the earliest I found was back from 2013 but NO ONE has had any sensible reply for this and seemingly Unity dev completely ignores this whole problem which seems weird to me seeing as it pretty much invalidates one major portion of game design altogether. (Night time nature scenery, hello?)


I've spent literally around 12 hours of active development time just trying to work a solution for this. I've tried using different shaders but couldn't live with the drawbacks of losing bending and dynamic billboarding, asking for help from people who know shaders better than me but getting 0 replies from 0 people, digging through the internet only to find the question asked several times with no one explaining why it's so, modifying the existing shaders without having enough proficiency to get to a proper end result, nothing has solved the problem and I am getting pretty frustrated by now (12 hours is a very long time trying to battle with 1 technical issue).


I just really need (like... The whole game depends on them) those damn spotlights for my scene because I need both, car headlights and a flashlight to function with the forest scenery. Please help me figure this thing out, either find a workaround where I can reach similar end results as with the built-in nature shaders or to fix the built-in shaders so they start getting properly illuminated by the spotlight cookie only.


This is a .gifv of how the trees/stones act when using a spotlight. Absolutely horrible! https://i.imgur.com/IWWXXcM.gifv


  • The trees are single mesh with 2 materials (bark and leaves) like they are supposed to be.

  • They are in a folder called Ambient-Occlusion like they are supposed to be.

  • I get no compiler errors or notifications regarding the trees or anything related to them or the terrain, everything compiles perfectly.

  • The bilboarding works flawlessly, you cannot notice with a naked eye the transition from mesh to 2D billboard.

  • The shader inspector parameters are all tuned so the trees react to any other kind of lighting (even point lights) properly, only the spot light works erronously.


PS. The shader itself seems to support spotlight because when used on any normal gameobjects the light works properly but once you apply the shaders to actual Terrain-> Trees (which they are meant for, ironically) they start acting really weird.

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

0 Replies

· Add your reply
  • Sort: 

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

109 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 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

Terrain Trees remain lit up when no light is cast 1 Answer

Water4 problems and how to fix them 0 Answers

Trees not lighting properly 0 Answers

Grass seems unaffected by light? In the dark its still very green 0 Answers

Skybox lighting not working and causing weird issues 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