Im sorry i have a bit limited time at the moment so the answer will need to be revisited later.
While its true that the hardware of your computer could do this, and it could be included in by wolfram making shadows is usually considered a next step in rendering. I am not dwelling on why this doesn't work, as you can use any of the existing free raytracers out there. There are plenty heres a (really) partial list (by preference and suitability in this case, path of least resistance):
Highend stuff
Midend
- pixie R free
- Aqsis R free
- yafaray free
- ... lots and lots of other software and hardware renderers out there that can easily do the job
There are a lot more. The ones marked with R conform to the RI spec making it easy to swap between the systems. On top of that Mathematica supports RIB export. It also brings your pipeline quite a bit o future proof that no other solution would give.
Note, I think POV ray is not a suitable tool by todays standard.
Exporting the geometry to rib should be as simple as:
Export["s:\\temp\\test.rib", Plot3D[Sin[x y], {x, 0, Pi}, {y, 0, Pi}]]
over this you need to append the lights and shaders. Now the RIB file at this point is unrenderable. Because its missing
- Camera
- Materials
- Lights
- World
Lets add those. A suitable camera environment would be ( Im using 3Delight so the notation may differ very slightly for auto shadows feature)
#this is rib
PixelSamples 3 3
PixelFilter "sinc" 2 2
ShadingRate 1
Display "output.tif" "tiff" "rgb"
Format 400 400 1
Projection "perspective" "fov" 20
Rotate 180 0 1 0
Translate 2.5 -0.5 -20
Rotate -50 1 0 0
Rotate 118 0 0 1
After this we need the world where the object resides:
#still rib
WorldBegin
... items in world...
WorldEnd
inside this world each light needs something like this:
#rib also beween World
AttributeBegin
Translate 0 0 -1
Color 0 0 1
Surface "constant"
Sphere 0.1 -0.1 0.1 360.0
Attribute "light" "shadows" "on"
LightSource "pointlight" "l1"
"intensity" 5
"lightcolor" [0 0 1]
AttributeEnd
Illuminate "l1" 1
and finally the object which we can include test.rib:
#still rib
Attribute "visibility" "int transmission" [1]
Surface "matte"
ReadArchive "test.rib"

Image 1: This is whats being produced. Note scene contains a weak extra fill light
Thats it now to write this into a function in Mathematica. But again i got to go
Export["file.pov", plot]
(Untested: POV-Ray has issues with Intel Macs) $\endgroup$