Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 Komak57 · Aug 09, 2014 at 11:17 PM · shadowrealtimespotlightflashlight

Spot light shadow clipping early

After designing a new scene, ensuring fantastic quality, changing camera rendering to diferred, I've obtained shadows that look pretty cool. My spot light preferred distance is about 100. Downside, is that the shadows start at a minimum of 4 unity's from the player, meaning anything you're up close to is fully penetrated by the light. To add injury to insult, the shadows can half show on objects, which is clearly not something anyone would want. I find the shadows work pretty well so long as I run up to 10 unity distance spot lights, but that's ridiculously short. I've scanned quality settings, camera rendering tricks, I simply can't find a balance to get ranged spot light with good enough looking shadows.

alt text

I need some kind of middle ground, or solution to the shading problem. I really dislike penetrating flashlights, and a good real-time shadowed flashlight is always an eye catcher in games.

screenshot 2014-08-09 19.12.32.png (165.5 kB)
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 RyanFavale · May 20, 2015 at 06:21 AM 0
Share

Having the same issue. If you found a solution, please post it.

avatar image Komak57 · May 20, 2015 at 07:29 PM 0
Share

Never found a solution. The point-light shadows don't work very well for Unity. Would probably need a custom shader to pull it off.

avatar image Deny Risgi · May 21, 2015 at 03:39 AM 0
Share

http://www.beyondblog.net/

1 Reply

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

Answer by FortisVenaliter · May 20, 2015 at 08:59 PM

So, this has to do with the way the shadows work. They use a depth buffer, much like the camera's depth settings. The difference is that the camera offers fields for both near and far clip planes, but the spotlight shadows only make available the far clip (called range), and generate a reasonable near clip (looks like about 0.045 x Range from my test).

I just tried playing with all the settings, even in debug mode, but I think this is just a limitation you have to live with, unfortunately. Unity does not appear to expose the near clip plane for shadow casting.

The only thing I can recommend is to use a two-light setup. Use a short in-focus one at all times, and if you can raycast past, say 6 units, then enable the far blurred one. Might make for a pretty cool effect now that I think of it.

Comment
Add comment · Show 2 · 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 Komak57 · May 21, 2015 at 02:25 AM 0
Share

Capsule cast might be more effective. But I tried dozens of tricks that never worked to my satisfaction, and I don't have the knowledge to generate a shader to do the work for me.

avatar image RyanFavale · May 21, 2015 at 09:35 AM 0
Share

Thanks. Ya, I was looking everywhere for a place to edit the nearClip but didn't find anything.

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

23 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

Related Questions

Flashlight battery script 3 Answers

Flashlight cuts off 180 degrees 0 Answers

Has anyone managed to make a decal shader with shadow support? 1 Answer

How to make a sound play when my flashlight (spotlight) hits an object 1 Answer

My Draw Calls go from 30 to 125 and I have twice as much tris/verts when I enable a spotlight. Why?? 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