Re: [PyOpenGL-Users] volume rendering
Brought to you by:
mcfletch
From: Dirk R. <di...@li...> - 2008-12-08 15:46:57
|
Hi Andrew, Andrew Wilson wrote: > > I'm simply doing texture slicing for volume rendering. OK. > I am running with low resolution textures (10x8x8 to 20x16x16 or so). Ouch! That is low. ;) > I'm > not sure I understand the full implementation of storing a plane equation in > the voxel, can you elaborate a bit more? There was a paper a few years ago that did this for shadow mapping, but I can't find it right now. The main idea is to think of the pixel/voxel as a cube that is split into two parts, one inside, one outside (in your case, of the ROI). When you render a pixel that belongs to the cube, you figure out where it is in the cube (fractional texcoords should be fine), and use that to decide whether it's in or out, and act accordingly. So for you you could save a plane equation that says for example that the area left of the x=.75 point in your cube is inside the ROI, the rest is outside, and you would get super-voxel resolution ROIs. You could also go beyond planes to higher-order > I'm expecting on the order of 4-6 ROI's per dataset and may have 2-4 > datasets up at the same time. OK. For those numbers you should be able to make it real simple and just run the inside/outside test inside the fragment shader for each fragment. That would given you pretty much zero-cost changes to the ROI, if needed. > I've pinged the opengl groups too, they recommended using using the > multitexture extension with an alpha texture with higher resolution than the > dataset to minimize the voxelation. I think this is pretty interesting too. Interesting idea, too. I guess the question is how often you need to update the ROI, and how high the ROI resolution really needs to be. Yours Dirk |