Pedestrian behavior simulation operation control method based on unreal engine
By using Unreal Engine's 3D scene construction and layered behavior control, combined with dynamic resource optimization and multi-threaded task allocation, the problems of insufficient realism and poor dynamic response in Unreal Engine's pedestrian behavior simulation technology have been solved. This has achieved highly realistic simulation and dynamic controllability of pedestrian behavior, meeting the real-time control requirements in complex scenarios.
Patent Information
- Application Number
- CN202511371968.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-24
- Publication Date
- 2026-02-03
AI Technical Summary
Existing pedestrian behavior simulation technology based on Unreal Engine suffers from insufficient realism, poor dynamic response and controllability, making it difficult to meet the real-time control requirements in complex scenarios.
The Datasmith plugin for Unreal Engine is used to build 3D scenes, and the logic of interactive devices is built in conjunction with the Blueprint system. Pedestrian attribute parameters are defined, and hierarchical behavior control and dynamic resource optimization are adopted. The Task Graph system is used for multi-threaded task allocation to achieve highly realistic and dynamically controllable pedestrian behavior.
It achieves highly realistic simulation of pedestrian behavior, possesses dynamic response and real-time control capabilities, enhances the interactivity and controllability of the simulation system, and supports diverse scheduling needs in complex scenarios.
Smart Images

