- Home /
Directional and Spot Light Shadows not working as expected
PROBLEM
I am having problems with Directional and Spot light cast shadows.
With Directional lighting I am getting a strange over arching shadow that has no relation to the cube in my scene. Below is the first picture of this weird effect. Where is this huge circular shadow coming from?
And another screen shot. Here I have panned around in the Scene View to show that this shadow can not be generated by the cube.
Now with Spot Lights I am getting no shadows cast at all. I try with Hard and Soft (pictured) shadows turned on and nothing. Here is the screen shot to show this:
It seems that Point Lights are working fine.
Another thing, in Edit > Project Settings > Player > Other Settings > Rendering Path I have set the Rendering Path to Deferred. See below:
Also I want to mention that I am running Unity 3.4 Pro and my computer is a Toshiba Satellite p305 s8904 with an Intel GMA 4500MHD graphics card. I assume it is not one of the supported graphics cards mentioned in the Shadows in Unity page under Hardware support for shadows in the Unity 3D manual here http://unity3d.com/support/documentation/Manual/Shadows.html Specifically the page says
Intel GMA X3000 (965) and up.
QUESTIONS
Could my supposedly unsupported graphics card be causing this problem?
If so is there a work around?
You should confirm by testing the same scene on other hardware. Regardless though, I've found that any hardware that can't support shadows generally isn't fast enough to do such extra render passes anyway and so you'd have to turn them off and use alternatives anyway.
Sucks if your development machine can't show them though!
What alternatives to creating shadows do you suggest? I know it sucks :( but on the upside I will just focus on scripting and modeling until I get a better graphics card.
Answer by Waz · Aug 26, 2011 at 12:51 PM
Workarounds are needed for players on low-end hardware anyway: try Lighmapping - it often looks more realistic than dynamic lighting (since it includes ambient occlusion), works on more cards and is cheaper to render. Blob shadows, or even just subtle SSAO shading also look good and cost little.
On my current project, I've spent the last month deliberately developing in VertexLit and my "Fastest" quality to ensure players on low-end hardware get the best experience, and it's been a worthwhile exercise, so don't assume you're losing out here: it's good to cater for the low end.
Yes I agree that low end hardware users need to be addressed Warwick. Lots to consider. Thanks for the suggestions. Interesting technique to develop in Vertex Lit rendering mode. I am most likely going to go the same route. Are you going to give the option for users/players of your app/game to improve the quality of the rendering (deferred lighting, forward rendering)?
I do deferred now (with FXAA filter), but it doesn't take much effort to keep that looking good.