Changing Alpha value on the fly for 3D RGBA texture

I am using 3D textures for volume rendering of raw data. The raw data can be Luminance-Alpha or RGBA.

I am currently reading raw data and setting the alpha value so that the farthest line (or chunk) is opaque (Alpha = 1) and the closest slice is "transparent" (say alpha = 0.1) and alpha the values โ€‹โ€‹are interpolated.

Is there any way in opengl I can change these alpha values โ€‹โ€‹dynamically. those. based on events like rotation? So the farthest slice is always opaque?

I am using the Scene Design Tool (www.openrm.org) to render a volume based on textures.

I think I am not looking for code, but any ideas I can do this efficiently on a GPU using OpenGL.


This conversation talks about the "alpha slice weight" which I intend to do (look at the pseudocode at the end)

http://www.ifi.uzh.ch/staff/stern/SciVis_WS2004/chstern/v100105/VolumeRendering/kulick/

Now the trick is to recalculate the alpha weight of the slice as the orientation changes.

+1


source to share


1 answer


Sounds like a perfect shader job ...



However, if you are using axis aligned slices and creating them on the CPU, you can set glColor4f with an alpha component <= 1.0, and also set glTexEnv to GL_MODULATE. Then the color value will be multiplied by the color value of your texture.

+3


source







All Articles