Three-dimensional engine path planning method, system and terminal based on topological relation
By constructing an initial topology graph, maintaining real-time dynamic topology, and performing hierarchical and accurate collision analysis, the problem of the disconnect between collision detection and path planning in 3D engines is solved, achieving efficient and accurate path planning and collision detection, and adapting to complex dynamic environments.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-26
- Publication Date
- 2026-03-10
AI Technical Summary
In existing 3D engines, collision detection and path planning are handled independently, resulting in a disconnect between the geometry layer and the topology layer, leading to low system efficiency and limited intelligence.
By constructing an initial topology graph, performing real-time dynamic topology maintenance, topology-aware path planning and optimization, and hierarchical precise collision resolution, a deep integration and optimization of collision detection and path planning is achieved.
It improves collision detection efficiency and path planning accuracy, enhances adaptability in dynamic scenarios, reduces system load, and improves the smoothness of scene interaction and the level of intelligent decision-making.
Smart Images

Figure CN121632137A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of three-dimensional engine, more particularly, to a three-dimensional engine path planning method and system based on topological relationship, a terminal and a computer readable storage medium. BACKGROUND
[0002] In a three-dimensional engine, collision detection and path planning are core modules supporting scene interaction and agent motion, both of which belong to computationally intensive tasks. In the traditional technical architecture, collision detection and path planning are decoupled and processed as independent modules, and are optimized respectively. The defects of this mode at least lie in the fragmentation of the geometric layer and the topological layer. Collision detection provides bottom-layer geometric contact information, and path planning is based on a static idealized topological model. Both lack a bidirectional real-time information bridge, resulting in low overall system efficiency and limited intelligence level.
[0003] Therefore, the prior art needs to be improved. SUMMARY
[0004] The present application aims to provide a three-dimensional engine path planning method and system based on topological relationship, a terminal and a computer readable storage medium, which aims to solve the technical problem of how to realize the deep integration and optimization of collision detection and path planning in the prior art.
[0005] To achieve the above-mentioned purpose, the technical solution adopted by the present application is: The present application provides a three-dimensional engine path planning method based on topological relationship, comprising the following steps: S100, constructing an initial topological graph: by topologizing the static scene geometry and registering the topological influence attributes of dynamic objects, an initial topological resource is obtained; S200, real-time dynamic topological maintenance: based on the initial topological resource and real-time dynamic data of the scene, topological conflict detection, topological graph blocking / release editing and dirty flag incremental updating are performed through a frame update loop to keep the topological graph and the scene real-time synchronized to generate a real-time dynamic topological graph; S300, topologically-aware path planning and optimization: based on the real-time dynamic topological graph, an optimal collision-free path is generated through global path search, local path smoothing and optional predictive planning; S400, hierarchical precise collision analysis: based on the optimal collision-free path, precise collision analysis is performed, the detection range is filtered and selected through topological narrow phase verification, high-precision geometric collision detection is performed on the target dynamic object, precise collision response data is obtained, and the precise collision response data is fed back to step S300 to trigger dynamic adjustment of the path.
[0006] In one embodiment, the step S100 comprises: S110, static scene topological processing: voxelization is combined with triangular mesh subdivision to preprocess static scene elements, generate a navigation mesh, and convert it into a static topology graph, which includes vertices V representing spatial positioning points, topology edges E representing walkable channels, and weights W representing channel attributes; S120, dynamic object topological attribute registration: bind a geometric boundary and a topological influence field (TIF) to a dynamic object, the geometric boundary is represented by an axis-aligned bounding box (AABB) or an oriented bounding box (OBB), and the topological influence field (TIF) is generated by inflation processing on the geometric boundary.
[0007] In an embodiment, in the step S110: The voxelization is used to divide the walkable area and the non-passable area of the scene; The triangular mesh subdivision is used to finely divide the walkable area to form continuous walkable triangular patches; The navigation mesh is spliced from the walkable triangular patches; The vertices V of the static topology graph correspond to the centers of gravity or vertices of the walkable triangular patches, the topology edges E connect the vertices of adjacent walkable patches, and the weights W are assigned according to the channel length and terrain difficulty.
[0008] In an embodiment, in the step S120, the topological influence field (TIF) is a warning area formed by expanding the actual geometric range of the dynamic object outward, and the warning area satisfies: when the dynamic object moves towards the topology channel, the TIF of the dynamic object reaches the topology edge E before the geometric boundary, ensuring that the system warning is triggered before the dynamic object completely blocks the topology edge, and realizing the advance marking of the potential influence on the topology channel.
[0009] In an embodiment, the step S200 includes: S210, topology conflict detection: based on the topology edges E in the initial topology resource and the topological influence field (TIF) of the dynamic object, the scene is divided into multiple spatial units using a spatial division technique, only the intersection test is performed on the TIF of the dynamic object and the topology edges E in the same unit, and the detection result of intersection or non-intersection is output; S220, topology graph blocking / release editing: according to the detection result, when it is detected that the TIF of the dynamic object intersects with the topology edge E, the weight of the topology edge is set to a maximum value or marked as non-passable; when it is detected that the TIF of the dynamic object no longer intersects with the topology edge E, the initial weight of the topology edge is restored; S230, dirty flag incremental update: set dirty / clean state flag for dynamic objects, mark as dirty object when its position moves beyond a preset threshold or its state changes; otherwise, mark as clean object, only dirty objects are included in intersection test range of step S210, clean objects are directly skipped.
[0010] In an embodiment, the step S300 comprises: S310, global path search: based on real-time dynamic topology graph, run algorithm or DLite algorithm to generate collision-free global path; S320, local path smoothing: based on the collision-free global path, use funnel algorithm to generate smooth curve path, with path start and end points as funnel vertices, and topology edges corresponding to walkable areas as funnel walls; S330, optional predictive planning: based on the topology edge associated area corresponding to the collision-free global path, collect dynamic object historical motion data, predict its future 3-5 frame position change through linear extrapolation or nonlinear prediction model, to improve potential blocked edge weight, guide agent away from potential blocked area.
[0011] In an embodiment, the step S400 comprises: Step S410, topology narrow phase verification: based on the path corridor of the optimal collision-free path, only dynamic objects that have been marked as blocked within the path corridor are included in the detection range; Step S420, high-precision geometric collision detection: for dynamic objects selected by topology narrow phase verification in step S410, use GJK algorithm to determine whether the agent and the dynamic object have collision risk, if there is collision risk, calculate the minimum penetration depth and collision normal through EPA algorithm, output accurate collision response data; Step S430, dynamic feedback adjustment: feedback the accurate collision response data to step S300, if sudden collision risk is detected, trigger fast re-planning of step S310 to generate a new optimal collision-free path.
[0012] In addition, based on the above-mentioned three-dimensional engine path planning method based on topological relationship, the application also provides a three-dimensional engine path planning system based on topological relationship, which comprises: A construction module is configured to construct an initial topology graph, and obtain initial topology resources by topological processing of static scene geometry and registering topology influence attributes for dynamic objects. The first generation module is configured to maintain a real-time dynamic topology based on the initial topology resource and scene real-time dynamic data, and perform topology conflict detection, topology graph blocking / release editing and dirty flag incremental updating through a frame update loop to keep the topology graph synchronized with the scene in real time, thereby generating a real-time dynamic topology graph. The second generation module is configured to generate an optimal collision-free path based on the real-time dynamic topology graph through global path search, local path smoothing and optional predictive planning. The collision feedback module is configured to perform high-precision geometric collision detection on the target dynamic object based on the optimal collision-free path, obtain precise collision response data, and feed back the precise collision response data to step S300 to trigger dynamic path adjustment.
[0013] In addition, based on the above-mentioned three-dimensional engine path planning method and system based on topological relations, the application further provides a terminal, which comprises a memory, a processor and a three-dimensional engine path planning program based on topological relations stored on the memory and executable on the processor. When the three-dimensional engine path planning program based on topological relations is executed by the processor, the steps of the three-dimensional engine path planning method based on topological relations are implemented.
[0014] In addition, based on the above-mentioned three-dimensional engine path planning method, system and terminal based on topological relations, the application further provides a computer readable storage medium, wherein the computer readable storage medium stores a three-dimensional engine path planning program based on topological relations, and when the three-dimensional engine path planning program based on topological relations is executed by a processor, the steps of the three-dimensional engine path planning method based on topological relations are implemented.
[0015] The three-dimensional engine path planning method, system, terminal and computer readable storage medium based on topological relations provided by the application have at least the following beneficial effects: The application discloses a three-dimensional engine path planning method and system based on a topological relationship, a terminal and a computer readable storage medium. BRIEF DESCRIPTION OF DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without any creative effort based on these drawings.
[0017] Figure 1 A flowchart of the three-dimensional engine path planning method based on a topological relationship provided by the embodiments of the present application is shown in the figure. Figure 2 A flowchart of the real-time dynamic topological maintenance provided by the embodiments of the present application is shown in the figure. Figure 3 A flowchart of the topological awareness path planning and optimization provided by the embodiments of the present application is shown in the figure. Figure 4 A flowchart of a specific embodiment of the three-dimensional engine path planning method based on a topological relationship provided by the embodiments of the present application is shown in the figure. Figure 5 A structure diagram of the three-dimensional engine path planning system based on a topological relationship provided by the embodiments of the present application is shown in the figure. Figure 6The operation environment schematic diagram of the preferred embodiment of the terminal provided by the embodiment of the present application.
[0018] In the drawings, various reference signs refer to: 10, processor; 20, memory; 30, display; 40, three-dimensional engine path planning program based on topological relationship; 51, construction module; 52, first generation module; 53, second generation module; 54, collision feedback module. DETAILED DESCRIPTION
[0019] In order to make the technical problems, technical solutions and beneficial effects of the present application clearer, the present application will be further described in detail below in combination with the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not to limit the present application.
[0020] It should be noted that when a component is referred to as "fixed to" or "provided on" another component, it can be directly or indirectly on the other component. When a component is referred to as "connected to" another component, it can be directly or indirectly connected to the other component. The terms "up", "down", "left", "right", "front", "back", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. indicate the orientation or position based on the orientation or position shown in the drawings, and are only for convenience of description, and cannot be understood as a limitation on the technical solutions. The terms "first", "second" are only for the purpose of convenience of description, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features. The meaning of "a plurality of" is two or more, unless otherwise specifically limited.
[0021] Referring to Figure 1 The embodiment provides a three-dimensional engine path planning method based on a topological relationship, which comprises the following steps. S100, constructing an initial topological graph: by topological processing of static scene geometry, and registering topological influence attributes for dynamic objects, to obtain initial topological resources.
[0022] Specifically, the initial topological graph is constructed: by topological processing of static scene geometry, and registering topological influence attributes for dynamic objects, to obtain initial topological resources. This step is the basis of the technical solution, and the core is to convert three-dimensional scene space information into calculable and correlatable topological data.
[0023] S200, real-time dynamic topological maintenance: based on the initial topological resources and real-time dynamic data of the scene, topological conflict detection, topological graph blocking / release editing and dirty flag incremental updating are performed through a frame update loop to keep the topological graph and the scene real-time synchronized to generate a real-time dynamic topological graph.
[0024] Specifically, real-time dynamic topology maintenance: based on initial topology resources and scene real-time dynamic data, through frame update loop to perform topology conflict detection, topology graph blocking / release editing and dirty flag incremental update, keep the topology graph and the scene real-time synchronization, to generate real-time dynamic topology graph, this step is the core dynamic hub, through frame update loop to ensure that the topology graph and the scene real-time synchronization.
[0025] S300, topology-aware path planning and optimization: based on real-time dynamic topology graph, through global path search, local path smoothing and optional predictive planning, generate optimal collision-free path.
[0026] Specifically, topology-aware path planning and optimization: based on real-time dynamic topology graph, through global path search, local path smoothing and optional predictive planning, generate optimal collision-free path, this step generates optimal path based on real-time topology information, taking into account collision-free and natural.
[0027] S400, hierarchical precise collision resolution: based on optimal collision-free path, perform precise collision resolution, through topology narrow phase verification to filter detection range, perform high-precision geometric collision detection on target dynamic objects, obtain precise collision response data, and feed back the precise collision response data to step S300 to trigger path dynamic adjustment.
[0028] Specifically, hierarchical precise collision resolution: based on optimal collision-free path, perform precise collision resolution, through topology narrow phase verification to filter detection range, perform high-precision geometric collision detection on target dynamic objects, obtain precise collision response data, and feed back the precise collision response data to step S300 to trigger path dynamic adjustment, this step balances detection accuracy and performance by focusing on key areas through hierarchical filtering.
[0029] Specifically, step S100 includes: S110, static scene topology processing: voxelization combined with triangle mesh subdivision is used to preprocess static scene elements, generate navigation mesh and convert it into static topology graph, static topology graph contains vertices V representing spatial positioning points, topology edges E representing walkable channels and weights W giving channel attributes.
[0030] For example, for static elements such as buildings, roads, fixed equipment, voxelization combined with triangle mesh subdivision is used for preprocessing. Voxelization divides walkable and non-passable areas (such as walls, ground depressions), and triangle mesh subdivision realizes fine segmentation of walkable areas, generating navigation mesh composed of triangular patches, which is then converted into static topology graph containing vertices V, topology edges E and weights W.
[0031] Specifically, in step S110: The voxelization is used for dividing the walkable area and the non-passable area of the scene, and the triangular mesh subdivision is used for finely segmenting the walkable area to form continuous walkable triangular patches, the navigation mesh is spliced from the walkable triangular patches, the vertex V of the static topology graph corresponds to the barycenter or vertex of the walkable triangular patch, the topology edge E connects the vertices of adjacent walkable patches, and the weight W is valued according to the channel length and the terrain difficulty.
[0032] For example, for static elements such as buildings, terrains and obstacles, voxelization combined with triangular mesh subdivision preprocessing is adopted, wherein the voxelization divides the scene into voxel units with a size of 0.1m*0.1m*0.1m, and marks the walkable area and the non-passable area; the triangular mesh subdivision finely segments the walkable area by using the MeshLab tool to form continuous walkable triangular patches; all adjacent walkable triangular patches are spliced according to the spatial position to generate a navigation mesh covering the whole scene walkable range; the navigation mesh is converted into a static topology graph, and the static topology graph includes vertices V, topology edges E and weights W, wherein the vertex V corresponds to the barycenter or vertex of the walkable triangular patch, the topology edge E connects the vertices V of adjacent walkable triangular patches, and the weight W is valued according to the channel length and the terrain difficulty, for example, the channel length can be the basic weight, and the weight is doubled when the terrain slope is greater than 30°.
[0033] In S120, the topology attribute of the dynamic object is registered, that is, the geometric boundary and the topology influence field (TIF) are bound for the dynamic object, the geometric boundary is represented by an axis-aligned bounding box (AABB) or an oriented bounding box (OBB), and the topology influence field (TIF) is generated by inflation processing on the geometric boundary.
[0034] For example, the dynamic object is a game NPC, a mobile robot or the like, when the dynamic object is initially loaded, the geometric boundary and the topology influence field (TIF) are bound for each dynamic object, the geometric boundary is represented by an axis-aligned bounding box (AABB) or an oriented bounding box (OBB), and the selection is made according to the shape of the dynamic object, that is, the regular shape is represented by the AABB, and the irregular shape is represented by the OBB.
[0035] Specifically, in S120, the topology influence field (TIF) is a warning area formed by expanding the actual geometric range of the dynamic object outward, and the warning area satisfies that when the dynamic object moves to the topology channel, the TIF can reach the topology edge E earlier than the geometric boundary, so as to ensure that the system warning is triggered before the dynamic object completely blocks the topology edge, and the potential influence on the topology channel is marked in advance.
[0036] For example, the topology influence field (TIF) forms a warning area by expanding the geometric boundary outward by 0.2 m, which meets the following condition: when the dynamic object moves towards the topology channel, the TIF reaches the topology edge E before the geometric boundary, ensuring that the system warning is triggered before the dynamic object completely blocks the topology edge, realizing the early marking of the potential impact on the topology channel.
[0037] In particular, please refer to Figure 2 , step S200 includes: S210, topology conflict detection: based on the topology edge E in the initial topology resource and the dynamic object topology influence field (TIF), the scene is divided into multiple spatial units using a spatial division technique, and only the intersection test of the dynamic object TIF and the topology edge E in the same unit is performed, and the intersection or non-intersection detection result is output.
[0038] For example, based on the topology edge E in the initial topology resource and the dynamic object TIF, the scene is divided into 1m×1m×1m spatial units using an octree spatial division technique, and only the intersection test of the dynamic object TIF and the topology edge E in the same unit is performed, and the intersection or non-intersection detection result is output, avoiding the waste of computing power caused by full-field traversal.
[0039] For example, assuming that there are 100 dynamic objects and 500 topology edges in the scene, the traditional existing technology full detection needs 50,000 times, while after spatial division, each unit contains an average of only 5 dynamic objects and 30 topology edges, the total detection times are reduced to 1,500 times, which can greatly improve the efficiency.
[0040] S220, topology graph blocking / release editing: according to the detection result, when it is detected that the dynamic object TIF intersects with the topology edge E, the weight of the topology edge is set to a maximum value or marked as impassable; when it is detected that the dynamic object TIF no longer intersects with the topology edge E, the initial weight of the topology edge is restored.
[0041] For example, according to the detection result of S210, when it is detected that the dynamic object TIF intersects with the topology edge E, the weight of the topology edge is set to a maximum value (such as 1,000 times the initial weight) or directly marked as “impassable”; when it is detected that the dynamic object TIF no longer intersects with the topology edge E, the initial weight of the topology edge is restored, ensuring that the topology graph can reflect the channel passable state in real time.
[0042] For example, in an industrial scene, when a transport trolley passes through a certain topology edge, the TIF intersects with the edge, and the system sets the weight to ∞, at which time the path search of the robot arm will avoid the edge; when the trolley leaves, the weight is restored to 5, and the edge can be used for path planning again.
[0043] S230, dirty flag incremental update: set dirty / clean state flag for dynamic objects, mark as dirty object when the dynamic object position moves more than a preset threshold or the motion state changes; otherwise mark as clean object, only include dirty objects in the intersection test range of step S210, and clean objects directly skip the test.
[0044] For example, set a "dirty / clean" state flag for each dynamic object, mark as "dirty object" when the dynamic object position moves more than a preset threshold or the motion state changes; otherwise mark as "clean object"; only include "dirty objects" in the intersection test range of S210, and "clean objects" directly skip the test, further reducing invalid calculations. For example, mark as "dirty object" when the dynamic object position moves more than 0.05m, or the motion state changes from static to moving, or from straight line motion to turning.
[0045] In particular, please refer to Figure 3 Step S300 includes: S310, global path search: based on the real-time dynamic topology graph, run algorithm or DLite algorithm to generate a collision-free global path.
[0046] In particular, based on the real-time dynamic topology graph, run algorithm or DLite algorithm to generate a collision-free global path, Both the A* algorithm and the DLite algorithm can be understood as prior art, where the DLite algorithm is used for fast path re-planning in dynamic scenarios. These two algorithms can be dynamically switched according to the scenario, using the A* algorithm for static scenarios and the DLite algorithm for high-frequency dynamic scenarios. The generated collision-free global path is a polyline path formed by concatenating topology vertices V, ensuring collision-free at the global level.
[0047] Since the real-time dynamic topology graph has been maintained by step S200, all blocked topology edges are marked, The A* algorithm or DLite algorithm will automatically avoid these blocked topology edges during the search process, so the generated path naturally has the "collision-free" property and does not need additional filtering. Compared with traditional methods, the present application uses the method of "planning the path first and then detecting the collision", which eliminates invalid planning from the source and improves the success rate of planning to 100%.
[0048] Among them, A* is the abbreviation of A-Star Algorithm, which is used for global optimal path search in static / low dynamic scenarios; DLite is the abbreviation of Dynamic A-Star Lite Algorithm, which is used for fast path re-planning in dynamic scenarios, The A* algorithm and the DLite algorithm can be switched as needed in the present application to adapt to the path planning needs of different scenarios. Both the A* algorithm and the DLite algorithm can be understood as prior art and will not be described in detail.
[0049] S320, local path smoothing: based on the collision-free global path, a funnel algorithm is used, with the path start point and end point as the funnel vertex, and the topological edges corresponding to the walkable area through which the path passes as the funnel wall, and the funnel wall is shrunk to generate a smooth curve path.
[0050] Specifically, based on the collision-free global path generated in step S310, a funnel algorithm is used for smoothing, with the path start point and end point as the funnel vertex, and the topological edges E corresponding to the walkable area through which the path passes as the funnel wall, and the funnel wall is shrunk by 0.01m step to generate a smooth curve path that fits the boundary of the walkable area, eliminating the mechanical feeling of the polyline path and improving the naturalness of the agent motion.
[0051] S330, optional predictive planning: based on the topological edge associated area corresponding to the collision-free global path, the historical motion data of dynamic objects is collected, and the future 3-5 frame position change is predicted through a linear extrapolation or a nonlinear prediction model to improve the weight of the potential blocked edge and guide the agent to avoid the potential blocked area.
[0052] Specifically, based on the topological edge associated area corresponding to the collision-free global path generated in step S310, for example, the topological edges within a range of 0.5m on both sides of the path, the historical motion data of dynamic objects in the last 10 frames is collected, including speed, direction and acceleration, and the future 3-5 frame position change is predicted through a linear extrapolation or a nonlinear prediction model, such as an LSTM neural network; if the prediction result shows that the dynamic object may block the topological edge in the area, the weight of the topological edge is increased by 50%~100%, guiding the agent to preferentially select other alternative channels when planning the path, and realizing forward-looking obstacle avoidance. This step is an optional function, which can be turned off in simple scenarios to save computing power. Wherein, LSTM is the abbreviation of Long Short-Term Memory Neural Network, which is used to capture long-term dependencies in time series data and is used for dynamic object motion state prediction. It is an implementation of a nonlinear prediction model. LSTM neural network can be understood as prior art and will not be described in detail.
[0053] Specifically, please combine Figure 4 , step S400 includes: Step S410, topological narrow phase verification: based on the path corridor of the optimal collision-free path, only the dynamic objects marked as blocked within the path corridor are included in the detection range.
[0054] Specifically, based on the path corridor of the optimal collision-free path, wherein the path corridor can be understood as the path center line on both sides, with a width of 1.5 times the radius of the agent, such as an agent radius of 0.3m, the corridor width is 0.45m. Only the dynamic objects marked as blocked within the path corridor are included in the detection range, further reducing the object pool of collision detection. Here, the dynamic object that has been marked as blocked refers to the object that has triggered the topological edge blocking in step S220.
[0055] Step S420, high-precision geometric collision detection: for the dynamic objects screened out by the topological narrow phase verification in step S410, the GJK algorithm is used to judge whether the agent and the dynamic object exist collision risk, if there is collision risk, the minimum penetration depth and collision normal are calculated by the EPA algorithm, and the accurate collision response data is output.
[0056] Specifically, for the dynamic objects screened out by step S410, the GJK algorithm is used to judge whether the agent and the dynamic object exist collision risk, the upper limit of the iteration number of the GJK algorithm is set to 50, to balance the accuracy and efficiency; if collision risk is detected, the minimum penetration depth and collision normal direction are calculated by the EPA algorithm, the accuracy threshold of the EPA algorithm can be 0.001m, and the accurate collision response data containing "collision state (yes / no), penetration depth, normal direction" is output.
[0057] Wherein, GJK algorithm is the abbreviation of Gilbert-Johnson-Keerthi Algorithm, which is used to quickly judge whether two convex geometries exist collision risk.
[0058] EPA algorithm is the abbreviation of Expanding Polytope Algorithm. After the GJK algorithm judges that the object exists collision risk, the minimum penetration depth and collision normal direction between two convex geometries are accurately calculated, which provides accurate data support for collision response. Both GJK algorithm and EPA algorithm can be understood as prior art, and will not be described again.
[0059] Step S430, dynamic feedback adjustment: the accurate collision response data is fed back to step S300, if sudden collision risk is detected, the rapid re-planning of step S310 is triggered to generate a new optimal collision-free path.
[0060] Specifically, the accurate collision response data output in S420 is fed back to S300, and if a sudden collision risk is detected, for example, a dynamic object suddenly accelerates and rushes into the path corridor, triggering the rapid re-planning in S310 to generate a new optimal collision-free path to avoid "through the mold" and other physical errors.
[0061] The embodiment adopts a hierarchical strategy of "first screening range, then accurate detection", which not only ensures the accuracy of collision detection, but also concentrates the computing resources in the key area, compared with the traditional full-field accurate detection, can reduce the CPU time consumption, and perfectly balance the accuracy and performance.
[0062] Therefore, the three-dimensional engine path planning method based on topological relationship provided by the embodiment has at least the following beneficial effects: The application adopts integrated design, and integrates collision detection and path optimization into a unified technical framework. The micro-geometric information obtained by collision detection can be directly transmitted to the path optimization module to provide instant support for macro-path decision-making, without complex data conversion and repeated processing, which greatly improves the response speed of the two modules. In the high-frequency interaction scene of the multiplayer online game, the character collision risk and path adjustment demand can be quickly synchronized; in virtual simulation training, the collision detection result and path correction of the training object can be connected in real time, which significantly improves the scene interaction fluency. The application can maintain a dynamic and semantic scene topological relationship graph in real time. On the one hand, it can quickly capture scene changes such as object position movement and temporary obstacle addition, and update the topological association logic in real time without reconstructing the whole model. For example, in path optimization, the channel that meets the scene functional requirements can be preferentially selected to reduce invalid path generation; in a virtual factory scene, the topological relationship can be updated according to the real-time position of the robot to quickly adapt to the robot operation path adjustment, and the adaptability and intelligent decision-making level of the technology to dynamic scenes are improved.
[0063] The application deeply integrates micro-geometric collision information and macro-topological connectivity analysis. On the one hand, it accurately identifies the subtle gap and boundary feature between objects by means of micro-data, ensures that there is no false judgment in collision detection, and avoids the problem of object penetration; on the other hand, it relies on macro-topological relationship to screen the associated object group, and only checks the geometry of the objects that may collide, which greatly reduces the invalid calculation amount and reduces the system running load. In high-precision simulation of industrial robots, the accuracy of collision detection and the low delay of path planning can be ensured at the same time to meet the millimeter-level operation precision requirement of robots; in a complex terrain virtual exploration scene, the accuracy of terrain detail collision detection and the efficiency of exploration path planning can be considered, and frame rate fluctuations caused by excessive calculation are avoided. The application can meet the requirements of real-time, accuracy and intelligence in complex dynamic environments by means of integrated design, dynamic topology maintenance, data fusion and other technical means. For example, in a game battlefield with hundreds of people on the same screen, the application can not only capture the collision risk between multiple characters in real time, but also accurately plan a collision-free path and intelligently adjust the path strategy according to variables such as character moving speed and obstacle type. In the application of multi-field high-performance three-dimensional engine, the performance indicators can be stabilized without compromising each other, providing a stable and high-performance technical solution for the fields of game, industrial simulation, virtual training and other fields, and significantly improving the technical practical value and scene adaptation range.
[0064] Please refer to Figure 5 Based on the above-mentioned three-dimensional engine path planning method based on topological relationship, the application further provides a three-dimensional engine path planning system based on topological relationship, which comprises: The construction module 51 is configured to construct an initial topological graph, and register topological influence attributes for dynamic objects by topological processing of static scene geometry, so as to obtain initial topological resources; The first generation module 52 is configured to maintain real-time dynamic topology, based on the initial topological resources and real-time dynamic data of the scene, and perform topological conflict detection, topological graph blocking / release editing and dirty flag incremental updating through a frame update loop, so as to keep the topological graph synchronized with the real-time scene and generate a real-time dynamic topological graph; The second generation module 53 is configured to perform topological-aware path planning and optimization, based on the real-time dynamic topological graph, and generate an optimal collision-free path through global path search, local path smoothing and optional predictive planning; The collision feedback module 54 is configured to perform hierarchical accurate collision analysis, based on the optimal collision-free path, and perform high-precision geometric collision detection on the target dynamic object through topological narrow phase verification screening detection range, to obtain accurate collision response data, and feed the accurate collision response data back to step S300 to trigger dynamic adjustment of the path.
[0065] The application realizes the deep fusion of micro-geometric collision information and macro-topological connectivity analysis through topological graph initialization and construction, real-time dynamic topology maintenance, topological-aware path planning and optimization, and hierarchical accurate collision analysis, effectively solving the problems of low collision detection efficiency, insufficient path planning accuracy and poor dynamic adaptability in dynamic scenes.
[0066] Further, please refer to Figure 6 Based on the above-mentioned three-dimensional engine path planning method based on topological relationship and system, the application further provides a terminal, which comprises a processor 10, a memory 20 and a display 30. Figure 6Only some components of the terminal are shown, but it should be understood that all the shown components are not required, and that more or less components can be implemented.
[0067] The memory 20 can be an internal storage unit of the terminal in some embodiments, such as a hard disk or a memory of the terminal. The memory 20 can also be an external storage device of the terminal in other embodiments, such as a plug-in hard disk, a SmartMediaCard (SMC), a Secure Digital (SD) card, a Flash Card, etc. Further, the memory 20 can include both an internal storage unit and an external storage device of the terminal. The memory 20 is used to store application software and various data installed on the terminal, such as program codes of the terminal, etc. The memory 20 can also be used to temporarily store data that has been output or will be output. In an embodiment, the memory 20 stores a three-dimensional engine path planning program based on topological relations 40, which can be executed by the processor 10 to implement the three-dimensional engine path planning method based on topological relations in the present application.
[0068] The processor 10 can be a Central Processing Unit (CPU), a microprocessor or other data processing chip in some embodiments, which is used to run program codes or process data stored in the memory 20, such as to execute the three-dimensional engine path planning method based on topological relations, etc.
[0069] The display 30 can be an LED display, a liquid crystal display, a touch liquid crystal display, an OLED (Organic Light-Emitting Diode) touch, etc. in some embodiments. The display 30 is used to display information of the terminal and to display a visualized user interface. The components of the terminal, i.e. the processor 10, the memory 20 and the display 30, communicate with each other through a system bus.
[0070] In an embodiment, when the processor 10 executes the three-dimensional engine path planning program based on topological relations in the memory 20, the steps of the three-dimensional engine path planning method based on topological relations as above are implemented.
[0071] The present application also provides a computer readable storage medium, which is a medium that can store computer programs, such as a hard disk, a U disk, an SD card, an optical disc, etc. The computer readable storage medium stores a three-dimensional engine path planning program based on topological relations, which, when executed by a processor, implements the steps of the three-dimensional engine path planning method based on topological relations as above.
[0072] In summary, the application discloses a three-dimensional engine path planning method and system based on topological relationship, a terminal and a computer readable storage medium, wherein the three-dimensional engine path planning method based on topological relationship comprises the following steps: S100, constructing an initial topological graph: topological processing is performed on static scene geometry, and a topological influence attribute is registered for a dynamic object, so as to obtain initial topological resources; S200, real-time dynamic topological maintenance: based on the initial topological resources and real-time dynamic data of a scene, topological conflict detection, topological graph blocking / release editing and dirty flag incremental updating are performed through a frame update loop, the topological graph is kept in real-time synchronization with the scene, and a real-time dynamic topological graph is generated; S300, topological awareness path planning and optimization: based on the real-time dynamic topological graph, an optimal collision-free path is generated through global path search, local path smoothing and optional predictive planning; S400, hierarchical precise collision analysis: precise collision analysis is performed based on the optimal collision-free path, a target dynamic object is subjected to high-precision geometric collision detection through topological narrow-phase verification screening detection range, precise collision response data is obtained, and the precise collision response data is fed back to step S300 to trigger dynamic adjustment of the path. Through the steps of constructing an initial topological graph, real-time dynamic topological maintenance, topological awareness path planning and optimization and hierarchical precise collision analysis, the application realizes deep fusion of micro-geometric collision information and macro-topological connectivity analysis, and effectively solves the problems of low collision detection efficiency, insufficient path planning precision and poor dynamic adaptability in a dynamic scene.
[0073] The above merely describes preferred embodiments of the application and is not intended to limit the application. Any modification, equivalent replacement and improvement made within the spirit and principle of the application should be included in the protection scope of the application.
Claims
1. A three-dimensional engine path planning method based on topological relationship, characterized in that, The method comprises the following steps: S100, constructing an initial topology graph: by topologizing static scene geometry and registering topology influence attributes for dynamic objects, an initial topology resource is obtained; S200, real-time dynamic topology maintenance: based on the initial topology resource and real-time dynamic data of the scene, topology conflict detection, topology graph blocking / release editing and dirty flag incremental updating are performed through a frame update loop to keep the topology graph synchronized with the scene in real time, thereby generating a real-time dynamic topology graph; S300, topology-aware path planning and optimization: based on the real-time dynamic topology graph, an optimal collision-free path is generated through global path search, local path smoothing and optional predictive planning; S400, hierarchical precise collision resolution: based on the optimal collision-free path, precise collision resolution is performed, the detection range is filtered through topology narrow phase verification, high-precision geometric collision detection is performed on the target dynamic object, precise collision response data is obtained, and the precise collision response data is fed back to step S300 to trigger dynamic adjustment of the path.
2. The topology relationship based 3D engine path planning method of claim 1, wherein, The step S100 comprises: S110, static scene topologization: voxelization is combined with triangular mesh subdivision to preprocess static scene elements, a navigation mesh is generated and converted into a static topology graph, and the static topology graph comprises vertices V representing spatial positioning points, topology edges E representing walkable channels, and weights W representing channel attributes; S120, dynamic object topology attribute registration: a dynamic object is bound with a geometric boundary and a topology influence field (TIF), the geometric boundary is represented by an axis-aligned bounding box (AABB) or an oriented bounding box (OBB), and the topology influence field (TIF) is generated by inflation processing of the geometric boundary.
3. The method of claim 2, wherein, In the step S110: The voxelization is used to divide the walkable area and the non-passable area of the scene; The triangular mesh subdivision is used to finely divide the walkable area to form continuous walkable triangular patches; The navigation mesh is formed by splicing the walkable triangular patches; The vertices V of the static topology graph correspond to the centers of gravity or vertices of the walkable triangular patches, the topology edges E connect the vertices of adjacent walkable patches, and the weights W are valued according to the channel length and terrain difficulty. 4.The method of claim 2, wherein, In the step S120, the topology influence field (TIF) is a warning area formed by expanding the actual geometric range of the dynamic object outward, and the warning area satisfies: when the dynamic object moves towards the topology channel, the TIF of the dynamic object reaches the topology edge E before the geometric boundary, which ensures that the system warning is triggered before the dynamic object completely blocks the topology edge, and realizes the early marking of the potential influence on the topology channel. 5.The method of claim 1, wherein, The step S200 comprises: S210, topology conflict detection: based on the topology edges E in the initial topology resource and the topology influence field (TIF) of the dynamic object, the scene is divided into multiple spatial units by using a spatial division technique, intersection tests are only performed on the TIF of the dynamic object and the topology edges E in the same unit, and the intersection or non-intersection detection results are output; S220, topology graph blocking / release editing: according to the detection result, when it is detected that the dynamic object TIF intersects with the topology edge E, the weight of the topology edge is set to a maximum value or marked as impassable; when it is detected that the dynamic object TIF no longer intersects with the topology edge E, the initial weight of the topology edge is restored; S230, dirty mark incremental update: a dirty / clean state mark is set for the dynamic object, and when the dynamic object position moves beyond a preset threshold or the motion state changes, the dynamic object is marked as dirty; otherwise, the dynamic object is marked as clean, and only the dirty object is included in the intersection test range of step S210, and the clean object directly skips the test. 6.The method of claim 1, wherein, The step S300 includes: S310, global path search: based on the real-time dynamic topology map, run an algorithm or a DLite algorithm to generate a collision-free global path; S320, local path smoothing: based on the collision-free global path, a funnel algorithm is used, the path starting point and the path ending point are taken as the funnel vertexes, and the topology edges corresponding to the walkable regions through which the path passes are taken as the funnel walls, and the funnel walls are shrunk to generate a smooth curve path; S330, optional predictive planning: based on the topology edge associated region corresponding to the collision-free global path, historical motion data of the dynamic object is collected, a linear extrapolation or a nonlinear prediction model is used to predict the future 3-5 frame position change of the dynamic object, the weight of a potential blocking edge is increased, and the intelligent agent is guided to be away from a potential blocking region.
7. The method of claim 6, wherein, The step S400 includes: Step S410, topology narrow phase verification: based on the path corridor of the optimal collision-free path, only the dynamic object that has been marked as blocked in the path corridor is included in the detection range; Step S420, high-precision geometric collision detection: for the dynamic object selected by the topology narrow phase verification in step S410, whether the intelligent agent and the dynamic object exist collision risk is judged by using the GJK algorithm, if the collision risk exists, the minimum penetration depth and the collision normal are calculated by using the EPA algorithm, and the accurate collision response data is output; Step S430, dynamic feedback adjustment: the accurate collision response data is fed back to step S300, and if a sudden collision risk is detected, the rapid re-planning of step S310 is triggered, and a new optimal collision-free path is generated.
8. A three-dimensional engine path planning system based on topological relationships, characterized by, It includes: The construction module is used for constructing an initial topology graph, performing topological processing on a static scene geometry, and registering a topology influence attribute for a dynamic object, so as to obtain initial topology resources; The first generation module is used for real-time dynamic topology maintenance, based on the initial topology resources and scene real-time dynamic data, performing topology conflict detection, topology graph blocking / release editing and dirty mark incremental update through a frame update loop, keeping the topology graph and the scene real-time synchronization, and generating a real-time dynamic topology graph; The second generation module is used for topology-aware path planning and optimization, based on the real-time dynamic topology graph, generating an optimal collision-free path through global path search, local path smoothing and optional predictive planning; The collision feedback module is used for hierarchical accurate collision analysis, based on the optimal collision-free path, performing accurate collision analysis, selecting a detection range through topology narrow phase verification, performing high-precision geometric collision detection on a target dynamic object, obtaining accurate collision response data, and feeding back the accurate collision response data to step S300 to trigger dynamic adjustment of the path.
9. A terminal, characterized by comprising: A computer readable storage medium stores a topological relation based three-dimensional engine path planning program, the topological relation based three-dimensional engine path planning program, when executed by a processor, implements the steps of the topological relation based three-dimensional engine path planning method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, A computer readable storage medium stores a topological relation based three-dimensional engine path planning program, the topological relation based three-dimensional engine path planning program, when executed by a processor, implements the steps of the topological relation based three-dimensional engine path planning method according to any one of claims 1-7.