googlesamples / arcore-depth-lab

ARCore Depth Lab is a set of Depth API samples that provides assets using depth for advanced geometry-aware features in AR interaction and rendering. (UIST 2020)
https://augmentedperception.github.io/depthlab/
Apache License 2.0
762 stars 152 forks source link

New PointCloud Example Scene #33

Closed petpetpeter closed 2 years ago

petpetpeter commented 3 years ago

from: https://github.com/googlesamples/arcore-depth-lab/issues/29#issue-900199576 I added a new PointCloudGeneration scene and script using a similar pointcloud generation code to RawPointCloudBlender.

google-cla[bot] commented 3 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

petpetpeter commented 3 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.

What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@googlebot I signed it!

cs-util commented 3 years ago

@petpetpeter How does that differ from the existing raw point cloud generation example? Do you create a mesh from the points? An example screenshot or similar would be great

petpetpeter commented 3 years ago

@petpetpeter How does that differ from the existing raw point cloud generation example? Do you create a mesh from the points? An example screenshot or similar would be great

The existing PointCloudGenerator script creates a list of vertices no the button callback and appends the vertex according to the depth value.

When using Raw Depth, I found that it crashes on my devices (Pixel4a and Mi 9) and seem to be very slow on a better smartphone according to https://github.com/googlesamples/arcore-depth-lab/issues/29#issuecomment-852234935

from PointCloudGenerator.cs

The newly updated RawPointCloudBlender script buffers the vertices before updating the vertex. This work fine on the mentioned devices.

from RawPointCloudBlender.cs

So, it would be great if the PointCloudGeneration Example uses a similar method.

ruofeidu commented 3 years ago

I'm testing and reviewing this one. Thank you for the patience.

ruofeidu commented 3 years ago

Hey petpetpeter,

Sorry for the late reply, as I could not get any point clouds from your PR on Wednesday and I tried again on this Friday, both using Pixel 4, Unity 2019.4.22f1.

For both tests, I copied the 4 files without any modification, then added opened scenes as the only scene to build. The update button shows, but I cannot get any feedback. In contrast, my raw point cloud scene runs when set as the only scene to build.

Sorry that I don't have much time to debug, as I have some life events next week. Would you please double check your PR and make sure it runs?

Cheers, Ruofei

petpetpeter commented 3 years ago

@ruofeidu My bad. I didn't copy the meta files so the script is missing from the inspector.

Now, I test by replacing the whole PointCloud folder from PR with the original andriod-sdk branch in a new project.

In case it is more convenient for you, You can copy the PointCloudWithRawDepth scene and RawPointCloudGenerator.cs and set the inspector like this:

In PointCloudWithRawDepth scene

Sorry for your inconvenient, Please take your time 👍

ruofeidu commented 3 years ago

Thank you petpetpeter for the update! I'll test it early next week :) Have a great weekend!