<div dir="ltr">Hi,<div><br></div><div>If you are rendering the two volumes at the same time and if they fit in GPU memory, they should be cached on the GPU without having to stream. IIRC, the OpenGL2 volume mapper uses a little more GPU memory over the old mapper but it should not be a significant difference.</div><div><br></div><div>Thanks,</div><div>Sankhesh</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Mar 20, 2018 at 11:56 AM Andras Lasso <<a href="mailto:lasso@queensu.ca">lasso@queensu.ca</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Automatic sample distance adjustment is based on measuring rendering times. If you render multiple volumes then maybe the measurement is not reliable anymore (just guessing). You could try manually setting sample distances for all volumes and see if you get more consistent behavior.<br>
<br>
Andras<br>
<br>
-----Original Message-----<br>
From: vtkusers <<a href="mailto:vtkusers-bounces@vtk.org" target="_blank">vtkusers-bounces@vtk.org</a>> On Behalf Of ianl<br>
Sent: Tuesday, March 20, 2018 11:41 AM<br>
To: <a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br>
Subject: Re: [vtkusers] Volume Rendering Performance With Two Volumes<br>
<br>
Andras Lasso wrote<br>
> Slicer 4.8.1 still uses the OpenGL1 backend. We've noticed slowdown<br>
> with<br>
> OpenGL2 backend in Slicer 4.9, but solved it by tuning adjustment of<br>
> sampling settings.<br>
><br>
> See the full discussion here:<br>
> <a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdisco" rel="noreferrer" target="_blank">https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdisco</a><br>
> <a href="http://urse.slicer.org" rel="noreferrer" target="_blank">urse.slicer.org</a>%2Ft%2Fvolume-rendering-slow-in-latest-nightlies-for-ma<br>
> cos%2F2231%2F21&data=02%7C01%7Classo%<a href="http://40queensu.ca" rel="noreferrer" target="_blank">40queensu.ca</a>%7Ca4d06e6ec31d45e97f<br>
> 2e08d58e790db4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C6365715729<br>
> 25774613&sdata=s5J76LJnOInDFeBR1APBgyb9Xe5Q8m8yzsZHdbJDbHU%3D&reserved<br>
> =0<br>
<br>
Interesting that 3DSlicer 4.8.1 is still using the old back end and I am seeing a similar issue. This somewhat disproves my suspicion that there might be an issue with multiple volumes introduced with OpenGL2. However, the effect is certainly worse in our code with the new back end.<br>
<br>
I have tried your fix to set LockSampleDistanceToInputSpacing. This does not seem to make much difference for us as we have InteractiveAdjustSampleDistances set on, which presumably overrides it. As it looks like 3DSlicer is also adjusting ImageSampleDistance from observation, this may be a difference. I will look into perhaps varying that too in interactive modes.<br>
<br>
Interestingly, I have just noticed that if I have just two VTK windows with volumes in, performance is much better and consistent with and without LockSampleDistanceToInputSpacing. If I have other VTK windows, MPR views for example, performance drops off on one of the volumes.<br>
<br>
<br>
Andras Lasso wrote<br>
> As a side note, these are very large volumes for a modest GPU such as<br>
> AMD<br>
> R7 200.<br>
<br>
Granted, the card is a few years old, but does have 2GB of graphics memory and renders volumes of this size and larger very nicely with the old OpenGL back end.<br>
<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvtk.1045678.n5.nabble.com%2FVTK-Users-f1224199.html&data=02%7C01%7Classo%40queensu.ca%7Ca4d06e6ec31d45e97f2e08d58e790db4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636571572925774613&sdata=MaOY1zTuXMMAwRrUiG8UFnbZMlKlfcGdbSmmY2vb64s%3D&reserved=0" rel="noreferrer" target="_blank">https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fvtk.1045678.n5.nabble.com%2FVTK-Users-f1224199.html&data=02%7C01%7Classo%40queensu.ca%7Ca4d06e6ec31d45e97f2e08d58e790db4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636571572925774613&sdata=MaOY1zTuXMMAwRrUiG8UFnbZMlKlfcGdbSmmY2vb64s%3D&reserved=0</a><br>
_______________________________________________<br>
Powered by <a href="https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7Ca4d06e6ec31d45e97f2e08d58e790db4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636571572925774613&sdata=zRdGnwhQ8HnlZ%2BBGOHRA3pbNBc7cnnAH6ft%2FPITr2B8%3D&reserved=0" rel="noreferrer" target="_blank">https://na01.safelinks.protection.outlook.com/?url=www.kitware.com&data=02%7C01%7Classo%40queensu.ca%7Ca4d06e6ec31d45e97f2e08d58e790db4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636571572925774613&sdata=zRdGnwhQ8HnlZ%2BBGOHRA3pbNBc7cnnAH6ft%2FPITr2B8%3D&reserved=0</a><br>
<br>
Visit other Kitware open-source projects at <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queensu.ca%7Ca4d06e6ec31d45e97f2e08d58e790db4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636571572925774613&sdata=ElsRWmQqZnJSdcjAdN6DI7LKVOdndAWkV77Sv1Nzkwo%3D&reserved=0" rel="noreferrer" target="_blank">https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Classo%40queensu.ca%7Ca4d06e6ec31d45e97f2e08d58e790db4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636571572925774613&sdata=ElsRWmQqZnJSdcjAdN6DI7LKVOdndAWkV77Sv1Nzkwo%3D&reserved=0</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7Ca4d06e6ec31d45e97f2e08d58e790db4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636571572925774613&sdata=yZQrBLgqIPqa10Gjhd2JbJLl%2Fi05vjev0PodYiwtnIE%3D&reserved=0" rel="noreferrer" target="_blank">https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.vtk.org%2FWiki%2FVTK_FAQ&data=02%7C01%7Classo%40queensu.ca%7Ca4d06e6ec31d45e97f2e08d58e790db4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636571572925774613&sdata=yZQrBLgqIPqa10Gjhd2JbJLl%2Fi05vjev0PodYiwtnIE%3D&reserved=0</a><br>
<br>
Search the list archives at: <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca%7Ca4d06e6ec31d45e97f2e08d58e790db4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636571572925774613&sdata=eFJwHeGxaobtJLJ%2FxQ7eUbGWu9IDhoDuIM5umpg5DDo%3D&reserved=0" rel="noreferrer" target="_blank">https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmarkmail.org%2Fsearch%2F%3Fq%3Dvtkusers&data=02%7C01%7Classo%40queensu.ca%7Ca4d06e6ec31d45e97f2e08d58e790db4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636571572925774613&sdata=eFJwHeGxaobtJLJ%2FxQ7eUbGWu9IDhoDuIM5umpg5DDo%3D&reserved=0</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvtk.org%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo%40queensu.ca%7Ca4d06e6ec31d45e97f2e08d58e790db4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636571572925774613&sdata=0Wfviq%2BeVV6vZeOlFiivuD9rX6uGwtXxeQ6I%2FpUPCa0%3D&reserved=0" rel="noreferrer" target="_blank">https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fvtk.org%2Fmailman%2Flistinfo%2Fvtkusers&data=02%7C01%7Classo%40queensu.ca%7Ca4d06e6ec31d45e97f2e08d58e790db4%7Cd61ecb3b38b142d582c4efb2838b925c%7C1%7C0%7C636571572925774613&sdata=0Wfviq%2BeVV6vZeOlFiivuD9rX6uGwtXxeQ6I%2FpUPCa0%3D&reserved=0</a><br>
_______________________________________________<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/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_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=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://vtk.org/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">https://vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div class="inbox-inbox-inbox-inbox-inbox-inbox-inbox-markdown-here-wrapper" style="font-family:"proza libre",sans-serif;color:rgb(0,56,107)"><h5 id="inbox-inbox-inbox-inbox-inbox-inbox-inbox-sankhesh-jhaveri" style="margin:1.3em 0px 1em;padding:0px;font-size:1.1em;border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);font-weight:bold;color:rgb(11,65,148)">Sankhesh Jhaveri</h5>
<h6 id="inbox-inbox-inbox-inbox-inbox-inbox-inbox--sr-research-development-engineer-kitware-http-www-kitware-com-518-881-4417" style="margin:1.3em 0px 1em;padding:0px;font-size:1em;color:rgb(11,83,148);font-family:"open sans",sans-serif;font-weight:normal"><em>Sr. Research &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u
YSwgc2Fucy1zZXJpZjsgY29sb3I6IHJnYigxMSwgODMsIDE0OCk7Ij48L3NwYW4+PC9kaXY+PC9k
aXY+PC9kaXY+PC9kaXY+" style="height:0px;width:0px;max-height:0px;max-width:0px;overflow:hidden;font-size:0em;padding:0px;margin:0px">​</div></div></div></div>