View Issue Details

IDProjectCategoryView StatusLast Update
0024521Open CASCADEOCCT:Visualizationpublic2021-03-01 23:32
Reporterkgv Assigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
PlatformAOSL 
Product Version6.3.1 
Target Version6.8.0Fixed in Version6.8.0 
Summary0024521: Visualization - automatic back face culling is not turned on for Solids packed into compound
DescriptionAutomatic back face culling (V3d_View::SetBackFacingModel (Visual3d_TOBM_AUTOMATIC)) does not work for Solids packed into compound (StdPrs_ShadedShape::Add()).
Additional information
and documentation updates
Back faces culling reduces rendered number of triangles (improve performance) and eliminates artifacts at shape boundaries. However this option might be used only for solid objects, where interior is actually should not be visible from any point of view. Automatic back-face culling mechanism is turned on by default, controlled by V3d_View::SetBackFacingModel().

The following issues have been fixed in StdPrs_ToolShadedShape::IsClosed() (used for definition of back face culling in Shaing Aspect):
- disable culling for free closed Shells (not inside the Solid) since reversed orientation of free Shell is valid case
- enable culling for Solids packed into compound
- ignore Solids with incomplete triangulation

Back face culling is now turned off at TKOpenGl level in the following cases:
- clipping/capping planes are in effect
- for translucent objects and with hatching presentation style
TagsNo tags attached.
Test case numberNot needed

Attached Files

  • cull_back.png (2,847 bytes)
  • cull_off.png (2,902 bytes)
  • box_old.png (34,364 bytes)
  • bug_new.png (33,934 bytes)

Relationships

related to 0023191 closedbugmaster Open CASCADE Visualization - small objects displayed with visual artifacts 
parent of 0032188 closedbugmaster Open CASCADE Visualization, Graphic3d_Aspects - define backface culling using Graphic3d_TypeOfBackfacingModel 
related to 0024531 closedbugmaster Open CASCADE Check shape does not report invalid orientation of Shells within Solid 
related to 0023235 closedPawel Community The inner side of an AIS_Shape not rendered when activated clipping plane 
related to 0024672 closedabv Open CASCADE Visualization - AIS_TexturedShape does not activate back face culling aspect 
related to 0024706 closedbugmaster Open CASCADE Solids produced by BOP do not have flag Closed set in shells 
related to 0025134 assignedmsv Open CASCADE Extended mode for checkshape command 
related to 0025687 closedbugmaster Open CASCADE Visualization, XCAF - eliminate visual artifacts at the edges of faces 

Activities

kgv

2014-01-09 12:01

developer   ~0027415

Patch is ready for review in CR24521 branch.

In addition to described problem (culling is not turned on for solids in compound) this patch also contains back-face culling disabling when clipping plane is in effect.

kgv

2014-01-09 14:47

developer  

cull_back.png (2,847 bytes)

kgv

2014-01-09 14:48

developer  

cull_off.png (2,902 bytes)

apl

2014-01-09 15:04

developer   ~0027419

Dear bugmaster,

The branch CR24521 is reviewed. No remarks.

Please test.

mkv

2014-01-13 14:32

tester   ~0027452

Dear BugMaster,

Branch CR24521 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: e70167bb9506e7fa339d5ecbe8b8f4220867f819

Number of compiler warnings:

occt component :
Linux: 55 (55 on master)
Windows: 1 (1 on master)

products component :
Linux: 20 (20 on master)
Windows: 2 (2 on master)

Regressions/Differences:
bugs vis(004) bug23227: FAILED
http://occt-tests/CR24521-master-occt/Debian60-64/bugs/vis/bug23227.html
http://occt-tests/CR24521-master-occt/Windows-32-VC9/bugs/vis/bug23227.html

Testing cases:


Testing on Linux:
Total MEMORY difference: 358038616 / 357038992
Total CPU difference: 43800.63000000024 / 42990.21999999986

Testing on Windows:
Total MEMORY difference: 413653100 / 412391816
Total CPU difference: 29865.53125 / 32600.59375

There are not differences in images found by testdiff.
http://occt-tests/CR24521-master-occt/Windows-32-VC9/diff-Windows-32-VC9.html
http://occt-tests/CR24521-master-occt/Debian60-64/diff-Debian60-64.html
IMAGE mesh standard_shading X1: X1.png differs
IMAGE mesh standard_shading T8: T8.png differs
IMAGE mesh standard_shading X2: X2.png differs
IMAGE bugs vis bug288_5: bug288_5_Driver1_Viewer1_View1.png differs
IMAGE bugs vis bug24224: bug24224_Driver1_Viewer1_View1.png differs

kgv

2014-01-13 16:27

developer   ~0027453

Last edited: 2014-01-13 16:56

The following issues have been observed by tests:
- Automatic culling should probably been disabled when Solid contains not triangulated faces (mesh standard_shading X1/X2).
- Disable culling for both capping and culling (capping might be specified with translucent properties, bugs vis bug24224).
- Disable culling for Shading aspect with translucent properties (caf presentation F3/F4).

Test case mesh/standard_shading/T8 produces broken shape (Shell within Solid has wrong orientation which can be fixed by fixshape, but positive output of checkshape might be considered as additional bug).

