this is well known issue with stencil shadowing techniques, not a bug in the engine or anything. The problem is your mesh is not "closed". A closed mesh means that there are noi double edges or open faces etc..It can be very frustrating to fix, especially in complex meshes. MED gives you a tool that tests whether your mesh is closed. The problem is tho, sometimes while the first frame test ok, other frames become not closed. either go through every vertex one by one, or just use the old shadowing technique.