View Issue Details

IDProjectCategoryView StatusLast Update
0027751Open CASCADEOCCT:Visualizationpublic2022-07-15 16:09
Reporterkgv Assigned Tobugmaster  
PrioritynormalSeverityfeature 
Status closedResolutionfixed 
Target Version7.1.0Fixed in Version7.1.0 
Summary0027751: Visualization, Graphic3d_ClipPlane - add option to inherit material from object
DescriptionGraphic3d_ClipPlane defines its own material for rendering capping plane.
This is useful for mapping special textures / highlighting capping surface.

However, in many scenarios it is desirable to apply to capping plane the material of object itself. Within current API this implies significant efforts on application level - in particular, since clipping planes have to be defined for each object, and moreover, object should be of one material (which is not the case when using AIS_ColoredShape and similar).

Therefore, it is proposed to provide the option to inherit material from object itself. Note, that within current implementation of capping algorithm, this mode implies performance slow down due to additional rendering passes.
TagsNo tags attached.
Test case numberbugs vis bug27751_capping

Attached Files

  • cap_nokeep.png (8,070 bytes)
  • cap_keep.png (7,424 bytes)
  • cap_keep2.png (50,798 bytes)

Relationships

parent of 0033066 closedvpozdyayev Community Visualization - null pointer dereference in MeshVS_ElementalColorPrsBuilder::Build() function 
child of 0027748 newvpozdyayev Open CASCADE Visualization - clipping and capping improvements 

Activities

kgv

2016-08-04 19:09

developer  

cap_nokeep.png (8,070 bytes)

kgv

2016-08-04 19:09

developer  

cap_keep.png (7,424 bytes)

git

2016-08-04 19:13

administrator   ~0056485

Branch CR27751 has been created by kgv.

SHA-1: 112e3e31cabbe1d8a2c33e4bf228824ca923949c


Detailed log of new commits:

Author: kgv
Date: Thu Aug 4 19:14:24 2016 +0300

    0027751: Visualization, Graphic3d_ClipPlane - add option to inherit material from object
    
    Graphic3d_ClipPlane - Graphic3d_AspectFillArea3d is now stored as class field.
    OpenGl_CappingAlgo::RenderCapping() now handles special mode
    preserving material from rednered object.
    
    Draw Harness, ViewerTest - vaspects now preserves display mode
    and location when assigning sub-shape aspects.

git

2016-08-04 20:30

administrator   ~0056488

Branch CR27751 has been updated forcibly by kgv.

SHA-1: 8035db19b0de9996af1b3ca039b1a577fb02142a

git

2016-08-05 01:29

administrator   ~0056489

Branch CR27751 has been updated forcibly by kgv.

SHA-1: 9157c61329167785621a2ad1a1f950f9bcdb67dd

git

2016-08-05 14:32

administrator   ~0056499

Branch CR27751 has been updated forcibly by kgv.

SHA-1: 8b89c83187d1790a7a3abc615028bc34e53e7845

kgv

2016-08-05 17:11

developer  

cap_keep2.png (50,798 bytes)

git

2016-08-05 17:22

administrator   ~0056508

Branch CR27751 has been updated forcibly by kgv.

SHA-1: 8ccb94c77a4db7ed961218415b2155762dafd0d2

git

2016-08-05 21:14

administrator   ~0056513

Branch CR27751 has been updated forcibly by kgv.

SHA-1: 6ce969c51284d25712751256125843d1f6f51e29

git

2016-08-05 21:45

administrator   ~0056514

Branch CR27751 has been updated forcibly by kgv.

SHA-1: f30964f8251f182f65173b0c6127cd0d37082216

kgv

2016-08-05 21:46

developer   ~0056515

Patch is ready for review.

git

2016-08-08 19:51

administrator   ~0056570

Branch CR27751 has been updated forcibly by kgv.

SHA-1: 432407797d8e964eb58c181e4e5491b8dcfbe6c2

san

2016-08-08 22:49

developer   ~0056579

Branch CR27751 reviewed without remarks, ready for testing.

git

2016-08-10 13:20

administrator   ~0056617

Branch CR27751 has been updated forcibly by apv.

SHA-1: 1fcc6faa69b6e31faf93755d5c27925b0b02e834

