The current algorithms of generating element image array using ray-tracing are complex. Although the quality of images generated by ray tracing is high, it requires a lot of double counting. Therefore, we propose to utilize photon mapping algorithm for generating element image array to reduce a lot of calculations in this paper. First, for a given virtual model, a light source is set, the photon emission vector is calculated and photons are tracked. A global photon map is used to store the energy and incident direction of the photons. Then, we trace rays of light that start from the viewpoint and pass through each pixel into the scene, and record the surface material of the first collision point into the photon map. The image of one view point can be generated according to the estimated rays of light by photon map. The photon map need to be generated only once for all images of different viewpoints. Finally, the images of different viewpoints are converted into an element image array. Experimental results show that the proposed method improves the generation speed of element image array significantly in the complex scene, especially for the generation of multiple images. While in the simple scene, the proposed method might be slightly slower for generating one image, but it still shows its advantages in the case of generating multiple images.
|