| With the rapid development of China’s road transportation, the constant improvement ofthe highway network planning, and the trend of highway information management, highwaydesign industry demands new requirements on the traditional design approaches. On the basisof two-dimensional linear design, structural design, and layout design, more attention shouldbe focused on the fusion of highway entity and environment and emphasizing the roadtransport system for the harmony of the senses. Based on these, for the lighting design part ofthe tunnel mechanical and electrical engineering, three-dimensional environment lightingdesign platform is developed by using virtual reality technology and computer3Dvisualization technology, which implements "Tunnel Lighting Design and Simulation SystemBased on OpenSceneGraph". The system can help designers to complete tunnel lightingproject design tasks in a three-dimensional environment, which achieves real-time layout andobservation of the tunnel lighting. Lighting effects is simulated in accordance with thelighting layout, which imitates tunnel lighting environment after the luminaires design.Firstly, theoretical backgrounds involved in platform development are described, whichare tunnel lighting theory and related technical basis of OSG, respectively. The tunnel lightingtheory, including the driver’s visual characteristics and influencing factors, division of tunnellighting sections, and lighting characteristics and layout; they provides the theoretical basis ofthe application. And then OSG and computer graphics content are introduced, including viewtransform, the OSG scene organization principle, and OpenGL shading language andcomputer lighting calculations, which serves as the technical basis in the platformdevelopment.Secondly, the tunnel lighting effects simulation is discussed in detail. The Shaderrendering technology is used for lighting parts of the tunnel floor and wall. According to thelighting characteristics of luminaires with polar axis of symmetry, lighting rendering range isgat by computing the intersection of the cone and tunnel model. The ground shape in theintersecting areas is regard as round approximately, which is colored by interpolation method.The blending factor in interpolation is the attenuation effect value in the spotlight attenuation principle. Coloring calculation range of the wall part in the intersecting areas is extended tothe sphere in space from flat, and this part is also attenuated colored. With all above, therealistic bright and dark effects are achieved. For the problem of multi-luminaires lightingeffects edge intersection in this coloring method, this article provides a solution by controllingcoloring range. Finally, using the method of grouping the same type, and isometric luminaires,the system achieves arrangement of the tunnel full range of lighting sequence. In addition, thesystem applies OSG built-in light source for auxiliary lighting calculations, by adding twoOSG position light sources for both ends of the tunnel model, which could providesbrightness for observing the layout of luminaires. In the system, the tunnel overall lightingstructure is consisted of OSG built-in light source and shader rendering.Finally, this thesis describes the realization of human-computer interaction on theplatform, mainly including luminaires layout control based on CEGUI and the realization andswitching of the manipulators in the system. In the summary of mechanism and steps of userinteractive events handling under the OSG environment, system functions are analyzed andthe menu interface is constructed based on CEGUI, thus the system achieves real-time layoutdesign of the tunnel luminaires, by inputting layout parameters on the panel interface. Interms of the requirements of simulating driving environment and global observation onluminaires layout, a kind of driving manipulator of the platform is achieved, with theadditional Trackball Manipulator, and the system completes the switching between these twomanipulators under CEGUI.The system builds a design platform of tunnel lighting project under thethree-dimensional environment, which could be used in actual lighting projects for3D designand simulation. This platform achieves real time interactive function and lighting effectssimulation. It runs stably and can be used as three-dimensional design software and displayplatform for the lighting project. |