apv

2016-08-10 13:21

tester   ~0056618

Branch CR27751 has been rebased on the current master.

kgv

2016-08-10 13:39

developer   ~0056619

Note that since this branch depends on patch for 0027750 the branch CR27750 for Products should be used for testing.

apv

2016-08-11 11:09

tester   ~0056633

Last edited: 2016-08-11 11:10

Dear BugMaster,

Branch CR27751 from occt git-repository (and CR27750 from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 1fcc6faa69b6e31faf93755d5c27925b0b02e834
SHA-1: 90d294448aed881d9388a41471bce320ab19824b

Number of compiler warnings:
occt component:
   Linux: 0 (0 on master)
   Windows: 0 (0 on master)
   MasOS: 0 (0 on master)
products component:
   Linux: 64
   Windows: 0
   MacOS: 1137

Regressions/Differences:
http://occt-tests/CR27751-CR27750-OCCT/Debian70-64/summary.html
http://occt-tests/CR27751-CR27750-OCCT/Windows-64-VC10/summary.html
bugs vis bug26028

Testing cases:
bugs vis bug27751_capping - OK
http://occt-tests/CR27751-CR27750-OCCT/Debian70-64/bugs/vis/bug27751_capping.html
http://occt-tests/CR27751-CR27750-OCCT/Windows-64-VC10/bugs/vis/bug27751_capping.html

Testing on Linux:
occt component:
Total MEMORY difference: 88875176 / 88445801 [+0.49%]
Total CPU difference: 19428.86000000007 / 19247.86000000006 [+0.94%]
products component:
Total MEMORY difference: 30063671 / 30023278 [+0.13%]
Total CPU difference: 5114.079999999969 / 5098.489999999977 [+0.31%]

Testing on Windows:
occt component:
Total MEMORY difference: 57132491 / 57170140 [-0.07%]
Total CPU difference: 17932.424150698906 / 18044.604469798804 [-0.62%]
products component:
Total MEMORY difference: 21269808 / 21236271 [+0.16%]
Total CPU difference: 4820.321699299949 / 4792.459920699942 [+0.58%]

There are differences in images found by testdiff:
http://occt-tests/CR27751-CR27750-OCCT/Debian70-64/diff-Debian70-64.html
http://occt-tests/CR27751-CR27750-OCCT/Windows-64-VC10/diff-Windows-64-VC10-image.html
v3d materials bug24855
bugs vis bug26028

apv

2016-08-11 11:12

tester   ~0056634

Dear Kirill,

Branch CR27751 has been rejected due to:
- regressions/differences/improvements
- differences in images

Please, validate resize of final pictures for v3d materials bug24855.

kgv

2016-08-11 12:00

developer   ~0056638

> Please, validate resize of final pictures for v3d materials bug24855.
The new behavior is correct - the erroneous file "tests/v3d/materials/begin" causing incorrect view size has been removed within the patch.

> Regressions/Differences:
> bugs vis bug26028
Test case should be updated to remove check for the one case (following Sergey remark it is incorrect to mark this MeshVS presentation mode as closed).

git

2016-08-11 12:05

administrator   ~0056639

Branch CR27751 has been updated by kgv.

SHA-1: f1b2e74ca9fcfac8acb5bba3879d81e57a63e526


Detailed log of new commits:

Author: kgv
Date: Thu Aug 11 12:07:14 2016 +0300

    update test case bugs/vis/bug26028

apv

2016-08-11 12:46

tester   ~0056643

Updated version of test case bugs vis bug26028 has been verified. Branch CR27751 is tested.

git

2016-08-26 16:23

administrator   ~0057147

Branch CR27751 has been deleted by inv.

SHA-1: f1b2e74ca9fcfac8acb5bba3879d81e57a63e526

git

2016-09-07 14:22

administrator   ~0057562

Branch CR27751 has been created by kgv.

SHA-1: 0ec6e0714a711f19cc1f466d4921ffee05b26fd2


Detailed log of new commits:

Author: kgv
Date: Fri Aug 5 01:28:58 2016 +0300

    0027756: Visualization - add Draw() method taking Graphic3d_Group to tools Prs3d_Arrow, Prs3d_Text
    
    and deprecate Draw() methods taking Prs3d_Presentation.

Author: kgv
Date: Mon Aug 8 19:51:40 2016 +0300

    0027751: Visualization, Graphic3d_ClipPlane - add option to inherit material from object
    
    Graphic3d_ClipPlane - Graphic3d_AspectFillArea3d is now stored as class field.
    OpenGl_CappingAlgo::RenderCapping() now handles special mode
    preserving material from rendered object.
    
    MeshVS_ElementalColorPrsBuilder::Build() now creates single primitives group
    for triangles, thus Closed flag is correctly applied.
    
    Redundant methods OpenGl_Structure::DrawGroups() and ::renderClosedGeometry()
    have been removed.
    
    Draw Harness, ViewerTest - vaspects now preserves display mode
    and location when assigning sub-shape aspects.
    The syntax of command vclipplane has been revised
    (preserving compatibility with old syntax):
    - Use "-param" style syntax for all arguments.
    - Eliminate redundant arguments "change", "view", "object".
    - Allow passing multiple parameters withing single call.
    - Do not require "create" command - create new plane implicitly.
    - "maxplanes" argument does not require view name anymore.
    - "delete" does not throws TCL exception for non-existing plane.
    - "view" argument without list now applies to active view.
    - Handle * and ALL withing "delete" to remove all defined planes.

Author: kgv
Date: Wed Aug 3 22:08:01 2016 +0300

    0027750: Visualization, V3d_View - remove unused functionality ZClipping and ZCueing
    
    Methods V3d_View::SetZClippingType(), ::SetZClippingDepth(), ::SetZClippingWidth(),
    ::SetZCueingDepth(), ::SetZCueingWidth(), ::SetZCueingOn(), ::SetZCueingOff()
    have been removed.

Author: kgv
Date: Fri Aug 5 20:58:13 2016 +0300

    0027735: Visualization, OpenGl_ShaderManager - fix clipping state management
    
    OpenGl_CappingAlgo::RenderCapping() now updates clipping state in Shader Manager.
    OpenGl_View::render() clipping state setup has been moved to OpenGl_View::renderScene().
    
    OpenGl_ShaderManager now converts position to homogeneous coordinates within clipping code GLSL.
    This fixes capping plane rendering with clipping planes applied.
    
    Fixed possible Clipping planes misconfiguration when FFP is used;
    error-prone OpenGl_Clipping::AddWorldLazy() method has been dropped.

git

2016-09-07 14:49

administrator   ~0057566

Branch CR27751 has been deleted by kgv.

SHA-1: 0ec6e0714a711f19cc1f466d4921ffee05b26fd2

Related Changesets

occt: master 3e05329c

2016-08-08 16:51:40

kgv


Committer: bugmaster Details Diff
0027751: Visualization, Graphic3d_ClipPlane - add option to inherit material from object

Graphic3d_ClipPlane - Graphic3d_AspectFillArea3d is now stored as class field.
OpenGl_CappingAlgo::RenderCapping() now handles special mode
preserving material from rendered object.

MeshVS_ElementalColorPrsBuilder::Build() now creates single primitives group
for triangles, thus Closed flag is correctly applied.

Redundant methods OpenGl_Structure::DrawGroups() and ::renderClosedGeometry()
have been removed.

Draw Harness, ViewerTest - vaspects now preserves display mode
and location when assigning sub-shape aspects.
The syntax of command vclipplane has been revised
(preserving compatibility with old syntax):
- Use "-param" style syntax for all arguments.
- Eliminate redundant arguments "change", "view", "object".
- Allow passing multiple parameters withing single call.
- Do not require "create" command - create new plane implicitly.
- "maxplanes" argument does not require view name anymore.
- "delete" does not throws TCL exception for non-existing plane.
- "view" argument without list now applies to active view.
- Handle * and ALL withing "delete" to remove all defined planes.

update test case bugs/vis/bug26028
Affected Issues
0027751
mod - src/Graphic3d/FILES Diff File
add - src/Graphic3d/Graphic3d_CappingFlags.hxx Diff File
mod - src/Graphic3d/Graphic3d_ClipPlane.cxx Diff File
mod - src/Graphic3d/Graphic3d_ClipPlane.hxx Diff File
mod - src/MeshVS/MeshVS_ElementalColorPrsBuilder.cxx Diff File
mod - src/OpenGl/OpenGl_CappingAlgo.cxx Diff File
mod - src/OpenGl/OpenGl_CappingAlgo.hxx Diff File
mod - src/OpenGl/OpenGl_CappingPlaneResource.cxx Diff File
mod - src/OpenGl/OpenGl_CappingPlaneResource.hxx Diff File
mod - src/OpenGl/OpenGl_SceneGeometry.cxx Diff File
mod - src/OpenGl/OpenGl_SceneGeometry.hxx Diff File
mod - src/OpenGl/OpenGl_Structure.cxx Diff File
mod - src/OpenGl/OpenGl_Structure.hxx Diff File
mod - src/OpenGl/OpenGl_StructureShadow.cxx Diff File
mod - src/OpenGl/OpenGl_StructureShadow.hxx Diff File
mod - src/OpenGl/OpenGl_View_Raytrace.cxx Diff File
mod - src/ViewerTest/ViewerTest.cxx Diff File
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx Diff File
mod - tests/bugs/vis/bug26028 Diff File
add - tests/bugs/vis/bug27751_capping Diff File
rm - tests/v3d/materials/begin Diff File

Issue History

Date Modified Username Field Change
2016-08-04 18:53 kgv New Issue
2016-08-04 18:53 kgv Assigned To => kgv
2016-08-04 18:53 kgv Relationship added child of 0027748
2016-08-04 19:09 kgv File Added: cap_nokeep.png
2016-08-04 19:09 kgv File Added: cap_keep.png
2016-08-04 19:13 git Note Added: 0056485
2016-08-04 20:30 git Note Added: 0056488
2016-08-05 01:29 git Note Added: 0056489
2016-08-05 14:32 git Note Added: 0056499
2016-08-05 17:11 kgv File Added: cap_keep2.png
2016-08-05 17:22 git Note Added: 0056508
2016-08-05 21:14 git Note Added: 0056513
2016-08-05 21:45 git Note Added: 0056514
2016-08-05 21:46 kgv Note Added: 0056515
2016-08-05 21:46 kgv Assigned To kgv => san
2016-08-05 21:46 kgv Status new => resolved
2016-08-08 19:51 git Note Added: 0056570
2016-08-08 22:49 san Note Added: 0056579
2016-08-08 22:49 san Assigned To san => bugmaster
2016-08-08 22:49 san Status resolved => reviewed
2016-08-09 11:10 apv Assigned To bugmaster => apv
2016-08-10 13:20 git Note Added: 0056617
2016-08-10 13:21 apv Note Added: 0056618
2016-08-10 13:39 kgv Note Added: 0056619
2016-08-11 09:16 apv Test case number => bugs vis bug27751_capping
2016-08-11 11:09 apv Note Added: 0056633
2016-08-11 11:09 apv Assigned To apv => kgv
2016-08-11 11:09 apv Status reviewed => assigned
2016-08-11 11:10 apv Note Edited: 0056633
2016-08-11 11:12 apv Note Added: 0056634
2016-08-11 12:00 kgv Note Added: 0056638
2016-08-11 12:05 git Note Added: 0056639
2016-08-11 12:06 kgv Assigned To kgv => bugmaster
2016-08-11 12:06 kgv Status assigned => feedback
2016-08-11 12:25 kgv Assigned To bugmaster => apv
2016-08-11 12:46 apv Note Added: 0056643
2016-08-11 12:46 apv Assigned To apv => bugmaster
2016-08-11 12:46 apv Status feedback => tested
2016-08-12 10:48 bugmaster Changeset attached => occt master 3e05329c
2016-08-12 10:48 bugmaster Status tested => verified
2016-08-12 10:48 bugmaster Resolution open => fixed
2016-08-26 16:23 git Note Added: 0057147
2016-09-07 14:22 git Note Added: 0057562
2016-09-07 14:49 git Note Added: 0057566
2016-12-09 16:30 aiv Status verified => closed
2016-12-09 16:38 aiv Fixed in Version => 7.1.0
2022-07-15 16:09 kgv Relationship added parent of 0033066