To have flat shadows of models on terrain just switch their shadow flag on.
Level geometry and levelmaps won't cast shadows.
When you're using shaders to render the terrain they may overwrite your models shadows.
Thus you could write a own shader function to render models shadows.
To have level geometry and level map shadows you'd have to write your own shader or modify the one from the wiki.
Just multiply the result matrix with the .a (alpha) matrix and deactivate alphablendenable and alphatestenable so that the alpha channel is not used for alpha blending but for multiplying the result texture matrix with 0...1 which looks like that:
(The ratrace function to pre-render this shadowmpar tooks 3~5 minutes, thus they really are static.)