MantisBT - Open CASCADE
View Issue Details
0027787Open CASCADE[OCCT] OCCT:Visualizationpublic2016-08-17 17:372019-05-07 16:46
dbp 
bugmaster 
normalfeature 
closedfixed 
 
[OCCT] 7.1.0[OCCT] 7.1.0 
bugs vis bug27751_capping
0027787: Visualization, TKOpenGl - Optimize rendering by additional check whether the object is fully clipped or not
Optimize rendering by additional check whether the object is fully clipped or not
bugs/vis/bug27751_capping
No tags attached.
related to 0029768closed abv Open CASCADE Visualization, TKOpenGl - structure is entirely clipped by suppressed clipping 
child of 0027748new kgv Open CASCADE Visualization - clipping and capping improvements 
Issue History
2016-08-17 17:37dbpNew Issue
2016-08-17 17:37dbpAssigned To => kgv
2016-08-17 17:37dbpAssigned Tokgv => dbp
2016-08-17 17:40kgvSummaryVisualization -- Optimize rendering by additional check whether the object is fully clipped or not => Visualization, TKOpenGl - Optimize rendering by additional check whether the object is fully clipped or not
2016-08-17 17:40kgvRelationship addedchild of 0027748
2016-08-17 17:41gitNote Added: 0056801
2016-08-17 17:41dbpNote Added: 0056802
2016-08-17 17:41dbpAssigned Todbp => kgv
2016-08-17 17:41dbpStatusnew => resolved
2016-08-17 17:41dbpSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=14424#r14424
2016-08-17 17:57kgvAssigned Tokgv => dbp
2016-08-17 17:57kgvSeverityminor => feature
2016-08-17 17:57kgvStatusresolved => assigned
2016-08-17 17:57kgvProduct VersionUnscheduled =>
2016-08-17 18:07gitNote Added: 0056805
2016-08-17 18:07gitNote Added: 0056806
2016-08-17 18:07dbpNote Edited: 0056802bug_revision_view_page.php?bugnote_id=56802#r14426
2016-08-18 19:36gitNote Added: 0056840
2016-08-18 19:41gitNote Added: 0056841
2016-08-18 19:55kgvNote Added: 0056842
2016-08-18 19:55kgvNote Added: 0056843
2016-08-18 19:55kgvAssigned Todbp => bugmaster
2016-08-18 19:55kgvStatusassigned => resolved
2016-08-18 19:55kgvStatusresolved => reviewed
2016-08-18 19:59kgvNote Edited: 0056842bug_revision_view_page.php?bugnote_id=56842#r14440
2016-08-18 19:59kgvNote Edited: 0056842bug_revision_view_page.php?bugnote_id=56842#r14441
2016-08-18 19:59kgvNote Edited: 0056842bug_revision_view_page.php?bugnote_id=56842#r14442
2016-08-18 20:01kgvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=14443#r14443
2016-08-19 09:23mkvAssigned Tobugmaster => mkv
2016-08-19 11:15gitNote Added: 0056855
2016-08-22 14:58mkvNote Added: 0056923
2016-08-22 14:59mkvNote Added: 0056924
2016-08-22 14:59mkvNote Added: 0056925
2016-08-22 14:59mkvAssigned Tomkv => bugmaster
2016-08-22 14:59mkvStatusreviewed => tested
2016-08-22 14:59mkvTest case number => bugs vis bug27751_capping
2016-08-26 11:53bugmasterChangeset attached => occt master 1a7ece8f
2016-08-26 11:53bugmasterStatustested => verified
2016-08-26 11:53bugmasterResolutionopen => fixed
2016-08-26 16:22gitNote Added: 0057129
2016-08-26 16:22gitNote Added: 0057131
2016-12-09 16:31aivStatusverified => closed
2016-12-09 16:38aivFixed in Version => 7.1.0
2018-05-14 19:28kgvRelationship addedrelated to 0029768
2019-05-07 16:46kgvRelationship addedrelated to 0030698

Notes
(0056801)
git   
2016-08-17 17:41   
Branch CR0027787 has been created by dbp.

SHA-1: 50eb0ae9508f5a530b2bf1672f4e412411c53490


Detailed log of new commits:

Author: dbp
Date: Wed Aug 17 17:40:37 2016 +0300

    0027787: Visualization -- Optimize rendering by additional check whether the object is fully clipped or not
(0056802)
dbp   
2016-08-17 17:41   
(edited on: 2016-08-17 18:07)
Dear kgv,

Please review the patch in branch CR27787.

(0056805)
git   
2016-08-17 18:07   
Branch CR27787 has been created by dbp.

SHA-1: 6308265cf386de85d1ace4600095738ea6c5cfa0


Detailed log of new commits:

Author: dbp
Date: Wed Aug 17 17:40:37 2016 +0300

    0027787: Visualization -- Optimize rendering by additional check whether the object is fully clipped or not
