[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vtk-developers
Subject:    Re: [vtk-developers] [vtkusers] VTK 6.3 OpenGL2 - vtkTextActor blurred text when used with vtkFixedP
From:       Aashish Chaudhary <aashish.chaudhary () kitware ! com>
Date:       2015-11-23 17:16:16
Message-ID: CAEw35Z97tN6phqZzn39B1t93+7nnq==dt1MWC=C9OmYOHXTixQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


I believe that might be because of push and pop attributes in older GL. I
updated the the mantis (I hope I did it right -:)).

Thanks Simon.

On Mon, Nov 23, 2015 at 4:32 AM, Simon ESNEAULT <simon.esneault@gmail.com>
wrote:

> Hello,
>
> Thanks for merging this.
>
> As a side note, I believe the same is true for the old backend, because
> the function vtkOpenGLRayCastImageDisplayHelper::RenderTextureInternal(
> ... ) does also modify the blend state without restoring it. But somehow,
> the 2D texture are correctly drawn with the old backend ...
>
> Mantis bugs :
> http://www.vtk.org/Bug/view.php?id=15838
> and
> http://www.vtk.org/Bug/view.php?id=15812
>
> can now be closed :)
>
> Thanks
> Simon
>
> 2015-11-21 2:39 GMT+01:00 Aashish Chaudhary <aashish.chaudhary@kitware.com
> >:
>
>> Simon,
>>
>> You branch has been merged:
>> https://gitlab.kitware.com/vtk/vtk/merge_requests/932. Thank for the
>> patch.
>>
>> - Aashish
>>
>> On Fri, Nov 20, 2015 at 9:37 AM, Ken Martin <ken.martin@kitware.com>
>> wrote:
>>
>>> That is the standard blend save/restore code so I think that should do
>>> the trick. Thanks for digging into it.
>>>
>>> On Fri, Nov 20, 2015 at 8:32 AM, Aashish Chaudhary <
>>> aashish.chaudhary@kitware.com> wrote:
>>>
>>>> Hi Simon,
>>>>
>>>> Thanks! I am okay with merging this change but in general restoring to
>>>> previous state is tricky as for that you need to know the previous state. I
>>>> think restoring to a default state (which you did) makes more sense.
>>>> Although in VTK we don't have clear guideline on this. I am reviewing your
>>>> changes..
>>>>
>>>>
>>>> On Fri, Nov 20, 2015 at 8:26 AM, Simon ESNEAULT <
>>>> simon.esneault@gmail.com> wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> I've created a merge request for this bug :
>>>>> https://gitlab.kitware.com/vtk/vtk/merge_requests/932
>>>>>
>>>>> The class vtkOpenGLRayCastImageDisplayHelper is changing OpenGL blend
>>>>> state, but never restores the state as it was before, resulting in some
>>>>> incorrect blend later.
>>>>> I don't know if it's the correct fix, but it certainly look like the
>>>>> reason for this bug, and it solve the bug here.
>>>>> Can someone review this merge ?
>>>>>
>>>>> Regards
>>>>> Simon
>>>>>
>>>>>
>>>>> 2015-11-18 9:38 GMT+01:00 Simon ESNEAULT <simon.esneault@gmail.com>:
>>>>>
>>>>>> Morning !
>>>>>>
>>>>>> http://www.vtk.org/Bug/view.php?id=15838
>>>>>>
>>>>>> Let me know if there is anything I can do to solve this.
>>>>>>
>>>>>> Simon
>>>>>>
>>>>>> 2015-11-17 16:50 GMT+01:00 Aashish Chaudhary <
>>>>>> aashish.chaudhary@kitware.com>:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Tue, Nov 17, 2015 at 3:36 AM, Simon ESNEAULT <
>>>>>>> simon.esneault@gmail.com> wrote:
>>>>>>>
>>>>>>>> Dear Aashish,
>>>>>>>>
>>>>>>>> Yes the root cause is probably located in vtkTexturedActor2D, or in
>>>>>>>> vtkOpenGLTexture::Load( vtkRenderer* ) which looks like the responsible
>>>>>>>> class for loading the texture.
>>>>>>>> Shall I fill a bug ?
>>>>>>>>
>>>>>>>
>>>>>>> Yes, please.
>>>>>>>
>>>>>>> - Aashish
>>>>>>>
>>>>>>>
>>>>>>>> Thanks
>>>>>>>> Simon
>>>>>>>>
>>>>>>>> 2015-11-16 17:49 GMT+01:00 Aashish Chaudhary <
>>>>>>>> aashish.chaudhary@kitware.com>:
>>>>>>>>
>>>>>>>>> I see so its not just related to volume rendering and it seems to
>>>>>>>>> be a vtkTextActor2D problem? In that can probably Ken / David Lonie wants
>>>>>>>>> to take a look at it. Nonetheless, we will follow up on this bug.
>>>>>>>>>
>>>>>>>>> - Aashish
>>>>>>>>>
>>>>>>>>> On Mon, Nov 16, 2015 at 11:12 AM, Simon ESNEAULT <
>>>>>>>>> simon.esneault@gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hello Aashish,
>>>>>>>>>>
>>>>>>>>>> Thanks !
>>>>>>>>>> After doing some test, I realized the patch I've just sent is not
>>>>>>>>>> the correct fix at all, because the text is not rendered properly when we
>>>>>>>>>> don't use a vtkFixedPointVolumeRayCastMapper anymore.
>>>>>>>>>>
>>>>>>>>>> I believe the problem is probably larger than this and probably
>>>>>>>>>> has nothing to do with the freetype text generation, but more with the
>>>>>>>>>> vtkTexturedActor2D rendering part used together with a
>>>>>>>>>> vtkFixedPointVolumeRayCastMapper on the new rendering backend, when the
>>>>>>>>>> texture has some transparent pixel in it ...
>>>>>>>>>>
>>>>>>>>>> Attached there is a new example that demonstrate that a
>>>>>>>>>> vtkTextActor AND a vtkTexturedButtonRepresentation2D are not correctly
>>>>>>>>>> drawn in that case :
>>>>>>>>>> - OpenGL1 backend
>>>>>>>>>> <http://picpaste.com/pics/OGL1-Texture-okay.1447690100.png> : Transparent
>>>>>>>>>> pixel in Texture are correctly drawn
>>>>>>>>>> - OpenGL2 backend
>>>>>>>>>> <http://picpaste.com/pics/OGL2-Texture-not-okay.1447690272.png>
>>>>>>>>>> : Transparent pixel in Texture are not correctly drawn (clamped to white ?)
>>>>>>>>>>
>>>>>>>>>> The example is more simple than the previous one and does not
>>>>>>>>>> need any additional data.
>>>>>>>>>>
>>>>>>>>>> Hope that helps !
>>>>>>>>>> -Simon
>>>>>>>>>>
>>>>>>>>>> 2015-11-16 16:11 GMT+01:00 Aashish Chaudhary <
>>>>>>>>>> aashish.chaudhary@kitware.com>:
>>>>>>>>>>
>>>>>>>>>>> Simon,
>>>>>>>>>>>
>>>>>>>>>>> Thanks for the report. I will follow up with other developers on
>>>>>>>>>>> this bug.
>>>>>>>>>>>
>>>>>>>>>>> - Aashish
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Mon, Nov 16, 2015 at 6:08 AM, Simon ESNEAULT <
>>>>>>>>>>> simon.esneault@gmail.com> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hello,
>>>>>>>>>>>>
>>>>>>>>>>>> Trying to solve this problem, I found out that if one call
>>>>>>>>>>>> "vtkFreeTypeTools::GetInstance()->DebugTexturesOn();" before to render a
>>>>>>>>>>>> string with a vtkTextActor, the text is properly rendered with a yellow dot
>>>>>>>>>>>> at the anchor point, and with a transparent gray background.
>>>>>>>>>>>> - DebugTexturesOn :
>>>>>>>>>>>> http://picpaste.com/pics/Blurred.1447668943.PNG
>>>>>>>>>>>> - DebugTexturesOff :
>>>>>>>>>>>> http://picpaste.com/pics/Not-Blurred.1447669009.PNG
>>>>>>>>>>>>
>>>>>>>>>>>> Now digging into the code in vtkFreeTypeTools.cxx, I suspect
>>>>>>>>>>>> this is a blending problem. When we activate Texture Debugging, a gray
>>>>>>>>>>>> background is first drawn, and after that in the method RenderCharacter(
>>>>>>>>>>>> ... ) line 1887; we either blend the rendered text with the background or
>>>>>>>>>>>> not.
>>>>>>>>>>>>
>>>>>>>>>>>> Attached is a diff file that solves the problem for me. I do
>>>>>>>>>>>> not really understand why, so maybe a developer with more VTK's knowledge
>>>>>>>>>>>> can integrate this properly :)
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks,
>>>>>>>>>>>> Simon
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> 2015-11-13 16:43 GMT+01:00 Simon ESNEAULT <
>>>>>>>>>>>> simon.esneault@gmail.com>:
>>>>>>>>>>>>
>>>>>>>>>>>>> Hi All,
>>>>>>>>>>>>>
>>>>>>>>>>>>> All vtkTextActor are rendered blurred when using with
>>>>>>>>>>>>> vtkFixedPointVolumeRayCastMapper in the same renderer in vtk 6.3 with the
>>>>>>>>>>>>> new rendering backend.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Here are some snapshots :
>>>>>>>>>>>>>  - OpenGL1
>>>>>>>>>>>>> <http://picpaste.com/pics/OGL1-not-blurred.1447428990.png>
>>>>>>>>>>>>>  - OpenGL2
>>>>>>>>>>>>> <http://picpaste.com/pics/OGL2-blurred.1447429027.png>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Attached some code that reproduces the problem, to be used
>>>>>>>>>>>>> with this
>>>>>>>>>>>>> <https://www.dropbox.com/s/ptqwi0ebv75kt35/volume.zip>
>>>>>>>>>>>>> volume. Visible on OSX and Windows to our knowledge, probably on more OS.
>>>>>>>>>>>>>
>>>>>>>>>>>>> The text is rendered properly when used with the old backend
>>>>>>>>>>>>> or when using a vtkGPUVolumeRayCastMapper instead of
>>>>>>>>>>>>> the vtkFixedPointVolumeRayCastMapper.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Shall I feel a bug, is this a known issue ?
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thanks,
>>>>>>>>>>>>> Simon
>>>>>>>>>>>>>
>>>>>>>>>>>>> --
>>>>>>>>>>>>>
>>>>>>>>>>>>> ------------------------------------------------------------------
>>>>>>>>>>>>> Simon Esneault
>>>>>>>>>>>>> Rennes, France
>>>>>>>>>>>>>
>>>>>>>>>>>>> ------------------------------------------------------------------
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> --
>>>>>>>>>>>>
>>>>>>>>>>>> ------------------------------------------------------------------
>>>>>>>>>>>> Simon Esneault
>>>>>>>>>>>> Rennes, France
>>>>>>>>>>>>
>>>>>>>>>>>> ------------------------------------------------------------------
>>>>>>>>>>>>
>>>>>>>>>>>> _______________________________________________
>>>>>>>>>>>> Powered by www.kitware.com
>>>>>>>>>>>>
>>>>>>>>>>>> Visit other Kitware open-source projects at
>>>>>>>>>>>> http://www.kitware.com/opensource/opensource.html
>>>>>>>>>>>>
>>>>>>>>>>>> Please keep messages on-topic and check the VTK FAQ at:
>>>>>>>>>>>> http://www.vtk.org/Wiki/VTK_FAQ
>>>>>>>>>>>>
>>>>>>>>>>>> Search the list archives at:
>>>>>>>>>>>> http://markmail.org/search/?q=vtkusers
>>>>>>>>>>>>
>>>>>>>>>>>> Follow this link to subscribe/unsubscribe:
>>>>>>>>>>>> http://public.kitware.com/mailman/listinfo/vtkusers
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> *| Aashish Chaudhary | Technical Leader         | Kitware Inc.
>>>>>>>>>>>           *
>>>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html
>>>>>>>>>>> <http://www.kitware.com/company/team/chaudhary.html>*
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> ------------------------------------------------------------------
>>>>>>>>>> Simon Esneault
>>>>>>>>>> Rennes, France
>>>>>>>>>> ------------------------------------------------------------------
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> *| Aashish Chaudhary | Technical Leader         | Kitware Inc.
>>>>>>>>>         *
>>>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html
>>>>>>>>> <http://www.kitware.com/company/team/chaudhary.html>*
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> ------------------------------------------------------------------
>>>>>>>> Simon Esneault
>>>>>>>> Rennes, France
>>>>>>>> ------------------------------------------------------------------
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> *| Aashish Chaudhary | Technical Leader         | Kitware Inc.
>>>>>>>       *
>>>>>>> *| http://www.kitware.com/company/team/chaudhary.html
>>>>>>> <http://www.kitware.com/company/team/chaudhary.html>*
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> ------------------------------------------------------------------
>>>>>> Simon Esneault
>>>>>> Rennes, France
>>>>>> ------------------------------------------------------------------
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> ------------------------------------------------------------------
>>>>> Simon Esneault
>>>>> Rennes, France
>>>>> ------------------------------------------------------------------
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>>
>>>>
>>>> *| Aashish Chaudhary | Technical Leader         | Kitware Inc.
>>>>   *
>>>> *| http://www.kitware.com/company/team/chaudhary.html
>>>> <http://www.kitware.com/company/team/chaudhary.html>*
>>>>
>>>> _______________________________________________
>>>> Powered by www.kitware.com
>>>>
>>>> Visit other Kitware open-source projects at
>>>> http://www.kitware.com/opensource/opensource.html
>>>>
>>>> Search the list archives at:
>>>> http://markmail.org/search/?q=vtk-developers
>>>>
>>>> Follow this link to subscribe/unsubscribe:
>>>> http://public.kitware.com/mailman/listinfo/vtk-developers
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Ken Martin PhD
>>> Chairman & CFO
>>> Kitware Inc.
>>> 28 Corporate Drive
>>> Clifton Park NY 12065
>>> 518 371 3971
>>>
>>> This communication, including all attachments, contains confidential and
>>> legally privileged information, and it is intended only for the use of the
>>> addressee.  Access to this email by anyone else is unauthorized. If you are
>>> not the intended recipient, any disclosure, copying, distribution or any
>>> action taken in reliance on it is prohibited and may be unlawful. If you
>>> received this communication in error please notify us immediately and
>>> destroy the original message.  Thank you.
>>>
>>
>>
>>
>> --
>>
>>
>>
>> *| Aashish Chaudhary | Technical Leader         | Kitware Inc.
>> *
>> *| http://www.kitware.com/company/team/chaudhary.html
>> <http://www.kitware.com/company/team/chaudhary.html>*
>>
>
>
>
> --
> ------------------------------------------------------------------
> Simon Esneault
> Rennes, France
> ------------------------------------------------------------------
>



-- 



*| Aashish Chaudhary | Technical Leader         | Kitware Inc.            *
*| http://www.kitware.com/company/team/chaudhary.html
<http://www.kitware.com/company/team/chaudhary.html>*

[Attachment #5 (text/html)]

<div dir="ltr">I believe that might be because of push and pop attributes in older \
GL. I updated the the mantis (I hope I did it right -:)).  <div><br></div><div>Thanks \
Simon.  </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov \
23, 2015 at 4:32 AM, Simon ESNEAULT <span dir="ltr">&lt;<a \
href="mailto:simon.esneault@gmail.com" \
target="_blank">simon.esneault@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">Hello,<br><br>Thanks for merging \
this.<br><br>As a side note, I believe the same is true for the old backend, because \
the function vtkOpenGLRayCastImageDisplayHelper::RenderTextureInternal(   ... ) does \
also modify the blend state without restoring it. But somehow, the 2D texture are \
correctly drawn with the old backend ...<br><br>Mantis bugs :<br><a \
href="http://www.vtk.org/Bug/view.php?id=15838" \
target="_blank">http://www.vtk.org/Bug/view.php?id=15838</a><br><div>and  \
</div><div><a href="http://www.vtk.org/Bug/view.php?id=15812" \
target="_blank">http://www.vtk.org/Bug/view.php?id=15812</a><br></div><div><br></div><div>can \
now be closed :)<br><br>Thanks</div><span class="HOEnZb"><font \
color="#888888"><div>Simon</div></font></span></div><div class="HOEnZb"><div \
class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2015-11-21 2:39 \
GMT+01:00 Aashish Chaudhary <span dir="ltr">&lt;<a \
href="mailto:aashish.chaudhary@kitware.com" \
target="_blank">aashish.chaudhary@kitware.com</a>&gt;</span>:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">Simon,  <div><br></div><div>You branch has \
been merged:  <a href="https://gitlab.kitware.com/vtk/vtk/merge_requests/932" \
target="_blank">https://gitlab.kitware.com/vtk/vtk/merge_requests/932</a>. Thank for \
the patch.  </div><span><font color="#888888"><div><br></div><div>- \
Aashish</div></font></span></div><div><div><div class="gmail_extra"><br><div \
class="gmail_quote">On Fri, Nov 20, 2015 at 9:37 AM, Ken Martin <span \
dir="ltr">&lt;<a href="mailto:ken.martin@kitware.com" \
target="_blank">ken.martin@kitware.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">That is the standard blend save/restore code \
so I think that should do the trick. Thanks for digging into it.</div><div \
class="gmail_extra"><br><div class="gmail_quote"><span>On Fri, Nov 20, 2015 at 8:32 \
AM, Aashish Chaudhary <span dir="ltr">&lt;<a \
href="mailto:aashish.chaudhary@kitware.com" \
target="_blank">aashish.chaudhary@kitware.com</a>&gt;</span> \
wrote:<br></span><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hi Simon,  \
<div><br></div><div>Thanks! I am okay with merging this change but in general \
restoring to previous state is tricky as for that you need to know the previous \
state. I think restoring to a default state (which you did) makes more sense. \
Although in VTK we don&#39;t have clear guideline on this. I am reviewing your \
changes..</div><div><br></div></div><div class="gmail_extra"><br><div \
class="gmail_quote">On Fri, Nov 20, 2015 at 8:26 AM, Simon ESNEAULT <span \
dir="ltr">&lt;<a href="mailto:simon.esneault@gmail.com" \
target="_blank">simon.esneault@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">Hello,<br><br>I&#39;ve created a merge request \
for this bug :  <br><a href="https://gitlab.kitware.com/vtk/vtk/merge_requests/932" \
target="_blank">https://gitlab.kitware.com/vtk/vtk/merge_requests/932</a><br><br>The \
class  vtkOpenGLRayCastImageDisplayHelper is changing OpenGL blend state, but never \
restores the state as it was before, resulting in some incorrect blend later.<br>I \
don&#39;t know if it&#39;s the correct fix, but it certainly look like the reason for \
this bug, and it solve the bug here.<br>Can someone review this merge \
?<br><br>Regards<span><font \
color="#888888"><br>Simon<br><br></font></span></div><div><div><div \
class="gmail_extra"><br><div class="gmail_quote">2015-11-18 9:38 GMT+01:00 Simon \
ESNEAULT <span dir="ltr">&lt;<a href="mailto:simon.esneault@gmail.com" \
target="_blank">simon.esneault@gmail.com</a>&gt;</span>:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">Morning !<br><br><a \
href="http://www.vtk.org/Bug/view.php?id=15838" \
target="_blank">http://www.vtk.org/Bug/view.php?id=15838</a><br><br>Let me know if \
there is anything I can do to solve this.<span><font \
color="#888888"><br><br>Simon</font></span></div><div><div><div \
class="gmail_extra"><br><div class="gmail_quote">2015-11-17 16:50 GMT+01:00 Aashish \
Chaudhary <span dir="ltr">&lt;<a href="mailto:aashish.chaudhary@kitware.com" \
target="_blank">aashish.chaudhary@kitware.com</a>&gt;</span>:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div \
class="gmail_quote"><span>On Tue, Nov 17, 2015 at 3:36 AM, Simon ESNEAULT <span \
dir="ltr">&lt;<a href="mailto:simon.esneault@gmail.com" \
target="_blank">simon.esneault@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">Dear Aashish,<br><br>Yes the root cause is \
probably located in vtkTexturedActor2D, or in vtkOpenGLTexture::Load( vtkRenderer* ) \
which looks like the responsible class for loading the texture.<br>Shall I fill a bug \
?<br></div></blockquote><div><br></div></span><div>Yes, please.  </div><span><font \
color="#888888"><div><br></div><div>- Aashish</div></font></span><div><div><div>  \
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">Thanks<span><font \
color="#888888"><br>Simon</font></span></div><div><div><div \
class="gmail_extra"><br><div class="gmail_quote">2015-11-16 17:49 GMT+01:00 Aashish \
Chaudhary <span dir="ltr">&lt;<a href="mailto:aashish.chaudhary@kitware.com" \
target="_blank">aashish.chaudhary@kitware.com</a>&gt;</span>:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">I see so its not just related to volume \
rendering and it seems to be a vtkTextActor2D problem? In that can probably Ken / \
David Lonie wants to take a look at it. Nonetheless, we will follow up on this bug.  \
<span><font color="#888888"><div><br></div><div>- \
Aashish</div></font></span></div><div><div><div class="gmail_extra"><br><div \
class="gmail_quote">On Mon, Nov 16, 2015 at 11:12 AM, Simon ESNEAULT <span \
dir="ltr">&lt;<a href="mailto:simon.esneault@gmail.com" \
target="_blank">simon.esneault@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">Hello Aashish,<br><br>Thanks !<br>After doing \
some test, I realized the patch I&#39;ve just sent is not the correct fix at all, \
because the text is not rendered properly when we don&#39;t use a \
vtkFixedPointVolumeRayCastMapper anymore.<br><br>I believe the problem is probably \
larger than this and probably has nothing to do with the freetype text generation, \
but more with the vtkTexturedActor2D rendering part used together with a \
vtkFixedPointVolumeRayCastMapper on the new rendering backend, when the texture has \
some transparent pixel in it ...<br><br>Attached there is a new example that \
demonstrate that a vtkTextActor AND a  vtkTexturedButtonRepresentation2D are not \
correctly drawn in that case :<br>- <a \
href="http://picpaste.com/pics/OGL1-Texture-okay.1447690100.png" \
target="_blank">OpenGL1 backend</a>  :  Transparent pixel in Texture are correctly \
drawn<div>- <a href="http://picpaste.com/pics/OGL2-Texture-not-okay.1447690272.png" \
target="_blank">OpenGL2 backend</a> : Transparent pixel in Texture are not correctly \
drawn (clamped to white ?)<br><br></div><div>The example is more simple than the \
previous one and does not need any additional data.<br><br>Hope that helps \
!<span><font color="#888888"><br>-Simon</font></span></div></div><div><div><div \
class="gmail_extra"><br><div class="gmail_quote">2015-11-16 16:11 GMT+01:00 Aashish \
Chaudhary <span dir="ltr">&lt;<a href="mailto:aashish.chaudhary@kitware.com" \
target="_blank">aashish.chaudhary@kitware.com</a>&gt;</span>:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">Simon,  <div><br></div><div>Thanks for the \
report. I will follow up with other developers on this bug.  \
</div><div><br></div><div>- Aashish</div><div><br><div class="gmail_extra"><br><div \
class="gmail_quote"><div><div>On Mon, Nov 16, 2015 at 6:08 AM, Simon ESNEAULT <span \
dir="ltr">&lt;<a href="mailto:simon.esneault@gmail.com" \
target="_blank">simon.esneault@gmail.com</a>&gt;</span> \
wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div \
dir="ltr">Hello,<br><br>Trying to solve this problem, I found out that if one call \
&quot;vtkFreeTypeTools::GetInstance()-&gt;DebugTexturesOn();&quot; before to render a \
string with a vtkTextActor, the text is properly rendered with a yellow dot at the \
anchor point, and with a transparent gray background.<div><div>- DebugTexturesOn :  \
<a href="http://picpaste.com/pics/Blurred.1447668943.PNG" \
target="_blank">http://picpaste.com/pics/Blurred.1447668943.PNG</a><br>- \
DebugTexturesOff :  <a href="http://picpaste.com/pics/Not-Blurred.1447669009.PNG" \
target="_blank">http://picpaste.com/pics/Not-Blurred.1447669009.PNG</a><br><br>Now \
digging into the code in vtkFreeTypeTools.cxx, I suspect this is a blending problem. \
When we activate Texture Debugging, a gray background is first drawn, and after that \
in the method  RenderCharacter( ... ) line 1887; we either blend the rendered text \
with the background or not.</div><div><br>Attached is a diff file that solves the \
problem for me. I do not really understand why, so maybe a developer with more \
VTK&#39;s knowledge can integrate this properly \
:)<br><br>Thanks,<br>Simon</div></div><div><br></div><div><br></div></div><div><div><div \
class="gmail_extra"><br><div class="gmail_quote">2015-11-13 16:43 GMT+01:00 Simon \
ESNEAULT <span dir="ltr">&lt;<a href="mailto:simon.esneault@gmail.com" \
target="_blank">simon.esneault@gmail.com</a>&gt;</span>:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">Hi All,<br><br>All  vtkTextActor  are rendered \
blurred when using with vtkFixedPointVolumeRayCastMapper in the same  renderer in vtk \
6.3 with the new rendering backend.<div><br></div><div>Here are some snapshots :<br>  \
- <a href="http://picpaste.com/pics/OGL1-not-blurred.1447428990.png" \
target="_blank">OpenGL1</a></div><div>  - <a \
href="http://picpaste.com/pics/OGL2-blurred.1447429027.png" \
target="_blank">OpenGL2</a><br><br>Attached some code that reproduces the problem, to \
be used with <a href="https://www.dropbox.com/s/ptqwi0ebv75kt35/volume.zip" \
target="_blank">this</a> volume. Visible on OSX and Windows to our knowledge, \
probably on more OS.<br><br>The text is rendered properly when used with the old \
backend or when using a vtkGPUVolumeRayCastMapper instead of the  \
vtkFixedPointVolumeRayCastMapper.<br><br>Shall I feel a bug, is this a known issue \
?<br><br>Thanks,<br>Simon<span><font color="#888888"><br \
clear="all"><div><br></div>-- <br><div><div \
dir="ltr"><div>------------------------------------------------------------------<br>Simon \
Esneault<div>Rennes, \
France<br>------------------------------------------------------------------</div></div></div></div>
 </font></span></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div \
dir="ltr"><div>------------------------------------------------------------------<br>Simon \
Esneault<div>Rennes, \
France<br>------------------------------------------------------------------</div></div></div></div>
 </div>
</div></div><br></div></div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" \
target="_blank">www.kitware.com</a><br> <br>
Visit other Kitware open-source projects at <a \
href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" \
target="_blank">http://www.kitware.com/opensource/opensource.html</a><br> <br>
Please keep messages on-topic and check the VTK FAQ at: <a \
href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" \
target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br> <br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" \
rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br> <br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" \
target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br> \
<br></blockquote></div><span><font color="#888888"><br><br \
clear="all"><div><br></div>-- <br><div><div dir="ltr"><font face="trebuchet ms, \
sans-serif"><i>| Aashish Chaudhary <br>| Technical Leader              <br>| Kitware \
Inc.                  <br></i></font><div><i><font face="trebuchet ms, sans-serif">|  \
</font><a href="http://www.kitware.com/company/team/chaudhary.html" \
target="_blank">http://www.kitware.com/company/team/chaudhary.html</a></i></div></div></div>
 </font></span></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div \
dir="ltr"><div>------------------------------------------------------------------<br>Simon \
Esneault<div>Rennes, \
France<br>------------------------------------------------------------------</div></div></div></div>
 </div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div \
dir="ltr"><font face="trebuchet ms, sans-serif"><i>| Aashish Chaudhary <br>| \
Technical Leader              <br>| Kitware Inc.                  \
<br></i></font><div><i><font face="trebuchet ms, sans-serif">|  </font><a \
href="http://www.kitware.com/company/team/chaudhary.html" \
target="_blank">http://www.kitware.com/company/team/chaudhary.html</a></i></div></div></div>
 </div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div \
dir="ltr"><div>------------------------------------------------------------------<br>Simon \
Esneault<div>Rennes, \
France<br>------------------------------------------------------------------</div></div></div></div>
 </div>
</div></div></blockquote></div></div></div><div><div><br><br \
clear="all"><div><br></div>-- <br><div><div dir="ltr"><font face="trebuchet ms, \
sans-serif"><i>| Aashish Chaudhary <br>| Technical Leader              <br>| Kitware \
Inc.                  <br></i></font><div><i><font face="trebuchet ms, sans-serif">|  \
</font><a href="http://www.kitware.com/company/team/chaudhary.html" \
target="_blank">http://www.kitware.com/company/team/chaudhary.html</a></i></div></div></div>
 </div></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div \
dir="ltr"><div>------------------------------------------------------------------<br>Simon \
Esneault<div>Rennes, \
France<br>------------------------------------------------------------------</div></div></div></div>
 </div>
