Sceneform-android-sdk: Show debugging points

Created on 1 Jul 2018  路  12Comments  路  Source: google-ar/sceneform-android-sdk

In ARCore sample there are points in the view, how to enable this in Sceneform sample?

I would also like to know how to disable "moving hand".

Thank you.

Most helpful comment

Sorry about that - I had some of the points backwards. Now it works:
pointcloud

PointCloud.java

All 12 comments

For your second question, see #68 . As for the first, I'm also curious about it. I think you can get the known points with this :

PointCloud pC = arFragment.getArSceneView().getArFrame().acquirePointCloud();
FloatBuffer points = pC.getPoints();

But I don't know if there is a simple way to show them other than creating a renderable for each.

ARKit has this option on configuration level of session.

Visually it's easier for me to understand that trackable points exist in the area I taped.

I wrote a PointCloudNode class to primatively display the point cloud. It's currently on my personal fork (I am working to get it checked in here), but feel free to use it or simply look at it for inspiration.

I would also like to have the point cloud rendering this as a debug option.
It is a good indicator of how good the tracking is working.

@claywilkinson did you find a workaround to display points that are always facing the camera?
Since points are attached to a Node, the drawing takes into account the initial node's rotation, and therefore when you move the camera, they no longer face the camera (and can become invisible when rotation becomes 90掳).
Also, points are drawn as triangles but shoulsn't they be squares? (or even cubes to avoid the rotation issue?)

Hi @SimonMarquis - The geometry for the point cloud is updated on every frame (since the point cloud is updated every frame too). The points are in world space coordinates, so adding them to a unrotated node in the scene positions them correctly for the current camera pose.

Are you seeing the points disappearing but still in the cloud, or are they removed from the point cloud data?

I am using triangles to keep it simple, feel free to copy the code and customize it. I'd love to see what you come up with.

Are you seeing the points disappearing but still in the cloud, or are they removed from the point cloud data?

I was hoping to find a way to keep them visible whatever the camera pose.

I am using triangles to keep it simple, feel free to copy the code and customize it.

Then why are you using 4 points in your draw commands? Triangles should only require 3 points (or am I missing something here?)

https://github.com/claywilkinson/arcore-android-sdk/blob/d13b1b7c905d162519920e980cf3c0fba59f948a/samples/cloud_anchor_java/app/src/main/java/com/google/ar/core/examples/java/cloudanchor/sceneform/PointCloudNode.java#L102-L116

@SimonMarquis - I changed the rendering to be pyramids, so they are visible from all angles. Thanks for pointing out that my code was incomplete! PointCloudNode.java.

馃憤 for the pyramids choice.
Unfortunately, they still appear as flat (2D) triangles when I change the camera orientation.
Did I miss something to enable or configure on the AR rendering side?

Sorry about that - I had some of the points backwards. Now it works:
pointcloud

PointCloud.java

Closing due to inactivity. A feature request for PointCloudRenderer is tracked at https://github.com/google-ar/sceneform-android-sdk/issues/207

I've finally created my own PointCloud renderer, based on ShapeFactory.makeCube() code.
It renders small 3D cubes on each feature point.

output

Was this page helpful?
0 / 5 - 0 ratings

Related issues

terezo picture terezo  路  3Comments

chiaolinghong3d picture chiaolinghong3d  路  3Comments

rajaselvan picture rajaselvan  路  4Comments

yashvv picture yashvv  路  3Comments

LukasStancikas picture LukasStancikas  路  3Comments