Tuesday, December 10, 2019

cst 325 w7

This week, we learned about the challenges of rasterization based shadows, learned how to implement orthographic projection, projective texturing, and the shadow mapping algorithm.

There are 2 main approaches to rasterization based shadows: volume and image. In the volume based way, stencil shadows volumes are used to extrude polygons away from the light source and make those the shadow. In the image based approach, shadow mapping is used using pixels to utilize pixel depth from the light source. The image based approach is used currently. In the basic algorithm, the scene depth is rendered from the pov of the light  into a texture. The scene is rendered again from the eye and the pixel is calculated to be in or out of shadow using the depth texture. Then we see if the pixels world position is further from the light than the closest recorded distance for the pixel aka wesee if something is occluding the surface from the pov of the light. A problem created by this is aliasing and acne, where the shadows have blocky or patterned effects. This is solved using a bias offset so it calculates the depth to be slightly shorter.

Orthographic projection is used instead of perspective to match the direction of the light which is the same at all surface points.  The projection lines are parallel and perpendicular to the image plane, resulting in a view that is orthographic.

No comments:

Post a Comment

cst 499 week 8

This week, we finished writing the paper in order to do the best job possible even if it was a little bit late. Now that everything is done,...