</div></div></blockquote></div><br><br clear="all"><span><font \
color="#888888"><div><br></div>-- <br><div><div \
dir="ltr"><div>------------------------------------------------------------------<br>Simon \
Esneault<div>Rennes, \
France<br>------------------------------------------------------------------</div></div></div></div>
 </font></span></div><span><font color="#888888">
</font></span></div></div></blockquote></div><span><font color="#888888"><br><br \
clear="all"><div><br></div>-- <br><div><div dir="ltr"><font face="trebuchet ms, \
sans-serif"><i>| Aashish Chaudhary <br>| Technical Leader              <br>| Kitware \
Inc.                  <br></i></font><div><i><font face="trebuchet ms, sans-serif">|  \
</font><a href="http://www.kitware.com/company/team/chaudhary.html" \
target="_blank">http://www.kitware.com/company/team/chaudhary.html</a></i></div></div></div>
 </font></span></div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" \
target="_blank">www.kitware.com</a><br> <br>
Visit other Kitware open-source projects at <a \
href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" \
target="_blank">http://www.kitware.com/opensource/opensource.html</a><br> \
<br></div></div> Search the list archives at: <a \
href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer" \
target="_blank">http://markmail.org/search/?q=vtk-developers</a><span><br> <br>
Follow this link to subscribe/unsubscribe:<br>
</span><a href="http://public.kitware.com/mailman/listinfo/vtk-developers" \
rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtk-developers</a><br>
 <br>
