MantisBT - Open CASCADE
View Issue Details
0032143Open CASCADE[OCCT] OCCT:Visualizationpublic2021-02-19 14:202021-07-01 19:38
kgv 
bugmaster 
normalminor 
verifiedfixed 
[OCCT] 7.2.0 
[OCCT] 7.6.0* 
bugs/vis/bug32143
0032143: Visualization - add option excluding transparent object from sorting
OCCT 3D Viewer performs automatic sorting of semitransparent groups to be drawn on top of opaque.

In some specific cases (2D UI elements most of all) this behavior is undesired - it is necessary strictly ordering opaque and transparent groups for proper effect.

One option could be defining Graphic3d_AlphaMode_BlendUnordered mode handled in this specific way.
pload MODELING VISUALIZATION
vinit View1 -width 800 -height 600
vbackground -gradient GRAY20 GRAY80
restore [locate_data_file Ball.brep] b
vdisplay -dispMode 1 b
vfit

set dx 220; set dy 74
set logoPath "$::env(CSF_OCCTResourcePath)/DrawResources/OCC_logo.png"
box logo $dx $dy 0 -preview
vdisplay -dispMode 1 logo -topmost -2d bottomRight [expr $dx+25] 25
vtexture logo "$logoPath"
vaspects logo -alphaMode BLEND -shadingModel UNLIT

vdisplay logo -underlay
# KO - logo in Graphic3d_ZLayerId_BotOSD layer
# is drawn on TOP of 3D object from Graphic3d_ZLayerId_Default layer!
vzlayer DEFAULT -enable depthClear; # workaround sorting issue
# OK - workaround helps

No tags attached.
related to 0031278feedback bugmaster Community Visualization - display elements above transparent area 
child of 0029517closed bugmaster Open CASCADE Visualization - introduce AlphaMode property defining alpha value handling options 
child of 0027925closed bugmaster Open CASCADE Visualization - implement order-independent transparency algorithm within rasterization rendering 
Issue History
2021-02-19 14:20kgvNew Issue
2021-02-19 14:20kgvAssigned To => kgv
2021-02-19 14:20kgvRelationship addedchild of 0029517
2021-02-19 14:24kgvRelationship addedchild of 0027925
2021-02-19 14:25kgvProduct Version7.5.0 => 7.2.0
2021-03-01 12:49kgvRelationship addedrelated to 0031278
2021-03-01 15:17gitNote Added: 0099238
2021-03-01 16:37gitNote Added: 0099245
2021-03-01 17:58kgvNote Added: 0099247
2021-03-01 17:58kgvAssigned Tokgv => osa
2021-03-01 17:58kgvStatusnew => resolved
2021-03-02 07:50kgvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=24654#r24654
2021-03-02 09:51kgvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=24655#r24655
2021-03-02 10:28osaNote Added: 0099268
2021-03-02 10:28osaAssigned Toosa => bugmaster
2021-03-02 10:28osaStatusresolved => reviewed
2021-03-06 12:15bugmasterNote Added: 0099468
2021-03-06 12:15bugmasterStatusreviewed => tested
2021-03-06 12:19bugmasterTest case number => bugs/vis/bug32143
2021-03-06 12:34bugmasterChangeset attached => occt master 33425a46
2021-03-06 12:34bugmasterStatustested => verified
2021-03-06 12:34bugmasterResolutionopen => fixed
2021-03-06 13:25gitNote Added: 0099498
2021-07-01 19:38kgvRelationship addedparent of 0032469

Notes
(0099238)
git   
2021-03-01 15:17   
Branch CR32143 has been created by kgv.

SHA-1: f4727316272b12d985133fd75389385f86b1ba74


Detailed log of new commits:

Author: kgv
Date: Mon Mar 1 15:16:52 2021 +0300

    0032143: Visualization - add option excluding transparent object from sorting
    
    Added option Graphic3d_AlphaMode_MaskBlend combining Mask (no sorting)
    and Blend (enable blending with background) behavior.
(0099245)
git   
2021-03-01 16:37   
Branch CR32143 has been updated forcibly by kgv.

SHA-1: 12df1fbc7824f0399629433ac63a4fb4ecead610
(0099247)
kgv   
2021-03-01 17:58   
Patch is ready for review
- OCCT: branch CR32143.

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR32143-master-KGV/ [^]
(0099268)
osa   
2021-03-02 10:28   
The patch was reviewed
(0099468)
bugmaster   
2021-03-06 12:15   
Combination -
OCCT branch : IR-2021-03-05
master SHA - 58210e5983a7986bc4cd1bec9c0b5cb29828fda4
a87b7ddc8cb44606b91e3f37113847c3f5f50fdc
Products branch : IR-2021-03-05 SHA - b3d022cfefe721ee2ad6db68ca360345d656610b
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian80-64:
OCCT
Total CPU difference: 17744.80000000016 / 17811.87000000015 [-0.38%]
Products
Total CPU difference: 11539.9800000001 / 11543.6500000001 [-0.03%]
Windows-64-VC14:
OCCT
Total CPU difference: 19321.640625 / 19344.390625 [-0.12%]
Products
Total CPU difference: 12868.796875 / 12900.578125 [-0.25%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0099498)
git   
2021-03-06 13:25   
Branch CR32143 has been deleted by inv.

SHA-1: 12df1fbc7824f0399629433ac63a4fb4ecead610