提出了一种在把瑞利散射和米氏散射列入考虑的情况下,从地平面到外太空的任何视角实时渲染大气的算法。该算法能够呈现出许多光的散射现象,例如日光和曙暮光天空的颜色和航空视角等所有视角下的光线方向,或者地面和山脉的阴影在大气里形成的光束,并展示了运用一个适应GPU的算法在几秒钟之内预处理完成这些数据。这个预处理的数据使得我们能够在考虑到地面上阴影和自然光束的情况下,评估光线传输方程在固定时间内的运行时间,从而克服了常规方法在实时性方面的瓶颈,并且有良好的显示效果,在航空仿真等领域可以得到广泛应用。
An accurate method to render the atmosphere in real time from any viewpoint from ground level to outer space is proposed,while taking Rayleigh and Mie multiple scattering into account. This method reproduces many effects of the scattering of light,such as the daylight and twilight sky color and aerial perspective for all view and light directions,or the Earth and mountain shadows (light shafts) inside the atmosphere. This method is based on a formulation of the light transport equation that is precomputable for all view points,view directions and sun directions. How to store this data compactly is shown and a GPU compliant algorithm to pre-compute it in a few seconds is presented. This pre-computed data allows us to evaluate at runtime the light transport equation in constant time,so that we can overcome the bottleneck of the conventional method in real-time,while taking into account the ground for shadows and light shafts. The atmosphere rendered by this method has a good display effect and it is applied to the flight scene simulation widely.