(0056806)
git   
2016-08-17 18:07   
Branch CR0027787 has been deleted by dbp.

SHA-1: 50eb0ae9508f5a530b2bf1672f4e412411c53490
(0056840)
git   
2016-08-18 19:36   
Branch CR27787 has been updated by kgv.

SHA-1: e87c5e44e85cb6e9d7c6044c23d43a842230015a


Detailed log of new commits:

Author: kgv
Date: Thu Aug 18 19:28:08 2016 +0300

    OpenGl_ShaderManager - define dedicated GLSL programs for one and two clipping planes

Author: kgv
Date: Thu Aug 18 19:26:52 2016 +0300

    fix disabling and enabling planes

(0056841)
git   
2016-08-18 19:41   
Branch CR27787_1 has been created by kgv.

SHA-1: d89ab8f87a9d874828188892daa56a974e83d97b


Detailed log of new commits:

Author: dbp
Date: Thu Aug 18 19:41:05 2016 +0300

    0027787: Visualization, TKOpenGl - Optimize rendering by additional check whether the object is fully clipped or not
    
    OpenGl_Structure::Render() now checks if structure is entirely clipped to skip rendering at all,
    or entirely NOT clipped to disable clipping / capping plane.
    
    OpenGl_ShaderManager now defines dedicated GLSL programs for one and two clipping planes
    to optimize rendering on slow hardware.
(0056842)
kgv   
2016-08-18 19:55   
(edited on: 2016-08-18 19:59)
Clipping on CPU side dramatically improves rendering performance of global clipping / capping plane applied on a complex scene:
- Skipping rendering of entire object is essential, when considerable part is scene is clipped (like in case of frustum culling).
- Disabling capping for objects far behind the plane dramatically reduces CPU (multiple rendering passes) and GPU usage.
  This might improve performance in 10+ times depending on scene structure and complexity.
  On test model FPS increased from 10 to 60, being highly CPU-limited in first case.

Using truncated shading program in case of single clipping plane (avoid for-loop in a fragment shader) improves rendering performance on slow hardware.
On PowerVR SGX 544MP patch increases FPS by two times (at best) in case of single clipping / capping plane.
On test model FPS increased from 14.9 to 30 for clipping (7.9 to 18.5 for capping), with 53 without clipping.

(0056843)
kgv   
2016-08-18 19:55   
Patch is ready for testing in branch CR27787_1.
(0056855)
git   
2016-08-19 11:15   
Branch CR27787_1 has been updated forcibly by mkv.

SHA-1: 1e85173588d5bc634c5cdfc95a168e5f22ee5f62
(0056923)
mkv   
2016-08-22 14:58   
Dear BugMaster,
Branch CR27787_1 was rebased on current master of occt git-repository.
SHA-1: 1e85173588d5bc634c5cdfc95a168e5f22ee5f62
(0056924)
mkv   
2016-08-22 14:59   
Dear BugMaster,
Branch CR27787_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: 1e85173588d5bc634c5cdfc95a168e5f22ee5f62

Number of compiler warnings:

occt component :
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS : 0 (0 on master)

products component :
Linux: 64 (64 on master)
Windows: 0 (0 on master)
MacOS : 1152

Regressions/Differences/Improvements:
No regressions/differences

Testing cases:
http://occt-tests/CR27787_1-master-OCCT/Debian70-64/bugs/vis/bug27751_capping.html [^]
http://occt-tests/CR27787_1-master-OCCT/Windows-64-VC10/bugs/vis/bug27751_capping.html [^]
bugs vis bug27751_capping: OK

Testing on Linux:
occt component :
Total MEMORY difference: 90213577 / 89492510 [+0.81%]
Total CPU difference: 19468.28999999995 / 19495.580000000107 [-0.14%]
products component :
Total MEMORY difference: 30074211 / 30045379 [+0.10%]
Total CPU difference: 5083.799999999969 / 5077.5199999999795 [+0.12%]

Testing on Windows:
occt component :
Total MEMORY difference: 57178209 / 57161393 [+0.03%]
Total CPU difference: 18246.610164698755 / 18084.68112669885 [+0.90%]
products component :
Total MEMORY difference: 21298922 / 21261546 [+0.18%]
Total CPU difference: 4887.46452969995 / 4849.696687599947 [+0.78%]

There are no differences in images found by testdiff.
(0056925)
mkv   
2016-08-22 14:59   
Dear BugMaster,
Branch CR27787_1 is TESTED.
(0057129)
git   
2016-08-26 16:22   
Branch CR27787_1 has been deleted by inv.

SHA-1: 1e85173588d5bc634c5cdfc95a168e5f22ee5f62
(0057131)
git   
2016-08-26 16:22   
Branch CR27787 has been deleted by inv.

SHA-1: e87c5e44e85cb6e9d7c6044c23d43a842230015a