Light fog shadows?

how would I simulate a ray of light passing through an irregularly shaped hole and making the light appear to be passing through dust? I tried light fog on the spotlight, but this just seemed to create a big cone of fog which did not cast a shadow.

Yes you need to enable the depyhmap shadows (and the object needs to be shadowcasting). Or if you want to use raytracving then youd need to up volume samples altough tahts usalay so bad for your rendertime taht you want to do a sucide. Better to actlay use a parti volume cone in mr insead.

If I render with maya it works fine, but if I render with mental ray it wont. Is this an incompatibility with mental ray? and is there a way to bypass it?

Wll, in mentalray you may want to use a parti volume material and and maybe a parti volume caustics material also with photons all using raytraced shadows.

http://www.motiondesign.biz/index2.html

Altyough it is a prohibitely expensive way of making the lightfog!