Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: point cloud picking precision issue #2508

Merged

Conversation

pramodcog
Copy link
Contributor

@pramodcog pramodcog commented Sep 29, 2022

Description

Precision error in pixel intersection in point cloud was caused due to PickingWindowSize was higher 20, reduced the value to 5 pixel to bring the precision error REV-523

While identifying the cause of the issue, I found some of the calculation done in PointCloudOctreePickerHelper.findHit() are not needed. We should have a detail look into the potree library if need to refactor it for our need

Checklist:

Here is a checklist that should completed before merging this given feature.
Any shortcomings from the items below should be explained and detailed within the contents of this PR.

@pramodcog pramodcog added auto-update Makes bulldozer automatically update this PR when there are changes to the target branch slack PRs and issues with this label will be pushed to Slack labels Sep 29, 2022
@pramodcog pramodcog marked this pull request as ready for review September 29, 2022 13:39
@pramodcog pramodcog requested a review from a team as a code owner September 29, 2022 13:39
@codecov
Copy link

codecov bot commented Sep 30, 2022

Codecov Report

Merging #2508 (4fa1790) into master (d91b479) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #2508      +/-   ##
==========================================
+ Coverage   70.15%   70.16%   +0.01%     
==========================================
  Files         215      215              
  Lines        9243     9243              
  Branches     1203     1203              
==========================================
+ Hits         6484     6485       +1     
+ Misses       2611     2610       -1     
  Partials      148      148              
Impacted Files Coverage Δ
...ckages/pointclouds/src/PointCloudPickingHandler.ts 21.62% <100.00%> (ø)
...r/packages/utilities/src/indexset/LeafIndexNode.ts 82.22% <0.00%> (-2.23%) ⬇️
.../packages/cad-parsers/src/utilities/SectorScene.ts 98.78% <0.00%> (+2.43%) ⬆️

Copy link
Contributor

@christjt christjt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Think this is fine for now, but down the road I would like this to be a little smarter. Having a larger window size is good in cases where users miss-click. I think a better schema is to always pick the center pixel, unless there is a pixel in the window that is a lot closer (by some relative threshold). Then we get the best of both worlds.

@pramodcog pramodcog merged commit 7c5b1f8 into master Oct 5, 2022
@pramodcog pramodcog deleted the pramodcog/fix-pointcloud-pixel-intersection-precision branch October 5, 2022 12:19
christjt pushed a commit that referenced this pull request Nov 2, 2022
Co-authored-by: cognite-bulldozer[bot] <51074376+cognite-bulldozer[bot]@users.noreply.github.com>
christjt added a commit that referenced this pull request Nov 3, 2022
…ch (#2635)

* chore: add workflow that deploys to NPM on Github release (#2586)

* test: initial dry run publish

* chore: trigger release on released published

* fix: remove caching on release workflow

Co-authored-by: cognite-bulldozer[bot] <51074376+cognite-bulldozer[bot]@users.noreply.github.com>

* fix: expose and fix bug causing getBoundingBoxByNodeId/TreeIndex not to modify out parameter (#2472)

* refact: keyboard and mouse event handling in viewer (#2492)

* Intermediate commit

* Removed isFocused check in keyboard handling

* Keyboard active only which domElement is focused, mouse events are active when canvas is focused

* Refactored axisview eventlistener

* Reverted axisview event passed to domElement

* updated examples yarn.lock

* clean up

* leftover clean up

* Keyboard event listen on domElement, removed unnecessary event push to domElement from Axis cross

* removed unused variables

* clean up

* Fixed visual test error

Co-authored-by: cognite-bulldozer[bot] <51074376+cognite-bulldozer[bot]@users.noreply.github.com>

* fixed point cloud picking precision issue (#2508)

Co-authored-by: cognite-bulldozer[bot] <51074376+cognite-bulldozer[bot]@users.noreply.github.com>

* improvement: use 'high-performance' powerPreference to avoid non-discrete GPU being used on certain systems (#2512)

* feat: add metrics to MeasurementTool (#2523)

* chore: backport to old file structure

* fix: remove flat modifier, while maintaining TreeIndex precision (#2536)

Contribution by @Strepto (Equinor)

* fix: do not blend in-front and back frame buffers when back objects have not been rendered (#2540)

Co-authored-by: cognite-bulldozer[bot] <51074376+cognite-bulldozer[bot]@users.noreply.github.com>

* fix: visualization artifacts due to wrongfully handling cylinder clip planes (#2556)

* fix: simplify shader

* fix: set proper plane length

* fix: reduce some matrix transformations, and use built-in face-forward

* fix: plane magnitude not adjusting for scaled world transform

* fix: bad merge

* chore: revert CDF environments json

* chore: add primitive test fixture

Co-authored-by: cognite-bulldozer[bot] <51074376+cognite-bulldozer[bot]@users.noreply.github.com>

* improvement: make CadModelUpdateHandler trigger sector loading immediately after the camera stops moving (#2573)

* Make CadModelUpdateHandler trigger sector loading immediately after the camera stops moving

* Remove setting of redraw flag

* Update test

* Fix test

Co-authored-by: Christopher J. Tannum <[email protected]>

* Use vec2 instead of struct for packing TreeIndexes (#2585)

This works around an issue with struct precision on ardeno gpus: KhronosGroup/WebGL#3351

* fix: general cylinder inside rendering (#2620)

* fix: rendering if camera is inside primitive

* fix: reverse normal direction if hitting inside of cylinder

* fix: enable depth writing for in-front pass (#2621)

* Enable depth writing for in-front pass

* Set depth to minimum of in-front and back pass

Co-authored-by: Christopher J. Tannum <[email protected]>

* fix: remove unused pcMaterialManager from bad merge

* fix: re-create v8 test image due to cylinder clipping planes fix

Co-authored-by: cognite-bulldozer[bot] <51074376+cognite-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Lars Moastuen <[email protected]>
Co-authored-by: Pramod S <[email protected]>
Co-authored-by: Nils Henrik Hals <[email protected]>
Co-authored-by: eiriklegernaes <[email protected]>
Co-authored-by: Håkon Flatval <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-update Makes bulldozer automatically update this PR when there are changes to the target branch slack PRs and issues with this label will be pushed to Slack
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants