MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0029366Open CASCADE[OCCT] OCCT:Visualizationpublic2017-12-04 15:252017-12-11 12:00
Reporterkgv 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusverifiedResolutionfixed 
PlatformOSOS Version
Product Version[OCCT] 5.2.2 
Target Version[OCCT] 7.3.0*Fixed in Version 
Summary0029366: Visualization, OpenGl_Text - artifacts when using Aspect_TODT_SHADOW/Aspect_TODT_DEKALE at different zoom level
DescriptionArtifacts occur when using Aspect_TODT_SHADOW or Aspect_TODT_DEKALE at different zoom levels - the shadow/decal changes its position.

The reason is the fixed Z shift 0.00001f specified in world coordinate system, intended to ensure that decal/shadow will be drawn behind text (avoid Z-fighting):
    case Aspect_TODT_DEKALE:
    {
      theCtx->SetColor4fv (theColorSubs);
      setupMatrix (theCtx, theTextAspect, OpenGl_Vec3 (+1.0f, +1.0f, 0.00001f));
      drawText    (theCtx, theTextAspect);
      setupMatrix (theCtx, theTextAspect, OpenGl_Vec3 (-1.0f, -1.0f, 0.00001f));
      drawText    (theCtx, theTextAspect);
      setupMatrix (theCtx, theTextAspect, OpenGl_Vec3 (-1.0f, +1.0f, 0.00001f));
      drawText    (theCtx, theTextAspect);
      setupMatrix (theCtx, theTextAspect, OpenGl_Vec3 (+1.0f, -1.0f, 0.00001f));
      drawText    (theCtx, theTextAspect);
      break;
    }
    case Aspect_TODT_SHADOW:
    {
      theCtx->SetColor4fv (theColorSubs);
      setupMatrix (theCtx, theTextAspect, OpenGl_Vec3 (+1.0f, -1.0f, 0.00001f));
      drawText    (theCtx, theTextAspect);
      break;
    }
Steps To ReproduceN/A

pload MODELING VISUALIZATION
box b 1 2 3
vclear
vinit View1
vsetdispmode 1
vdisplay b
vcamera -persp
vfit
vdrawtext t "Text"  -2d -persPos -1 1 -subColor BLUE1 -pos 0 -100 0 -color 0 1 1 -height 20 
-font Times -dispType decal
vzoom 2
vzoom 2
TagsNo tags attached.
Test case numberNot required
Attached Filespng file icon occ_text_shadow_KO.png (85,518 bytes) 2017-12-04 15:25
png file icon occ_text_shadow_OK.png (94,442 bytes) 2017-12-04 15:26

- Relationships
related to 0029346verifiedbugmaster Visualization, TKOpenGl - collect frame statistics 

-  Notes
(0072690)
git (administrator)
2017-12-04 16:31

Branch CR29366 has been created by kgv.

SHA-1: d94c97627b6ba2c82079ecc30d44a641abea87e9


Detailed log of new commits:

Author: kgv
Date: Mon Dec 4 16:29:43 2017 +0300

    0029366: Visualization, OpenGl_Text - artifacts when using Aspect_TODT_SHADOW/Aspect_TODT_DEKALE at different zoom level
    
    OpenGl_Text now applies Polygon Offset instead of Z-shift in world coordinates for drawing background.
    OpenGl_Context::SetPolygonOffset() - polygon offset state has been moved from OpenGl_Workspace to OpenGl_Context.
(0072701)
git (administrator)
2017-12-04 19:44

Branch CR29366_1 has been created by kgv.

SHA-1: 1c3696c6edcf092a6457aec8824e0015348c3b6b


Detailed log of new commits:

Author: kgv
Date: Mon Dec 4 16:29:43 2017 +0300

    0029366: Visualization, OpenGl_Text - artifacts when using Aspect_TODT_SHADOW/Aspect_TODT_DEKALE at different zoom level
    
    OpenGl_Text now applies Polygon Offset instead of Z-shift in world coordinates for drawing background.
    OpenGl_Context::SetPolygonOffset() - polygon offset state has been moved from OpenGl_Workspace to OpenGl_Context.
(0072703)
kgv (developer)
2017-12-04 19:48
edited on: 2017-12-05 10:58

Patch is ready for review.
http://jenkins-test-10.nnov.opencascade.com/view/CR29366_1-master-KGV [^]

Note that using Polygon Offset impacts text rendering performance negatively (in case of affected text styles), which is expected due to extra OpenGL calls.

(0072705)
git (administrator)
2017-12-04 20:05

Branch CR29366_1 has been updated forcibly by kgv.

SHA-1: 51e76065cacd3c05d387d86b48917c5431e4f117
(0072729)
san (developer)
2017-12-05 19:14

Branch CR29366_1 reviewed without remarks, ready for testing.
(0072730)
bugmaster (administrator)
2017-12-05 19:38

Combination -
OCCT branch : CR29366_1 SHA - 51e76065cacd3c05d387d86b48917c5431e4f117
Products branch : master SHA - 415c5096b9b013d1fad1454581bcdbe1e6090b5d
was compiled on Linux, MacOS and Windows platforms and tested on optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian70-64:
OCCT
Total CPU difference: 18374.739999999685 / 18469.379999999688 [-0.51%]
Products
Total CPU difference: 7467.210000000008 / 7457.550000000003 [+0.13%]
Windows-64-VC10:
OCCT
Total CPU difference: 17961.26873559861 / 17828.96428749855 [+0.74%]
Products
Total CPU difference: 8014.161372499974 / 8009.6685436999705 [+0.06%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0072899)
git (administrator)
2017-12-11 12:00

Branch CR29366 has been deleted by kgv.

SHA-1: d94c97627b6ba2c82079ecc30d44a641abea87e9
(0072900)
git (administrator)
2017-12-11 12:00

Branch CR29366_1 has been deleted by kgv.

SHA-1: 51e76065cacd3c05d387d86b48917c5431e4f117

- Related Changesets
occt: master 8d1a539c
Timestamp: 2017-12-04 13:29:43
Author: kgv
Committer: bugmaster
Details ] Diff ]
0029366: Visualization, OpenGl_Text - artifacts when using Aspect_TODT_SHADOW/Aspect_TODT_DEKALE at different zoom level

OpenGl_Text now applies Polygon Offset instead of Z-shift in world coordinates for drawing background.
OpenGl_Context::SetPolygonOffset() - polygon offset state has been moved from OpenGl_Workspace to OpenGl_Context.
mod - src/OpenGl/OpenGl_Context.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_Context.hxx Diff ] File ]
mod - src/OpenGl/OpenGl_Layer.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_Text.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_Workspace.cxx Diff ] File ]
mod - src/OpenGl/OpenGl_Workspace.hxx Diff ] File ]

- Issue History
Date Modified Username Field Change
2017-12-04 15:25 kgv New Issue
2017-12-04 15:25 kgv Assigned To => kgv
2017-12-04 15:25 kgv File Added: occ_text_shadow_KO.png
2017-12-04 15:26 kgv File Added: occ_text_shadow_OK.png
2017-12-04 15:26 kgv Relationship added related to 0029346
2017-12-04 16:31 git Note Added: 0072690
2017-12-04 19:44 git Note Added: 0072701
2017-12-04 19:48 kgv Note Added: 0072703
2017-12-04 19:48 kgv Assigned To kgv => san
2017-12-04 19:48 kgv Status new => resolved
2017-12-04 20:05 git Note Added: 0072705
2017-12-05 09:53 kgv Steps to Reproduce Updated View Revisions
2017-12-05 10:10 kgv Product Version 7.3.0* => 5.2.2
2017-12-05 10:58 kgv Note Edited: 0072703 View Revisions
2017-12-05 19:14 san Note Added: 0072729
2017-12-05 19:14 san Assigned To san => bugmaster
2017-12-05 19:14 san Status resolved => reviewed
2017-12-05 19:38 bugmaster Note Added: 0072730
2017-12-05 19:38 bugmaster Status reviewed => tested
2017-12-05 19:39 bugmaster Test case number => Not required
2017-12-08 23:00 bugmaster Changeset attached => occt master 8d1a539c
2017-12-08 23:00 bugmaster Status tested => verified
2017-12-08 23:00 bugmaster Resolution open => fixed
2017-12-11 12:00 git Note Added: 0072899
2017-12-11 12:00 git Note Added: 0072900


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker