| Today, with the fast-developing of computer simulation techniques, the technique of Virtual reality has been implemented in many fields. The construction of virtual campus system, who has two important properties-immersion and interaction, is a key part of it. The realization of virtual campus ramble system helps people know school scenes well in all-round, and enhance its growth.This paper is aimed to build a roaming system of multi-functional virtual campus interaction by applying C++combined with3D rendering engine named OSG. The main work is as follows:First, it gives a brief introduction about the definition of virtual reality technique and scene graph theory, also property and function, and elaborate on the concept of the OSG, composition and rendering processes, as well as making an overall designation of the system, mainly on the function of each systematic modules, software and hardware platforms required by implementation.Second, it designs and implements the visualization system of the virtual campus, including the setting of systematic view window based on OSG, the loading method of model, the creation of sky box and the realization of illumination, the simulation of rainy and snowy based on OSG particle system, also the accomplishments of fog effect and3D navigation chart function. Moreover, it realizes the3D sound effect of virtual campus by applying osgAudio named sound library of open source scene graph, which offers a better immersion to virtual campus roaming system.Next, it explains the basic technique of interaction function, especially analyzing the principle of OSG scene roam, researching and realizing some Human-Computer interaction like viewpoint tracking, scene roaming and path roaming. In addition, the method called line/body intersection is adopted to realize the effect of collision detection between perspective and campus scene model, which helps maintain a closer relation with users.Finally, this paper makes a summary and further expansion of the system design ideas. In this paper, the realization of the virtual campus roaming system has a better sense of immersion, authenticity and real-time characteristics. It is very simple to operate within systematic interface, even by interactive equipments like mouse and keyboard. |