MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0031579Open CASCADE[OCCT] OCCT:Visualizationpublic2020-05-26 10:362021-04-28 11:04
Reporternds 
Assigned Tonds 
PrioritynormalSeverityfeature 
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.6.0*Fixed in Version 
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

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

-  Notes
(0092344)
git (administrator)
2020-05-26 11:20

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)
(0100471)
git (administrator)
2021-04-20 10:43

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)
(0100477)
nds (developer)
2021-04-20 13:29

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

Thank you,
Natasha
(0100483)
kgv (developer)
2021-04-20 14:39

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.
(0100628)
git (administrator)
2021-04-28 09:56

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
(0100629)
nds (developer)
2021-04-28 09:58

Dear Kirill,

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

Best regards, Natalia
(0100634)
kgv (developer)
2021-04-28 11:02
edited on: 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.


- 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 View Revisions
2021-04-28 11:04 kgv Note Edited: 0100634 View Revisions


Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker