[Paraview-developers] Grabbing tiled display output for network streaming

Paul Melis paul.melis at sara.nl
Tue Mar 20 12:32:04 EDT 2012


Hi Utkarsh,

Sorry for perhaps not showing enough detail. The old code (for PV 3.8)
did the following:

In Servers/Filters/vtkIceTRenderManager.cxx:

1. It initialized in PreRenderProcessing() the streaming framework for
each render process, using values such as process rank, viewport of the
tile within the full output image, tile resolution, etc.
2. In RecordIceTImage() it intercepted the rendered tile image and
copied it to a streaming buffer
3. In PostRenderProcessing() it basically flushed the network output

There was another addition in VTK/Rendering/vtkXOpenGLRenderWindow.cxx,
where the code did an override on the ScreenSize, to set it to a
specific user-requested resolution (which is used to control total
render resolution, and thus needed network bandwith).

The tricky bit is that I need to initialize an object using the
equivalent values as previously found in step 1, but now from
vtkIceTCompositePass and have that same object available in
vtkTileDisplayHelper during image interception as in step 2 (and 3).

Looking at the PV code, I believe there is only a single
vtkTileDisplayHelper instance per render process, which would help, as
calling Instance() will give me the correct one.

I'm planning to add stuff to
vtkIceTCompositePass::UpdateTileInformation(), so that it does a
one-time initialization (step 1), while step 2 and 3 will be done in the
vtkTileDisplayHelper instance. Does that make sense?

In vtkIceTCompositePass::UpdateTileInformation() I see that it's
possible that there are multiple tiles, depending on TileDimensions. Is
that an uncommon case? Can I just assume there's always just one tile?

Regards,
Paul





On 03/19/2012 06:58 PM, Utkarsh Ayachit wrote:
> I'm slightly confused exactly what you need here, but I'm going to
> suggest looking at vtkIceTCompositePass.cxx,
> vtkIceTSynchronizedRenderers  and vtkTilesHelper. Using the basic
> information like the current process rank. tile layout, vtkTilesHelper
> provides mechanisms to compute viewports, among other things.
> 
> Utkarsh
> 
> On Fri, Mar 16, 2012 at 8:59 AM, Paul Melis <paul.melis at sara.nl> wrote:
>> Ouch, I hit a snag. I also need info on the global tile configuration
>> (number of tiles, total resolution, rank of a render process). It looks
>> like this information isn't available from inside the tile display
>> helper (which makes sense in a good design ;-)).
>>
>> So I will need to do part of the initialization somewhere else.
>> Previously this was done in vtkIceTRenderManager, which had all the info
>> available. Is there an equivalent place in the new code?
>>
>> Regards,
>> Paul
>>
>> On 03/16/2012 01:31 PM, Paul Melis wrote:
>>> Okay, great!
>>>
>>> Would it be hard to explicitly set the render resolution (per tile) in
>>> the code? Currently, the screen res is used it seems, but I would really
>>> like to control the resolution used.
>>>
>>> Thanks again,
>>> Paul
>>>
>>> On 03/15/2012 05:24 PM, Utkarsh Ayachit wrote:
>>>> Paul,
>>>>
>>>> SetTile() sounds like a good place for your initialization,
>>>> remembering that it will be called on every render, in general.
>>>>
>>>> Utkarsh
>>>>
>>>> On Thu, Mar 15, 2012 at 12:04 PM, Paul Melis <paul.melis at sara.nl> wrote:
>>>>> Hi Utkarsh,
>>>>>
>>>>> Awesome! That's just the pointer I needed.
>>>>>
>>>>> Getting the image is indeed real easy at that point. Is the image data
>>>>> guaranteed to have 4 components (RGBA)? I can't access the Data array in
>>>>> vtkSynchronizedRenderers::vtkRawImage to check (although that's easily
>>>>> added of course).
>>>>>
>>>>> A second question has to do with an initialization step of the streaming
>>>>> framework that I need to do. I need the tile resolution and subregion of
>>>>> the full image that each tile represents (in normalized coords). I get
>>>>> these currently in vtkTileDisplayHelper::SetTile() by looking at the
>>>>> vtkRenderer's resolution, while parameter viewport[4] gives the other
>>>>> values. Getting those values is guarded by a static bool to make sure I
>>>>> do this only once. Is SetTile() the best option for this kind of
>>>>> initialization, or is there a more natural place?
>>>>>
>>>>> Thanks a lot so far!
>>>>>
>>>>> Regards,
>>>>> Paul
>>>>>
>>>>> On 03/15/2012 03:45 PM, Utkarsh Ayachit wrote:
>>>>>> Paul,
>>>>>>
>>>>>> I think the key place for you is vtkTileDisplayHelper::FlushTiles().
>>>>>> That method is called on the server sides everytime a view renders and
>>>>>> ParaView wants to update the rendered images on to the tile display
>>>>>> screen. vtkTileDisplayHelper already caches all the rendered tile
>>>>>> images that it then posts to the screen. You can intercept this and
>>>>>> you'll be sending these over the network as well/instead.
>>>>>>
>>>>>> with 3.14 this won't work well with 2D Charts/Plots, but I'm working
>>>>>> on fixing that as we 'speak' so that will automatically work as well
>>>>>> once those fixes are in.
>>>>>>
>>>>>> Utkarsh
>>>>>>
>>>>>> On Thu, Mar 15, 2012 at 6:47 AM, Paul Melis <paul.melis at sara.nl> wrote:
>>>>>>> Hi,
>>>>>>>
>>>>>>> I'd like to grab the rendered output from ParaView, specifically when
>>>>>>> running in tiled display mode. The use case here is to run PV in
>>>>>>> parallel on a render cluster in our data center, which then streams the
>>>>>>> output over an optical network to a high-resolution tiled display. This
>>>>>>> tiled display is actually used to show several image sources
>>>>>>> side-by-side and uses the SAGE tiled display rendering framework.
>>>>>>>
>>>>>>> We've been using some(body else's) code based on PV 3.8 that does the
>>>>>>> above, by hacking into vtkIceTRenderManager to intercept the rendered
>>>>>>> images and send them out over the network. I've been looking into
>>>>>>> porting this to a more recent PV but I see the whole render
>>>>>>> infrastructure has been overhauled to be based on VTK views and
>>>>>>> representations.
>>>>>>>
>>>>>>> I've been looking into the PV 3.14 code to see what would be the most
>>>>>>> logical place to add code to intercept rendered images and send them
>>>>>>> out, but I'm getting a bit lost. Any hint where to start hacking would
>>>>>>> be greatly appreciated.
>>>>>>>
>>>>>>> Best regards,
>>>>>>> Paul
>>>>>>> _______________________________________________
>>>>>>> Paraview-developers mailing list
>>>>>>> Paraview-developers at paraview.org
>>>>>>> http://public.kitware.com/mailman/listinfo/paraview-developers
>>>>>
>>>
>>> _______________________________________________
>>> 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