MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0025914Open CASCADE[OCCT] OCCT:Visualizationpublic2015-03-11 16:442017-07-20 10:46
Reporterasl 
Assigned Toasl 
PrioritynormalSeverityminor 
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version[OCCT] 6.8.0 
Target Version[OCCT] 7.4.0*Fixed in Version 
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 Filespng file icon bad_mesh_text.png (38,696 bytes) 2015-03-11 19:39
png file icon good_text.png (4,513 bytes) 2015-03-11 19:51

- Relationships

-  Notes
(0038276)
abv (manager)
2015-03-11 16:55

Alexander, do you reproduce this problem on current master or older version?
(0038286)
san (developer)
2015-03-11 19:38
edited on: 2015-03-11 19:39

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

(0038287)
san (developer)
2015-03-11 19:52

NOT reproduced without MeshVS - see good_text.png attached.
So it looks like pure MeshVS issue not related to text rendering in general...
(0038289)
abv (manager)
2015-03-11 22:45

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)
(0038290)
san (developer)
2015-03-12 10:38

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.
(0040002)
apl (developer)
2015-04-17 19:08
edited on: 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.


- 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 View Revisions
2015-03-11 17:08 san Steps to Reproduce Updated View Revisions
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 View Revisions
2015-03-11 19:49 san Steps to Reproduce Updated View Revisions
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 View Revisions
2015-04-17 19:18 abv Relationship added related to 0002935
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*


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker