Chapter 96
The Establishment of Sensor Virtual Laboratory Based on VR-Platform Dahu Wang, Huan Liu and Hui He
Abstract This system comprehensively utilizes 3Ds max modeling tools and VR-platform which is 3D virtual reality interactive Platform. We develop a sensor virtual laboratory system which include teacher’s interpretation, animation demo, independent operation, knowledge consolidating and test. The system represents 3d experimental apparatus, realizes the display of experimental instrument details, experiment process and the simulation of experimental phenomena by using VRP scripting language. Under the condition of collision detection, the system realizes the roam to the laboratory scene. The actual application indicates that the system provides a good solution for experimental teaching when some experimental conditions are restricted. Keywords 3Ds max
VR-platform Virtual reality Sensor virtual laboratory
96.1 Preface Experimental teaching as the important part of the teaching in universities plays an irreplaceable role to cultivate students’ manipulative ability, ability to analyze the problem and ability to solve problems, the correct method of thinking and the D. Wang (&) H. Liu H. He School of Electrical Engineering and Automation, Henan Polytechnic University, Jiaozuo 454003, China e-mail:
[email protected] H. Liu e-mail:
[email protected] H. He e-mail:
[email protected]
X. Wang et al. (eds.), Electrical, Information Engineering and Mechatronics 2011, Lecture Notes in Electrical Engineering 138, DOI: 10.1007/978-1-4471-2467-2_96, Ó Springer-Verlag London Limited 2012
809
810
D. Wang et al.
Fig. 96.1 System structure
rigorous work style. However, with the increasing number of college students, the traditional experimental teaching means are affected by teacher resources, venues, instruments and less equipment or teaching quantity is affected [1]. At present, the virtual experimental teaching systems mostly are demo systems, made by Java or Flash. These soft wares lack interactivity between people and system, so the experiment lacks authenticity and vitality [2]. To solve this problem, we must combine 3D visualization technology into the virtual experimental system. By running script language in client we make sure that the system outputs life-like 3D experiment scenes. This sensor virtual laboratory system, as the basis of undergraduate experimental course of detection and automation technology, puts theoretical teaching and practical teaching together and solves a series of shortages during traditional teaching process due to the limits of objective conditions (instrument insufficiency, the risk of practical operation of experiment and a series of other difficulties). Virtual sensor laboratory realistically shows the dynamic characteristics of the experiment, its intelligent human–machine interactive way greatly enhances the learning interests of the students; its functions of independent experimental operation, knowledge summary and testing play an important role for students to deepen knowledge, understanding and grasping, and improve the student’s practical ability, analyzing ability and the ability of solving problems [3].
96.2 System Analyses In order to make this system more useful for students’ learning, we divide it into five modules, and they are teacher’s interpretation, animation demo, independent operation, knowledge consolidating and test, as shown in Fig. 96.1: Teacher’s interpretation and animation demo parts achieve the advance guidance for student’s independent experimental operation by loading lectures video; Animation demo part, combining with the 3D models produced by 3Ds max, is produced by adjusting the key frames and call action library, and it has good dynamic characteristic. Independent operation namely intelligent human–machine interaction, let the students feel that they exist in the real laboratory personally, so increases students’ interest to experimental courses. In the system, students can
96
The Establishment of Sensor Virtual Laboratory
811
design some simple experiments independently. Knowledge consolidate part is used to help students deepen understanding and mastering of theoretical knowledge. Testing system is a summary to this experiment course’s technical operation and difficulty knowledge, and can also test students’ insufficieny through this system, so that most students can self-study better.
96.3 The Key Technology of System Implementation 96.3.1 Entity Modeling Technology (1) The drawing of models This system uses polygon method of 3Ds max8 to model the CSY2001/B sensor system comprehensive test bench, temperature sensor experiments module and other equipments. (2) The optimization of scene model Under the condition of the experimental models, reducing the number of scene model’s strips can not only make sure that the operation of virtual system is more fluent, but also can effectively reduce the requirements of the scene to computer memory and physical memory. (3) The processing method to map models Because of faces which are used too much in the scene, taking more memory resources, the models are displayed by maps in the process of the scene building, such as the upper part of the heating furnace of thermocouple experimental modules, there are too much broken surfaces as it is created by the method of Boolean, thus it costs a significant amount of memory resources. We use Boolean operation to create entity model, and use the render technology of 3Ds max render images with.png or.jpg styles, then use Adobe Photoshop to delete the spare parts. The name of map cannot be named in Chinese, otherwise when we render the images using network rendering method in late stage, it will have problems. At the same time, the size of the texture also has strict requirements, we should ensure map dimensions are 2n, and make the map size as small as possible while guarantee map is clear enough.This can not only save computer memory, but also can optimize speed of the system.
96.3.2 Technology of 3D Animation Technology of 3D animation is mainly applied in animation demo part, it is the important part of virtual laboratory, it can make the system be more vivid and can detailedly introduce the function of each experiment instrument, and the key content of the experiment.
812
D. Wang et al.
Fig. 96.2 Experimental equipment model for example
This technique mainly makes use of the animation function in 3Ds max8. After choosing good materials, playing good lighting and adjusting the key frames, we output images with.tag format, then we put the pictures sequences synthesis for film by using Adobe Premiere cs3, eventually payload to VRP.
96.3.3 The Establishment Technology of VR-Platform System VR-Platform, a 3D interactive simulation platform developed by Zhong Shi Dian digital technology Company independently which is software of 3D virtual reality platform with fully independent intellectual property rights, this software has high applicability, simple operation, powerful, high visualization and its appearance will inject new vitality into the developing VR industry. We use script language of VRP software to realize the browsing and interactive function of 3D scenes. It is both convenient and simple, and can realize a good effect.
96.4 System Constructions 96.4.1 Model Production By using 3Ds max8, we model the modeling of CSY2001/B sensor system comprehensive test bench, temperature sensor experiments module and other equipments, partial models are shown in Fig. 96.2:
96
The Establishment of Sensor Virtual Laboratory
813
96.4.2 Model Baking and Importing After finishing maps of models and decorating lamplight of the scene, and because the model area of laboratory equipment is lesser and some maps need to be tiled, we bake them using complete map way. After being baked, its light and shade information on smooth surface of model will be stored in the file in the form of corresponding textures, after we import the scene into VR-platform, the whole scene will appear the characteristics of trenchant details, regular light and shade. After rendering the images, click [*VRPlatform*] button, then in the open rollout, click the export button, after having confirmed, click append the VRP editor button, and we can successfully import 3D models into VRP editor.
96.4.3 Design of System Interface Based on management system of client and server mode, the function module and functional interface are made firstly in drawing district of VR-platform; then we design images of users’ interface in Photoshop and then cut figures. The interfaces of the system are shown in Figs. 96.3 and 96.4:
96.4.4 The Realization of Interaction 96.4.4.1 The Adding Method of Background Music Experimental teaching in university occupies more and more proportion, in order to add bit vigor for virtual laboratory system, so as to enhance the students’ enthusiasm to experimental courses; we use VRP script language to add some soft background music. By using the following script files to realize this function: Firstly, establish an initial function in system file: Set the state value of object, music broadcast, 0 Then, add the following scripts in trigger function: Switching the state values of object, music broadcast # compares the state values of the objects, music broadcast, 1 Play music, E:\zzz\ papers dubbing\ windancer.mp3, 0, 0, 1 Set the volume, 0, 5 # Otherwise Stop music, 0 Such, we can achieve the playing and closing of music through a button, and can also control the volume.
814
Fig. 96.3 Main interface
Fig. 96.4 Loading window of teacher’s interpretation video
D. Wang et al.
96
The Establishment of Sensor Virtual Laboratory
815
96.4.4.2 Load of Animation Video In 3Ds Max files, we use the method of adjusting key frames and loading action library makes a small animation about the processing of experiment, after rendering, we import sequence frame images into Adobe Premiere CS3 to synthesize for .avi files. We load.avi files which have been compounded into the sensor virtual laboratory system based on VRP. Firstly establish a 3D screen model in 3Ds max8, we can use cuboids instead, then we import it into VRP after rendering, and finally we realize video loading by using the following script commands: Firstly, establish an initialization function in system file: Set the state value of object, video broadcast, 0 Then, add the following scripts in trigger function: Switching the state values of object, video broadcast # compares the state values of the object, video broadcast, 1 Load video, E:\zzz\ papers video\ thermocouple experiment..avi,0 Apply video to model, video broadcast, 1 Control to video broadcast, video broadcast, 1 Show hidden objects, 1, video broadcast, 1 # Otherwise Control to video broadcast, video broadcast,0 Show hidden objects, 1, video broadcast, 0 We can achieve the button control to the broadcasting and closing of the video, and can achieve the controlling to pause and broadcast operation by using the upper script language. Video loading window is shown in Fig. 96.4:
96.4.4.3 Production of Test System Testing system is a simple system which achieves the control to static text and single marquee by using script languages, it can remember students’ answers, and display test scores, and finally shows the correct answer. Its characteristic is every problem has only one chance to choose, after being chosen, the question becomes unavailable state, and record scores, after answering the last question, the system will automatically display ‘displaying the correct answer’ button, after clicking the button, the right answer can display, click ‘start again’ button can start again to answer. Test system as Fig. 96.5 shows:
96.4.4.4 The Design of Independently Operating System Independently operating system is a student to 3D experimental models interactive system. Students can operate 3D equipment freely, and students in virtual laboratory like placing themselves in real laboratory, they can operate any of the
816
D. Wang et al.
Fig. 96.5 Interface of test system for thermocouple thermometer experiment
experimental models independently, design experimental steps freely and can record their own process of experiment. So this system can facilitate students to analyze their operation, and it is useful to find their mistakes. Each step of students’ operation can immediately be observed, when the experiment is completed, students can keep their experimental results, and it is conducive to facilitate the completion of experiment report.
96.5 Conclusions The establishment of the sensor virtual laboratory can improve the students’ autonomous learning ability, and it can reduce teachers’ burden, the more important factor is that it can solve problems of experimental teaching caused by restricting about experimental conditions, although virtual experiment just an auxiliary means for experimental teaching, and cannot completely replace the actual experimental operation, but virtual laboratory injects new vitality for experimental teaching, let experimental teaching extend to a broader space [1], and dynamic 3D scene can more stimulate the fun of student to experiment courses.
96
The Establishment of Sensor Virtual Laboratory
817
References 1. Qu Y (2010) Design and research for virtual laboratory based on the campus network. Mod Education Technol 5:23–27 2. Liang B, Xu D, Mo L (2003) The Research based on VRML for online 3D virtual laboratory. Comput Age 11:167–171 3. Zhang Y, Tan T, Zhao X, Guo Z (2010) The building design for virtual chemical experiment platform based on OSG. Comput Eng Des 31(12):87–91