google-ar / arcore-unity-sdk

ARCore SDK for Unity
https://developers.google.com/ar
Other
1.4k stars 402 forks source link

Can I guess the occlusion from camera preview? #184

Open TakuKobayashi opened 6 years ago

TakuKobayashi commented 6 years ago

Hello. I want to apply the occlusion to the AR. So, can I guess the occlusion from camera preview? Or, does it exist how to obtain to the depth map from camera preview image?

pablisho commented 6 years ago

Hi, Thanks for the feature request. Currently occlusion cannot be obtained from ARCore.

eisenbruch commented 6 years ago

@TakuKobayashi if I understand your question correctly, you can get plane occlusion with ARCoreUtils https://github.com/jonas-johansson/ARCoreUtils

TakuKobayashi commented 6 years ago

@pablisho Thanks. I'm waiting for it to be implemented as expected.

TakuKobayashi commented 6 years ago

@eisenbruch "Occlusion" is not such a feature. “Occlusion” means hiding virtual objects behind real things.

eisenbruch commented 6 years ago

@takukobayashi yes, I am aware. Arcoreutils has occlusion for detected planes

TakuKobayashi commented 6 years ago

@eisenbruch oh! Can it do the vertical plane or Instantiated 3d model too?

eisenbruch commented 6 years ago

It hasn't been updated for vertical planes, but it should be easy to update on your own if needed. unity takes care of occlusion for 3d models.

TakuKobayashi commented 6 years ago

@eisenbruch Thanks! I'll try to use it.

TakuKobayashi commented 6 years ago

@eisenbruch I used ARCoreUtils https://github.com/jonas-johansson/ARCoreUtils and read this source code. But sorry, this is not “Occlusion”.

TakuKobayashi commented 6 years ago

@eisenbruch For example, “Occlusion” means like this. https://www.youtube.com/watch?v=yl30WY7sKN0

eisenbruch commented 6 years ago

nearly positive I had occlusion on my projects that use arcoreutils, but I can't test that right now because none of them are installed. perhaps the occlusion was from something else. in anycase, it seems easy to implement with : https://forum.unity.com/threads/clipping-objects-behind-a-higher-plane.492147/

b29b commented 5 years ago

i used the occlusion shader to vertical and horizontal planes and its pretty good for walls and tables, but the planes must be scanned fully for realistic occlusion. @takukobayashi close enough?

TakuKobayashi commented 5 years ago

@b29b not yet. The “Occlusion” means the only realistic occlusion. This feature is not yet implemented.