[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vtk-developers
Subject:    Re: [vtk-developers] Performance issue regarding vtkOpenGLGlyph3DMapper with large number of vtkData
From:       Haocheng Liu <haocheng.liu () kitware ! com>
Date:       2018-04-09 15:52:35
Message-ID: CACbTE7NAaZ=zWUfyNZLZn+0rLHd_KAZzrssaOTwbgAV1Hr+V9Q () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi David and Ken,

David is right about the number of mappers and actors.

On Mon, Apr 9, 2018 at 11:36 AM, David Thompson <david.thompson@kitware.com>
wrote:

> Hi Haocheng,
>
> > I have a use case that I want to glyph several hundreds of vtkDatasets.
> However, the frame rate becomes super slow since vtkOpenGLyph3DMapper would
> call rebuildstructures function for each dataset. With 258 vtkDatasets, it
> takes more than 4 seconds to render one frame and spends 52% of the time
> doing rebuilding stuff(Rebuilding the structure 258 times even though
> nothing new!). I'm thinking to remove Line 515 in /Rendering/OpenGL2/vtkOpenGLGlyph3DMapper.cxx
> and pass a flag instead to trigger the rebuilding if a new color is
> assigned.
>
> I'm not sure that change would not be enough to guarantee that the
> vtkOpenGLGlyph3DMapper::vtkOpenGLGlyph3DMapperEntry objects are kept up
> to date.
>
> It might be better to understand why the mapper's MTime is being updated
> every render. If we can't use the mapper's MTime, then we should probably
> add a new MTime member to the mapper that gets modified when things that
> *do* matter (like block color changes) occur.
>
> Mapper's MTime is updated because a mouse movement would trigger
*vtkCompositePolyDtaMapper2::ComputeBounds*. It would then update vtkMapper
MTime. I'm looking at the proposed method now.

>         David




-- 
Best regards
Haocheng

Haocheng LIU
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4421 <(518)%20881-4421>

[Attachment #5 (text/html)]

<div dir="ltr">Hi David and Ken,<div><br></div><div>David is right about the number \
of mappers and actors.</div><div class="gmail_extra"><br><div class="gmail_quote">On \
Mon, Apr 9, 2018 at 11:36 AM, David Thompson <span dir="ltr">&lt;<a \
href="mailto:david.thompson@kitware.com" \
target="_blank">david.thompson@kitware.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Hi Haocheng,<br> <span class=""><br>
&gt; I have a use case that I want to glyph several hundreds of vtkDatasets. However, \
the frame rate becomes super slow since vtkOpenGLyph3DMapper would call \
rebuildstructures function for each dataset. With 258 vtkDatasets, it takes more than \
4 seconds to render one frame and spends 52% of the time doing rebuilding \
stuff(Rebuilding the structure 258 times even though nothing new!). I&#39;m thinking \
to remove Line 515 in /Rendering/OpenGL2/<wbr>vtkOpenGLGlyph3DMapper.cxx and pass a \
flag instead to trigger the rebuilding if a new color is assigned.<br> <br>
</span>I&#39;m not sure that change would not be enough to guarantee that the \
vtkOpenGLGlyph3DMapper::<wbr>vtkOpenGLGlyph3DMapperEntry objects are kept up to \
date.<br> <br>
It might be better to understand why the mapper&#39;s MTime is being updated every \
render. If we can&#39;t use the mapper&#39;s MTime, then we should probably add a new \
MTime member to the mapper that gets modified when things that *do* matter (like \
block color changes) occur.<br> <span class="HOEnZb"><font \
color="#888888"><br></font></span></blockquote><div>Mapper&#39;s MTime is updated \
because a mouse movement would trigger  \
<b>vtkCompositePolyDtaMapper2::ComputeBounds</b>. It would then update vtkMapper \
MTime. I&#39;m looking at the proposed method now.</div><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><span class="HOEnZb"><font color="#888888">  \
David</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div \
class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div \
dir="ltr">Best regards<div>Haocheng</div><div><br></div><div>Haocheng \
LIU</div><div><span style="color:rgb(0,0,0);font-size:12.8px">Kitware, Inc.</span><br \
style="color:rgb(0,0,0);font-size:12.8px"><span \
style="color:rgb(0,0,0);font-size:12.8px">R&amp;D Engineer</span><br \
style="color:rgb(0,0,0);font-size:12.8px"><span \
style="color:rgb(0,0,0);font-size:12.8px">21 Corporate Drive</span><br \
style="color:rgb(0,0,0);font-size:12.8px"><span \
style="color:rgb(0,0,0);font-size:12.8px">Clifton Park, NY 12065-8662</span><br \
style="color:rgb(0,0,0);font-size:12.8px"><span \
style="color:rgb(0,0,0);font-size:12.8px">Phone:  </span><a \
href="tel:(518)%20881-4421" value="+15188814443" \
style="color:rgb(17,85,204);font-size:12.8px" \
target="_blank">518-881-4421</a><br></div></div></div></div></div> </div></div>



_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Search the list archives at: http://markmail.org/search/?q=vtk-developers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtk-developers



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic