View Issue Details

IDProjectCategoryView StatusLast Update
0027787Open CASCADEOCCT:Visualizationpublic2020-05-27 11:13
ReporterdbpAssigned Tobugmaster  
PrioritynormalSeverityfeature 
Status closedResolutionfixed 
Target Version7.1.0Fixed in Version7.1.0 
Summary0027787: Visualization, TKOpenGl - Optimize rendering by additional check whether the object is fully clipped or not
DescriptionOptimize rendering by additional check whether the object is fully clipped or not
Steps To Reproducebugs/vis/bug27751_capping
TagsNo tags attached.
Test case numberbugs vis bug27751_capping

Relationships

parent of 0031579 closedbugmaster Open CASCADE Visualization, OpenGl_CappingAlgo - clip graphics group by bounding box 
related to 0029768 closedabv Open CASCADE Visualization, TKOpenGl - structure is entirely clipped by suppressed clipping 
child of 0027748 newvpozdyayev Open CASCADE Visualization - clipping and capping improvements 

Activities

git

2016-08-17 17:41

administrator   ~0056801

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

dbp

2016-08-17 17:41

developer   ~0056802

Last edited: 2016-08-17 18:07

Dear kgv,

Please review the patch in branch CR27787.

git

2016-08-17 18:07

administrator   ~0056805

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

git

2016-08-17 18:07

administrator   ~0056806

Branch CR0027787 has been deleted by dbp.

SHA-1: 50eb0ae9508f5a530b2bf1672f4e412411c53490

git

2016-08-18 19:36

administrator   ~0056840

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

git

2016-08-18 19:41

administrator   ~0056841

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.

kgv

2016-08-18 19:55

developer   ~0056842

Last edited: 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.

kgv

2016-08-18 19:55

developer   ~0056843

Patch is ready for testing in branch CR27787_1.

git

2016-08-19 11:15

administrator   ~0056855

Branch CR27787_1 has been updated forcibly by mkv.

SHA-1: 1e85173588d5bc634c5cdfc95a168e5f22ee5f62

mkv

2016-08-22 14:58

tester   ~0056923

Dear BugMaster,
Branch CR27787_1 was rebased on current master of occt git-repository.
SHA-1: 1e85173588d5bc634c5cdfc95a168e5f22ee5f62

mkv

2016-08-22 14:59

tester   ~0056924

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.

mkv

2016-08-22 14:59

tester   ~0056925

Dear BugMaster,
Branch CR27787_1 is TESTED.

git

2016-08-26 16:22

administrator   ~0057129

Branch CR27787_1 has been deleted by inv.

SHA-1: 1e85173588d5bc634c5cdfc95a168e5f22ee5f62

git

2016-08-26 16:22

administrator   ~0057131

Branch CR27787 has been deleted by inv.

SHA-1: e87c5e44e85cb6e9d7c6044c23d43a842230015a

Related Changesets

occt: master 1a7ece8f

2016-08-18 16:41:05

dbp


Committer: bugmaster Details Diff
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.
Affected Issues
0027787
mod - src/NCollection/NCollection_Vec4.hxx Diff File
mod - src/OpenGl/OpenGl_Clipping.cxx Diff File
mod - src/OpenGl/OpenGl_Clipping.hxx Diff File
mod - src/OpenGl/OpenGl_SetOfShaderPrograms.hxx Diff File
mod - src/OpenGl/OpenGl_ShaderManager.cxx Diff File
mod - src/OpenGl/OpenGl_ShaderManager.hxx Diff File
mod - src/OpenGl/OpenGl_Structure.cxx Diff File

Issue History

Date Modified Username Field Change
2016-08-17 17:37 dbp New Issue
2016-08-17 17:37 dbp Assigned To => kgv
2016-08-17 17:37 dbp Assigned To kgv => dbp
2016-08-17 17:40 kgv Summary Visualization -- 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:40 kgv Relationship added child of 0027748
2016-08-17 17:41 git Note Added: 0056801
2016-08-17 17:41 dbp Note Added: 0056802
2016-08-17 17:41 dbp Assigned To dbp => kgv
2016-08-17 17:41 dbp Status new => resolved
2016-08-17 17:41 dbp Steps to Reproduce Updated
2016-08-17 17:57 kgv Assigned To kgv => dbp
2016-08-17 17:57 kgv Severity minor => feature
2016-08-17 17:57 kgv Status resolved => assigned
2016-08-17 17:57 kgv Product Version Unscheduled =>
2016-08-17 18:07 git Note Added: 0056805
2016-08-17 18:07 git Note Added: 0056806
2016-08-17 18:07 dbp Note Edited: 0056802
2016-08-18 19:36 git Note Added: 0056840
2016-08-18 19:41 git Note Added: 0056841
2016-08-18 19:55 kgv Note Added: 0056842
2016-08-18 19:55 kgv Note Added: 0056843
2016-08-18 19:55 kgv Assigned To dbp => bugmaster
2016-08-18 19:55 kgv Status assigned => resolved
2016-08-18 19:55 kgv Status resolved => reviewed
2016-08-18 19:59 kgv Note Edited: 0056842
2016-08-18 19:59 kgv Note Edited: 0056842
2016-08-18 19:59 kgv Note Edited: 0056842
2016-08-18 20:01 kgv Steps to Reproduce Updated
2016-08-19 09:23 mkv Assigned To bugmaster => mkv
2016-08-19 11:15 git Note Added: 0056855
2016-08-22 14:58 mkv Note Added: 0056923
2016-08-22 14:59 mkv Note Added: 0056924
2016-08-22 14:59 mkv Note Added: 0056925
2016-08-22 14:59 mkv Assigned To mkv => bugmaster
2016-08-22 14:59 mkv Status reviewed => tested
2016-08-22 14:59 mkv Test case number => bugs vis bug27751_capping
2016-08-26 11:53 bugmaster Changeset attached => occt master 1a7ece8f
2016-08-26 11:53 bugmaster Status tested => verified
2016-08-26 11:53 bugmaster Resolution open => fixed
2016-08-26 16:22 git Note Added: 0057129
2016-08-26 16:22 git Note Added: 0057131
2016-12-09 16:31 aiv Status verified => closed
2016-12-09 16:38 aiv Fixed in Version => 7.1.0
2018-05-14 19:28 kgv Relationship added related to 0029768
2020-05-27 11:13 kgv Relationship added parent of 0031579