I want to have an example of rendering shadows in my WPF 3D book, and I've been exploring some techniques. This one, however, I'm going to have to classify as a failure. You can try it out here: ShadowsFeasibilityStudy1.xbap I don't want to make the source code available because it's rather sloppy and way too specific to this particular program, but I can describe how it works: The "chopper" is just two 8-vertex boxes stuck together and moved around with three animations: rotating around its axis, revolving around the Y axis, and moving up and down. The "ground" is a plane surface composed of 200 by 200 rectangles, or 80,000 triangles. Interestingly, even without the shadow logic, increasing the number of triangles in the ground made the animation of the chopper increasingly choppy. The illumination is a combination of AmbientLight with a color of 40-40-40 and DirectionalLight with a color of C0-C0-C0 and a direction of (2, -3, -1) . I render the shadow by manipulating the Normals collection
Read More...