Design of an Optical Physics Virtual Simulation System Based on Unreal Engine 5
Abstract
:1. Introduction
1.1. Background
1.2. Related Research
- (1)
- The experimental process is fixed and singular, and students can only mechanically complete the required experimental operations, reducing the opportunities for students’ independent exploration of experiments.
- (2)
- The use of virtual simulation programs requires the installation of cumbersome auxiliary software or plugins, leading to compatibility risks when used across platforms, limiting the user base and system promotion.
- (3)
- The system’s immersion and experience are not ideal, and the experimental environment and instruments are non-3D models, making it difficult for students to interact well with the experimental instruments and understand their structure and principles. The low-coverage UI interface and additional operation introductions increase the learning burden on students, causing them to develop feelings of frustration [13].
- (4)
- The system’s use requires a significant amount of computer resources, making it difficult for low-performance computers to run smoothly when other programs are running in the background.
1.3. Our Research
- (1)
- To address the issue of a fixed and singular experimental process, the system integrates the spectrometer’s grating diffraction experimental system and presents it in a step-by-step experimental format. Students can autonomously design experimental solutions to meet specific requirements for practical problems, fostering students’ experimental innovative thinking abilities, ensuring satisfaction, and enhancing students’ willingness to use it [14]. This lays a solid experimental foundation for subsequent course learning and work.
- (2)
- To tackle compatibility issues, the system utilizes the pixel streaming technology solution of Unreal Engine 5. Users can smoothly use the virtual simulation system without the need for software or plugin installations, thereby resolving compatibility issues when used across platforms.
- (3)
- To address the issues of immersion and experience in the system, this virtual simulation system employs SolidWorks to create high-precision 3D models. It utilizes the LUMEN and NANITE technologies of the Unreal Engine 5 engine to achieve the real-time rendering of dynamic scenes, making the experimental scenes of the virtual simulation system more delicate and realistic. Additionally, the system creates a UI interface with higher coverage and simplicity, and the principles and theoretical explanations of the experiments are presented mostly through animated videos. The personalized design of experiments, sound effects, UI design, function buttons, etc., significantly increase students’ interest in learning and reduce the learning cost of using the program. However, high-precision models may occupy more computer hard drive space.
- (4)
- To address performance issues, the system adopts a web-based access method. The program’s operation does not consume computer resources, and users can directly perform experimental operations by entering a URL, greatly reducing the computer performance requirements for users.
2. System Design Principles
2.1. Unreal Engine 5
2.2. Principles of Optical Experiments
3. General System Design
3.1. Overall Design
- (1)
- The Physical Interaction subsystem implements the experimental operation and scene rendering functions of virtual simulation. It enhances the system reusability and immersion. When integrating new experimental content, each module’s functionality can be reused, reducing the development cycles and costs while maintaining a detailed and realistic experimental environment with consistent operating methods. After starting the experiment, the initial state values of the experimental instruments will be randomly processed, providing the most intuitive feedback through changes in optical phenomena by adjusting the spatial information and relevant physical parameters using the operation adjuster.
- (2)
- The Learning Interaction subsystem implements UI functions such as phenomenon observation, data measurement, and recording. It enhances the system scalability, and, by adding other teaching materials, the relevant functions of this subsystem can be reused, facilitating the addition of subsequent experiments and avoiding the rigidification of experiments. The visual drag-and-drop window allows the convenient observation of the physical space changes of the devices without adjusting one’s position and perspective.
- (3)
- The Data Interaction subsystem implements functions such as data storage and information processing, enhancing the system’s management and maintenance capabilities for experimental data resources. This subsystem processes the physical data generated by adjusting instruments based on the algorithms in the experimental principles. It achieves the localized storage and retrieval of information through MySQL Integration plugin technology, facilitating teachers and students in viewing experimental data, teaching materials, and grade rankings.
- (4)
- The Task Interaction subsystem implements functions for the evaluation and querying of grades, enhancing the system’s practicality. The system automatically grades the experiment at the end, allowing students to repeat the experiment to achieve better grades. The entire process does not require teacher involvement, reducing the workload of supervision and grading.
- (5)
- The Human–Machine Interaction subsystem implements the local and network usage of the program, improving the system compatibility and reducing the computer performance requirements. By providing a “.exe” executable program directly through the packaging module, the local program’s real-time rendering will occupy some computer resources, requiring a computer with better performance. The network module uses pixel streaming technology, allowing direct access and usage of the simulation system through a webpage, without installing any software or plugins.
3.2. Module Introduction
3.2.1. Device Adjustment and Linkage Module
- (1)
- Device Adjustment:
- (2)
- Device Linkage:
- (1)
- Boolean variable ‘Other_Has_Using’ indicates whether other keys are invoking the macro. It is set to false only when the conditions “(pressing Q key and releasing E key) or (pressing E key and releasing Q key)” are satisfied.
- (2)
- Boolean variable ‘Is_Runing’ represents whether the macro is currently running. It is set to true only when the macro is running.
- (3)
- Floating-point variable ‘Delay_Time’ represents the delay time.
3.2.2. Physics Module
3.2.3. Rendering Module
3.2.4. Scoring Module
3.2.5. UI Module
3.2.6. Network Module
4. Experiment Process
4.1. Experimental Operation
- (1)
- Adjustment of Telescope for Parallel Light Reception. Utilize methods such as the self-collimation method, rough adjustment method, and semi-adjustment method to ensure that the telescope receives parallel light.
- (2)
- Adjustment of Collimator to Emit Parallel Light. Utilize the properly adjusted telescope to adjust the collimator, ensuring that it emits parallel light.
- (3)
- Placement of Grating and Alignment. Place the diffraction grating and rotate the vernier disc to align the green crosshair in the telescope with the central bright fringe. Secure relevant screws after alignment.
- (4)
- Observation of ±1 Order Spectra. Read the angular coordinates of the central bright fringe at this point. Rotate the telescope to observe the ±1 order spectra on both sides. Adjust the screws to make both side spectra of equal height.
- (5)
- Adjustment of Carrier Stage and Data Collection. Unlock the screws of the carrier stage, rotate it, and observe the movement of the spectra. Simultaneously observe the minimum diffraction angle and disappearance point. Record and analyze data accordingly.
4.2. Data Recording
4.3. Data Processing and Analysis
- (1)
- Given the wavelength of mercury lamp green light as 546.1 nm, the calculation for the minimum diffraction angle and the results for the incidence angle are as follows:
- (2)
- Calculate the measured and theoretical values of green light diffraction angles at different incident angles.
- (3)
- Draw the graph depicting the relationship between the green light diffraction angles and incident angles, as shown in Figure 6.
5. Innovation and Advantage
- (1)
- The experimental content is innovative. The studies in [8,9,10,11,12] do not innovate the experimental content of the spectrometer. However, the virtual simulation experiments in this system include self-designed experiments (as shown in Figure 7). The grating equal inclination instrument used in the experiment is also a homemade device (replacing the telescope of a discarded spectrometer with a laser, transforming the parallel light tube into a receiving screen, and keeping other parts unchanged). Independently exploring innovative experiments can better cultivate students’ practical and innovative abilities.
- (2)
- Compatibility and cross-platform use are enhanced in this simulation system. Unlike the simulation programs in references [10,12], which only provide .exe files, our simulation system includes both a local version and a web version. The information between the program and the webpage is synchronized in real time through a database. The web version can run the program directly without installing any software or plugins (as shown in Figure 8), avoiding compatibility issues across different computer systems.
- (3)
- A strong sense of immersion. Comparing the virtual experiments using the virtual spectrometer in this article with those in references [8,9,10,11,12], the actual effect is shown in Figure 9. It can be visually perceived that the immersion of the spectrometer experiment based on Unreal Engine 5 (Figure 9f) is stronger. The model’s texture and material gloss are of higher quality, and users in such a high-quality virtual laboratory can greatly avoid the operational dissonance caused by mouse and keyboard operations, providing users with a more user-friendly interactive experience and adaptability [27].
- (4)
- Lower performance requirements. As this system is a 3D virtual simulation experiment, the real-time rendering of scene models and lighting effects consumes more system resources compared to 2D experiments. Therefore, the “.exe” program of this system is not included in the performance comparison. It only demonstrates that web-based access using Unreal Engine 5’s pixel streaming technology has lower requirements for computer performance. By delving into the well-known virtual simulation platforms such as phET and Chem Collective, the performance superiority of the system is compared based on CPU usage (AMD Ryzen 7 5800H with Radeon Graphics) and GPU usage (NVIDIA GeForce RTX 3070 Laptop GPU), as shown in Figure 10. The web-based CPU average usage of Unreal Engine 5 is only 0.4%, reducing the CPU usage by 90.24% to 96.23% compared to the other three platforms, with an average saving of 94.76%. Additionally, the GPU usage for network access in this system is 0%, saving GPU resources compared to non-network-access simulations.
- (5)
- Comprehensive scoring system. None of the platforms in references [8,11,12], or the three virtual simulation platforms in Figure 10, have a complete scoring system. A scoring system is beneficial in assessing students’ performance in experiments and providing targeted feedback. This system can evaluate students’ understanding of operational procedures, provide information on measurement accuracy by comparing the measured results with standard values, analyze the calculation process, check the accuracy of calculations, and assess the ability to follow operational norms. It facilitates teaching assistance for educators, enhancing the teaching efficiency.
- (6)
- Has real-time exception handling. During the experiment with the spectrometer in Figure 10, system crashes occurred without error codes for issue feedback. However, when designing the system using a generic architecture approach, it integrates Unreal Engine 5’s exception monitoring tools to monitor the system’s exceptions in real time (such as Unreal Insights performance analysis and debugging tools, the Crash Reporter crash reporting tool, the Bugsnag exception monitoring tool, and the Custom Logging tool, etc.). When users encounter system crashes or similar situations, the system automatically sends error logs to the database to identify the specific location causing the crash or error.
- (7)
- Positive reputation. During the trial phase after the completion of system development, in-depth experiences were provided to professionals and students from various disciplines. A comprehensive survey was conducted, resulting in the collection and analysis of 80 survey reports, as shown in Figure 11. By analyzing the data in the figure, it is evident that each evaluation category received a positive rating exceeding 90%. The system has gained an excellent reputation in real-world environments.
6. Conclusions
Author Contributions
Funding
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Huang, J.D. Construction of the Virtual Simulation Experiment Platform for the Physics Experimental Teaching Demonstration Center. Comput. Knowl. Technol. 2019, 15, 261–264+274. [Google Scholar]
- Wijaya, P.A.; Widodo, A. Muslim Virtual experiment of simple pendulum to improve student’s conceptual understanding. J. Phys. Conf. Ser. 2021, 1806, 012133. [Google Scholar] [CrossRef]
- Asiksoy, G. Effects of Virtual Lab Experiences on Students’ Achievement and Perceptions of Learning Physics. Int. J. Online Biomed. Eng. 2023, 19, 31. [Google Scholar] [CrossRef]
- Artun, H.; Durukan, A.; Temur, A. Effects of virtual reality enriched science laboratory activities on pre-service science teachers’ science process skills. Educ. Inf. Technol. 2020, 25, 5477–5498. [Google Scholar] [CrossRef]
- Brinson, J.R. Learning outcome achievement in non-traditional (virtual and remote) versus traditional (hands-on) laboratories: A review of the empirical research. Comput. Educ. 2015, 87, 218–237. [Google Scholar] [CrossRef]
- Reeves, S.M.; Crippen, K.J. Virtual laboratories in undergraduate science and engineering courses: A systematic review, 2009–2019. J. Sci. Educ. Technol. 2021, 30, 16–30. [Google Scholar] [CrossRef]
- Husnaini, S.J.; Chen, S. Effects of guided inquiry virtual and physical laboratories on conceptual understanding, inquiry performance, scientific inquiry self-efficacy, and enjoyment. Phys. Rev. Phys. Educ. Res. 2019, 15, 010119. [Google Scholar] [CrossRef]
- Niu, H.B.; Li, Y.X.; Liu, H.L.; Wang, X.K. Virtual system of physics experimental instruments based on Unity 3D. Phys. Exp. 2021, 41, 32–37. [Google Scholar]
- Wang, J.W.; Liang, H.N. Application of virtual simulation technology in spectrometer experimental teaching. Coll. Phys. Exp. 2020, 33, 21–23. [Google Scholar]
- Liu, X.; Yang, F.R. Research on adjustment of spectrometer based on simulation experimental platform. Inf. Rec. Mater. 2020, 21, 230–231. [Google Scholar]
- Hou, D.M.; Chen, W.H.; Ma, J.H. Virtual simulation experiment design based on OpenGL. Lab. Res. Explor. 2019, 38, 89–92. [Google Scholar]
- Chen, Z.X.; Xu, A.J. Design and implementation of spectrometer experiment system based on virtual reality technology. Mod. Comput. 2019, 35, 93–96. [Google Scholar]
- Ali, N.; Ullah, S.; Khan, D. Interactive Laboratories for Science Education: A Subjective Study and Systematic Literature Review. Multimodal Technol. Interact. 2022, 6, 85. [Google Scholar] [CrossRef]
- Zhang, M.-H.; Su, C.-Y.; Li, Y.-Y. Factors affecting Chinese university students’ intention to continue using virtual and remote labs. Australas. J. Educ. Technol. 2020, 36, 169–185. [Google Scholar] [CrossRef]
- Xiao, X.; Liu, X.; Xiao, Z. Construction and Application of Computer Virtual Simulation Teaching Platform for Medical Testing. J. Phys. Conf. Ser. 2021, 1915, 042074. [Google Scholar] [CrossRef]
- Zhang, Z.; Du, J.; Zhang, W. Application of virtual simulation experiment system in instrumental analysis teaching in colleges. ITM Web Conf. 2022, 45, 01085. [Google Scholar] [CrossRef]
- Cui, Y.; Lai, Z.; Li, Z.; Su, J. Design and implementation of electronic circuit virtual laboratory based on virtual reality technology. J. Comput. Methods Sci. Eng. 2021, 21, 1125–1144. [Google Scholar] [CrossRef]
- El-Wajeh, Y.A.; Hatton, P.V.; Lee, N.J. Unreal Engine 5 and immersive surgical training: Translating advances in gaming technology into extended-reality surgical simulation training programmes. Br. J. Surg. 2022, 109, 470–471. [Google Scholar] [CrossRef]
- Zhang, X.; Fan, Y.; Liu, H.; Zhang, Y.; Sha, Q. Design and Implementation of Autonomous Underwater Vehicle Simulation System Based on MOOS and Unreal Engine. Electronics 2023, 12, 3107. [Google Scholar] [CrossRef]
- Monji-Azad, S.; Kinz, M.; Hesser, J.; Löw, N. SimTool: A toolset for soft body simulation using Flex and Unreal Engine. Softw. Impacts 2023, 17, 100521. [Google Scholar] [CrossRef]
- Jiang, C.; Dhamankar, S.; Liu, Z.; Vinod, G.; Shaver, G.; Evans, J.; Puryk, C.; Anderson, E.; DeLaurentis, D. Co-simulation of the Unreal Engine and MATLAB/Simulink for Automated Grain Offoading. IFAC-PapersOnLine 2022, 55, 379–384. [Google Scholar] [CrossRef]
- Yang, H.; Xia, Z.; Chen, Y.; Zhu, L.; Dai, L.; Xu, R.; Sun, G.; Yu, H.; Xu, W. Research on visual simulation for complex weapon equipment interoperability based on MBSE. Multimed. Tools Appl. 2023, 1–20. [Google Scholar] [CrossRef]
- Leng, B.; Gao, S.; Xia, T.; Pan, E.; Seidelmann, J.; Wang, H.; Xi, L. Digital twin monitoring and simulation integrated platform for reconfigurable manufacturing systems. Adv. Eng. Inform. 2023, 58, 102141. [Google Scholar] [CrossRef]
- Hernández-De-Menéndez, M.; Guevara, A.V.; Morales-Menendez, R. Virtual reality laboratories: A review of experiences. Int. J. Interact. Des. Manuf. 2019, 13, 947–966. [Google Scholar] [CrossRef]
- Jin, F.Z. Two auxiliary methods for measuring grating constant in grating diffraction experiment. Coll. Phys. 2020, 39, 48–52+56. [Google Scholar]
- Chen, Z.H.; Xu, S.N.; Lv, Z.Y. Derivation of the Wavelength of Diffracted Grating by Geometric Method and Experimental Research. Phys. Eng. 2022, 32, 161–164. [Google Scholar]
- Alam, A.; Ullah, S.; Ali, N. The Effect of Learning-Based Adaptivity on Students’ Performance in 3D-Virtual Learning Environments. IEEE Access 2017, 6, 3400–3407. [Google Scholar] [CrossRef]
Spectral Coordinates | Spectral Coordinates | ||||
---|---|---|---|---|---|
n | |||||
---|---|---|---|---|---|
0 | |||||
1 | |||||
2 | |||||
3 | |||||
4 | |||||
5 | / | / | |||
6 | / | / | |||
7 | / | / | |||
8 | / | / | |||
9 | / | / |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Xin, Y.-L.; Ge, G.-P.; Du, W.; Wu, H.; Zhao, Y. Design of an Optical Physics Virtual Simulation System Based on Unreal Engine 5. Appl. Sci. 2024, 14, 955. https://doi.org/10.3390/app14030955
Xin Y-L, Ge G-P, Du W, Wu H, Zhao Y. Design of an Optical Physics Virtual Simulation System Based on Unreal Engine 5. Applied Sciences. 2024; 14(3):955. https://doi.org/10.3390/app14030955
Chicago/Turabian StyleXin, Yi-Lin, Gui-Ping Ge, Wei Du, Han Wu, and Yu Zhao. 2024. "Design of an Optical Physics Virtual Simulation System Based on Unreal Engine 5" Applied Sciences 14, no. 3: 955. https://doi.org/10.3390/app14030955
APA StyleXin, Y.-L., Ge, G.-P., Du, W., Wu, H., & Zhao, Y. (2024). Design of an Optical Physics Virtual Simulation System Based on Unreal Engine 5. Applied Sciences, 14(3), 955. https://doi.org/10.3390/app14030955