Fantastic shadows not so fantastic (Unity 5.4.0F1 - release candidate!!)

Case numbers:
782331 (old case)
805740 (new case)

Hello everyone!
After updating to 5.3.1, the shadows in my scenes have a terribly low resolution.
I didn’t change the settings and I use “Fantastic” in Edit → Project Settings → Quality.

Here are some screenshots of the different qualities when changing the settings:

simple:
2449647--168189--01 simple.PNG

good:
2449647--168187--02 good.PNG

beautiful:
2449647--168186--03 beautiful.PNG

fantastic:
2449647--168188--04 fantastic.PNG

Any ideas? Anyone?
Best wishes,
Shu

EDIT:
Also, this appears when “fantastic” quality is chosen:
2449647--168191--screenshot.PNG
This disappears when i uncheck “Receive Shadows” and changing the quality to lower settings will improve the fragments a bit.

Due to a huge number of problems with 5.3.x, I downgraded to 5.2.2.
Here are some screenshots of the shadows (fantastic quality) in 5.2.2:
2450478--168266--01.jpg
2450478--168267--02.jpg
2450478--168268--03.jpg

After upgrading to 5.3.1, try restarting Unity. Shadows quality seems unresponsive just the first time after upgrade.

1 Like

@TBone0xFF
Thanks for your reply! I will do that if Unity 5.3.x becomes stable at some point and I’m running into this again!

Could somebody move this to the 5.4 beta forum? This problem is still present in 5.4.0B11.

Seemed to be fixed around B25ish, but this is even happening now in the first release candidate!

Case numbers:
782331 (old case)
805740 (new case)

I just created a new project for some testing and this is what it looks like after switching to iOS:

Quality is set to fantastic, right?
I’m not sure what the green color in the “Quality Levels” indicates? Is this the recommendet setting?
Because I can’t seem to be able to change that.

Oh and some additional information:
When I delete the project’s Library folder and restart the project, there will be a very weird shadow! (1-5 in the next screenshots attached)
Then, when I restart the project, the quality will be fine again (6 in the screenshots).

Here are the screenshots:

The problem with this workaround, though: When I delete the Library folder, Unity will switch back to Windows / OSX / Linux as build platforms.
When I switch to iOS again afterwards, the shadow quality will be bad again. So I cannot escape this.

Oh and unfortunately, restarting Unity without deleting the Library folder doesn’t help either.

Wrong forum, moved to beta (and added graphics tag). Point of beta forum is to post issues in that forum… :smile:
But heck that’s one hell of a ship stopper. Needs immediate love I think.

1 Like

The green checkboxes represent the default quality level for a particular platform. In your case, Standalone is set to Fantastic and iOS to Simple.

See the following link if you want to know how to switch the default quality level:
https://docs.unity3d.com/Manual/class-QualitySettings.html

2 Likes

@Peter77
Thanks for pointing out!
I didn’t know about this! Is this new?
While the shadow problem hasn’t been solved by setting iOS’s quality to fantastic, a different issue has been solved by doing so:
The iOS normal map issue (

) was in fact related to low quality settings.
I thought when clicking on the settings “what you see is what you get” on device also and I haven’t had any normal map issues with doing so in previous versions of Unity.
Anyway, normal map issue solved.
Shadow issue persists.
In fact, I get better shadows when using worse quality settings as you can see in the following images:

iOS simple:

Editor:

iOS fantastic:

Also, kind of weird that the fantastic shadow on iOS is even worse than the bad fantastic shadow I am getting in the Editor.

Hi Stefan,

Thanks for your feedback. After investigation it appears that the root of the problem was in Unity 5.2 → The shadow preview in this version of Unity was incorrectly using shadow cascades even if they are not supported on mobile for performance reason.
Please see the doc for reference :

Shadow quality is heavily dependent on two settings :

  • shadow distance
  • number of shadow cascades
    Because on mobile shadow cascade is always forced to “none” and fantastic quality set the shadow distance to 150m → we end up with really bad shadow in that case.
    A solution would be to set the shadow projection to “close fit” or to reduce the shadow distance (will save a lot of draw call, very valuable on mobile:))

Clearly the UI is not helping here ! So i will keep that bug open so we add some feedback in that direction in the quality inspector.

Finally a glimpse of the future : mobile hardware is evolving and it probably make sense to have shadow cascades on recent hardware, this is something we are working on :slight_smile:

Have a good day !

Florent

3 Likes

Just as a tip: In one of our mobile projects we determined which object was most important for the shadow generation and changed the shadow distance accordingly. This led to a refinement in shadow quality when approaching important details and more granular shadows when not so important…

1 Like

@fguinier
Hello Florent!

If I understand your reasoning correctly, I have to disagree, though.
In 5.2.2, even final iOS builds had much better shadow quality on the device (not just inside the editor) compared to what I get in the 5.4.0F1 editor and in 5.4.0F1 iOS builds.
To me, it clearly seems to be a problem with the shadow’s resolution. Even worse ( !! ) settings than fantastic look better in 5.4.0F1, which is weird as well.

