Naktibalda
12-27-2010, 03:33 PM
Hi, I'm new to openGl, but I've managed to make an app to load and display medical MRI data. I make a cube for each voxel in the data set and colorize them. I've been experimenting with changing the opacity for each cube. I call
glEnable (GL_BLEND);
glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
and then set the opacity for each cube to 0.5. This produces some strange results. On all the cubes in the left half of the screen, there is a dark shadow outlining the cubes from the left. The right half of the screen does not have this shadow and appears "normal". I have disabled all lights and lightning so I don't think that's the problem. However, when I rotate the data set, the shadows appear and disappear depending on the orientation... I think the alpha blending visually looks much better, so it would be very nice to be able to render the data sets with opacity, but without those shadows. Does anyone have an idea of whats going on here?
Thanks
glEnable (GL_BLEND);
glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
and then set the opacity for each cube to 0.5. This produces some strange results. On all the cubes in the left half of the screen, there is a dark shadow outlining the cubes from the left. The right half of the screen does not have this shadow and appears "normal". I have disabled all lights and lightning so I don't think that's the problem. However, when I rotate the data set, the shadows appear and disappear depending on the orientation... I think the alpha blending visually looks much better, so it would be very nice to be able to render the data sets with opacity, but without those shadows. Does anyone have an idea of whats going on here?
Thanks