Repository navigation
Web: AR point cloud on the frame, and displayPointCloud - #472
Merged
Merged
Conversation
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The web AR frame always carried an empty point cloud, and
displayPointCloudhad no web path. This puts the tracker's feature points on every web AR frame and draws them the wayVROARScenedoes natively. Web only; iOS and Android are unchanged.What changed
Point cloud on the frame (
VROARWeb)VROARSessionWeb::setPointCloud(points, identifiers)stores the latest cloud; every frame built afterwards carries it, soVROARFrame::getPointCloud()returns it on the web as it does on iOS and Android.viroARSetPointCloud(xyz, ids): a flat x,y,z array in Y-up world space plus ids. The 4th component (ARCore's confidence) is 1, since the web tracker has none.Drawing it (
VROSceneWeb)viroARDisplayPointCloud(display, textureHandle, sx, sy, sz, maxPoints).VROSceneWeb::setPointCloudDisplaybuilds aVROFixedParticleEmitteron a node with the same surfaceVROARSceneuses (1 x 1 quad, additive blend, no bloom), and the AR draw loop feeds it each frame's points. The node follows the scene root when the bridge swaps it.textureHandle < 0keeps the default dot; otherwise it uses the given texture, which is howdisplayPointCloud.imageSourcearrives.Default point texture (
VROImageUtil)initPointCloudTexture()was empty on WASM. It now draws a 32 x 32 white dot with a soft edge, which the additive blend turns into a glow like the image native ships.Related
arSetPointCloud/arDisplayPointCloudonARPointCloudUpdate,displayPointCloudTesting
wasm/build_web.shbuilds clean.arSetPointCloud.