View Issue Details

IDProjectCategoryView StatusLast Update
0025914Open CASCADEOCCT:Visualizationpublic2021-03-20 14:08
ReporteraslAssigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionwon't fix 
Product Version6.8.0 
Target Version7.6.0 
Summary0025914: Visualization, MeshVS - text labels are drawn behind the object
DescriptionWhen the MeshVS_Mesh is shown in the shading mode with text (MeshVS_DMF_TextDataPrs | MeshVS_DMF_Shading) all text labels are rendered as if they are always behind the shaded mesh elements.

It looks like incorrect depth values are written for text labels, or depth buffer is cleared between the text rendering and the shaded mesh rendering.
Steps To Reproduce1. To reproduce In DRAW:
pload ALL
vinit
meshfromstl s data/stl/sh1.stl
meshtext s
vsetdispmode s 34

2. Scenario that works well (MeshVS not used!):
pload ALL
box b 1 2 3
vinit
# Display the text first to follow the same sequence as in MeshVS_Mesh
vdrawtext "sample text" 2 -1 2 255 0 0 0 0 0 0 40 1
vsetdispmode 1
vdisplay b
vfit

TagsNo tags attached.
Test case number

Attached Files

  • bad_mesh_text.png (38,696 bytes)
  • good_text.png (4,513 bytes)

Activities

abv

2015-03-11 16:55

manager   ~0038276

Alexander, do you reproduce this problem on current master or older version?

san

2015-03-11 19:38

developer   ~0038286

Last edited: 2015-03-11 19:39

Just checked: reproduced with the current master (vc10 32-bits optimized build), see bad_mesh_text.png attached.

san

2015-03-11 19:39

developer  

bad_mesh_text.png (38,696 bytes)

san

2015-03-11 19:51

developer  

good_text.png (4,513 bytes)

san

2015-03-11 19:52

developer   ~0038287

NOT reproduced without MeshVS - see good_text.png attached.
So it looks like pure MeshVS issue not related to text rendering in general...

abv

2015-03-11 22:45

manager   ~0038289

I guess this might be due to different display priorities, recalling that something like that has been made as work-around against 0025732 (if I am not mistaken)

san

2015-03-12 10:38

developer   ~0038290

Display priorities do not affect the results of depth test in case if the primitives do not coincide geometrically. And after all, text rendering in general works as expected, the problem is located most likely somewhere at MeshVS level.

apl

2015-04-17 19:08

developer   ~0040002

Last edited: 2015-04-17 19:09

The text primitives have Aspect_TOST_ANNOTATION. It means that the depth test and depth writing are turned off. The text primitives will be overlapped by shaded faces, which follow them in rendering pipeline.

The order of text and face primitives is defined by MeshVS_Mesh::Compute(). This method executes primitive builders in accordance with their priority declared in "MeshVS_BuilderPriority.hxx".

For today, there are two possible options:
- Change priority of text builder. In this case the text elements will appear in front of the mesh, regardless of whether they are on the back side or in front of the mesh.
- Use another aspect Aspect_TOST_NORMAL for text. In this case the back side labels will be hidden. However, the labels located on the front might graphically intersect with the mesh.

It was decided to implement the 2nd option.

kgv

2021-03-02 15:55

developer   ~0099299

To be considered on real need.
Lets close for now as non-blocking.

Issue History

Date Modified Username Field Change
2015-03-11 16:44 asl New Issue
2015-03-11 16:44 asl Assigned To => kgv
2015-03-11 16:55 abv Note Added: 0038276
2015-03-11 17:08 san Summary Regression in the text rendering on mesh (MeshVS) => Visualization, MeshVS - Regression in the text data rendering on mesh
2015-03-11 17:08 san Description Updated
2015-03-11 17:08 san Steps to Reproduce Updated
2015-03-11 19:38 san Note Added: 0038286
2015-03-11 19:39 san File Added: bad_mesh_text.png
2015-03-11 19:39 san Note Edited: 0038286
2015-03-11 19:49 san Steps to Reproduce Updated
2015-03-11 19:51 san File Added: good_text.png
2015-03-11 19:52 san Note Added: 0038287
2015-03-11 19:53 san Assigned To kgv => asl
2015-03-11 19:53 san Status new => assigned
2015-03-11 22:45 abv Note Added: 0038289
2015-03-12 10:38 san Note Added: 0038290
2015-04-17 19:08 apl Note Added: 0040002
2015-04-17 19:09 apl Note Edited: 0040002
2015-04-27 19:25 kgv Target Version 6.9.0 => 7.1.0
2016-10-13 12:52 kgv Severity major => minor
2016-10-13 12:52 kgv Product Version => 6.8.0
2016-10-13 12:52 kgv Summary Visualization, MeshVS - Regression in the text data rendering on mesh => Visualization, MeshVS - text labels are drawn behind the object
2016-10-25 09:24 kgv Target Version 7.1.0 => 7.2.0
2017-07-20 10:46 kgv Target Version 7.2.0 => 7.4.0
2019-08-13 12:04 kgv Target Version 7.4.0 => 7.5.0
2020-09-21 17:16 kgv Target Version 7.5.0 => 7.6.0
2021-03-02 15:55 kgv Note Added: 0099299
2021-03-02 15:55 kgv Assigned To asl => bugmaster
2021-03-02 15:55 kgv Status assigned => feedback
2021-03-02 15:55 kgv Resolution open => won't fix
2021-03-02 15:55 kgv Steps to Reproduce Updated
2021-03-20 14:08 bugmaster Status feedback => closed