MayaStation’s Owen Burgess posts an interesting piece on sampling a 3D texture in Maya using MEL. Sampling color values of a pixel on a 2D texture is a simple MEL command “colorAtPoint”, however sampling a 3D texture is a little more complicated. Check out how to sample a 3D texture in Maya here.

“Sampling the colour values of a pixel on a 2D texture is easy enough in Maya; there is the MEL command ‘colorAtPoint’, and you can emit particles from a texture and query the RGB values per particle. Sampling a colour value of a 3D texure is not so straightforward, and the approach suggested in the documentation is to bake your 3D texture to an image file and use the aforementioned methods to query the colour value on the resulting texture.”