View Issue Details

IDProjectCategoryView StatusLast Update
0031579Open CASCADEOCCT:Visualizationpublic2021-09-03 13:41
Reporternds Assigned Tobugmaster  
PrioritynormalSeverityfeature 
Status closedResolutionwon't fix 
Target Version7.6.0 
Summary0031579: Visualization, OpenGl_CappingAlgo - clip graphics group by bounding box
DescriptionWe have slow redraw of V3d_View when we set:
- more than 6 clipping planes,
- capping is ON for all planes,
- using object material is ON for all planes.

Especially it influences on performance on discrete video cards.

TagsNo tags attached.
Test case number

Attached Files

  • 0001-0031579-Visualization-OpenGl_CappingAlgo-performance.patch (1,897 bytes)

Relationships

child of 0027787 closedbugmaster Visualization, TKOpenGl - Optimize rendering by additional check whether the object is fully clipped or not 

Activities

git

2020-05-26 11:20

administrator   ~0092344

Branch CR31579 has been created by nds.

SHA-1: e1a923082213307bad65a89909ad3ba750cb3dc8


Detailed log of new commits:

Author: nds
Date: Tue May 26 10:39:58 2020 +0300

    0031579: Visualization - OpenGl_CappingAlgo performance on some clipping planes
    
    (cherry picked from commit 61d75276ea924e0fd22de0a2a927bce1d554de99)

git

2021-04-20 10:43

administrator   ~0100471

Branch CR31579_1 has been created by nds.

SHA-1: 9a6b87c112ae86da2835ab814ecc536821ab6456


Detailed log of new commits:

Author: nds
Date: Tue May 26 10:39:58 2020 +0300

    0031579: Visualization - OpenGl_CappingAlgo performance on some clipping planes
    
    (cherry picked from commit 61d75276ea924e0fd22de0a2a927bce1d554de99)
    (cherry picked from commit fa3bd5f2e598916906c28ac8789bdfb28ad42255)
    (cherry picked from commit 2ab0ba846ac3ac073552997d030d51392dc82314)
    (cherry picked from commit 6085d229e9537cca4fac417412aac399664bbdd9)

nds

2021-04-20 13:29

developer   ~0100477

Dear Kirill,
please review the patch.
Jenkins Job: http://jenkins-test-12.nnov.opencascade.com/view/CR31579-master-nds/view/ALL/

Thank you,
Natasha

kgv

2021-04-20 14:39

developer   ~0100483

General remark - it seems that structure transformation is not taken into account by new logic
(Graphic3d_Group::BoundingBox() defines local Min/Max range, while Graphic3d_Structure::BoundingBox() stores transformed AABB).

+        isClipped = true;
+        break;
+      }
+    }
+    return isClipped;

Please just return TRUE in place.

+    const Graphic3d_BndBox4f& aBoxF = theGroup->BoundingBox();

Please add IsValid() check.

Graphic3d_Vec3d ((Standard_Real )aBoxF.CornerMin().x(),
+                                                  (Standard_Real )aBoxF.CornerMin().y(),
+                                                  (Standard_Real )aBoxF.CornerMin().z()),

Please use cast constructor:
> Graphic3d_Vec3d (aBoxF.CornerMin().xyz())

(cherry picked from commit 61d75276ea924e0fd22de0a2a927bce1d554de99)
(cherry picked from commit fa3bd5f2e598916906c28ac8789bdfb28ad42255)
(cherry picked from commit 2ab0ba846ac3ac073552997d030d51392dc82314)
(cherry picked from commit 6085d229e9537cca4fac417412aac399664bbdd9)

Please clean up commit from service info.

git

2021-04-28 09:56

administrator   ~0100628

Branch CR31579_2 has been created by nds.

SHA-1: ce866070070dbdcaf46a2ae8d6fa4dfb805162e2


Detailed log of new commits:

Author: nds
Date: Tue May 26 10:39:58 2020 +0300

    0031579: Visualization - OpenGl_CappingAlgo performance on some clipping planes