Please take a look at the screenshots of an iOS game that I released using Unity 5.2.2:

https://itunes.apple.com/us/app/one-life/id1033007854?mt=8

I made those screenshots on device.
The shadow quality there is very nice.
That project was also using just one directional light.

If this really is a bug, which I’m pretty sure it is (in fact, I just cannot reproduce 5.2.2’s shadow quality in 5.4.0F1’s iOS editor and builds), I hope this can be fixed in time for 5.4.0’s final build?
It really has been rough developing with very buggy 5.x releases and as far as I can tell, 5.4.0F1 is pretty stable now, but I cannot work with shadows like these.

@Metron
Thank you for your reply!
It’s weird, though. In 5.2.2, I get very nice quality with shadow distance 150, which is the default fantastic setting. So basically, in 5.2.2 the shadows just work and look nice. I don’t even need any optimizations there.

EDIT:
I cannot see any difference in the quality settings in 5.2.2.
The shadow distance is 150, too. Cascades are set to four cascades and shadow projection is stable fit.

Maybe in 5.2.2, shadow cascades weren’t set to none for iOS?
After reading Unity’s documentation, I can say “Close fit” is not an option for me.
Besides, it worked in 5.2.2, too. Why shouldn’t it work now?

1 Like

Hi Shushustorm,

Thanks for the follow up :slight_smile:

So i took the repro project from the bug case 805740 and compare Unity 5.2.5f1 and Unity 5.4.0f1 on an Ipad2 device here are the results :

Unity 5.2.2f1

Unity 5.4.0f1 (same project upon automatic upgrade to 5.4)

Seems really comparable imho, so i’m probably not getting the point here?

Would it be possible for you to provide a repro project (or repro steps) to pin point the trouble please.

Thanks !

Florent

1 Like

AFAIK fantastic also increases the shadow distance, which, without cascades, makes shadows look worse than any other setting.

I don’t think there’s a bug here.

@fguinier
May I know what version of Xcode you have been using? I don’t know if this changes anything, but just to be sure: I am using Xcode 7.3.
It’s weird.
Your screenshots are not what I expected.
When using 5.2.2, the quality I get is better than in your image for 5.2.2.
And at the same time, when I use 5.4.0F1, the quality I get is worse than in your image for 5.4.0F1.
This happens on iPhone 5S and iPad mini 2, but it is also shown like that in the editor.

Could you try the following to reproduce?:

1.: Open Unity 5.4.0F1
2.: Start a new project
3.: Create a cube
4.: Duplicate the cube
5.: Move duplicated cube above the original cube
6.: Switch platform to iOS
→ The shadow of the duplicated cube that is cast onto the original cube should be very bad
(This is literally the way I can reproduce this issue every single time.)

@AcidArrow
I guess this would only make sense if there actually were shadow cascades being used in 5.2.2 and in 5.4.0F1 this is not the case anymore?
Also, why would this happen exclusively on fantastic? If there are no shadow cascades, they aren’t being used on lower quality settings either, right?
This is very confusing.

EDIT:
Please, take a look:
This is really simple and easily reproduced (well, at least on my machine):

I did not change any shadow quality settings.
I used completely new projects for all of the four screenshots.
While the shadow quality for Windows / OSX / Linux in 5.4.0F1 seems a little bit better compared to 5.2.2 (probably due to anti aliasing in 5.4.0F1), the quality for iOS gets really bad. Also, please notice that besides the obviously bad shadow quality, there are weird shadow fragments the lower cube seems to be casting onto itself (on the left face of the cube, below the upper edge). In this scenario, they don’t seem very prominent, but in other cases, those look really disturbing. (For this, take a look at the last images in my first post in this topic.)

2 Likes

Shadow distance is crucial to shadow quality. What’s the shadow distance setting in “fantastic”? Is it higher than in other quality settings? Do the shadows improve if you reduce it?

1 Like

As I said, shadow distance is at 150. But that’s the case in 5.2.2, too.
And yes, shadow quality increases when I decrease the distance.
But I shouldn’t have to go that way in order to get the shadow quality like it used to be in 5.2.2, right?
Because I don’t actually want a smaller shadow distance.

1 Like

Hi Shushustorm,

I’m abroad tomorrow and next week, however Tomas from QA will take a look into the repro and I will get on it when i’m back. We will go to the bottom of it ! :slight_smile:

Have a good day and thanks for the follow up !

Florent

1 Like

fguinier mentioned that Unity fixed an Editor preview bug in 5.3 so doing a repo of 5.2 vs 5.4 only within the Editor isn’t going to help Unity much here as the differences you are seeing within the Editor might just be caused by the fixing of that Editor bug.

What they need is a screenshot of a 5.2 build set to Fantastic running on an actual iOS device versus a screenshot of a 5.4 build set to Fantastic running on an actual iOS device, which I know Unity will be grateful if you can provide.

2 Likes

@fguinier
Please also make sure to try the step by step instructions I provided in post #15 of this topic.
It really should be easy like that to reproduce.

@ScottyB
I actually did take the iOS screenshots (“iOS simple” / “iOS fantastic”) in post #9 of this topic on device.