Directional shadow problem

I have a problem with the shadows cast from a directional light… My character is 2 units tall in unity,(2 of the default cubes).

When far away the shadow starts getting weird and when close it starts getting fine and detailed. Problem is im not that far away when the problems are happening… I have tried tweaking shadow distance… and oddly enough shadow distance doesnt effect my shadows quality at all… i mean no change. I could put the distance to 50,000 or to 10 and the shadows still look and behave exactly the same way. What is happening? I have tried both forward and deferred rendering.

easiest thing is likely to switch to hard shadows if you dislike the look of the soft shadows …

hard shadows also have problems… this isnt what soft shadows are supposed to act like. There is a problem here. Hard shadows as i move backwards they do all sort of issues… check out this screenshot… this is of hard shadows. I also think your missing the point about the first image… the right side is up close… and it looks fine… the left side looks like 4 hard shadows blobbed a big distnace from one another.

the shadows also change based on the resolution or screen space the game view is taking up inside of unity. Unity has some garbage shadows… let me tell you… the problems never stop. The shadows honestly worked better in unity2… which is sad.

Why does there page say the shadow distnace will improve the directional lights shadow quality? it doesnt change anything… I mean no difference at all.

In order to make my shadows look decent i have to scale the scene 100x100 and still shadow distnace doesnt change anything quality wise… this is buggn the hell out of me and making me frustrated. Someone please help, because its stopping me from completing my project.

Looks to me like this shadow problem exists from teh beginning so the only way to get decent looking directional light shadows is to increase the size… it seems like all hte shadows look better when the scene is 10x the original size… including point light shadows…

I dont want to sound like im complaining, but if your building a scene to unitys 1 unit system… and calling each unit a meter… would mean that your game would look ugly. Im curious as to what the devs would do in my situation. Devs what is my appropriate course of action? Please tell me everything that might hurt me in the end because of scaling the scene. Physics?

More issues… check out the screenshot… im casting a shadow… and depending on what angle i put my character… the shadow on the floor will have artifacts… or extra shadows … nothing is casting these shadows in the scene… this is the directional light

plus look at the edges of my shadow… this is at the scene being a scale of x10… what is happening???

Update- this particular edge problem only happens in the editor… not in game view.

Hello there,
Look at your quality settings in both editor and standalone.
Edit > project settings > quality
Then you will see shadow quality settings.

yea its on max quality already both on fantastic and fantastic is maxed out

bumping the thread … hoping for an answer… even an answer from the devs stating that real time shadows are a priority and were attempting to make the real time lighting and shadows better.

You mean this is not how you want them to act and look.
But it does not change the fact that this is exactly how they work and look in unity.
If you don’t like it, you can write your own shader that overwrite the original ones. The shadow calc part is scattered over like 4 shaders or so, which you can find in the built-in shader zip in the resources-assets area at the top.

(no I don’t like them either, but it does not change the fact that they act how they are meant to by design … The topic was discussed to death during beta, if not even to afterlife)

you say that, but they worked better in unity 2. They are broken. These are glitches… shadows that are cast off of imaginary objects that dont exist… i mean… a shadow is being cast off of nothing at certain angles… bugs dude. Stop defending a bug just because its a bug in unity. I understand you love unity. So do I. But if you dont complain about it… it will never be fixed.

The only shadows you can make look decent at the normal size are spot light shadows… and now ive been looking at other forum posts and even the spot lights are having a problem where they will shine through walls or not cast correct shadows… some things wont even cast shadows.

And I dont know how to write shaders. I bought and payed for unity on a lowly 3d artists salary. I think I have the right to complain about things that are advertised to work right in unity pro, but dont.

Oh man and the fact that directional light shadows are the only thing that work for forward rendering… really bothers me… i have shaders written for me that only work in forward rendering, and i cant cast multiple shadows because of that… What was the purpose of removing them from foward rendering? the shadows for point and spot lights i mean.

the makers of unity should concentrate on this to be improved (/ “fixed”) for the next updates.
and to help, everyone should post bugs like this. i dislike the unity shadows too and im sorry for you that these quality of shadows were not in the price of unity…

I’m having the same problem with the shadows… when i move around the shadows have this wavy motion in them that looks like some kind of artifacting but when i go near or look straight down at them the quality changes what seems like some kind of optimization thing the devs put in which sucks hard soo as of now in unity3 i can not use dynamic “moving” shadows because it just looks like a flickering mess…

Yea, they are garbage. That particular problem though may only be inside the viewer… may actually work right in the game view , just not in any editor window for some reason.

The bad news is that what you see is as good as Unity 3.1 can produce at present. The good news is that I’ve been promised by UT staff that point light shadows for forward rendering will return in the next update (which I believe I read is due early next year).

I’ve spent a fair bit of time experimenting with shadows in Unity and other engines these past few weeks. It seems to me that although we seem to have good controls for shadows in Unity versus other engines, the quality of the shadows are considerably uglier in Unity. This is definitely something Unity Tech needs to invest time into if they want Unity to remain a viable solution in the future. That is unless they don’t care about the desktop market (which could be what they are thinking).

Yeah, in Unity 3 we have changed how the blur of directional light shadows works. Good news is that now the blur falloff is more “physically based”, and does not go from “blurry” to “no blur” over shadow distance. Bad news is that depending on your scene size, it can produce too much blur, which looks like in your screenshots.

Anyway, next Unity build will have a slider per Light to control blur width of directional light shadows, so you could tweak it to match your scene size.

Very cool Aras! Thank you for the response! I will continue to put unity over any other engine to everyone I know professionaly :slight_smile: Espeacially since I know fixes are coming :slight_smile: Is there any word on giving us the ability to make point light shadows sharper? Any sort of setting that could be implemented?