PDA

View Full Version : vol rendering and blending



alark
07-02-2003, 02:42 PM
Hi,
when i perform vol rendering with a 3D texture and enable MIP mode, it works fine.
1) when i use this
glEnable(GL_BLEND);
glBlendEquationEXT(GL_MAX_EXT);
glBlendFunc(GL_SRC_ALPHA,GL_ZERO);
glBlendFunc (GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);

it works perfectly and i can see the mip volume. now when i remove the glBlendEquationEXT() line, shouldnt it technically show the direct rendered volume? But it doesnt. This seems very weird. Any ideas, suggestions ?

2) About 2D multitexturing, do you use 2D textures or a single 3D texture. It looks like you have to use 3 copies of object aligned 2D textures, but just wanted to make
sure.
3) also if you are trying to preprocess a volume to say detect edges, can you extend a sobel mask to 3D and use it and then view that volume? the edge detection using marr-hildreth or extended sobel looks equally bad, any suggestions??
thanks,

alark

dorbie
07-02-2003, 03:28 PM
This could be several things, and the MAX function is just making it look OK.

It could be that you are not sorting back to front when rendering the slices.

It could be that you have no alpha in the volume.

It could be that your expectations are not realistic w.r.t. contributions from slices and the softer look with a real blend is not what you expect.

It could be that your slices are too opaque to accumulate correctly & look decent

It could be that if you have a data -> LUT that your alpha is contributing dark texels because the alpha does not fall off appropriately w.r.t. luminance.

It could be that you have insufficient slices to sample the data but it looks OK with MAX but not with a proper blend.

dorbie
07-02-2003, 03:39 PM
P.S.

Only the last glBlendFunc will be applied during rendering.

On question 2, you are correct, 3D volumes have 1 copy, 2D slices need 3 axis aligned copies for full freedom of orientation, one is used at a time based on orientation, of course the 3D volume is the higher quality solution thanks to the 3D texel filtering. It's also easier, you don't have to worry about adjusting alpha and slice density to compensate for ray path distance issues as the 2D slices orient off the orthogonal.

w.r.t. filtering, get the blends right first then see.

One more suggestion, you may not have enough slices to reconstruct the volume when different blending is applied.