I have been working on this for a quite a while, mostly trying to find a way to render back/front faces of an object in single pass and to extract volumetric data from 2D texture.
Now it has all been solved and here is the result. Now we can have medical imaging in BGE
i`ll just paste the text from my blog:
Hey, I got volumetric ray casting to work in Blender Game Engine. The shader is fully done in GLSL, including front&back face calculation in single pass and 2D texture conversion to texture3D, so it should be reeaally easy to implement in every OpenGL supporting engine.
The blend. file is here:
DOWNLOAD (Warning! Crashes on ATI cards. debugging almost done… Thanks Mokazon!)
(note: disable mipmapping in Blender`s System settings, otherwise you will see some weirdness)
glsl fragment shader:
video is coming soon.
screenshots taken in BGE (click on the thumbnails to see them full-sized) :
different opacity values
simple sample dithering
So, anyone of you have done CT (computed tomography) lately?