江苏科技大学学报(自然科学版)
江囌科技大學學報(自然科學版)
강소과기대학학보(자연과학판)
JOURNAL OF JIANGSU UNIVERSITY OF SCIENCE AND TECHNOLOGY(NATURAL SCIENCE EDITION)
2013年
4期
386-390
,共5页
陈宁%聂垒鑫%刘炜%龚嫚%王之民
陳寧%聶壘鑫%劉煒%龔嫚%王之民
진저%섭루흠%류위%공만%왕지민
OSG%海洋漫游%船模
OSG%海洋漫遊%船模
OSG%해양만유%선모
OSG%ocean scene ramble%ship model
针对海上环境气候复杂,模拟困难等原因,本系统在基于OSG三维渲染引擎的基础上,借助OsgOcean场景实现了第一视角的海洋场景漫游,包括船舶模型的调换,天气变化,键盘事件响应来控制船舶运动。首先通过将OSG视景窗口嵌入MFC框架下,并在OSG核心类cOSG中响应海洋场景的生成;其次在模型节点中通过添加和移除节点,动态实现船舶模型的加载和转换,然后通过天空盒中阳光在海面产生的不同光照效果,利用着色器,渲染不同气候下海面的颜色;最后通过OSG三维渲染引擎中的粒子效果,将自定义粒子模块实时加载到场景中,用来模拟大自然中的雨、雪效果。
針對海上環境氣候複雜,模擬睏難等原因,本繫統在基于OSG三維渲染引擎的基礎上,藉助OsgOcean場景實現瞭第一視角的海洋場景漫遊,包括船舶模型的調換,天氣變化,鍵盤事件響應來控製船舶運動。首先通過將OSG視景窗口嵌入MFC框架下,併在OSG覈心類cOSG中響應海洋場景的生成;其次在模型節點中通過添加和移除節點,動態實現船舶模型的加載和轉換,然後通過天空盒中暘光在海麵產生的不同光照效果,利用著色器,渲染不同氣候下海麵的顏色;最後通過OSG三維渲染引擎中的粒子效果,將自定義粒子模塊實時加載到場景中,用來模擬大自然中的雨、雪效果。
침대해상배경기후복잡,모의곤난등원인,본계통재기우OSG삼유선염인경적기출상,차조OsgOcean장경실현료제일시각적해양장경만유,포괄선박모형적조환,천기변화,건반사건향응래공제선박운동。수선통과장OSG시경창구감입MFC광가하,병재OSG핵심류cOSG중향응해양장경적생성;기차재모형절점중통과첨가화이제절점,동태실현선박모형적가재화전환,연후통과천공합중양광재해면산생적불동광조효과,이용착색기,선염불동기후하해면적안색;최후통과OSG삼유선염인경중적입자효과,장자정의입자모괴실시가재도장경중,용래모의대자연중적우、설효과。
Since the maritime environment is complicated and it is difficult to simulate , an ocean scene ramble system has been designed based on the OSG 3-D rendering engine and osgOcean .The system included the fol-lowing functions:switch of ship models , weather variations and ship movements controlled through keyboard e-vents response .At first, the OSG view window was embedded in the MFC framework , the ocean scene was gen-erated in the core class cOSG , then by adding and removing the model nodes , ship models were loaded and switched dynamically .After this,the color of ocean surface under different climates was rendered by the shader based on the light reflection and refraction of the ocean surface .At last,the rain and snow effects were simulated by adding the particle system of OSG rendering engine to the ocean scene .