- Home /
Low shadow quality from distance light
Here I go asking something for the third time (this and this) hoping this time somebody answer me. I'm creating a race game. It has a track set in a dark place, so I design some stadium lights to illuminate. Knowing light is a expensive resource, I made those lights supports tall and distant enough to use only 4.
I terms of lighting, it works very fine, but the car's shadows were too ugly. It isn't even like a shadow. So I've created a separated project and tested many different lighting and quality settings. The only variable that made difference is the distance of the light to the objects.
Does any one knows how I can reach shadows with quality from a distance light (spot or point light)?
ps: I know how to use bake light. It is for the cars that are always moving.
Edit:
I created a video to show it better : https://www.youtube.com/embed/wqGY-eG9i8w
Answer by tanoshimi · Jun 27, 2016 at 03:31 PM
(We can't see what quality settings you're using, but I'll assume that you've already set this to highest quality for your shadows.)
450 units is a huge range for a point light, so inevitably the resolution of the shadows it casts will be reduced. See here for an explanation: http://docs.unity3d.com/460/Documentation/Manual/ShadowSizeDetails.html. You're also possibly running out of video memory so Unity is not using the highest resolution map created - point lights create shadow cubemaps - can you use directional lights instead?
I scaled everything in the scene to 0.01 and reduce the lights range to 4.5. It results the same.
Yes, it is in fantastic quality and Very High Resolution in all lights.
Directional behaviour is not what I expect from a artificial light source. I'm using one directional very low to represent the cosmos light.
The same problem happens in this test. Create a default Point light (10 range) casting shadows in (0, 2, 0) position, a plane (0, 0, 0) and a sphere (0, 0.07, 0) with 0.05 scale. If the sphere reaches the 0.09 y position, it starts to have a shadow. This tests represents my problem (plane = track, sphere = car).
Answer by Landerk · Jun 28, 2016 at 04:51 AM
So of course you know shadows can be render heavy, and making them dynamic even more so. You could use a little "cheat" or "fake" the shadows if you will....paint a "shadow" texture with Alpha in Photoshop, slap that on a plane in Unity, attach the plane under your car - bam - easy dynamic shadow. It will look believable in-game...obviously the static shadows might get a closer look so it is a good idea to bake those, but for moving shadows this is cheaper and easier.
Sorry, I'm late because I was busy this days. Your solution is good for Ambient Occlusion shadows. I'm using a component in the camera to create this effect already.
The shadows created by the light tower can variate too much to use a single image. Cars can be almost in any light angle, and I want a convincing shadow.
Your answer
Follow this Question
Related Questions
Spotlights refuse to cast shadows. 0 Answers
Hardlight for spotlight 0 Answers
Flickering circle of light around character 0 Answers
How can I change the SpotAngle's range in a SpotLight? 0 Answers
ugly shadows 3 Answers