0

This what scene normally looks like:

normal view

Sometimes after placing renderable on scene there appears 2 shadows of the one object. Why is so?

pushandpop
  • 455
  • 1
  • 10
  • 22
  • Can you show us an example where there are 2 shadows? – Simon Marquis Oct 08 '19 at 07:54
  • @SimonMarquis it happens when you detected plane, placed renderable and then try to move that renderable halfway out of plane and then resizing/rotating/placing it another point of plane. Renderable remains single, but now it casts 2 shadows. bug reproduces like 2/10 tries, but doesn't have specific steps to be reproduced 10/10 – pushandpop Oct 09 '19 at 12:04
  • 1
    Are you sure that it's not because two planes are actually detected, hence two shadows? – Simon Marquis Oct 09 '19 at 12:10
  • @SimonMarquis exactly! I was just going to add comment that it actually detects 2 plains. Do you know possible reasons for this? – pushandpop Oct 09 '19 at 16:04
  • *planes, not plains – pushandpop Oct 09 '19 at 22:00
  • 1
    There might not be enough features points detected, or maybe too much reflection on your surface. By paning the device around, it should force arcore to merge the two planes into one. – Simon Marquis Oct 10 '19 at 07:44
  • @SimonMarquis it does merge shadows together after some movements sometimes. can i assume this is ARCore's "feature" and not a bug I can fix? Would creating transparent plane on top help? – pushandpop Oct 10 '19 at 09:22
  • 1
    No I don't think you could fix this on your end. Unfortunately, plane rendering is not configurable right now. – Simon Marquis Oct 10 '19 at 09:33
  • @SimonMarquis thank you. You can put this conclusion as an answer - I will accept it as solution. I've tried looking on different apps that use AR (BBC, for instance). It looks they don't use built-in shadow casting (they managed to make their own somehow, though). – pushandpop Oct 10 '19 at 10:41

1 Answers1

1

The issue here is caused by arcore / sceneform detecting two horizontal planes next to each other instead of a single one. Therefore, a shadow is casted on both planes.

The root cause of this is that there might not be enough features points detected, or maybe too much reflection on the surface. By paning the device around, it should force arcore to merge the two planes into one.

Simon Marquis
  • 7,248
  • 1
  • 28
  • 43