[vtkusers] VTK 6.3 OpenGL2 - vtkTextActor blurred text when used with vtkFixedPointVolumeRayCastMapper

Aashish Chaudhary aashish.chaudhary at kitware.com
Mon Nov 16 11:49:10 EST 2015


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 at 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 at 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 at 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 at 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>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20151116/87e03ad4/attachment.html>


More information about the vtkusers mailing list