- Home /
Some objects have realtime shadows, other do not!
Ok, I have Pro, the Cast and Receive shadows are on. So what other settings would make an object in a the scene not cast a shadow. I put on deferred Shadow mode, and then they are there, and look amazing! I am currently baking these shadows into the scene, since my lighting and these objects are static. Is there a limit to how many objects will throw a shadow, or quality setting I might have set to cause this. My character, and several other object cast real time soft shadows fine... In the Editor,but others do not!
So just in case I did not explain this correctly. In the SCENE window in the editor, I have several cars on train tracks. Several cast real time shadows fine, others do not.
I have made sure they are using CAST and Receive Shadows, using Diffuse material (default) and are set to STATIC. I have gone over all the objects details, but just can't see what is up. I changed the quality to Fantasic for the Editor, no change. I have turned on and off the lighting, and closed and opened the files several times...
So what am I missing.
My goal was to bake the shadows for all the static objects.
As a side note, I turned on Deferred rendering and the shadows show up in the Game Window, (but not the Scene) Deferred, looks amazing!
So with Forward Rendering, only a few shadows, with Differed everyone has shadows...
Answer by luizgpa · Dec 07, 2011 at 05:42 PM
Do you have more than one light casting shadows? Do you have other lights that are brighter than than the one casting shadows?
In forward rendering mode, Unity uses the brightest light to cast shadows, even if it's not illuminating the object (e.g. the object is on a layer not in the light's culling mask). On deferred this behavior doesn't happen because all lights can cast shadows.
On the SCENE top bar there is a "Light" button (see image below). It switches between a light on the "camera" and the actual lights from the scene.
I have 2 lights , 1 is the $$anonymous$$ey light, the other for a slight fill. Only Shadows from the $$anonymous$$ey light. I have 2 train tracks and an ethenol plant, 1 consist is 12 cars , all have shadows, the other consist is 4 cars, no shadows. Yet I have them setup exactly the same! So I am confused. I know the quality setting affects it, so I set the Editor on Fantastic, just in case I am reaching some kind of limit, which I am not sure how they deter$$anonymous$$e what to shadow... Overall I can turn the shadows on and off, and its very consistant. I have found the Billboarded trees don't have a shadow, but I have many models that look fine, but just don't have a shadow, and I can't explain why not! I will put up a screen shot as well..
I added a screen shot ,but don't see it yet.(?) I did find that if I put it on Deferred Lighting, then they all have shadows! So I am not sure what to make of that! The shadows are based on the same light (ie they match the ones that are there on the Forward Rendering Path.)
$$anonymous$$aybe you should delete the fill light, and adjust the Ambient light in the Render Settings?
Answer by wkmccoy · Dec 07, 2011 at 07:56 PM
Here is the Scene window. the Train on the right as shadows, the one on the left should, but does not. the buildings are not putting out a shadow, the sign, etc... So the trees and the one train are working, the others are not, and I am not sure why.... Cast and Receive is on, Defualt Difuse Material. 1 Light with Hard shadows.... Any thoughts? Scene Editor Quality is on Fantastic.
It doesn't seem to be an issue caused by the distance from the camera (the max distance from the quality settings states how close to the camera the object has to be to cast shadows), but if you move the cars on the left closer to the camera does it affect the shadows?
Nope, I can move closer and there is no change. the whacky thing is If I set the Camera to Direction (Rendering Path) I get the shadows, but only in the Game window, not the Editor Window. I am on the good setting. I removed the fill light, and no change. Once I put Forward in the Rendering Path I loose all shadows on the buildings, and the 2nd set of cars. I am always learning in Unity, and this is no difference, such as Billboarding Trees don't cast a shadow, and the Rendering Path issue. Overall, I am really working towards creating a Light $$anonymous$$ap, as the realtime shadow (at least on my machine) are killing the textures with random whackiness and slows the whole machine down. I have tons of stuff, very high res models. I was just confused on this and wanted to at least understand it.
I think that if you change the rendering type in the cameras the Editor you still use forward rendering, but if you change the settings on the project (Edit-> Project Settings -> Player -> Other Settings -> Rendering Path) then you should see the shadows on the SCENE View as well.
Your answer
![](https://koobas.hobune.stream/wayback/20220613061834im_/https://answers.unity.com/themes/thub/images/avi.jpg)