View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0031798 | Open CASCADE | OCCT:Visualization | public | 2020-09-27 12:31 | 2024-03-25 12:56 |
Reporter | kgv | Assigned To | mzernova | ||
Priority | normal | Severity | minor | ||
Status | resolved | Resolution | open | ||
Product Version | 7.4.0 | ||||
Target Version | 7.8.1 | ||||
Summary | 0031798: Visualization, SelectMgr_ViewerSelector - fix comparing depth of direct and indirect triangle hits | ||||
Description | Currently, SelectMgr_ViewerSelector sorts picking results basing on a depth along the ray (direct hit) or distance from eye to the closest point within the picking tolerance (indirect hit). In some cases, depth to indirect hit of a surface behind might become closer than distance to direct hit of a surface in front, leading to awkward picking results. It is proposed to compute the smallest depth always considering picking tolerance, while keeping direct hit as result 3D point. In addition, it might be reasonable allowing a 0 tolerance for triangulation sensitivities. In this case, selection volume will be implicitly upscaled to 1px, but indirect picking results will be rejected (only direct hits allowed). | ||||
Steps To Reproduce | pload MODELING VISUALIZATION box b1 0 0 0 100 90 1 box b2 0 0 1 100 100 1 vinit View1 vdisplay -dispMode 1 b1 vdisplay -dispMode 1 b2 -highmode 1 vsetcolor b1 RED4 vsetcolor b2 GREEN4 vfit vselprops -pixTol 10 vselprops -pixTol 100 vselprops -pixTol 2 vselprops -depthTol uniformpx 0.1 vviewparams -scale 2.28866 -proj 0.57735 -0.57735 0.57735 -up -0.408248 0.408248 0.816497 -at 24.7467 48.7768 25.0301 vmoveto 220 231 vstate -entities | ||||
Tags | No tags attached. | ||||
Test case number | |||||
|
occt_pick_surf_behind.png (38,761 bytes) |
|
occt_pick_vert_behind.png (53,132 bytes) |
|
Branch CR31798_1 has been created by kgv. SHA-1: b9513dc178fc229cd8398901920e3b1b54460d8f Detailed log of new commits: Author: kgv Date: Sun Sep 27 12:42:10 2020 +0300 0031798: Visualization, SelectMgr_ViewerSelector - fix comparing depth of direct and indirect triangle hits SelectMgr_RectangularFrustum now stores also a distance from picking Ray within SelectBasics_PickResult to better prioritize results and prefer entities closer to ray. |
|
Branch CR31798_2 has been created by age. SHA-1: 6367fbdb3c085e3f9c82ea1aafedbedb6755678b Detailed log of new commits: Author: age Date: Mon Nov 16 14:53:07 2020 +0300 0031798: Visualization, SelectMgr_ViewerSelector - fix comparing depth of direct and indirect triangle hits |
2020-11-17 08:32 developer |
0031798.png (26,910 bytes) |
2020-11-17 08:32 developer |
0031798_1.png (209,461 bytes) |
|
In the branch CR31798_2 a new algorithm of depth calculation for triangles was implemented, It computes the nearest distance between projected on the triangle plane camera eye and intersected area of triangle and camera frustum. In most cases it works correctly but when the camera frustum is bigger than triangle (as in attached image 0031798.png) it gives incorrect result. |
2020-11-17 08:41 developer |
Engine V Twin Revision 02 Simplified.step (972,035 bytes) |
|
Algorithm implemented in branch CR31798_2 has better results in some cases. But on for "zoomed-out" objects there are incorrect results of detection even for big triangles. Use the next steps to reproduce: pload MODELING VISUALIZATION box b1 0 0 0 100 90 1 box b2 0 0 1 100 100 1 vinit View1 vdisplay -dispMode 1 b1 vdisplay -dispMode 1 b2 -highmode 1 vaspects b1 -drawEdges 1 vaspects b2 -drawEdges 1 vsetcolor b1 RED4 vsetcolor b2 GREEN4 vfit vselprops -pixTol 10 See results on different zoom - Detection_OK.png and Detection_KO.png |
2021-01-15 12:21 developer |
Detection_KO.png (8,340 bytes) |
2021-01-15 12:21 developer |
Detection_OK.png (13,023 bytes) |
|
Branch CR31798_3 has been created by drochalo. SHA-1: 8bc5b0f89e83b8463d502bb67f9e1f2e033049f2 Detailed log of new commits: Author: drochalo Date: Fri Sep 29 11:38:49 2023 +0100 0031798: Visualization, SelectMgr_ViewerSelector - fix comparing depth of direct and indirect triangle hits Added bias to the depth test made for indirect hits. |
|
Branch CR31798_3 has been updated by drochalo. SHA-1: 514d047df7eb4a4c3fe94d661ca6f32e5687dff5 Detailed log of new commits: Author: drochalo Date: Tue Oct 3 09:52:42 2023 +0100 0031798: Visualization, SelectMgr_ViewerSelector - fix comparing depth of direct and indirect triangle hits Replaced bias approach to depth test criterion to instead use bool that marks if a hit was direct or not. The bool is used in processing elements and in matching methods. |
|
The changes made solve the issue at hands but produced some differences in other test cases. Please review if additional changes are necessary. Link to test: http://jenkins-test-10.nnov.opencascade.com/view/CR31798_3-master-drochalo/ |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-09-27 12:31 | kgv | New Issue | |
2020-09-27 12:31 | kgv | Assigned To | => kgv |
2020-09-27 12:31 | kgv | Relationship added | related to 0031701 |
2020-09-27 12:31 | kgv | File Added: occt_pick_surf_behind.png | |
2020-09-27 12:31 | kgv | File Added: occt_pick_vert_behind.png | |
2020-09-27 12:32 | kgv | Steps to Reproduce Updated | |
2020-09-27 12:35 | kgv | Description Updated | |
2020-09-27 12:39 | git | Note Added: 0095357 | |
2020-11-12 12:01 | kgv | Assigned To | kgv => age |
2020-11-12 12:01 | kgv | Status | new => assigned |
2020-11-17 08:31 | git | Note Added: 0096807 | |
2020-11-17 08:32 |
|
File Added: 0031798.png | |
2020-11-17 08:32 |
|
File Added: 0031798_1.png | |
2020-11-17 08:40 |
|
Note Added: 0096808 | |
2020-11-17 08:41 |
|
File Added: Engine V Twin Revision 02 Simplified.step | |
2021-01-15 12:20 |
|
Note Added: 0098130 | |
2021-01-15 12:21 |
|
File Added: Detection_KO.png | |
2021-01-15 12:21 |
|
File Added: Detection_OK.png | |
2021-01-15 12:21 |
|
Note Edited: 0098130 | |
2021-08-24 14:19 | kgv | Target Version | 7.6.0 => 7.7.0 |
2022-08-17 11:57 | kgv | Target Version | 7.7.0 => 7.8.0 |
2023-08-01 15:09 | dpasukhi | Target Version | 7.8.0 => Unscheduled |
2023-09-21 17:48 | ebelouso | Assigned To | age => drochalo |
2023-09-28 18:59 |
|
Target Version | Unscheduled => 7.8.0 |
2023-09-29 13:42 | git | Note Added: 0114326 | |
2023-10-03 11:53 | git | Note Added: 0114367 | |
2023-10-03 15:59 |
|
Assigned To | drochalo => mzernova |
2023-10-03 15:59 |
|
Status | assigned => feedback |
2023-10-03 15:59 |
|
Note Added: 0114368 | |
2024-03-25 12:56 | dpasukhi | Status | feedback => resolved |
2024-03-25 12:56 | dpasukhi | Target Version | 7.8.0 => 7.8.1 |