Orthographic shadow with stationary light

[Test setup] I’m not sure if this is a bug or not. This is a new blank blueprint project in UE 4.7.6 with no starter content. I added a new controller/pawn to switch camera mode to orthographic.

[Bug?] It seems like the floor is casting a shadow on the cube when using an orthographic camera. Disabling Cast Dynamic Shadows on the floor actor seems to fix it. This happens when the the light source is “Stationary”.

That shadow also jitters or shakes if the object is moving.

The problem is shown in the second picture.

http://i.imgur.com/HC8griH.png

http://i.imgur.com/NPMB4NG.png

Hi Tanbouz,

I’ve tried to recreate this on my end, but without any luck.

Can you post your exact repro steps? I don’t need the player controller part though. Also, it would be helpful to know what your light source settings are that have been changed from default.

When I test this my camera ends up clipping before reaching the mesh, so it would be helpful to know what your settings are for your orthographic camera view is as well.

Thank you!

Tim

Hello!

  1. New project
  2. Blank blueprint
  3. No starter content, maximum quality
  4. Add a mesh cube from the Basic shapes on top of the floor
  5. Go to project settings.
  6. Create new game mode and set it as project default
  7. Create new pawn and set it as project default
  8. Add an empty root scene to the new pawn
  9. Then add a camera as a child of the root.
  10. Position camera to be looking downwards at angle like top down games.
  11. Switch camera to orthographic mode
  12. Press Play!

My test project. I didn’t play with the light source. Just using the included default sun.
camera placement
project

Thank you for the details.

Looking at your setup, you’re default Directional Light is set to Stationary, but it’s only using the Static portion of the lighting. You will need to adjust the Cascaded Shadows Dynamic Distance to a higher value than 0. Try something like higher than 0 - 7500 to keep the shadows within range. After that it’s outside of the cascaded shadow maps range to be displayed.

If you need the shadow, you can enable Far Shadow for this when 4.8 releases, which should help. You can also use the “Cast Inset Shadow” as well for some specific meshes that are set to movable like you’re box. I woudn’t recommend this for a lot of meshes as it’s typically reserved for cinematics on characters.

The most bang for your buck would come from using Static baked lighting though with dynamic lighting at a distance. This would require your mesh to be static though so it can bake the lighting.

Orthographic Camera view still needs some work and there is a number of features in the editor that currently do not or will never work with this view type. It’s a limitation of using Orthographic Camera view.

Thanks a lot for the help. Off to try out your suggestions :slight_smile: