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

2017-05-08 Thread Ken Martin
Awesome, glad it worked out!

On Sun, May 7, 2017 at 8:32 AM, Nenad Vujicic  wrote:

> > >> >* 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?
> *> >
> > 2xN is a good texture. That is what you should get for both the old and new
> > backends (N covers the  scalar range, the 2 covers normal versus NaN, it is
> > a 2D map because of how normal scalar values should properly interpolate to
> > NaN).
>
> > ...
>
> Ken, thank you very much for your help. I think I solved my problem of 
> simulating InterpolateScalarsBeforeMapping (and getting sharp edges) by 
> re-creating larger colormap (4x1K) from generated one.
>
> Thanks very much once again to everyone for helping!
>
>
> 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
>
>


-- 
Ken Martin PhD
Distinguished Engineer
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065

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.
___
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


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

2017-05-07 Thread Nenad Vujicic
> >> >* 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?
*> >
> 2xN is a good texture. That is what you should get for both the old and new
> backends (N covers the  scalar range, the 2 covers normal versus NaN, it is
> a 2D map because of how normal scalar values should properly interpolate to
> NaN).

> ...

Ken, thank you very much for your help. I think I solved my problem of
simulating InterpolateScalarsBeforeMapping (and getting sharp edges)
by re-creating larger colormap (4x1K) from generated one.

Thanks very much once again to everyone for helping!


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


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

2017-05-05 Thread Ken Martin
>
> 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?
>

2xN is a good texture. That is what you should get for both the old and new
backends (N covers the  scalar range, the 2 covers normal versus NaN, it is
a 2D map because of how normal scalar values should properly interpolate to
NaN).

When interp before mapping is on we do create a 2xN texture and texture
coordinates. The texture coordinate maps the scalar values into the texture
map. Interpolation is done in the fragment shader by texture lookup. The
process for cell data is a bit different but in that case there is no
interpolation. There we use a texture to map cellids to colors I believe.

If you have point scalars, and you write out the 2xN texture map along with
the color texture coordinates generated for it (not the texture coordinates
that might have come from the model or a source), then that should be
correct.

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

OpenGL2 has a different design that does not use painters.


>
> Nenad.
>
> On Tue, Apr 25, 2017 at 11:59 AM, Nenad Vujicic  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.dema...@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 
>>> 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


>>>
>>
>
> ___
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensou
> rce/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
>
>
>


-- 
Ken Martin PhD
Distinguished Engineer
Kitware Inc.
28 Corporate Drive
Clifton Park NY 12065

This communication, including all attachments, contains confidential and
legally privileged inform

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

2017-05-05 Thread Nenad Vujicic
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  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  > 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  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
>>>
>>>
>>
>
___
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


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

2017-04-25 Thread Nenad Vujicic
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 
wrote:

> Hi Nenand,
>
> You might try vtkMapper::GetColorMapColors/ColorCoordinates/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  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
>>
>>
>
___
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


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

2017-04-13 Thread David E DeMarle
Hi Nenand,

You might try vtkMapper::GetColorMapColors/ColorCoordinates/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

On Tue, Apr 11, 2017 at 6:34 AM, Nenad Vujicic  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
>
>
___
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


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

2017-04-11 Thread Nenad Vujicic
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