Anti-Aliased Rendering of Water Surface Anti-Aliased Rendering of Water Surface

Anti-Aliased Rendering of Water Surface

  • 期刊名字:计算机科学技术学报
  • 文件大小:255kb
  • 论文作者:Xue-Ying Qin,Eihachiro Nakamae
  • 作者单位:State Key Lab of CAD&CG,Sanei Co.,Hiroshima Institute of Technology
  • 更新时间:2020-07-08
  • 下载次数:
论文简介

Sept. 2004, Vol.19, No.5, pp.626- 632J. Comput. Sei. & Technol.Anti-Aliased Rendering of Water SurfaceXue- Ying Qin' , Eihachiro Nakamae2, Wei Hual , Yasuo Nagais, and Qun Sheng Peng''State Key Lab of CAD&CG, Zhejiang University, Hangzhou 310027, P.R. China"Sanei Co., Hachihonmatsuminami, Higashihiroshima, 739-0144, JapanHiroshima Institute of Technology, Miyake, Saki-ku, Hiroshima, 781-5193, JapanE-mail: {xyqin,huawei,peng}@cad .ju.edu.cn; enakamae@crux .ocn.nejp; yasuocx0c.it-hiroshima.acjipRevised August 21, 2004.Abstract Water surface is one of the most important components of landscape scenes. When rendering spaciouswater surface such as that of the lakes and reservoirs, aliasing and/or moire artifacts frequently occur in the regionsfar from the viewpoint. This is because water surface consists of stochastic water waves which are usually modeledby periodic bump mapping. The incident rays on the water surface are actually scattered by the bumped waves,and the reflected rays at each sample point are distributed in a solid angle. To get rid of the artifacts of moirepattern, we estimate this solid angle of refected rays and trace these rays. An image-based accelerating methodis adopted so that the contribution of each reflected ray can be quickly obtained without elaborate intersectioncalculation. We also demonstrate anti-aliased shadows of sunlight and skylight on the water surface. Both therendered images and animations show excellent efcts on the water surface of a reservoir.Keywords anti-aliasing, water waves, spectral function, rendering, computer graphics (CG)1 Introductiondent light but also on the angle between the view-ing direction and the normal vector of water surface.Photo-realistic rendering of spacious water sur- The larger the angle, the smaller the reflection ra-face such as that of a large lake or a reservoir plays tio. This explains why there is little reflection whena very important role in the simulation of land-one views the water surface vertically, and the re-scape scenes for environmental assessments. Al-flection is very strong when the viewing directionthough water surface looks macroscopically like a is nearly parallel to the water surface. Note that,plane, it is the stochastic water waves that compose the incident light may come from buildings, trees,a realistic water surface. Water waves are conven-nd grasses that surround the water surface, ca1us-tionally modeled by a set of spectrum functions such ing great differences in the resultant images of wateras cosine and sine functions.surface.The ilumination of water surface is due to theIf a ray tracing approach is adopted for render-daylight and afected by surrounding scenes. Whening the spacious water surface, then an array ofan incident ray arrives at wave surface, it is simul-rays originated from the viewpoint passing throughtaneously reflected and refracted due to the reflec- the center of each pixel on the image plane will betivity and transmissibility of water surface. Conse-traced, and the intensity brought back by each sam-quently, the rays leaving water surface are also com-ple ray composes the final image. Nevertheless, aposed of two parts: the rays of reflections by water pixel located at the far end of the water surfacesurface and the rays of transmissions from underwa- may cover a large area on water surface, which con-ter. In fact, the color of water is due to the scatter-tains a series of dynamic water waves. Since alling and absorbing of the transmitted rays within theof these water waves will make contribution to theturbid water. When a strong light source such asintensity of the respective pixel, the classic centralsunlight is obscured on the surface of turbid water,point sampling will cause serious aliasing. In ad-the shadowed area of water surface appears dark. It dition, periodic water waves may interfere yieldingis found that the color of water is nearly indepen-moire patterns; and the high refectivity of waterdent to the angle between the viewing direction andsurface makes the moire patterns more apparent.water surface normal.In general, the appearance of moire pattern is dueOn the contrary, the intensity of reflection rays to shorts of sampling. However, in this case, in-from the water surface depends not only on the inci-creasing the sampling points will not remove this●CorrespondenceThe first, third and fth co-authors were partially supported by the National Natural Science Foundation of China(Grant Nos.60021201 and 60373035), Key Research Project of Ministry of Education (Grant No.01094) and the NationalGrand Fundamental Research 973 Program of China (Grant No.2002CB312102).中国煤化工MHCNMHG627Xue Ying Qin et al: Anti-Aliased Rendering of Water SurfaceatinctN. Removing thee moir6 patters isabig 2 Transmitted Intensitychallenge, especially in animations.When lights arrive at water surface, a part ofAnti-aliasing is therefore an essential isue forrays are refracted into underwater, these rays arerealistie rendering of water surface. In principle,then scattered and absorbed by particles inside theanti-aliasing effect can be achieved by accountingwater. If the refracted rays are strong enough andfor the contributions from all the scenes visible atthe water is quite clean, the rays can arrive at theeach pixel. Current anti-aliasing techniques canbebottom of the water and ilumninate the bottom.divided into two main categories: pre fitering23]Then the bottom refected rays are scattered andand post flteing,5t,absorbed again. A part of these mult-scatteredPre-filtering is normally performed at objectrays go through the water and arrive at the view-space. It tries to determine the exact region of anpoint. The scattering of transmitted rays under wa-object that is visible within each pixel and the initer shows the turbidity of the water, and the obtensity of each pixel is evaluated as the weightedserver can see the bottom of the water only if: theaverage of contributions from these visible objects.refection light of the bottom can penetrate the wa-On the other hand, post-iltering is performed atter body. For simplicity, we will ignore the efetsimage space by increasing the sampling density ofof the relections from the bottom in the followingthe concerned pixel during rendering process. Sodiscussion.post-filtering, is also commonly referred to as su-As the light source of outdoor scenes consists ofper sampling[5. The super sampled image is thensunlight and skylight, and the skylight comes frompassed through a filter that reduces the super sam-all directions of the sky dome, the evaluation ofpled pixel back to the desired resolutionlo. Themulti-scattering and absorbing of the sunlight andthree most common types of pixel filters are boxskylight under water is time-consuming. Therefore,filter, cone filter and Gauss flterel. Nevertheless,we calculate the color of water due to scattering andall these methods for anti-aliasing are mainly forabsorbing of water body in a pre-process and storestatic geometry objects. Water surfaces are com-the result in a look-up tablel8,sposed of sequential waves with diferent frequency,amplitude, wavelength, and progesing directions.Sme the re rays on the wter uraoes are 3 Shadow Generaionscattered by the bumped waves, stochastic sam-Note, surrounding scenes, such as buildings andpling and jitring!7] should be a good choice formountains, trees and clouds may cast shadows onanti-aliasing, which takes advantage of the percep-water surface. To facilitate occlusion calculation,tion feature of the human visual system. Althoughwe set a shadow bufer at each sampling point onstochastic sampling jttering works well with thethe water surfacel1o, each pixel of the shadow bufermoire patterns in single images, the implied noisecorresponds to a discrete direction of incident light.is too obvious and it fickers in animations since The penumbrae and umbrae on water surface arerandom sampling possesses no temporal continuityrendered eficiently.during animations.Since the color of water is heavily dependentIn this paper, we remove the moire pattern by on the incident light, the color of the water withinincorporating a novel pre-filtering method into the shadowed region becomes dark too. Moreover, onlyrendering process. Reflections from waves of dif- a portion of the incident light is refracted into un-ferent frequencyntegrated and averaged. Fur- dderwater, the shadows appear on water surface lookthermore, we devise an image-based approach to less clear than the shadows cast on surrounding ob-find the intensity of each reflected ray, the shad- jects like terrains. We set the transmitted intensityows of surrounding scenes on water surface are also of the water within shadowed region to be propor-approximated.tional to the amount of unoccluded incident light.The remaining part of this paper is arranged asfollows. In Section 2, the evaluation of transmit- 4 Refected Intensity of Water Surfaceted intensity of the water surface is described. Sec-tion 3 addreseses the ise of shadows on water sur- 4.1 Modelling of Wavesface. Section 4 presents an anti-aliasing algorithmfor computing the rflected intensity of water sur-Water surface of a lake or a reservoir is composedface. Exprimental rsuts are demonstrated in See of a series of sochastic water waves, In our method,tion 5. Fially, in Secion 6, we draw the conclusion these waves are modeled by a set of spectrurm functions with various frequencies, amplitudes, wave-of this paper.中国煤化工MHCNMHG628J. Comput. Sci. & Technol, Sept. 2004, Vol.19, No.5lengths, and pogessing diretions. Each function 4.2 Distributed Reflectionsdefines a ruler surface whose generating line is acosine curve. We call it a wavelet.As discussed before, aliasing become apparentSuppose the water surface plane is paralleled toat pixel which corresponds to a large region on theX-Y plane, and then the height field of the waterwater surface. Central point sampling during raysurface can be expressed as:tracing will lead to moire patterns. To alleviate thisproblem, we adopt a super sampling approach byH(x,y)=ho+22 As co(witi(x,y) + 0o) (1) emitting several rays to pass through each of these=0pixels.whereH(x,y) is the height of a point (x,y) onEach ray hits a sequence of water wavelets. Notewater surface, and ho is the height of the water that these wavelets have diferent frequencies andsurface plane, A; is the amplitude of the i-th har. different amplitudes. While the wavelets of low fre-monics wavelet, wi and Ooi are the frequency and quency determine the local shape of the water sur-initial phase respectively, and t:(x,y) is sized byface, the wavelets of high frequency attach bumpthe projected length of the ith harmonics (or dis- details to the surface of water waves. We call thetance) on X-Y plane. For point P(x,y,ho) on thewavelets of low frequency as major wavelets and thewater surface, its length t(x,y) along unit vectorwavelets of high frequency as detail wavelets. Ap-V(Vix, Viy,0) as shown in Fig.1 has:parently the water surface normal at the hit pointt(x,y)= (P,V)= xVix + yviy,will be mainly determined by the shape of majorwavelets while the existence of detail wavelets bringwhere呢+唱=1.a disturbance to the orientation of the surface nor-mal.Furthermore, each sample point within a pixelrepresents a sub-window on the image. For anti-aliasing purpose, we need to estimate the aver-age surface normal of the local water region visi-ble through the sub-window. We represent the av-'amaxerage normal Np by two components, ie, Np ="AmaxN。+ Nd, where N, denotes the component deter-mined by the major wavelets. It is evaluated by in-Fig.1. Wavelet progresses along dretion v, and the varia-tegrating normal vectors at all points on the visiblepart of the major wavelets within the sub-window,tion of its normal direction is within amar.andDuring ray tracing, the surface normal at wa-ter waves must be calculated. According to (1), thenormal vector N of the water suface at point P is( I[。 2 Au2(0 siute(a) + 8))d)given by:S二08H(x,y) \N。=JJs i=0N(r,y)=|_ 8H(,)| +τ=)y3)where m is the number of major wavelets and Sis the local water region visible through the sub-window of the pixel. The component Nd accountsA;w;(via si(wst:(x,y) + 0o))for the disturbance of the detail wavelets on N。.Due to their high frequency, a sub-window may con-tain several periods of these wavelets. When detail> Aw(vy sin(wit(x,y) +0o))wavelets overlap with the major wavelets, their av-1erage normal will be adhered to N, and the orien-tation variation at different parts of these wavelets“introduces a deviation of N, from its normal direc-where r is a small random vector to simulate the tion. Obviously, for each detail wavelet, the varia-stochastic waves.tion of its normal vector is periodic, The variation中国煤化工MHCNMH GXue- Ying Qin et al: Anti-Aliased Rendering of Water Surface629of normal direction for the i-th wavelet is within reflection bufer does not provide any informationa; = 2arccos ((Aiw)2+ 1)-1/2) (refer to Fig.1). about Ro but another visible point R lying on the .Thus, due to the disturbance of Ndon Ng, there- ray from the virtual viewpoint O' to Q. In most ,flected rays corresponding to a single incident rayis cases, R is near to Ro, it can be used as an esti-distributed in an llipse cone as shown in Fig.2.mate of Ro. We then build a new plane passingthrough R and paralleling to the refection bufferplane. The reflection ray of the water surface at Pintersects the new plane at R'. We further send aray from the virtual viewpoint towards R' which in-tersects the reflection buffer plane at Q'. Q' refersViewpointto a visible point R" of the surrounding scene whichprovides a better estimate of Ro than R. The above^AAAA↑srAt,process can be performed iteratively until the dis-tance between the two estimated points is within athreshold. The final estimation is adopted as the hit1 Pixelpoint of the reflection ray from P and its intensityFig.2. One pixel area causes the scattering in incident direc-can be fetched from the reflection buffer.tion.4.3 Image-Based Reflection CalculationAfter the eliptic cone of reflection rays with re-spect to each detail wavelet has been determined,S'what we have to do next is to trace these rays dis-▲tributively, then sum up their contributions by somekind of filter. This is equivalent to distributed raytracing and is apparently a time consumning task. Viewpoint”To accelerate the reflection calculation, we adopt-Na,0an image- based method to find the contributions of:whole reflection conel9l.Assume that the water surface can be approx-imated by a plane, let it be Sp. If Sp is a mirrorsurface, then the mirror reflections of the surround-Fig.3. Geometry relationship of fast rendering water surface.ing scene on the water surface can be easily obtainedby performing a“Inirror” method[11l. Specifically,we define a virtual viewpoint beneath the water sur-As mentioned in Subsection 4.2, due to the dis-face, and set up a refection view frustum with its turbance of each detail wavelets, the refections ofapex at the virtual viewpoint as shown in Fig.3.water surface at P is not a single ray but an ellipticThe virtual viewpoint and the reflction view frus-cone. Owing to the image coherence, the projectiontum define a new space which is referred to as refec-of the hit points of the reflection cone onto the re-tion space. We render the surounding scene in the fetion buffer plane can also be approximated byrelection space by employing a traditional Z-bufferan eliptic area. Let its major axis and mirror axisalgorithmlt0, and record the resultant image in abe a and b, respectively. The center of the eliptic isrelection bufer. The rllection buffer is atached set at the projection of hit point Ro of the principleto the further clipping plane of the refection viewreflection ray onto the refection buffer plane (e.g,frustum. Each pixel stores both the color and dis-Q' inFig.3). Leta= dcosy, and b = dsin r, wheretance of a respective visible point corresponding tod is the distance between P and Ro, and γ is theNevertheless, the spacious water surface is notthe virtual viewpoint.angle between the progression direction of the spe-a ideal plane but a ripple surface, and the surfacecific detail wavelet and the viewing direction. Thennormal at P (Fig.3) deviates from the vertical direc-for each detail wavelet, we can find an elliptic areaon the reflection buffer and a box filter is appliedtion. Consequently the inspired relection ray hits to find its average relection intensity. The final rethe surrounding scene at Ro and intersets the re- flections of water surface at P can be obtained byflection buffer plane at Q. Note that pixel Q on thegathering the contributions from all detail wavelets.中国煤化工MHCNMHG630J. Cormput. Sci. & Technol, Sept. 2004, Vol.19, No.55 Implementationsproposed method is capable of generating well anti-aliased, very natural water surface.We examined the proposed algorithm with sev-The rendering time of Figs.4(a)-(e) are showneral examples. The computer environment consists in Table 1. The resolution of all these imagesofa PC with a 2.4GHz CPU, graphics board of is 640x 480. Figs.4(b) and 4(d) were generatedGeforce 4.0, main memory of 523MB.Fig.4 shows scenes of a reservoir whose farthestwith super sampling, and Fig.4(c) was anti-aliasedby our proposed approach. Although the amountboundary is around 500 meters from viewpoint, and of time for computing the relection of water sur-the water srtfire was rendered with diferenet meth- face in Fig:4(c) is longer than that in Figs 4(a) andods. Fig.4(a) shows the moire pattern on the water4(e), the image quality is greatly improved. Sincesurface. It was rendered without incorporating ei-Figs.4(b) and 4(d) involve 5 x 5 super sampling nother super sampling or any anti- aliasing technique.wonder that the total time cost for generating theseFig.4(b) shows the same scene. The image was anti-two images are increased dramatically. The com-aliased by implementing super sampling with5x5 puting time for shadowing of sunlight and skylightpoints for one pixel. Nevertheless, the moire arti-on water surface are included in total rendering timefiacts in the area far from eye are stil noticable in Table 1. Its time cot is very limited.especially when the image is enlarged. Fig.4(c) wasgenerated by our proposed technique without superTable 1. Time Statistics for Images in Fig.4sampling, and the moire patterns almost disappear.Time (S)Fig.4(d) improves the result of Fig.4(c) by incorpo-间b)(c)(d)@Total25.31 133.61 33.22 179.58 25.02rating a 5x 5 super sampling. In these scenes, wavesWater surface 6.17 23.52 14.19 69.80 6,78are ripple, and so the reflections on the water surfaceReflection0.68 16.94 8.87 63.200.71are clear, while in the area far from the viewpoint,Inverted image 4.47 4.35 4.50 4.364.49the reflections appear blurred. Fig.4(e) was ren-dered by incorporating statistic sampling jittering.Fig.5 demonstrates a practical project of envi-Although this technique works well for still image,ronment assessments. A bridge is asessed in thesethe animation sequence generated by this technique landscapes. The position of the viewpoint is at ais less satisfactory. Animation results show that our stand of viewing scenery, and the viewpoint is above)b)c)(d)”)Fig.4. Outdoor scenes with water surfaces rendered. (a) Without any ani-aliasing. () With 5 x 5 super sampling. (<) Byproposed techniques. (d) By proposed techniques with 5 x 5 super sampling. (e) By statistic sampling jttering.中国煤化工MYHCNMHGXue- Ying Qin et al: Anti-Aliased Rendering of Water Surface631(a)(b)Fig.5. Shadows on the water surface. (a) A reservoir scene in spring. (b) Magnified of the right pier of the bridge.Fig.6. Beautiful scenery with large water area.the water surface 16.70 meters. Since the water is rendered image, the water surface looks peaceful.very turbid, the shadows of sunlight are apparent The water area close to the viewpoint is a lttle bitand dark. We can clearly see the shadows of the dark since this area is shadowed, and the waves arebridge and the trees on the water surface.also very smooth. The reflection of the mountain onFig.6 demonstrates a beautiful scenery of land- the area far from the viewpoint is flat, but blurredscape. The viewpoint is 23.00 meters high above the without any moire patterns. The resolution of thiswater surface, and the farthest point of water sur- image is 960 x 800. The total rendering time for theface is more than one kilometer. According to the whole scene is 331s, and the rendering time for re中国煤化工MYHCNMHG632J. Comput. Sci. & Technol, Sept. 2004, Vol.19, No.5flection of water surface with our proposed method [10] Tadamura K, Qin x, Jiao G, Nakamae E. Rendering op-is 151s. The whole image is anti-aliased with 3x3tical solar shadows using plural sunlight depth buffers.sub-pixels.Journal of the Visual Computer, 2001, 17(2): 76-90.[1] Wallace J R, Cohen M F. A two-path solution to the ren-dering equation: A synthesis of ray tracing and radiosity6 Conclusionmethods. In SIGGRAPH'87, 1987, 21(4): 311-320.Xue-Ying Qin is an asnique for rendering the spacious water surface withsociated professor of State Keyripple waves, such as lakes or reservoirs. Since theLaboratory of CAD&CG, Zhe-water surface consists of a set of wavelets, the inci-jiang University. She receiveddent rays on water surface might be reflected alongher Ph.D. degree from HiroshimaUniversity in 2001, B.S. and M.S.a lot ofdirections due to the disturbance of highdegreesin Mathematics fromfrequency wavelets to the normal of the water sur-Peking University in 1988 andface. In this case, moire pattern can easily occur iffrom Zhejiang University in 1991,the image is rendered without anti-aliasing process.respectively. Her research inter-A robust anti-aliasing method has been pro- ests include computer graphics, visions and image pro-posed in this paper. In the proposed method, the cessing.distribution of the normal vectors of water surfaceat each sample point is analyzed and estimated ac-Eihachiro Nakamae is currently Chairman ofcording to the geometry of its wavelets. The re- Sanei Co. He was granted the title of emeritus profes-flection rays are then modeled as elliptic cones. An sor from both Hiroshima U niversity and Hiroshima In-image-based approach is adopted to determine the stitute of Technology. He was appointed as a researcherreflection intensity of each cone. At the same time,associate at HiroshimaUniversity in 1956, a professorthe shadows of the sunlight and skylight on the wa-from 1968 to 1992 and an associate researcher at Clark-ter surface are also approximated. The still imagesson College of Technology, Potsdam, N.Y., from 1973 toand animations rendered by the proposed method1974. He was a professor at Hiroshima Prefectural Uni-show that the proposed method is robust, stableversity from 1992 to 1995 and a professor at HiroshimaInstitute of Technology from 1996 to the end of Marchand photo-realistic.1999. He received his B.E, M.E, and Ph.D. degreesin electrical engineering in 1954, 1956, and 1967 fromReferencesWaseda University. His research interests include com-puter graphics, image processing and electric machinery.[] ht://ww sggraph.org/education/ materials/Hyper-He is a member of IEEE, ACM, CGS, Eurographics, IEEGraph/ aliasing/ alias0.htmof Japan, and IPS of Japan.[2] Fabris A E, Forrest A R. Antialiasing of curves by dis-crete pre-fitering. In SIGGRAPH'97, Los Angeles, CA,USA, 1997, 24(3): 317- -326.Wei Hua received his Ph.D. degree in applied[3] Turkowski K. Anti-aliasing through the use of coordinate mathematics from Zhejiang. University in 2002. Htransformations. In SIGGRAPH'82, Boston, MA, USA,joined the CAD&CG State Key Lab in 2002. His main1982, 16(3): 19 -26interests include real-time simulation and rendering, vir-[4] Cook R L. Stochastic sampling in computer graphics.tual reality and software.engineering.ACM Trans. Graphics, January 1986, 5(1): 51-72.[5] Crow F C. A Comparison of antialiasing techniques.IEEE Computer Graphic8 and Applications, ISSN 0272-Yasuo Nagai is now an associate professor of Hi-1716, January 1981, 1(1): 40-48.roshima Institute of Technology. He was appointed a6] Norton A, Rockwood A P, Skolmoski P T. Clamping: A researcher associate at Hiroshima Institute of Technol-method of antialiasing textured surfaces by bandwidth ogy in 1965, and an associate professor in 1984. Hislimiting in object space. In SIGGRAPH'82, Boston,,research interests include computer graphics and imageMA, USA, 1982, 16(3): 1-8[7] Don P Mitachell. Generating antialiased images at lowprocessing. He is a member of IEE, IEICE, IPSJ, andsampling densities. Computer Graphics, 1987, 21(3):ITE of Japan.65-72.[8] Kaneda K, Yuan G, Tomoda Y, Baba M, NakamaeQun-Sheng Peng was born in 1947. He receivedE, Nishita T. Realistic visual simulation of water sur-his Ph.D. degree in computer science from the Univer-faces taking into account radiative transfer. In Proe.sity of East Anglia, U.K., in 1983. He is a professor andCAD/Graphics'91, 1991, pp.25 -30.9] Tadamura K, Qin X, JiaoG, Nakamae E. Fast rendering his research interests include computer graphics, com-water surface for outdoor scenes. International Journal puter animation, virtual reality, and point-based mod-of Image and Graphics, 2001, 1(2): 313 -327.eling and rendering.中国煤化工MYHCNMHG

论文截图
版权:如无特殊注明,文章转载自网络,侵权请联系cnmhg168#163.com删除!文件均为网友上传,仅供研究和学习使用,务必24小时内删除。