<br></blockquote></div><span><font color="#888888"><br><br \
clear="all"><div><br></div>-- <br><div>Ken Martin PhD<div>Chairman &amp; \
CFO<br>Kitware Inc.<br>28 Corporate Drive<br>Clifton Park NY 12065<br><a \
href="tel:518%20371%203971" value="+15183713971" target="_blank">518 371 \
3971</a><div><br></div><div><span \
style="font-size:10pt;font-family:Tahoma,sans-serif">This communication, including \
all attachments, contains confidential and legally privileged information, and it is \
intended only for the use of the addressee.   Access to this email by anyone else is \
unauthorized. If you are not the intended recipient, any disclosure, copying, \
distribution or any action taken in reliance on it is prohibited and may be unlawful. \
If you received this communication in error please notify us immediately and destroy \
the original message.   Thank you.</span></div></div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div \
dir="ltr"><font face="trebuchet ms, sans-serif"><i>| Aashish Chaudhary <br>| \
Technical Leader              <br>| Kitware Inc.                  \
<br></i></font><div><i><font face="trebuchet ms, sans-serif">|  </font><a \
href="http://www.kitware.com/company/team/chaudhary.html" \
target="_blank">http://www.kitware.com/company/team/chaudhary.html</a></i></div></div></div>
 </div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div \
dir="ltr"><div>------------------------------------------------------------------<br>Simon \
Esneault<div>Rennes, \
France<br>------------------------------------------------------------------</div></div></div></div>
 </div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div \
class="gmail_signature"><div dir="ltr"><font face="trebuchet ms, sans-serif"><i>| \
Aashish Chaudhary <br>| Technical Leader              <br>| Kitware Inc.              \
<br></i></font><div><i><font face="trebuchet ms, sans-serif">|  </font><a \
href="http://www.kitware.com/company/team/chaudhary.html" \
target="_blank">http://www.kitware.com/company/team/chaudhary.html</a></i></div></div></div>
 </div>



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtk-developers



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic