[vtkusers] GPU Volume Rendering / Cuda

Lars Friedrich Lars lars-friedrich at gmx.net
Sat Mar 6 04:34:45 EST 2010


Hello,

I do not know about your concrete geometry setup, OS or further settings which may dramatically influence rendering speed, but I would like to note one thing that may be interesting for you and possibly for other vtkusers (in the case if you have not already been aware of it before).

There are two relatively important properties in the base class vtkGPUVolumeRayCastMapper: MaxMemoryInBytes (corresponds to maximum dedicated video memory of the GPU) and MaxMemoryFraction (maximum fraction of available video memory to be used). If you compile VTK with NV-CONTROL X extension on Linux or DirectX SDK on windows, vtkGPUVolumeRayCastMapper is able to retrieve these hardware props automatically (through vtkGPUInfo). Have a look at:
http://www.vtk.org/Wiki/VTKEdge:FAQ#Compile_time

If you did not compile VTK with one of these options, vtkGPUVolumeRayCastMapper uses some internal default estimation of video memory size which is statically 128 MB. The default value for max memory fraction is 0.75 in either case. Resultant available video memory without extensions: 96MB.

Your situation, assuming unsigned short (16bit) volume: 512*512*200 gives 100MB.

If you look at the internals of vtkOpenGLGPUVolumeRayCastMapper you will notice that there is a query like this: (volumesize <= maxmemoryinbytes*maxmemoryfraction)?
... even if the volume could be successfully transferred to the GPU without any errors, it may not be respected by the code (100 > 96) and STREAMING will be activated internally. This is that the volume will be splitted into slabs and then transferred to the GPU. Moreover, this usually requires further internal FB ping-pong to compensate the overlapping regions (but that depends on the blending mode you are using). Streaming and ping-pong will basically slow down rendering.

Therefore, make sure that you either compile VTK with the respective extension or set MaxMemoryInBytes manually to 256MB (which is your card's video mem size) and possibly increase MaxMemoryFraction to 0.95 or so.

HTH,

lars


-------- Original-Nachricht --------
> Datum: Fri, 5 Mar 2010 19:43:45 -0800 (PST)
> Von: superzz <jxdw_zlf at yahoo.com.cn>
> An: vtkusers at vtk.org
> Betreff: [vtkusers]  GPU Volume Rendering / Cuda

> 
> Hello
> I am leveraging vtkGPUVolumeRayCastMapper to render a 512*512*200 dataset.
> The window size is 800x800. It is much faster than CPU volume rendering.
> But
> the speed is still not satisifying. The FPS is only 1. My video card is
> NVIDIA Quadro NVS 160M.
> 
> I am considering to update my video card. Video card has some techinal
> parameters. I do not know which one is the most important for GPU volume
> rendering. Core Clock, Memory Size, Memory Interface or anything else?
> 
> The desired FPS of mine is at least 10.
> 
> I also find some a vtk volume rendering project is leveraging CUDA. Will
> CUDA greately accelerate rendering speed?
> 
> Thanks
> 
> superZZ
> -- 
> View this message in context:
> http://old.nabble.com/GPU-Volume-Rendering---Cuda-tp27801812p27801812.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> 
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers

-- 
GMX DSL: Internet, Telefon und Entertainment für nur 19,99 EUR/mtl.!
http://portal.gmx.net/de/go/dsl02



More information about the vtkusers mailing list