MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0025675Open CASCADE[OCCT] OCCT:Visualizationpublic2014-12-29 16:062015-10-16 16:37
Reporterdbp 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version[OCCT] 6.8.0 
Target Version[OCCT] 6.9.0Fixed in Version[OCCT] 6.9.0 
Summary0025675: Visualization - Fix problems and inefficiencies with frustum culling
DescriptionPotential problems in method:

OpenGl_BVHTreeSelector::Intersect (const OpenGl_Vec4& theMinPt, const OpenGl_Vec4& theMaxPt)

There are a few places like this:

aFrustumProjMax = myMaxOrthoProjectionPts[0] - DotProduct (OpenGl_Vec4 (1.0f, 0.0f, 0.0f, 1.0f), theMinPt);
aFrustumProjMin = myMinOrthoProjectionPts[0] - DotProduct (OpenGl_Vec4 (1.0f, 0.0f, 0.0f, 1.0f), theMinPt);

In such places homogenios coords are used, thus SAT directions must have W = 0 (not 1.0):

DotProduct (OpenGl_Vec4 (1.0f, 0.0f, 0.0f, 0.0f), theMinPt)

This leads to diffierent result of DOT functiom (extra 1.0).

Moreover, it is inefficient to use DOT here, because

DOT (vec (1, 0, 0, 0), V) = V.x
DOT (vec (0, 1, 0, 0), V) = V.y
DOT (vec (0, 0, 1, 0), V) = V.z

So it is better to eliminate all DOTs to achieve higher performance.

Another shadow point is in traverse function:

      if (theSelector.Intersect (aBVHTree->MinPoint (aNode),
                                 aBVHTree->MaxPoint (aNode)))
      {
        Standard_Integer aIdx = aBVHTree->BegPrimitive (aNode);
        myBVHPrimitives.GetStructureById (aIdx)->MarkAsNotCulled();
        if (aHead < 0)
        {
          return;
        }

        aNode = aStack[aHead];
        --aHead;
      }

Why do we need to ckeck intersection here? All intersections were checked on previous steps.
Steps To Reproducenot required
TagsNo tags attached.
Test case numberNot needed
Attached Filesxls file icon BVH_culling_performance.xls (58,368 bytes) 2015-01-27 19:05
xls file icon BVH_culling_performance_upd.xls (64,512 bytes) 2015-02-04 12:17

- Relationships
related to 0024307closedapn Open CASCADE TKOpenGl - efficient culling of large number of presentations 
related to 0025768closedbugmaster Open CASCADE Visualization, Graphic3d_Structure - do not use invalid bounding boxes of empty groups 
related to 0025853closedbugmaster Community Edges disappear or reappear when displaying new edges 

-  Notes
(0035973)
git (administrator)
2015-01-12 18:11

Branch CR25675 has been created by vpa.

SHA-1: 385adf0d664ee9592daf5457cee5c65471ab5e46


Detailed log of new commits:

Author: vpa
Date: Mon Jan 12 18:08:42 2015 +0300

    0025675: Visaulization - Fix problems and inefficiencies with frustum culling
    
    Removed unnecessary overlap check in traverse of priority list items;
    Slight optimization of calculations in overlap detection methods in OpenGl_BVHTreeSelector
(0036432)
git (administrator)
2015-01-23 12:17

Branch CR25675 has been updated forcibly by vpa.

SHA-1: 90a68473fde6e1dbbd4ed176d815a53a3faf1e03
(0036709)
git (administrator)
2015-01-27 14:50

Branch CR25675 has been updated forcibly by vpa.

SHA-1: 3d20217cc4c8675091704a9ba20fd334e982602b
(0036738)
git (administrator)
2015-01-27 19:14

Branch CR25675 has been updated forcibly by vpa.

SHA-1: f4838959042f7593efec3876c85e61ea419ddd73
(0036739)
vpa (developer)
2015-01-27 19:14

Dear Denis,

the patch in branch CR25675 is ready to be reviewed.

For performance comparsion results please see the attached file BVH_culling_performance.xls.
(0036893)
git (administrator)
2015-01-30 14:24

Branch CR25675 has been updated forcibly by vpa.

SHA-1: b808a92dc1aea25028978eb45d2d571ea6d78d61
(0036902)
git (administrator)
2015-01-30 15:34

Branch CR25675 has been updated forcibly by vpa.

SHA-1: 2ccf863bfcb49886b1c4ac8bb47f81b279938ca0
(0037046)
git (administrator)
2015-02-04 11:40

Branch CR25675 has been updated forcibly by vpa.

SHA-1: ef27ec5e83f56c6e90e03cae95964ef54a8e5ffb
(0037048)
vpa (developer)
2015-02-04 12:18

Dear Denis,

the patch in branch CR25675 was corrected according to your remarks and is ready to be reviewed.

For new performance comparsion results please see the attached file BVH_culling_performance_upd.xls.
(0037062)
git (administrator)
2015-02-04 13:40

Branch CR25675 has been updated forcibly by vpa.

SHA-1: 00861ddda5097bb6a5bdb35768dee7728b5d7839
(0037063)
dbp (developer)
2015-02-04 13:42

Dear bugmaster,

please test the patch.
(0037077)
git (administrator)
2015-02-04 16:00

Branch CR25675 has been updated forcibly by vpa.

SHA-1: ebef1bc61408b6375b308957674551c111a46721
(0037111)
mkv (tester)
2015-02-05 13:16

Dear BugMaster,
Branch CR25675 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: ebef1bc61408b6375b308957674551c111a46721

Number of compiler warnings:

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

products component :
Linux: 11 (11 on master)
Windows: 1 (1 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
occt component :
Total MEMORY difference: 369741952 / 370076844
Total CPU difference: 54165.1500000001 / 49863.81000000002
products component :
Total MEMORY difference: 110349192 / 110236384
Total CPU difference: 15863.469999999978 / 15774.329999999973

Testing on Windows:
occt component :
Total MEMORY difference: 276104008 / 276284192
Total CPU difference: 34660.28125 / 36894.109375
products component :
Total MEMORY difference: 53810528 / 53717872
Total CPU difference: 8116.5 / 10071.46875

There are no differences in images found by testdiff.
(0037483)
git (administrator)
2015-02-13 10:28

Branch CR25675 has been deleted by kgv.

SHA-1: ebef1bc61408b6375b308957674551c111a46721
(0046632)
git (administrator)
2015-10-09 16:04

Branch CR25675_2 has been created by nbv.

SHA-1: 4fd36f5053e21c0092c7ba624afb3d14a36d1655


Detailed log of new commits:

Author: nbv
Date: Fri Oct 9 13:28:20 2015 +0300

    0026675: Eliminate normalization of coordinates in ApproxInt package
    
    Normalization has been eliminated.
    
    Additionally,
    1. Some methods of AppDef_Compute and ApproxInt_MultiLine classes have become inline (for speeding up performance).
    2. Interfaces of AppDef_Compute::Parametrization(...) and BRepAlgo_BooleanOperations::SetApproxParameters() methods have been changed.
    3. Overloaded methods for ApproxInt_Approx::SetParameters(...), TopOpeBRepTool_GeomTool::GetTolerances(...) and TopOpeBRepTool_GeomTool::SetTolerances(...) have been removed (because some fields of these classes are not used more).
    4. Lost comments have been added in BRepApprox_TheMultiLineOfApprox.hxx and GeomInt_TheMultiLineOfWLApprox.hxx files.
    5. Some fields have been deleted from ApproxInt_MultiLine class. Kept members have become constant.
    6. Interface of ksection DRAW-command has been changed.
    7. Some code fragments have been rewritten to make them easier.
    8. Function CleanWline(...) has been added in IntPatch_Intersection.cxx file. See comments in code for detail description.
    
    Adjusting some test case according to their new behavior.
(0046967)
git (administrator)
2015-10-16 16:37

Branch CR25675_2 has been deleted by kgv.

SHA-1: 4fd36f5053e21c0092c7ba624afb3d14a36d1655

- Related Changesets
occt: master 14a35e5d
Timestamp: 2015-02-04 12:59:14
Author: vpa
Committer: bugmaster
Details ] Diff ]
0025675: Visualization - Fix problems and inefficiencies with frustum culling

Removed unnecessary overlap check in traverse of layer items;
Slight optimization of calculations in overlap detection methods in OpenGl_BVHTreeSelector.
mod - src/OpenGl/OpenGl_BVHTreeSelector.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_Layer.cxx Diff ] File ]

- Issue History
Date Modified Username Field Change
2014-12-29 16:06 dbp New Issue
2014-12-29 16:06 dbp Assigned To => kgv
2014-12-29 16:11 kgv Assigned To kgv => vpa
2014-12-29 16:11 kgv Assigned To vpa => san
2014-12-29 16:11 kgv Assigned To san => kgv
2014-12-29 16:12 kgv Relationship added related to 0024307
2014-12-29 21:47 kgv Relationship added related to 0025679
2015-01-12 10:24 kgv Assigned To kgv => vpa
2015-01-12 10:24 kgv Status new => assigned
2015-01-12 18:11 git Note Added: 0035973
2015-01-23 12:17 git Note Added: 0036432
2015-01-27 14:50 git Note Added: 0036709
2015-01-27 19:05 vpa File Added: BVH_culling_performance.xls
2015-01-27 19:14 git Note Added: 0036738
2015-01-27 19:14 vpa Note Added: 0036739
2015-01-27 19:14 vpa Assigned To vpa => dbp
2015-01-27 19:14 vpa Status assigned => resolved
2015-01-27 19:14 vpa Steps to Reproduce Updated View Revisions
2015-01-30 12:32 kgv Relationship added related to 0025768
2015-01-30 12:38 kgv Product Version 6.9.0 => 6.8.0
2015-01-30 12:38 kgv Target Version Unscheduled => 6.9.0
2015-01-30 12:42 szv Summary Visaulization - Fix problems and inefficiencies with frustum culling => Visualization - Fix problems and inefficiencies with frustum culling
2015-01-30 13:15 dbp Assigned To dbp => vpa
2015-01-30 13:15 dbp Status resolved => assigned
2015-01-30 14:24 git Note Added: 0036893
2015-01-30 15:34 git Note Added: 0036902
2015-02-04 11:40 git Note Added: 0037046
2015-02-04 12:17 vpa File Added: BVH_culling_performance_upd.xls
2015-02-04 12:18 vpa Note Added: 0037048
2015-02-04 12:18 vpa Assigned To vpa => dbp
2015-02-04 12:18 vpa Status assigned => resolved
2015-02-04 13:40 git Note Added: 0037062
2015-02-04 13:42 dbp Note Added: 0037063
2015-02-04 13:42 dbp Assigned To dbp => bugmaster
2015-02-04 13:42 dbp Status resolved => reviewed
2015-02-04 16:00 git Note Added: 0037077
2015-02-04 17:27 mkv Assigned To bugmaster => mkv
2015-02-05 13:16 mkv Note Added: 0037111
2015-02-05 13:16 mkv Assigned To mkv => bugmaster
2015-02-05 13:16 mkv Status reviewed => tested
2015-02-05 13:16 mkv Test case number => Not needed
2015-02-06 15:38 bugmaster Changeset attached => occt master 14a35e5d
2015-02-06 15:38 bugmaster Status tested => verified
2015-02-06 15:38 bugmaster Resolution open => fixed
2015-02-13 10:28 git Note Added: 0037483
2015-02-24 08:59 kgv Relationship added related to 0025853
2015-05-14 15:29 aiv Status verified => closed
2015-05-14 15:32 aiv Fixed in Version => 6.9.0
2015-10-09 16:04 git Note Added: 0046632
2015-10-16 16:37 git Note Added: 0046967


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker