《计算机学报》2009年8期基于图形硬件的光滑线条绘制赵汉理1,金小刚1+,沈建冰2,卫飞飞1,冯结青11(浙江大学计算机辅助设计与图形学国家重点实验室,浙江省杭州市310058)2(北京理工大学计算机科学与工程学院,北京市100081)SmoothLineDrawingonGraphicsHardwareZHAOHan-Li1,JINXiao-Gang1+,SHEN激an-Bing2,WEIFei-Fei1,FENG激e-Qing11(StateKeyLabofCADCG,ZhejiangUniversity,Hangzhou310058,China)2(SchoolofComputerScienceandTechnology,BeijingInstituteofTechnology,Beijing100081,China)+Correspondingauthor:Phn:+86-571-88206681-507,Fax:+86-571-88206680,E-mail:jin@cad.zju.edu,wwcad.zju.edu/home/jinReceived2008-06-30;Accepted2008-12-08Abstract:Thispaperpresentsanewobject-spacebasedalgorithmforrenderinga3Dmodelasalinedrawingusinggraphicshardware,basedontheinsightthatalinedrawingcaneffectivelyconveyshapeusingremarkablyminimalvisualcontent.Suggestivecontours,anewtypeoflinecanbecombinedwithsilhouettestoproduceimpressiveview-dependentlinedrawingofsmoothshapes.Inaddition,geometryshader,whichisnewlyintroducedintotheDirect3D10pipeline,canprocessper-triangleprimitivedataandoutputzeroormorelineprimitives.Weproposeaparallelizedlinedrawingapproachthatdirectlyextracts3Dsparselinearfeaturesingeometryshader.Themethodselectslinesatanappropriatescaleautomatically,andexhibitsgoodframe-to-framecoherenceatinteractiverates.Theimplementationofouralgorithmisstraightforward,andseveralexperimentalexamplesaregivenattheendofthepapertodemonstratetheeffectivenessofourapproach.Keywords:linedrawing;silhouette;suggestivecontour;radialcurvature;graphicshardware摘要:线条能够以相当少的可视信息来有效地表示一个三维模型的形状.利用图形硬件的高度并行处理能力,本文提出了一种新的基于物体空间的线条绘制方法.对于一个光滑物体形状,新型的Suggestive轮廓线能够结合侧影轮廓线来生成非常好的视点相关的线条效果.并且,最新被引入到Direct3D10流水线的几何着SupportedbytheNationalNaturalScienceFoundationofChinaunderGrantNos.60533080,60833007国家自然科学基金;theNationalKeyBasicResearchFoundationofChinaunderGrantNo.2009CB320801国家重点基础研究发展计划;theKeyTechnologyRDProgramunderGrantNo.2007BAH11B03国家科技支撑计划课题色器能处理三角形图元数据及输出零个或多个线条图元.本文提出了一种并行化的线条绘制方法,能够直接在几何着色器中抽取三维的特征线条.本方法能根据视点与模型的距离自动地选取合适比例的线条进行绘制,绘制的线条平滑,绘制速度快.在文章最后给出的许多实验示例证实了本方法的效果.关键词:线条绘制;侧影轮廓线;suggestive轮廓线;径向曲率;图形硬件中图法分类号:TP311.1文献标识码:A1IntroductionComputergraphicsboastsanamazingsuccessstorywithregardtorealisticrendering,whiletomakepicturesphotorealisquiteexpensive.Fortunately,thereisanalternativetocommunicatevisualinformationthatavoidshavingtoworryaboutamyriadofperhapsunnecessarydetails.Depictinginformationaboutshapebylinedrawingisclearlyeffectiveandnatural,havingbeenusedfortensofthousandsofyears.Whenartistsdesignimagerytoportrayascene,theydonotjustrendervisualcuesveridically.Instead,theyselectwhichvisualcuestoportrayandadapttheinformationeachcuecarries.Linedrawingstylescanbefoundinmanycontexts,suchascartoon,storytelling,technicalillustration,architecturaldesignandmedicalatlases.DeCarloetal.[1]recentlyaugmentedthesuiteofavailablelinetypesbyintroducingsuggestivecontours--featurelinesdrawnalongzerocrossingofradialcurvature.Suggestivecontoursblendvisuallywithtruecontoursandhelpconvey3Dshape(seeFig.1).Inaddition,graphicshardwareisbecomingmor...