Figure CN121457765A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and more specifically, to a pedestrian behavior simulation and operation control method based on Unreal Engine (UE), which is applicable to pedestrian behavior simulation, traffic planning optimization, and emergency evacuation drills in scenarios such as urban transportation hubs and large public buildings. Background Technology
[0002] With the expansion of urban scale and the increase in traffic complexity, urban managers have an increasingly urgent need for pedestrian behavior simulation tools to assist in traffic flow control, public space design optimization, and emergency drills. Traditional pedestrian simulation technologies are mostly based on two-dimensional or simple three-dimensional scenes, which have two major drawbacks: First, they lack realism, only simulating pedestrian movement along fixed or random paths, and cannot reproduce the complex factors such as environmental interaction and emotional influence in human behavior logic; second, they have poor dynamic response and controllability, focusing on static scenes or single behavioral patterns, lacking flexible operation control mechanisms, and are unable to cope with dynamic scheduling and behavior adjustment in multiple scenarios.
[0003] Unreal Engine, as an industrial-grade open-source development engine, boasts powerful real-time rendering capabilities, highly realistic image quality, and a wealth of auxiliary development tools. Its built-in graphics rendering, physics simulation, and AI systems provide the foundation for high-quality pedestrian simulation. However, existing simulation systems based on Unreal Engine still have limitations: on the one hand, the pedestrian behavior logic design is simplified, often achieving group simulation by replicating fixed paths, which cannot scientifically reflect the movement decisions of pedestrians in real space; on the other hand, computational bottlenecks are prone to occur in large-scale scenes, leading to simulation stuttering and delayed dynamic responses, making it difficult to meet the needs of real-time control and complex scene simulation.
[0004] Therefore, there is an urgent need for a pedestrian behavior simulation control method that can collaboratively optimize behavioral logic, dynamic response, and computational efficiency, so as to give full play to the technical advantages of Unreal Engine and improve the practicality and reliability of the simulation system. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of existing pedestrian behavior simulation technology and provide a pedestrian behavior simulation operation control method based on Unreal Engine, which realizes highly realistic pedestrian behavior, dynamic controllability of the simulation process, and efficient calculation of large-scale scenarios, providing technical support for scenarios such as traffic planning and emergency drills.
[0006] To achieve the above objectives, this invention provides a pedestrian behavior simulation and control method based on Unreal Engine, comprising the following steps: S1: 3D scene construction, specifically including: using the Unreal Engine Datasmith plugin to convert the Revit / IFC format BIM model into an Unreal Engine mesh, and performing lightweight processing on the mesh; based on the Unreal Engine Blueprint system, constructing a dynamic 3D scene containing interactive device logic, wherein the interactive devices realize interactive behavior through custom blueprint nodes and event-driven mechanisms; generating environmental elements that simulate factors affecting pedestrian walking. S2: Pedestrian model construction, specifically including defining a set of pedestrian attribute parameters containing basic attributes, behavioral patterns, and emotional states; configuring the initial pedestrian distribution through a data-driven approach, which supports random generation or import of external data; S3: Layered behavioral control, specifically including the control logic of the macro-path planning layer, the micro-behavioral decision-making layer, and the emotion-driven layer; S4: Dynamic resource optimization, which includes detailed level control and multi-threaded task allocation; S5: Real-time interaction and data analysis, specifically including the construction of interactive control interfaces, the generation of data visualization dashboards, and data recording and playback.
[0007] Furthermore, in step S1, the interactive devices include elevators, turnstiles, and escalators; the interactive behaviors of the elevators include opening and closing doors, running, and responding to passenger calls; the interactive behaviors of the turnstiles include recognizing pedestrian ticketing information, valid tickets triggering the barrier to open, and invalid / unused cards triggering closure and alarms.
[0008] Furthermore, in step S2, the basic attributes include gender, age, and movement speed, and the movement speed is set according to differences in age, gender, and carried items; the behavior patterns include daily walking and emergency evacuation; the emotional states include calm, anxiety, and panic; when randomly generating the initial distribution of pedestrians, the pedestrian generation probability is set according to the passenger flow statistics of each area of the scene.
[0009] Furthermore, the macro-path planning layer in step S3 adopts an improved navigation mesh (NavMesh) dynamic update algorithm. The algorithm adjusts the navigation mesh weights in real time according to the level of scene congestion, temporary obstacles and event information, so as to realize pedestrian group obstacle avoidance and diversion.
[0010] Furthermore, the micro-behavioral decision layer in step S3 adopts a hybrid architecture of behavior tree and finite state machine (FSM), specifically including: Based on the ORCA algorithm, the avoidance rules are optimized. When the distance between a pedestrian and an obstacle / other pedestrian is less than the safety threshold, the avoidance speed and direction are automatically calculated. A dynamic safety distance calculation model is introduced to adjust the following distance based on pedestrian speed and environmental congestion. The design incorporates emergency stop and help-seeking behavior logic. When a sudden danger occurs, pedestrians should immediately stop and issue a warning signal. When encountering difficulties, pedestrians should proactively approach staff within the scene and request help.
[0011] Furthermore, the emotion-driven layer in step S3 introduces emotion state variables and generates emotion fluctuation curves through the Perlin noise function to dynamically adjust pedestrian decision weights. Specifically, pedestrians in a panicked state prioritize the shortest path and simplify unnecessary obstacle avoidance logic, while pedestrians in an anxious state increase their movement speed and prioritize the time-optimal path.
[0012] Furthermore, step S4, Level of Detail (LOD) control, combines the camera's view frustum distance and scene load prediction model to dynamically adjust the rendering and physics calculation accuracy of the pedestrian model: a high-precision model is used for the camera's close-range observation area, which includes complete textures and complex physical collisions; a low-precision model is used for the camera's far-range observation area, which includes simplified textures and merged collision bodies.
[0013] Furthermore, step S4, multi-threaded task allocation, utilizes Unreal Engine's Task Graph system to break down the pedestrian AI logic into independent tasks and allocate them to different threads: The main thread handles user input, UI rendering, and camera control. Asynchronous thread groups perform path planning, collision detection, and pedestrian behavior status updates in parallel.
[0014] Furthermore, the interactive control interface in step S5 allows users to adjust simulation parameters in real time. These simulation parameters include blocking specific areas of the scene, triggering emergencies, adjusting simulation speed, and switching observation perspectives. The emergencies include fires, earthquakes, and equipment failures.
[0015] Furthermore, in step S5, the data visualization dashboard displays a pedestrian density heatmap, movement speed distribution, and path conflict frequency in real time, and the pedestrian density heatmap uses a green-yellow-red color gradient to mark the population density in different areas; the data recording and playback uses the Unreal Engine's Replay system to record the entire simulation process data, supports trajectory playback and key event marking, and exports CSV format logs for use by external analysis tools.
[0016] The beneficial effects of this invention are: (1) Achieving a high degree of realism and diversity in pedestrian behavior. Through the definition of detailed pedestrian attribute parameters, emotion-driven behavioral decisions, and comprehensive consideration of environmental factors, it is possible to simulate a wide variety of pedestrian behaviors, such as walking patterns, avoidance strategies, and interactive behaviors under different emotional states. This makes pedestrian behavior in the simulation scenario closer to real human behavior, greatly enhancing the realism and credibility of the simulation, and providing a reliable data foundation for pedestrian behavior research, architectural design evaluation, and traffic planning.
[0017] (2) Dynamic response and real-time control capability. The entire simulation system method has dynamic response capability, which can adapt to changes in scene, changes in pedestrian behavior, and control commands input by users in real time. In complex scenarios, such as large shopping malls, transportation hubs, and emergency evacuation scenarios, it can flexibly respond to various emergencies, provide strong support for real-time scheduling and emergency decision-making, and effectively meet the diverse scheduling needs in complex scenarios.
[0018] (3) Enhance the interactivity and controllability of the simulation system. The user-friendly interactive control interface and rich real-time interactive functions enable users to easily modify, control, and observe the simulation scene in real time. Users can adjust scene parameters, simulation speed, and observation angle at any time according to actual needs, and gain a deeper understanding of the interaction between pedestrian behavior and scene factors. (4) Data visualization and analysis support enhances users' intuitive understanding of the simulation status. Key indicator data are displayed in real time in clear chart format, enabling users to quickly understand the simulation status and pedestrian behavior characteristics, and facilitating timely identification of problems and trends. Attached Figure Description
[0019] Figure 1 This is a schematic diagram of the pedestrian behavior simulation and control method based on Unreal Engine. Figure 2 Station model diagram in Unreal Engine Figure 3 This is a diagram illustrating some pedestrian behaviors. Detailed Implementation
[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] Figure 1 A pedestrian behavior simulation and operation control method based on Unreal Engine is provided for embodiments of the present invention. The method flow is as follows: S1: The 3D scene construction of the station in Unreal Engine S11: Obtain the RVT format BIM model of the station. This model contains detailed information about the station's architectural structure, including elements such as the concourse, platforms, stairs, passageways, and various entrances and exits. Convert the model into Unreal Engine meshes using the Datasmith plugin. Simultaneously, perform lightweight model processing, removing redundant details that do not affect the overall simulation results but increase computational burden, such as... Figure 2 .
[0022] S12: Based on the Unreal Engine's Blueprint system, construct the logic for interactive devices in the station. Taking the elevator as an example, create an elevator Blueprint component, defining its door opening and closing, operating status, and logic for responding to passenger calls, enabling it to perform corresponding actions in the simulation based on passenger instructions. For the turnstiles, construct logic to recognize pedestrian ticket information; the gate opens when a valid ticket approaches, and remains closed and triggers an alarm when an invalid ticket or no card is swiped.
[0023] S13: Use the Unreal Engine physics engine to generate station environment elements, such as simulating temperature regulation inside the station, adjusting the ground friction coefficient during rainy weather, and affecting pedestrian walking speed and stability.
[0024] S2: Passenger and pedestrian model construction within the station scene S21: Define a detailed set of pedestrian attribute parameters. For basic attributes, the gender ratio of pedestrians is set to roughly correspond to urban population statistics, the age range covers all age groups from children to the elderly, and the movement speed is differentiated based on factors such as age, gender, and items carried.
[0025] S22: Behavioral patterns include daily commuting walking, post-shopping walking (the state after shopping in the commercial area of the subway station), and emergency evacuation walking. Emotional states consider calm (normal travel state), anxiety (such as worrying about missing the last train), and panic (emotions in emergency situations such as fires). By combining these different attributes, a rich variety of pedestrian individual models can be constructed, reflecting the characteristics and behavioral tendencies of different passengers in the station.
[0026] S23: When supporting the random generation of the initial pedestrian distribution, the probability of pedestrian generation at different entrances and exits can be set based on passenger flow statistics for each station entrance and exit. For example, if a major entrance or exit has a large passenger flow during peak hours, then more pedestrians will be randomly generated near that entrance or exit at the start of the simulation. Simultaneously, real-time passenger flow monitoring data provided by the subway operation department can be imported as external data, allowing for precise initial pedestrian layout in the simulation scenario based on the pedestrian distribution data for different time periods and areas recorded in the data.
[0027] S3: Layered Behavior Construction S31: Employs an improved NavMesh dynamic update algorithm. It comprehensively considers factors such as station congestion levels, construction areas, temporary obstacles (e.g., maintenance equipment placement areas), and train arrival schedules to calculate the globally optimal path in real time.
[0028] S32: Utilizing a hybrid architecture of Behavior Tree and Finite State Machine (FSM), the micro-interaction logic of individual pedestrians in the station is defined. Regarding avoidance rules, based on the ORCA algorithm, when the distance between a pedestrian and other pedestrians or obstacles in front is less than a set safe distance, the pedestrian adjusts their walking trajectory in a timely manner according to the avoidance speed and direction calculated by the ORCA algorithm to ensure that a collision is not occurred. Figure 3 .
[0029] S33: For following behavior, a dynamic safe distance calculation model is introduced. Inside a subway station, if a pedestrian notices a group of pedestrians walking in the same direction at a similar speed, they will automatically adjust their speed to maintain a dynamic safe distance from the group and follow them. This safe distance will change in real time based on factors such as the pedestrian's walking speed and the level of congestion in the surrounding environment.
[0030] S34: Emergency stop behavior is for unexpected situations, such as an obstacle suddenly falling or a passenger fainting. Pedestrians can react quickly, immediately stopping to avoid collisions and simultaneously issuing a warning signal to alert others to the area. Request for help behavior is demonstrated when pedestrians encounter problems, such as being lost, unable to find an exit, or feeling unwell, they can proactively approach station staff or volunteers and request assistance. The system will simulate a simple dialogue between the pedestrian and staff, with staff guiding the pedestrian to resolve the issue, such as providing directions or necessary help.
[0031] S35: Introduce emotional state variables to influence pedestrians' psychological and emotional changes in a station setting through various factors.
[0032] S4: Dynamic Resource Optimization S41: Based on the camera's viewing cone distance and scene load prediction model, dynamically adjust the rendering and physics calculation accuracy of pedestrian models in the station simulation scene. In the central area of the station hall, when the camera is observing at close range, the pedestrian model will be rendered with high precision; while in scenes where the pedestrian model is viewed from a distance on the platform or through a long passage, the level of detail of the pedestrian model will be reduced, the texture resolution will be reduced, and the physics collision calculation will be simplified, thereby saving computing resources.
[0033] S42: Fully utilizes Unreal Engine's Task Graph system to rationally allocate various AI logic tasks in the station pedestrian simulation. The main thread focuses on processing user input, such as management personnel adjusting scene parameters through the interactive interface (blocking a faulty area, simulating sudden equipment failure, etc.), UI rendering (displaying various operation buttons, data display panels, etc.), and camera control (switching perspectives to observe different areas).
[0034] S5: Real-time Interaction and Data Analysis S51: Create an intuitive and user-friendly interface for real-time operation by subway operation managers and researchers. The interface includes various scenario parameter adjustment options, such as simulating an emergency by blocking a station entrance / exit, setting virtual obstacles (e.g., simulated falling objects due to equipment malfunction) to observe pedestrian detours, and triggering simulated fires or earthquakes to test evacuation strategies.
[0035] S52: The data visualization dashboard statistically analyzes and displays key indicators in real time during station simulation. The pedestrian density heat map can intuitively present the population density in various areas of the station, marked on the station scene map with different colors (such as green for low density, yellow for medium density, and red for high density), helping managers to quickly locate congested areas.
[0036] S53: Relying on the Unreal Engine's Replay system, it records detailed data of the entire station simulation process, including the location information (3D coordinates), walking speed, behavioral status (such as normal walking, avoidance, following, emotional changes, etc.) of each pedestrian, and surrounding environmental parameters (such as congestion level, time and location of sudden events, etc.).
[0037] S54: Exporting CSV format log files contains complete simulation data that can be read by external analysis tools (such as professional data mining software, traffic flow analysis software, etc.) to further conduct in-depth behavioral pattern mining, evacuation efficiency assessment, passenger psychological change analysis, etc., providing strong data support and decision-making basis for improving the station's safe operation level and optimizing passenger transport organization strategies.
[0038] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A pedestrian behavior simulation and operation control method based on Unreal Engine, characterized in that, Includes the following steps: S1: 3D scene construction, specifically including using the Unreal Engine Datasmith plugin to convert the Revit / IFC format BIM model into an Unreal Engine mesh, and performing lightweight processing on the mesh; The Unreal Engine-based Blueprint system constructs a dynamic 3D scene containing the logic of interactive devices. These interactive devices achieve interactive behavior through custom Blueprint nodes and event-driven mechanisms; and generates environmental elements that simulate factors affecting pedestrian movement. S2: Pedestrian model construction, specifically including defining a set of pedestrian attribute parameters containing basic attributes, behavioral patterns, and emotional states; configuring the initial pedestrian distribution through a data-driven approach, which supports random generation or import of external data; S3: Layered behavioral control, specifically including the control logic of the macro-path planning layer, the micro-behavioral decision-making layer, and the emotion-driven layer; S4: Dynamic resource optimization, which includes detailed level control and multi-threaded task allocation; S5: Real-time interaction and data analysis, specifically including the construction of interactive control interfaces, the generation of data visualization dashboards, and data recording and playback.
2. The pedestrian behavior simulation and operation control method based on Unreal Engine according to claim 1, characterized in that, In step S1, the interactive devices include elevators, turnstiles, and escalators; the interactive behaviors of the elevators include opening and closing doors, running, and responding to passenger calls; the interactive behaviors of the turnstiles include recognizing pedestrian ticket information, valid tickets triggering the barrier to open, and invalid / unused cards triggering closure and alarms.
3. The pedestrian behavior simulation and operation control method based on Unreal Engine according to claim 1, characterized in that, In step S2, the basic attributes include gender, age, and movement speed, and the movement speed is set according to differences in age, gender, and carried items; the behavior patterns include daily walking and emergency evacuation; the emotional states include calm, anxiety, and panic; when randomly generating the initial distribution of pedestrians, the pedestrian generation probability is set according to the passenger flow statistics of each area of the scene.
4. The pedestrian behavior simulation and operation control method based on Unreal Engine according to claim 1, characterized in that, The macro-path planning layer in step S3 adopts an improved navigation mesh (NavMesh) dynamic update algorithm. The algorithm adjusts the navigation mesh weights in real time according to the level of scene congestion, temporary obstacles and event information to achieve pedestrian group obstacle avoidance and diversion.
5. The pedestrian behavior simulation and operation control method based on Unreal Engine according to claim 1, characterized in that, The micro-behavioral decision-making layer in step S3 adopts a hybrid architecture of behavior tree and finite state machine (FSM), specifically including: Based on the ORCA algorithm, the avoidance rules are optimized. When the distance between a pedestrian and an obstacle / other pedestrian is less than the safety threshold, the avoidance speed and direction are automatically calculated. A dynamic safety distance calculation model is introduced to adjust the following distance based on pedestrian speed and environmental congestion. The design incorporates emergency stop and help-seeking logic. When a sudden danger occurs, pedestrians should immediately stop and issue a warning signal. When encountering difficulties, pedestrians should proactively approach staff within the scene and request help.
6. The pedestrian behavior simulation and operation control method based on Unreal Engine according to claim 1, characterized in that, Step S3 introduces emotional state variables into the emotion-driven layer, generates an emotion fluctuation curve through the Perlin noise function, and dynamically adjusts the pedestrian decision weights. Specifically, pedestrians in a panicked state prioritize the shortest path and simplify unnecessary obstacle avoidance logic, while pedestrians in an anxious state increase their movement speed and prioritize the time-optimal path.
7. The pedestrian behavior simulation and operation control method based on Unreal Engine according to claim 1, characterized in that, Step S4, Level of Detail (LOD) control, combines the camera's view frustum distance and scene load prediction model to dynamically adjust the rendering accuracy of the pedestrian model and the accuracy of the physics calculation: a high-precision model is used for the camera's close-up viewing area, which includes full textures and complex physical collisions; a low-precision model is used for the camera's far-up viewing area, which includes simplified textures and merged collisions.
8. The pedestrian behavior simulation and operation control method based on Unreal Engine according to claim 1, characterized in that, Step S4, multi-threaded task allocation, utilizes Unreal Engine's Task Graph system to break down the pedestrian AI logic into independent tasks and allocate them to different threads: The main thread handles user input, UI rendering, and camera control. Asynchronous thread groups perform path planning, collision detection, and pedestrian behavior status updates in parallel.
9. The pedestrian behavior simulation and operation control method based on Unreal Engine according to claim 1, characterized in that, The interactive control interface in step S5 allows users to adjust simulation parameters in real time. These simulation parameters include blocking specific areas of the scene, triggering emergencies, adjusting simulation speed, and switching observation perspectives. The emergencies include fire, earthquake, and equipment failure.
10. The pedestrian behavior simulation and operation control method based on Unreal Engine according to claim 1, characterized in that, In step S5, the data visualization dashboard displays a pedestrian density heatmap, movement speed distribution, and path conflict frequency in real time, and the pedestrian density heatmap uses a green-yellow-red color gradient to mark the population density in different areas; the data recording and playback uses the Unreal Engine's Replay system to record the simulation data throughout the entire process, supports trajectory playback and key event marking, and exports CSV format logs for use by external analysis tools.
Citation Information
Cited By
Aircraft autonomous decision-making method based on finite-state machine and behavior tree hybrid architecture
CN121763782A
An autonomous decision-making method for aircraft based on a hybrid architecture of finite state machine and behavior tree
CN121763782B
A three-dimensional evacuation simulation visualization method and system
CN122289610A
A simulation system and method for vulnerable group behavior in public buildings
CN122413720A