閆秋羽 張興剛 郝冬冬
摘 ?要: 針對交互型虛擬現實室內場景建設以及人物漫游問題,提出一種基于改進二叉樹BSP的室內場景管理方法,并采用遺傳算法實現該場景下的人物路徑規劃。首先,在基于幾何建模法的虛擬漫游系統中,利用改進的二叉空間剖分BSP樹算法對三維場景進行預處理,從而提高實時圖形繪制的效率;然后,對漫游場景進行柵格化處理,并采用遺傳算法實現兩點間最短漫游路徑的計算。室內場景漫游測試結果表明,相比傳統的A*算法,提出的BSP?遺傳漫游算法在耗時和最短路徑長度兩方面均表現出一定的優勢。
關鍵詞: 室內場景管理; 虛擬現實技術; 三維場景預處理; 實時圖形繪制; 路徑規劃; 漫游技術
中圖分類號: TN02?34; TP391.41 ? ? ? ? ? ? ? ? ? ? 文獻標識碼: A ? ? ? ? ? ? ? ? ?文章編號: 1004?373X(2019)19?0095?03
Abstract: An indoor scene management method based on improved binary tree BSP is proposed, and the genetic algorithm is used to realize the path planning of the character in the scene, so as to solve the problem of interactive virtual reality indoor scene construction and character roaming. The improved binary space split BSP tree algorithm is used in the virtual roaming system based on geometric modeling method to preprocess the 3D scene, which is beneficial to the improvement of the real?time graphics rendering efficiency. The roaming scene is rasterized, and the genetic algorithm is used to calculate the shortest roaming path between two points. The indoor scene roaming test results show that the proposed BSP?genetic roaming algorithm has more obvious advantages in both time?consuming and path length in comparison with the traditional A* algorithm.
Keywords: indoor scene management; virtual reality technology; 3D scene preprocessing; real?time graphic rendering; path planning; roaming technology
隨著虛擬現實技術的不斷發展,各種行業中應用虛擬現實技術的場景越來越多。虛擬現實技術不僅應用在航空、航天等特殊領域,更應用在現實生活中,例如,虛擬游戲、真實3D電影、三維室內漫游等,為用戶營造出一種身臨其境的感覺[1]。
虛擬漫游技術是虛擬現實技術中的一項基本功能。為了不斷增加用戶的真實感,虛擬現實系統的圖形分辨率質量和三維場景復雜度也隨之不斷提高,以便提供較好的逼真度。因此,如何采用先進的場景處理方法構建室內場景中的三維模型,以及通過路徑規劃實現場景內人物的交互成為一個很重要的研究方向。文獻[2]對沉浸式三維虛擬漫游技術進行了研究,提出基于Multigen Creator和3DMAX的虛擬城鎮場景建模方法,并通過二叉空間剖分BSP樹在Vega軟件中實現虛擬場景中的人物漫游交互。文獻[3]提出一種三維巷道場景中虛擬漫游路徑優化技術,該方法根據OpenGL視點變換模型原理,在BSP樹基礎上實現視點追蹤,并結合線性分形插值函數和Cardinal曲線擬合算法,對追蹤路徑進行優化。文獻[4]提出基于滑動窗口和A*算法的四足機器人路徑規劃方法。但是,BSP樹算法的計算復雜度較大,在處理復雜場景時效率會有所降低。同時,新型智能化路徑規劃算法也不斷出現,遺傳算法解決柵格地圖上的最短路徑求解問題時,具有較好的求解質量和效率[5]。因此,在以上研究的基礎上,本文提出一種基于改進二叉樹BSP的室內場景設計方法,并采用遺傳算法實現該場景下的人物路徑規劃。首先,利用球體樹原理構造粗略、模糊的空間分割法,從而使基于二叉樹BSP算法的三維漫游場景構造速度得到加快;其次,對漫游場景進行柵格化處理,并采用遺傳算法實現該場景下的人物路徑規劃,得到最短漫游路徑。測試結果驗證了提出漫游方法的優越性能。


[6] 吳曉雪,王魏,李響,等.基于osgEarth虛擬校園漫游的研究[J]. 現代電子技術,2017,40(20):18?21.
WU Xiaoxue, WANG Wei, LI Xiang, et al. Study on virtual campus roaming based on osgEarth [J]. Modern electronics technique, 2017, 40(20): 18?21.
[7] BASTUG E, BENNIS M, MEDARD M, et al. Toward interconnected virtual reality: opportunities, challenges, and enablers [J]. IEEE communications magazine, 2017, 55(6): 110?117.
[8] WALSH C M. Assessment of competence in pediatric gastrointestinal endoscopy [J]. Current gastroenterology reports, 2014, 16(8): 1?10.
[9] LEE N Y, LEE D K, SONG H S. Effect of virtual reality dance exercise on the balance, activities of daily living, and depressive disorder status of Parkinson′s disease patients [J]. Journal of physical therapy science, 2015, 27(1): 145?152.
[10] SONG B, WANG Z, SHENG L. A new genetic algorithm approach to smooth path planning for mobile robots [J]. Assembly automation, 2016, 36(2): 138?145.
[11] MAPLES?KELLER J L, BUNNELL B E, KIM S J, et al. The use of virtual reality technology in the treatment of anxiety and other psychiatric disorders [J]. Harv rev psychiatry, 2017, 25(3): 103?113.
[12] QU B, ZHANG Z, LI F, et al. Research and application of oil operator training system based on virtual reality technology [J]. Journal of Petrochemical Universities, 2017, 30(1): 54?59.