nds

2021-04-28 09:58

developer   ~0100629

Dear Kirill,

please, review once again.
Could you please pay attention, whether the general remark is fixed correctly.

Best regards, Natalia

kgv

2021-04-28 11:02

developer   ~0100634

Last edited: 2021-04-28 11:04

+  Standard_Boolean isGroupClipped (const Handle(Graphic3d_Group)& theGroup, const Handle(OpenGl_Context)& theContext)
+ {
+    const Graphic3d_BndBox3d& aBBox = theGroup->Structure()->CStructure()->BoundingBox();

If this AABB doesn't pass clipping test - wouldn't it be rejected earlier to not perform capping algorithm at all?
I have some doubts on usefulness of this check on group level - I think it will be necessary reevaluating performance comparison after changed logic and define some reproducible test case.
Ideally, this could be conditional by a parameter in Graphic3d_RenderingParams to be able to perform tests without rebuilding OCCT and to be able to disable optimization when it might have counter effect.

kgv

2021-08-24 14:47

developer  

0001-0031579-Visualization-OpenGl_CappingAlgo-performance.patch (1,897 bytes)

kgv

2021-08-24 14:48

developer   ~0103408

Please close this bug as it is not that trivial to implement correctly (and beneficially).
Will be considered in future as one of the ways to improve capping performance.

git

2021-08-24 14:49

administrator   ~0103409

Branch CR31579 has been deleted by kgv.

SHA-1: e1a923082213307bad65a89909ad3ba750cb3dc8

git

2021-08-24 14:49

administrator   ~0103410

Branch CR31579_1 has been deleted by kgv.

SHA-1: 9a6b87c112ae86da2835ab814ecc536821ab6456

git

2021-08-24 14:49

administrator   ~0103411

Branch CR31579_2 has been deleted by kgv.

SHA-1: ce866070070dbdcaf46a2ae8d6fa4dfb805162e2

Issue History

Date Modified Username Field Change
2020-05-26 10:36 nds New Issue
2020-05-26 10:36 nds Assigned To => kgv
2020-05-26 11:20 git Note Added: 0092344
2020-05-27 11:12 kgv Summary Visualization - OpenGl_CappingAlgo performance on some clipping planes => Visualization, OpenGl_CappingAlgo - clip graphics group by bounding box
2020-05-27 11:13 kgv Relationship added child of 0027787
2020-05-27 11:13 kgv Severity minor => feature
2020-09-21 17:42 kgv Target Version 7.5.0 => 7.6.0
2021-04-20 10:43 git Note Added: 0100471
2021-04-20 13:29 nds Note Added: 0100477
2021-04-20 13:29 nds Status new => resolved
2021-04-20 14:39 kgv Note Added: 0100483
2021-04-20 14:39 kgv Assigned To kgv => nds
2021-04-20 14:39 kgv Status resolved => assigned
2021-04-28 09:56 git Note Added: 0100628
2021-04-28 09:58 nds Note Added: 0100629
2021-04-28 09:58 nds Assigned To nds => kgv
2021-04-28 09:58 nds Status assigned => resolved
2021-04-28 11:02 kgv Note Added: 0100634
2021-04-28 11:03 kgv Assigned To kgv => nds
2021-04-28 11:03 kgv Status resolved => assigned
2021-04-28 11:03 kgv Note Edited: 0100634
2021-04-28 11:04 kgv Note Edited: 0100634
2021-08-24 14:47 kgv File Added: 0001-0031579-Visualization-OpenGl_CappingAlgo-performance.patch
2021-08-24 14:48 kgv Note Added: 0103408
2021-08-24 14:48 kgv Assigned To nds => bugmaster
2021-08-24 14:48 kgv Status assigned => feedback
2021-08-24 14:48 kgv Resolution open => won't fix
2021-08-24 14:49 git Note Added: 0103409
2021-08-24 14:49 git Note Added: 0103410
2021-08-24 14:49 git Note Added: 0103411
2021-09-03 13:41 bugmaster Status feedback => closed