[Paraview-developers] Image reduction factor

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Mon May 14 11:56:15 EDT 2012


That's indeed what we do. There's a vtkIceTCompositePass that we use.
The thing it doesn't do is update the transforms given the state in
IceT. I suppose it can be done, but may be tricky to manage all the
mtimes to ensure that we don't end up in a never ending update loop as
the camera transforms are being updated/changed.

Utkarsh

On Mon, May 14, 2012 at 11:02 AM, Biddiscombe, John A. <biddisco at cscs.ch> wrote:
> And that's worse than having the viewport/transforms being actively changed without anything in the pipeline being aware of it or being able to access it - and resulting in images which don't map onto the screen at all when you use a simple painter?
>
> I thought the whole point of the rather laborious painter design was to make it easy to throw in a vtkTiledImagePainter (or Pass) or something along those lines which does the right thing. and mofifies the transforms etc appropriately.
>
> Anyway. Now we know how to work around it. Let's leave it as it is for the next unsuspecting fool who tries to add some nice new feature to work it out!
>
> JB
>
>
>
> -----Original Message-----
> From: Utkarsh Ayachit [mailto:utkarsh.ayachit at kitware.com]
> Sent: 14 May 2012 16:53
> To: Biddiscombe, John A.
> Cc: paraview-developers at paraview.org
> Subject: Re: [Paraview-developers] Image reduction factor
>
> The problem is that this reduction factor is a very ParaView specific thing. Putting that into VTK and expecting mappers to start respecting it sounds fishy. And it doesn't solve the tile-display case where the transformations are much more complex than that can be specified by a reduction factor.
>
> Utkarsh
>
> On Mon, May 14, 2012 at 10:49 AM, Biddiscombe, John A. <biddisco at cscs.ch> wrote:
>> OK. I see the code in question.
>> However, it seems to me that adding an information key somewhere near the top of the painter pipeline would allow the reduction value to be passed down cleanly. The fact that it is so hard to get at the value strikes me as a serious omission. I think I'll add a feature request.
>>
>> JB
>>
>> -----Original Message-----
>> From: Utkarsh Ayachit [mailto:utkarsh.ayachit at kitware.com]
>> Sent: 14 May 2012 16:43
>> To: Biddiscombe, John A.
>> Cc: paraview-developers at paraview.org
>> Subject: Re: [Paraview-developers] Image reduction factor
>>
>> Alas, there's no way around getting the transform from OpenGL and using it. To get you started, look at  vtkSurfaceLICPainter.cxx:~462.
>> It obatins the projection and model-view matricies and then computes the resultant transform and then uses it. This will not only fix the issue for subsampling, but also ensure that things work smoothly on tile displays. That, I hope, is a perk enough to make you suffer through the OpenGL transforms :).
>>
>> Utkarsh
>>
>> On Mon, May 14, 2012 at 10:29 AM, Biddiscombe, John A. <biddisco at cscs.ch> wrote:
>>> My painter is software only and does not use OpenGL, I transform points using a vtkMatrix4x4 object directly and paint onto a memory RGB image.
>>> I do use openGL right at the end to copy the final image to the render buffer.
>>>
>>> I can access the glModelView matrix etc etc, but I haven't used the matrix entried manually to compute the transform for so long that I can't remember the column/row orderings etc, and getting the Camera->Transform + Actor Transform and using them ought to have worked. The ImageReduction just isn't visible to any part of the painter chain I can see. It must be there, but I couldn't even find where IceT actually sets it in the opengl context. wasted a lot of time on it.
>>>
>>> JB
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: Utkarsh Ayachit [mailto:utkarsh.ayachit at kitware.com]
>>> Sent: 14 May 2012 16:24
>>> To: Biddiscombe, John A.
>>> Cc: paraview-developers at paraview.org
>>> Subject: Re: [Paraview-developers] Image reduction factor
>>>
>>> Out of curiosity, why can't your painter make use of the OpenGL stack?
>>> Painters always can access OpenGL state, there's nothing in VTK precludes them from doing so.
>>>
>>> Utkarsh
>>>
>>>
>>> On Sat, May 12, 2012 at 4:23 PM, Biddiscombe, John A. <biddisco at cscs.ch> wrote:
>>>> Well, I tried everything to get access to the subsample factor. I overrode every painter, intercepted every call to everything, but was not able to get it.
>>>> Finally, I had to insert this in my painter
>>>>
>>>>  IceTInt ids;
>>>>  icetGetIntegerv(ICET_NUM_TILES,&ids);
>>>>  IceTInt *vp=new IceTInt[4*ids];
>>>>  icetGetIntegerv(ICET_TILE_VIEWPORTS,vp);
>>>>
>>>> and this does return the correct viewport, adjusted down.
>>>>
>>>> It seems that if you use a painter that doesn't make use of the standard modelview matrix settings which are put there during (presumably) the ice Camera pass, then it isn't possible to access the adjusted viewport.
>>>>
>>>> My trouble being that my mapper uses software only and does not make use of the OpenGL transform stack.
>>>>
>>>> Please tell me if there's some other way.
>>>>
>>>> Ta
>>>>
>>>> JB
>>>>
>>>> -----Original Message-----
>>>> From: Utkarsh Ayachit [mailto:utkarsh.ayachit at kitware.com]
>>>> Sent: 04 April 2012 18:43
>>>> To: Biddiscombe, John A.
>>>> Cc: paraview-developers at paraview.org
>>>> Subject: Re: [Paraview-developers] Image reduction factor
>>>>
>>>> If I remember correctly, the only thing that changes when subsample rate is specified is the viewport on the renderer.
>>>>
>>>> On Wed, Apr 4, 2012 at 11:46 AM, Biddiscombe, John A. <biddisco at cscs.ch> wrote:
>>>>> Utkarsh.
>>>>>
>>>>> 'Fraid not. This still only returns the same size as the renderwindow, setting the interactive subsample rate to N doesn't make the size smaller.
>>>>>
>>>>> I'll keep trying. thanks anyway.
>>>>>
>>>>> JB
>>>>>
>>>>> -----Original Message-----
>>>>> From: Utkarsh Ayachit [mailto:utkarsh.ayachit at kitware.com]
>>>>> Sent: 04 April 2012 17:25
>>>>> To: Biddiscombe, John A.
>>>>> Cc: paraview-developers at paraview.org
>>>>> Subject: Re: [Paraview-developers] Image reduction factor
>>>>>
>>>>> Look at  vtkSurfaceLICPainter (Perhaps PrepareForRendering() ). I believe you may be missing using the GetTiledSizeAndOrigin(). I cannot remember the details off the top of my head, but that should give you a starting point.
>>>>>
>>>>> Utkarsh
>>>>>
>>>>> On Tue, Apr 3, 2012 at 7:03 PM, Biddiscombe, John A. <biddisco at cscs.ch> wrote:
>>>>>> I've got a custom mapper which does its own compositing and works
>>>>>> fine, except during interactive renders in parallel.
>>>>>>
>>>>>>
>>>>>>
>>>>>> During interaction, the subsample rate>1 and the viewport
>>>>>> coordinate transform I'm using is wrong.
>>>>>>
>>>>>>
>>>>>>
>>>>>> Problem is, from the mapper, I just don't know how to get the
>>>>>> subsample rate. I've tried to get hold of the composite render
>>>>>> manager, but failed so far.
>>>>>>
>>>>>>
>>>>>>
>>>>>> If anyone knows, please tell.
>>>>>>
>>>>>>
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>>
>>>>>>
>>>>>> JB
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>>
>>>>>> John Biddiscombe,                        email:biddisco @.at.@
>>>>>> cscs.ch
>>>>>>
>>>>>> http://www.cscs.ch/
>>>>>>
>>>>>> CSCS, Swiss National Supercomputing Centre  | Tel:  +41 (91)
>>>>>> 610.82.07
>>>>>>
>>>>>> Via Trevano 131, 6900 Lugano, Switzerland   | Fax:  +41 (91)
>>>>>> 610.82.82
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Paraview-developers mailing list
>>>>>> Paraview-developers at paraview.org
>>>>>> http://public.kitware.com/mailman/listinfo/paraview-developers
>>>>>>


More information about the Paraview-developers mailing list