bugs/vis/bug288_5 differs due to z-fit issues (this test case is fixed by #0024001)

kgv

2014-01-13 17:23

developer   ~0027454

Updated patch is ready for review in CR24521_1 branch (CR24521 contains history).

apl

2014-01-14 07:00

developer   ~0027455

Dear Bugmaster.

The branch CR24521_1 is reviewed,

please test.

mkv

2014-01-14 11:46

tester   ~0027465

Dear BugMaster,

Branch CR24521_1 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: b11dd0633b6afc6901b64d1a0bf43b5659065fac

Number of compiler warnings:

occt component :
Linux: 54 (55 on master)
Windows: 1 (1 on master)

products component :
Linux: 20 (20 on master)
Windows: 2 (2 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 358085764 / 357062448
Total CPU difference: 41731.36999999996 / 42989.819999999854

Testing on Windows:
Total MEMORY difference: 413540996 / 412457984
Total CPU difference: 31390.5 / 32601.609375

There are following differences in images found by testdiff.
http://occt-tests/CR24521-1-master-occt/Debian60-64/diff-Debian60-64.html
http://occt-tests/CR24521-1-master-occt/Windows-32-VC9/diff-Windows-32-VC9.html
IMAGE mesh standard_shading X1: X1.png differs
IMAGE mesh standard_shading T8: T8.png differs
IMAGE bugs vis bug288_5: bug288_5_Driver1_Viewer1_View1.png differs

kgv

2014-01-16 09:46

developer  

box_old.png (34,364 bytes)

kgv

2014-01-16 09:46

developer  

bug_new.png (33,934 bytes)

Related Changesets

occt: master 3b1817a9

2014-01-16 17:09:20

kgv


Committer: bugmaster Details Diff
0024521: Visualization - automatic back face culling is not turned on for Solids packed into compound

StdPrs_ToolShadedShape::IsClosed():
- return true if shape is closed Solid (NOT just free closed Shell)
- accept compound of closed Solids as well
- ignore Solids with incomplete triangulation

TKOpenGl, automatically disable back face culling when:
- clipping/capping planes are in effect
- for translucent objects

Update bug23227 test case (now back faces are clipped).

OpenGl_Workspace::AspectFace() - disable culling in case of hatched style
Affected Issues
0024521
mod - src/InterfaceGraphic/InterfaceGraphic_telem.hxx Diff File
mod - src/OpenGl/OpenGl_Clipping.cxx Diff File
mod - src/OpenGl/OpenGl_Clipping.hxx Diff File
mod - src/OpenGl/OpenGl_Workspace.cxx Diff File
mod - src/OpenGl/OpenGl_Workspace.hxx Diff File
mod - src/OpenGl/OpenGl_Workspace_5.cxx Diff File
mod - src/StdPrs/StdPrs_ShadedShape.cxx Diff File
mod - src/StdPrs/StdPrs_ToolShadedShape.cdl Diff File
mod - src/StdPrs/StdPrs_ToolShadedShape.cxx Diff File
mod - tests/bugs/vis/bug23227 Diff File

Issue History

Date Modified Username Field Change
2014-01-09 11:13 kgv New Issue
2014-01-09 11:13 kgv Assigned To => san
2014-01-09 11:14 kgv Relationship added related to 0023191
2014-01-09 11:59 kgv Assigned To san => kgv
2014-01-09 11:59 kgv Status new => assigned
2014-01-09 12:01 kgv Note Added: 0027415
2014-01-09 12:01 kgv Assigned To kgv => apl
2014-01-09 12:01 kgv Status assigned => resolved
2014-01-09 14:47 kgv File Added: cull_back.png
2014-01-09 14:48 kgv File Added: cull_off.png
2014-01-09 15:04 apl Note Added: 0027419
2014-01-09 15:04 apl Assigned To apl => bugmaster
2014-01-09 15:04 apl Status resolved => reviewed
2014-01-10 10:42 mkv Assigned To bugmaster => mkv
2014-01-13 14:32 mkv Note Added: 0027452
2014-01-13 14:33 mkv Assigned To mkv => kgv
2014-01-13 14:33 mkv Status reviewed => assigned
2014-01-13 16:27 kgv Note Added: 0027453
2014-01-13 16:56 kgv Note Edited: 0027453
2014-01-13 17:23 kgv Note Added: 0027454
2014-01-13 17:23 kgv Assigned To kgv => apl
2014-01-13 17:23 kgv Status assigned => resolved
2014-01-14 07:00 apl Note Added: 0027455
2014-01-14 07:00 apl Assigned To apl => bugmaster
2014-01-14 07:00 apl Status resolved => reviewed
2014-01-14 07:26 mkv Assigned To bugmaster => mkv
2014-01-14 11:46 mkv Note Added: 0027465
2014-01-14 11:46 mkv Test case number => Not needed
2014-01-14 11:46 mkv Assigned To mkv => bugmaster
2014-01-14 11:46 mkv Status reviewed => tested
2014-01-15 11:34 kgv Relationship added related to 0024531
2014-01-16 09:46 kgv File Added: box_old.png
2014-01-16 09:46 kgv File Added: bug_new.png
2014-01-16 10:17 kgv Additional Information Updated
2014-01-21 11:22 bugmaster Changeset attached => occt master 3b1817a9
2014-01-21 11:22 bugmaster Status tested => verified
2014-01-21 11:22 bugmaster Resolution open => fixed
2014-02-17 15:05 kgv Relationship added related to 0023235
2014-02-28 10:10 kgv Relationship added related to 0024672
2014-03-09 10:26 abv Relationship added related to 0024706
2014-04-04 12:06 abv Target Version 6.7.1 => 6.8.0
2014-08-15 13:16 abv Relationship added related to 0025134
2014-11-11 12:46 aiv Fixed in Version => 6.8.0
2014-11-11 12:57 aiv Status verified => closed
2015-01-06 16:16 abv Relationship added related to 0025687
2021-03-01 23:32 kgv Relationship added parent of 0032188