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 VivienS · Mar 08, 2011 at 05:59 PM · lightmapshadowdeferredrealtime-shadows

Problem with deferred rendering real time shadows.

Hello.

Since some time we have serious problem with the real time shadows in Unity 3.2 Pro. It manifests like this:

1) There are simply no more real time shadows for directional and spotlights when using deferred rendering. In any scene in our main project. (They did work for the longest time. They still do appear as baked shadows. I can't really say, when we lost them, but I suspect it happened with our upgrade to 3.2)

2) Strange blending artifacts appear when we combine our (directional) lights with beast light maps.

Take a look at the following screenshot. It's a scene with a directional light, casting soft shadows on a terrain (random texture) with baked dual lightmaps. I took the screenshots while zooming out with the camera. Look at the strange bright border with the stepped, sharp edges. It appears approx. in the region where real time lighting and the baked light map should blend.

alt text

As you can see, there are still shadows in the baked light map, but none in the real time This is really troublesome and I ran out of ideas on how to fix it. Any ideas?

Thank you!

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 spinaljack · Mar 13, 2011 at 01:37 PM 0
Share

Just to be sure are you baking on one machine and then transferring the maps to another? I had this problem when I was using PC and $$anonymous$$ac and transferring the maps from one to the other broke the shadows. Just make sure to bake on the machine you're viewing it from.

Alternatively change the shaders you're using and check your quality settings in the editor to make sure you allow soft shadows at your current quality setting

avatar image VivienS · Mar 15, 2011 at 09:39 AM 0
Share

Thanks, I am baking and displaying on one PC (although we are using $$anonymous$$acs in our $$anonymous$$m aswell). For the above example I used fantastic Quality settings, that should display shadows. How do I change the shader on the terrain?

3 Replies

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

Answer by VivienS · Mar 17, 2011 at 09:19 AM

We fixed the problem!

It's cause was old shader code that was incompatible with the new rendering functionality of Unity.

First step was the deletion of the standard asset shaders, which we imported for reference some time ago. This fixed the light map blending problems, but still did not bring back real time shadows for most of our objects (specifically, the pixel-lit ones).

The second step was the modification of some old shader code in a Vertex-Lit shader. The problematic line was some ShaderLab Tags. The debugger turned them up as errors after I re-imported all the still remaining shaders in our project.

Offset [_ShadowBias], [_ShadowBiasSlope]

Commented the line out andto my great reliefwe have shadows again!

Thanks everyone!

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
1

Answer by JonManatee · Mar 10, 2011 at 09:47 PM

Try re-baking your light maps. A missing light map can really mess with your shadows in an area.

As a side note: the "blending artifact" is slices of the terrain mesh either being completely shadowed or completely unshadowed. The terrain is rendered in patches in case you didn't know, in order to keep the mesh size from being too large.

Also check to make sure that you don't have your shadow distance set too high, quality can really degrade at large numbers.

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 VivienS · Mar 11, 2011 at 08:58 AM 0
Share

Hi there! Thanks for the info about the terrain. I didn't know it was rendered this way, but it makes sense - so it is the light, that is not working as it should. I created the above map from scratch and already tried re-baking the maps in other scenes with no change. Also, I tried changing the shadow distance. The effect is, that the bright region moves closer or further away from the camera.

avatar image
0

Answer by Ilias · Mar 16, 2011 at 04:49 PM

make sure the static function of the objects are enable. You can check it in the inspector of the object. (right up in the inspector)

Good luck

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

No one has followed this question yet.

Related Questions

Disabling dynamic shadows in deferred rendering (Unity 5) 1 Answer

Lightmap + RealTimeShadow 2 Answers

Unity snaps : shadow leaks when baking lights 1 Answer

Light Probes - dynamic conditions 0 Answers

Terrain shadow distance and lighting problem 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