[Paraview] ParaView v5.3: Generating textures from scalars and lookup table

Nenad Vujicic nenadus at gmail.com
Fri May 5 06:42:24 EDT 2017


Hello everyone,

Does anyone have idea how to solve generating textures problem?

I continued to decompose the problem and I'm curious, is interpolation of
scalars before mapping performed (when OpenGL2 is selected) by shaders
(on-the-fly, during display) or is an intermediate texture generated?

Also, in OpenGL case, vtkPainter was available. This is missing in OpenGL2.
Where has this functionality moved to or is it missing?

Nenad.

On Tue, Apr 25, 2017 at 11:59 AM, Nenad Vujicic <nenadus at gmail.com> wrote:

> David,
>
> Thank you very much for your response! I tried what you suggested and it
> worked, but, I'm getting bad texture, i.e. I get texture 2xN, where N is
> number of segments in colormap and the exported texture mapped object looks
> like I turned OFF InterpolateScalarsBeforeMapping flag. I would like to
> simulate InterpolateScalarsBeforeMapping behavior by baking entire
> texture first and exporting it. You can easily see difference if you create
> Wavelet source, turn ON Surface representation, select RTData array for
> coloring and set Number Of Table Values (in Color Map Editor) to e.g. 5.
>
> What I did in background is: I patched vtkCompositePolyDataMapper2Internal
> and vtkCompositePolyDataMapper2, so I'm able to access appropriate block
> mapper and get rid of old colormap texture, coordinates, colors, call
> MapScalars(), dump created ColorMapTexture to .vti file (everything
> performed on block-mapper).
>
> Do you have some idea where I made mistake?
>
> Thanks in advance!
>
> Nenad.
>
>
> On Thu, Apr 13, 2017 at 2:33 PM, David E DeMarle <dave.demarle at kitware.com
> > wrote:
>
>> Hi Nenand,
>>
>> You might try vtkMapper::GetColorMapColors/C
>> olorCoordinates/ColorTextureMap. I'm using this in the OSPRay renderer
>> for example.
>>
>> Out of curiosity is this for the p2f3d exporter plugin?
>>
>> cheers
>>
>>
>> David E DeMarle
>> Kitware, Inc.
>> R&D Engineer
>> 21 Corporate Drive
>> Clifton Park, NY 12065-8662
>> Phone: 518-881-4909 <(518)%20881-4909>
>>
>> On Tue, Apr 11, 2017 at 6:34 AM, Nenad Vujicic <nenadus at gmail.com> wrote:
>>
>>> Hello everyone,
>>>
>>> I've just started building my ParaView exporter plugin using ParaView
>>> v5.3 with OpenGL2 selected for backend rendering
>>> (PARAVIEW_RENDERING_BACKEND), however, I'm having troubles with generating
>>> textures from scalars used for coloring the meshes. What I'm actually doing
>>> here is that I'm generating texture from currently selected array and
>>> lookup-table and I export texture mapped object instead of exporting object
>>> plus scalars and colormap or colors. Previously (with OpenGL used for
>>> backend rendering), I was deriving class from vtkScalarsToColorsPainter
>>> class for this purpose, however, now, this class is not used anymore with
>>> OpenGL2.
>>>
>>> Does anyone have idea how to solve this problem?
>>>
>>> Thanks in advance,
>>> Nenad.
>>>
>>> _______________________________________________
>>> 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 ParaView Wiki at:
>>> http://paraview.org/Wiki/ParaView
>>>
>>> Search the list archives at: http://markmail.org/search/?q=ParaView
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://public.kitware.com/mailman/listinfo/paraview
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170505/02a28dfc/attachment.html>


More information about the ParaView mailing list