<div dir="ltr">Be aware that in the new OpenGL2 backend rendering is asynchronous. That is VTK sends commands to the OpenGL hardware and continues processing. When the OpenGL hardware gets around to executing those commands is up to the hardware. <div><br></div><div>Fortunately there is vtkRenderTimerLog which I believe works quite well as of a month or two ago. See TestGPURayCastDepthPeeling.cxx in VTK for an example of its usage. Below is some sample output</div><div><br></div><div><br></div><div><div>- 100.0%   63.655 ms "vtkRenderWindow::Render"</div><div>  -  98.2%   62.535 ms "vtkRenderer::Render this=@0x2437a80 Layer=0"</div><div>    -   0.0%    0.001 ms "Culling props"</div><div>    - 100.0%   62.532 ms "DeviceRender"</div><div>      -   0.0%    0.025 ms "vtkRenderer::UpdateCamera"</div><div>      -   0.0%    0.001 ms "vtkRenderer::UpdateLightGeometry"</div><div>      -   0.0%    0.001 ms "vtkOpenGLRenderer::UpdateLights"</div><div>      - 100.0%   62.501 ms "vtkOpenGLRenderer::UpdateGeometry"</div><div>        -   0.0%    0.015 ms "Opaque Geometry"</div><div>        - 100.0%   62.481 ms "Translucent Geometry"</div><div>          - 100.0%   62.479 ms "vtkDualDepthPeelingPass::Render"</div><div>            -   0.0%    0.001 ms "vtkDualDepthPeelingPass::Initialize"</div><div>            -   4.1%    2.586 ms "vtkDualDepthPeelingPass::Prepare"</div><div>              -  95.0%    2.457 ms "vtkDualDepthPeelingPass::CopyOpaqueDepthBuffer"</div><div>              -   4.0%    0.103 ms "vtkDualDepthPeelingPass::InitializeDepth"</div><div>                -  98.4%    0.102 ms "vtkDualDepthPeelingPass::RenderTranslucentPass"</div><div>            -  51.2%   31.968 ms "vtkDualDepthPeelingPass::PeelVolumesOutsideTranslucentRange"</div><div>              - 100.0%   31.966 ms "vtkDualDepthPeelingPass::RenderVolumetricPass"</div><div>            -  30.4%   19.021 ms "vtkDualDepthPeelingPass::Peel"</div><div>              -   0.4%    0.074 ms "vtkDualDepthPeelingPass::InitializeTargetsForTranslucentPass"</div><div>                -  86.4%    0.064 ms "vtkDualDepthPeelingPass::CopyFrontSourceToFrontDestination"</div><div>              -   0.6%    0.123 ms "vtkDualDepthPeelingPass::PeelTranslucentGeometry"</div><div>                -  98.7%    0.122 ms "vtkDualDepthPeelingPass::RenderTranslucentPass"</div><div>              -   0.2%    0.044 ms "vtkDualDepthPeelingPass::BlendBackBuffer"</div><div>              -   2.5%    0.466 ms "vtkDualDepthPeelingPass::EndTranslucentOcclusionQuery"</div><div>              -   0.3%    0.049 ms "vtkDualDepthPeelingPass::InitializeTargetsForVolumetricPass"</div><div>                -  90.2%    0.045 ms "vtkDualDepthPeelingPass::CopyFrontSourceToFrontDestination"</div><div>              -  88.7%   16.878 ms "vtkDualDepthPeelingPass::PeelVolumeGeometry"</div><div>                - 100.0%   16.876 ms "vtkDualDepthPeelingPass::RenderVolumetricPass"</div><div>              -   0.2%    0.044 ms "vtkDualDepthPeelingPass::BlendBackBuffer"</div><div>              -   7.0%    1.330 ms "vtkDualDepthPeelingPass::EndVolumetricOcclusionQuery"</div><div>            -  10.2%    6.349 ms "vtkDualDepthPeelingPass::Peel"</div><div>              -   1.2%    0.075 ms "vtkDualDepthPeelingPass::InitializeTargetsForTranslucentPass"</div><div>                -  87.5%    0.065 ms "vtkDualDepthPeelingPass::CopyFrontSourceToFrontDestination"</div><div>              -   2.0%    0.124 ms "vtkDualDepthPeelingPass::PeelTranslucentGeometry"</div><div>                -  98.7%    0.123 ms "vtkDualDepthPeelingPass::RenderTranslucentPass"</div><div>              -   0.7%    0.044 ms "vtkDualDepthPeelingPass::BlendBackBuffer"</div><div>              -   8.9%    0.565 ms "vtkDualDepthPeelingPass::EndTranslucentOcclusionQuery"</div><div>              -   0.8%    0.049 ms "vtkDualDepthPeelingPass::InitializeTargetsForVolumetricPass"</div><div>                -  90.2%    0.045 ms "vtkDualDepthPeelingPass::CopyFrontSourceToFrontDestination"</div><div>              -  76.8%    4.878 ms "vtkDualDepthPeelingPass::PeelVolumeGeometry"</div><div>                - 100.0%    4.876 ms "vtkDualDepthPeelingPass::RenderVolumetricPass"</div><div>              -   0.7%    0.044 ms "vtkDualDepthPeelingPass::BlendBackBuffer"</div><div>              -   8.9%    0.563 ms "vtkDualDepthPeelingPass::EndVolumetricOcclusionQuery"</div><div>            -   4.0%    2.492 ms "vtkDualDepthPeelingPass::Peel"</div><div>              -   3.0%    0.074 ms "vtkDualDepthPeelingPass::InitializeTargetsForTranslucentPass"</div><div>                -  87.7%    0.065 ms "vtkDualDepthPeelingPass::CopyFrontSourceToFrontDestination"</div><div>              -   4.9%    0.123 ms "vtkDualDepthPeelingPass::PeelTranslucentGeometry"</div><div>                -  98.7%    0.121 ms "vtkDualDepthPeelingPass::RenderTranslucentPass"</div><div>              -   1.7%    0.043 ms "vtkDualDepthPeelingPass::BlendBackBuffer"</div><div>              -  12.7%    0.315 ms "vtkDualDepthPeelingPass::EndTranslucentOcclusionQuery"</div><div>              -   2.0%    0.049 ms "vtkDualDepthPeelingPass::InitializeTargetsForVolumetricPass"</div><div>                -  90.2%    0.044 ms "vtkDualDepthPeelingPass::CopyFrontSourceToFrontDestination"</div><div>              -  53.7%    1.338 ms "vtkDualDepthPeelingPass::PeelVolumeGeometry"</div><div>                -  99.9%    1.337 ms "vtkDualDepthPeelingPass::RenderVolumetricPass"</div><div>              -   1.8%    0.044 ms "vtkDualDepthPeelingPass::BlendBackBuffer"</div><div>              -  20.0%    0.498 ms "vtkDualDepthPeelingPass::EndVolumetricOcclusionQuery"</div><div>            -   0.1%    0.056 ms "vtkDualDepthPeelingPass::Finalize"</div><div>              -  94.8%    0.053 ms "vtkDualDepthPeelingPass::BlendFinalImage"</div><div>        -   0.0%    0.001 ms "Overlay"</div><div>  -   1.8%    1.118 ms "glXSwapBuffers (may stall for VSync)"</div></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 21, 2017 at 2:16 PM, mikewithascarf via vtkusers <span dir="ltr"><<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi! I'm attempting to speed up some image rendering (lots of images in<br>
sequence). Right now rendering time varies a lot, anywhere between 0.001 and<br>
0.059 seconds. Here is my pipeline:<br>
<br>
vtkImageData (3D) -> vtkImageReslice -> vtkImageMapToColors (using a lookup<br>
table with color/opacity) -> vtkImageActor -> vtkRenderer -> QVTKWidget<br>
<br>
I move the vtkImageReslice through the 3D volume, displaying images as I go.<br>
Is there any way to speed things up? I'm in release mode, using a NVidia GTX<br>
1070. If I could get it to always be less than 0.012 seconds that would be<br>
great. Here are example timings for multiple frames in a row:<br>
<br>
0.001 s<br>
0.006 s<br>
0.059 s<br>
0.002 s<br>
0.014 s<br>
0.003 s<br>
0.013 s<br>
0.011 s<br>
0.036 s<br>
0.001 s<br>
0.038 s<br>
0.001 s<br>
0.028 s<br>
0.001 s<br>
<br>
It's not even consistent per image. If I run the same test multiple times,<br>
different frames will have very different render times. Any help would be<br>
awesome!<br>
<br>
Mike<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/image-rendering-speed-tp5744115.html" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.<wbr>com/image-rendering-speed-<wbr>tp5744115.html</a><br>
Sent from the VTK - Users mailing list archive at Nabble.com.<br>
______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/<wbr>mailman/listinfo/vtkusers</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Ken Martin PhD<div>Distinguished Engineer<br><span style="font-size:12.8px">Kitware Inc.</span><br></div><div>28 Corporate Drive<br>Clifton Park NY 12065<br><div><br></div><div><span style="font-size:10pt;font-family:Tahoma,sans-serif">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.</span></div></div></div></div></div>
</div>