A-New-Method-of-Virtual-Reality-Based-on-Unity3D(一

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

ANewMethodofVirtualRealityBasedonUnity3DSaWang1,2*,ZhengliMao2,ChanghaiZeng2,HuiliGong1,ShanshanLi1,BeibeiChen11TheKeyLabofResourceEnvironmentandGIS,CapitalNormalUniversity,Beijing,China2DepartmentofSurveyingandUrbanSpatialInformation,HenanUniversityofUrbanConstruction,Pingdingshan,China*Correspondingauthor:cccwangsa@163.comAbstract—Intheareaofgeographicinformationsystem,therearealwaystwomethodstoget3Dvirtualreality,oneistousea2DprofessionalplatformsuchasArcGISsoftwaretogetthevirtualrealitybysecondarydevelopment,theotheristousea3Dor2.5Dsoftwareasaplatformfordevelopment,suchastheSkylinesoftware.Inthispaper,wewilluseadifferentplatform,Unity3D,whichisusuallytreatedasgamedevelopmentsoftware,asavirtualrealitydevelopmentplatform.Firstly,thehierarchicalapproachofgeographicinformationsystemisadoptedinthestudyarea,andtheareaisdividedintofourlayers:TerrainLayer,BuildingLayer,TransportLayer,VegetationLayer,additionally,therawdataofTerrainLayerisobtainedbyGPSmeasurements.Secondly,allthegeographicalentitieswhichrelatedtodifferentlayersareconvertedto3DmodelbyAutoCADand3dsMaxsoftware.Thirdly,the3DmodelsareimportedintotheUnity3D,andprogrammingwithJavascriptlanguageinVisualProgrammingLanguageEditorinordertoachieveGameobjectsandScenes.Lastly,theScenesareintegratedandpublishedonthenetwork.TheattributedataofstudyareaisstoredbyMySQLwhichisconnectedwithUnitygameplatformbyexternalinterface.VisitorscandownloadtheActiveXcontroltobrowsethestudyarea,thesceneiskeeponupdating60timespersecond,theviewerwillsubconsciouslyinputandimmediatelyimmersedinthevirtualsceneforspontaneousexplorationandobservation.Withafullrangeofpersonalizedmodeofoperation,theuserscanchoosetheirownwaytobrowseandparticipateinthevirtualreality,andgivefullplaytotheirimaginationaccordingtotheirownwisheswithoutaffectingtheothersbyusingthedesignatedkeysonthekeyboard.Keywords-VirtualReality;Unity3D;GISI.INTRODUCTIONVirtualreality(VR)isatechnologywhichallowsausertointeractwithacomputer-simulatedenvironment,MichaelHeim(1994)identifiessevendifferentconceptsofvirtualreality[1]:simulation,interaction,artificiality,immersion,telepresence,full-bodyimmersion,andnetworkcommunication.Nowvirtualrealityiswidelyusedinindustryandpublicservicewithitsintuitivevisualandsimpleoperation.Unity3Disoneofthemostfamousvirtualrealitytools,itiscross-platformgamedevelopmentsoftware,andnowbesidesMacOSX,Unity3DcanfullysupportWindowsXP/Vista/7,Unity3Dsupportsthreescriptinglanguages:JavaScript,C#,andadialectofPythoncalledBoo.Allthreeareequallyfastandinteroperate,andcanusetheunderlying.NETlibrarieswhichsupportdatabases,regularexpressions,XML,fileaccessandnetworking.Scriptingisfrequentlythoughtofaslimitedandslow,butinUnity3DscriptsarecompiledtonativecodeandrunnearlyasfastasC++.Itiseasytogetthefastiterationtimesandeaseofuseforsomeonewholikesscriptinglanguages.Thesethreelanguagesingamedevelopmentprojectscanalsobemixed-use.Unity3dalsosupportstheWindowsplatform,C#,VB.net,VB6,Delphiandotherprogramminglanguages.TheUnity3DgameengineandtheUnity3Ddevelopmentenvironmentaretightintegrated,soitprovidesaverypowerfulvisualeditorandlanguagelevelsofthenetwork.Inthisresearch,weuseUnity3Dasthedevelopmentplatformforvirtualreality.ThestudyareaisthecampusofHenanInstituteofUrbanConstruction,Pingdingshan,China,withanareaof1,066,667m2,rangingfrom33°46′11″Nto33°46′42″N,113°10′52″Eto113°11′36″E.II.FRAMEWORKANDIMPLEMENTATIONA.FrameworkBrowser-Serverthree-tierarchitectureVR-basedframeworkisdesignedintheresearchareaandincluding3layers:presentationlayer,logiclayeranddatalayer[2].1)Presentationlayerismainlyusedforinterfacedisplayandtoachievetheuser'squery.2)Logiclayerconsistsofwebserverandapplicationserver[3].WorkflowofLogiclayerisasfollows:a)Webserverreceivestheuser’sHttprequestwhichsendbythebrowser;b)requestispassedtotheapplicationserver;c)applicationserverconverttheHttprequestsintothestatementthatdatabasecanidentify;d)sendingtherequesttoqueryinthedatabase;e)Whenthequeryiscomplete,thequeryresultsetsarereturnedtotheapplicationserver;f)applicationserveranalyzeandprocesstheresultsets;g)senttheresulttowebbrowserbywebservers;h)downloadthethree-dimensionalscenefilesthatuserrequestsfromPresentationlayer;i)showavirtualthree-dimensionalscenebyaplug-inwhichembeddedinthebrowser.3)Datalayerincludestherelatedspatialdataandattributedata,suchasDEMdata.B.ImplementationInthisstudy,thehierarchicalapproachofgeographicinformationsystemisadopted,andthestudyareaisdividedintofourlayers:Terrainlayer,Buildinglayer,TransportlayerandVegetationlayer.Figure1showsthedetailsofthelayersinstudyarea.Figure1.ThedetailsofthelayersinstudyareaInthevirtualrealitysystem,Two-dimensionalmapsareusedasbasemapsin3Dscenestoexpressthegeographicentity’sthree-dimensionallocationinformation.3DsMaxandothersoftwareareusedtocreatethree-dimensionalmodelsoffeaturesinthestudyarea.Three-dimensionalmodelsneedtoaddtextureandattributeinformation.Textureswhichcollectedthroughoutdoorjobscantrulyreflectthesurfacefeaturesofgeographicentities.AfterprocessingbytoolssuchasPhotoshop,texturesareimpor

1 / 13
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功