Font Size: a A A

Study On Signed Distance Field For Soft Shadow Generation

Posted on:2020-03-05Degree:MasterType:Thesis
Country:ChinaCandidate:Y C LiFull Text:PDF
GTID:2428330599950923Subject:Engineering
Abstract/Summary:PDF Full Text Request
In computer graphics research,shadows enhance the three-dimensionality of objects,helping to understand the mutual position and size of objects.Traditional methods of generating shadows mainly include shadow mapping algorithm and shadow volumes algorithms,but those methods above have the drawback of being difficult to provide high quality soft shadows.Signed distance field can be used to represent the minimum distance from any point in the scene to the surface of a given three-dimensional object,and the relative positional relationship of the scene with the object is determined.In recent years,it has been successfully applied in the fields of collision detection and cloth simulation.Based on the method of generating signed distance field using brute force method,this paper studies the HP-adaptive signed method which can generate higher precision signed distance field and the signed distance field generation method based on fast marching method,and parallelized all three methods for acceleration.Finally,those methods are used to pre-compute signed distance field,and the soft shadows is generated by the pre-compute signed distance field.The paper mainly completes the following three aspects of work:(1)Tested and compared three kinds of signed distance field generation algorithms like the brute force method,the HP-adaptive method and the fast marching method,and GPU acceleration is applied to the brute force method and the fast marching method,multithreading acceleration is applied to HP-adaptive method.And this paper studies a signed distance field texture management algorithm based on the first fit strategy.The experimental results show that the parallelization acceleration can significantly improve the efficiency of the brute force method,the HP-adaptive method and the fast marching method.The HP-adaptive method is more suitable for generating high-quality local signed distance field,and the fast marching method is more suitable for generating low-quality global directional distance field.(2)The sampling and visualization methods of the signed distance field are studied.First,using the sphere marching algorithm to sample the signed distance field and using the sphere marching algorithm to visualize the signed distance field in the three-dimensional space.The experimental results show that the signed distance field visualization method based on the sphere marching is more intuitive than the signed distance field slice,and it is easy to verify the correctness of the signed distance field generation algorithms.(3)A high quality soft shadow generation algorithm based on sphere marching with two optimization methods are proposed.After obtaining the local signed distance field of the object in the scene,the sphere marching algorithm is used to sample the signed distance field of the object,and soft shadows is generated according to the sampled value.In order to improve the soft shadow generation's efficiency and the soft shadow's quality,firstly,the shadow intensity is calculated according to the two sample values to reduce the banding effect of the shadow,and then the optimization algorithm based on the bilateral filter,so that the qulity of the soft shadows can be improved,finally using the method of global signed distance field generation based on the fast marching method to reduce the number of accesses to the memory in the graphics card,thereby further improving the shadow generation efficiency.The experimental results show that the banding effect of the shadow can be effectively reduced according to the two sampled values,and the algorithm efficiency is improved by 43% and 29% respectively based on the bilateral filter and the fast marching-based optimization algorithm.Finally,this paper compares the soft shadow generation algorithm based on the signed distance field with the soft shadow generation algorithm based on the shadow mapping.The results show that the soft shadow generation algorithm based on the signed distance field can obtain soft shadow with higher quality while ensuring the running efficiency,and has a wide range of application,which can meet the demand for soft shadow in real-time rendering.
Keywords/Search Tags:signed distance field generation, GPU acceleration, sphere marching, SDF based soft shadow, screen space, bilateral filter
PDF Full Text Request
Related items