Shadows in Blender Game?

I’m using 2.64. I can get materials and colors in Blender game, but no shadows. Also, it doesn’t seem possible to change the light source. It ignores the scene’s light source(s) and uses a default, or so it seems. If I render the scene, the lighting is the way I expect. Any ideas?

Are you using GLSL lighting, or Single / Multitexture mode? If you’re using GLSL mode, but the graphics don’t improve, it might be that your graphics card isn’t capable of GLSL lighting.

Are you using GLSL? If so, did you check you if Shading is set to GLSL (in Display)? Maybe you are not using a Sun or Spot?

I have set to GLSL in display in the properties panel, and have tried all five lamp types. Is there something else I need to do?

OK I looked at the .blend file in the previous post and there was a shadow. So there must be some setting in my lamp(s) that I need to change. I don’t know what all the various lamp settings do. I’ve looked for tutorials but when I change some settings, I don’t see any differences every time. Some settings change things, but some don’t seem to do anything. Those probably work when other settings are changed etc. Anyway, now that I know that my graphics card supports GLSL then it must be the lamp settings.

There could be several reasons why you won’t see anything. So if you post the blend, I think this will be the fastest way to figure it out.
Some reasons could be: material settings of objects to receive Shadows, and objects to cast Shadows. Light settings Clip Start must be smaller than distance to object, Clip End must be higher than distance to object. Light type must be Sun or Spot.

Well there is really no blend file. All I did was to use the default cube and added a plane. I made the cube ‘dynamic’ so when I press “P” it just falls onto the plane. The lamps clipping distances are default, and as I said if I render the scene, the lamps are reaching the cube. I have tried, as I said, all five lamp types, so yes I have tried sun and spot. I will try to look into the material settings of casting and receiving shadows, but this is where I don’t really know what I should be doing. I haven’t been able to find any tutorials about these things. But I’ll bet that’s where my problem is. The graphics card does support GLSL because that .blend file above worked fine.

  1. Add ground plane and change Viewport Shading to Texture
  2. Press N in the Viewport and in Display change Shading to GLSL (MultiTexture is Default)
  3. Select Light and change to Sun
  4. Or change to Spot by first switching from Blender Render to Blender Game (next to Scene selection tab), next enable Shadow in the Light options (Object Data)

Thanks! That fixed it! So the real change was setting the viewport to “Textured”. Everything else was already set. Thanks again!