2

I'm trying to add shadows in ARKit using a directional light and planes on which to cast the shadows. When moving the camera however, parts of the shadow (not the plane) get cut off.

I'm using a directional light with shadow mode set to deffered. The plane's lighting model is set to constant.

I thought this had something to do with the zNear and zFar value, but changing these did not have any effect. When I set the light's automaticallyAdjustsShadowProjection property to false however, it does not get cut off anymore, but the shadow itself looks really bad.

ARKit shadow

What can I do to fix this?

LeonardRockstar
  • 139
  • 2
  • 10
  • Hey! I have a similar question too. I tried some of the other AR apps and it seemed to me that the shadows are baked into the model. However, there is some discussion that the animated/movable object with shadows casting cannot be baked into the model. Thoughts? – Ru Chern Chong Oct 17 '17 at 03:27
  • @RuChernChong Apple recommends that you bake the shadow into the model for performance reasons. In my app however, that is not an option, since the user has the ability to rotate the objects. – LeonardRockstar Oct 18 '17 at 14:08
  • 1
    My case is very similar to yours. It requires movement of the object so I cannot actually bake the shadows with the model. – Ru Chern Chong Oct 18 '17 at 16:07
  • @RuChernChong Have you found a solution yet? – LeonardRockstar Jun 24 '18 at 22:51

0 Answers0