0

I try to implement Raycasting volume rendering using OpenGL, GLSL and C++. As we all know, it is computationally intensive and it is very hard to get good interactivity such as move the viewpoint and zoom in and out. We can use an adaptive scheme for modifying parameters to achieve reactivity during interaction.

One parameter that we can modify is Image Sample Distance: the distance in x and y direction on the image plane between neighboring rays.

When I do raycasting volume rendering, in the first I draw a cube and then render its back face(exit points) and its front face(entry points), then I can do the raycasting pass.

My question is: how to decrease the Image Sample Distance?

Christian Rau
  • 45,360
  • 10
  • 108
  • 185
XiaJun
  • 1,855
  • 4
  • 24
  • 41

1 Answers1

2

My question is: how to decrease the Image Sample Distance?

Ideally by downsampling your original volume data. If your sampling distance is farther than your voxel distance you'll get nasty rendering artifacts. As a general rule your sampling distance should exactly match your voxel distance along the ray.

The application I'm currently programming does deal with high resolution medical images as well. May I ask what resolution your volumes have? The main problem you'll run into is to fit the volume into your GPUs fast memory. If your data exceeds those limits, then the GPU must swap in data from system memory which is slow. This makes easily a difference between interactive rates and a very slow slide show.

datenwolf
  • 159,371
  • 13
  • 185
  • 298
  • Firstly, Thanks for your reply. But I think you misunderstand my question. My question is how to decrease the number of rays casting from the image plane,not the sample stepsize on the ray in volume data~~ The resolution of the volume data that I have implemented is 512 * 512 * 465, and I am trying to do large data sets(for example 3GB) volume rendering.I found it is a little hard for me and I am working hard to try to resolve it.Could you recommend some materials of large data sets volume rendering to me ? Thanks a lot. – XiaJun Sep 25 '12 at 01:20
  • @XiaJun: The number of rays to cast is ultimately determined by the number of pixels in the target framebuffer. What you can do is render the volume to a FBO which color attachment (likely a texture) has the desired pixel and thus ray density. However by aware that the raycasting performance is largely dependent on the memory bandwidth by which volume voxels can be accessed. If your volume data does not fit into GPU memory, then performance will be largely impaired. You'll have to use some LOD scheme. I'm thinking about the volumetric equivalent of so called "Megatextures"; my problem as well. – datenwolf Sep 25 '12 at 07:51