520 |
|
|
|a Shadows are essential to realistic and visually appealing images. The important elements in shadows are the accuracy and the dynamics of hard shadows, which provide scene information and spatial cue. Soft shadows on the other hand provide the realism. The research goal is to create an accurate and real-time dynamic fake soft shadow using stencil shadow volume algorithm. The performance of the algorithm must maintain the quality at acceptable level, as it is the main criteria. In this research, a point light source is used and the occluder is an opaque object. Culling and particle system are excluded, and light source are not allowed to get close to the occluder. The methodology consists of two steps; first is to create the hard shadow using shadow volume with stencil buffer, and second is to add in the soft shadow effects. The first step involves silhouette determination of the occluder, construction of the shadow volume by extruding the silhouette to a very large value, and rendering the shadow volume with depth-pass technique in order to determine which objects are to be shadowed. The second step is to retrieve the original geometry of the hard shadows, and to produce samples of hard shadows with a sequentially enlarged and softened colour. All these samples are finally averaged and blended together to produce the soft shadow effects. The algorithm is implemented using C++ and OpenGL where the occluders are ranging from simple to complex objects. Comparison using proposed algorithm with an established algorithm revealed that the proposed algorithm is two to five times faster. Results from various tests reveal that the proposed algorithm not only achieves better frame per second performance but also maintains the quality of soft shadows. Therefore, the importance of soft shadows cannot be neglected as it increases realism in computer-generated scenes.
|