A method, device and electronic equipment for constructing three-dimensional virtual scene
By subdividing and smoothing the set of main path points, a continuous 3D model is constructed and matched with textures, solving the problem of insufficient flexibility in adjusting 3D virtual scene models in existing technologies, and realizing dynamic adjustment and enhanced realism of 3D virtual scenes.
Patent Information
- Application Number
- CN202411124000.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-16
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2044-08-16
AI Technical Summary
Existing methods for constructing 3D virtual scenes are difficult to flexibly adjust model components. In particular, when making complex changes such as adjusting road length, changing direction, and adding turning structures in urban road traffic systems, existing technologies cannot be directly implemented within the deployed 3D program, hindering the evolution of 3D virtual scenes towards higher degrees of freedom and stronger realism.
By acquiring preset 3D model template file data, determining the main path point set and performing subdivision and smoothing processing, a continuous 3D model is constructed and matched with preset textures to dynamically generate a 3D virtual scene, supporting operations such as model extension, shortening, and turning.
It enables dynamic adjustment of 3D virtual scenes, improves realism, reduces the workload of manual adjustments, supports the generation of curved and arc-shaped objects, and enhances the performance of 3D virtual scenes and program performance.
Smart Images

Figure CN118657889B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of digital animation technology, and in particular to a method, device and electronic equipment for constructing a three-dimensional virtual scene. Background Art
[0002] At present, in the process of building a 3D virtual scene, professional technicians use professional software to carry out fine design and production to obtain 3D prefabricated models, and then import these 3D prefabricated models into the 3D engine platform for real-time rendering and physical behavior simulation. However, under this workflow, once the 3D virtual scene application is finalized, its content tends to be solidified, and flexible adjustments such as adding, deleting and modifying model components in the 3D virtual scene often face significant technical challenges. Taking the 3D virtual scene of the urban road traffic system as an example, the existing practice usually requires the pre-construction of a complete 3D traffic road network model, and the pre-constructed 3D traffic road network model has almost no native support for complex changes such as the adjustment of road length, changes in direction and even the addition of turning structures in the later stage, and it is difficult to implement directly in the deployed 3D program. This limitation seriously hinders the evolution of 3D virtual scenes to higher degrees of freedom and stronger realism, and it is difficult to meet users' needs for highly dynamic and instantly adaptable scenes. Summary of the invention
[0003] In view of this, the embodiments of the present application provide a method, device and electronic device for constructing a three-dimensional virtual scene to improve the realism of the three-dimensional virtual scene and adapt to the needs of dynamic scenes.
[0004] In a first aspect, an embodiment of the present application provides a method for constructing a three-dimensional virtual scene, comprising the following steps:
[0005] Acquire preset 3D model template file data, wherein the preset 3D model is a model composed of multiple triangular faces;
[0006] Determine a main path point set according to the preset three-dimensional model template file data, and perform subdivision processing and smoothing processing on the main path point set, wherein the main path point set includes the main path point coordinates and the order of the main path points;
[0007] Construct a three-dimensional continuous overall model based on the three-dimensional model template file data and the main path point set;
[0008] Match the 3D continuous monolithic model to the preset map.
[0009] In some possible implementations, the preset 3D model template file data includes at least one of a vertex data set and a triangle face data set.
[0010] In some possible implementations, determining a main path point set according to the 3D model template file data includes:
[0011] Determine the shape of the three-dimensional model to be generated;
[0012] According to the shape of the three-dimensional model to be generated, multiple main path points are set, and the set multiple main path points constitute a main path point set.
[0013] In some possible implementations, the segmentation process includes the following steps:
[0014] Determine the segmentation granularity;
[0015] According to the subdivision granularity, sub-path points are set between two adjacent main path points, so that the total number of path points becomes (subdivision granularity * number of sub-paths + number of main path points), where the total number of path points is the sum of the number of main path points and the number of sub-path points, and the number of sub-paths is (number of main path points - 1);
[0016] The smoothing process includes the following steps:
[0017] Based on the smoothing method of Bezier curve, the tail slope of the previous sub-path is used as the head slope of the next sub-path;
[0018] The main path points and sub-path points are sampled by a second-order Bezier curve to obtain the position information of the sub-path points.
[0019] In some possible implementations, constructing a three-dimensional continuous overall model according to the three-dimensional model template file data and the main path point set includes:
[0020] The main path point coordinates, sub-path point coordinates, and the order of the main path point and sub-path point form a total path point set;
[0021] Construct a three-dimensional continuous overall model based on the three-dimensional model template file data and the total path point set.
[0022] In some possible implementations, constructing a three-dimensional continuous overall model according to the preset three-dimensional model template file data and the total path point set includes:
[0023] According to the preset 3D model template file data, a preset model template is set at each main path point and each sub-path point, and a triangular surface is constructed between two adjacent preset model templates;
[0024] A three-dimensional continuous overall model is constructed based on the triangular surfaces between two adjacent preset model templates.
[0025] In some possible implementations, matching the three-dimensional continuous overall model with the preset map includes:
[0026] Determine the UV value of the three-dimensional continuous overall model;
[0027] Determine the tiling value of the preset map based on the UV value;
[0028] Matches a 3D continuous monolithic model to a preset map based on the preset map's tiling values.
[0029] In a second aspect, an embodiment of the present application provides a device for constructing a three-dimensional virtual scene, including:
[0030] A determination unit, used to obtain preset three-dimensional model template file data, wherein the preset three-dimensional model is a model composed of multiple triangular faces;
[0031] A processing unit is used to determine a main path point set based on preset 3D model template file data, and to perform subdivision and smoothing processing on the main path point set, wherein the main path point set includes the main path point coordinates and the order of the main path points; construct a 3D continuous overall model based on the 3D model template file data and the main path point set; and match the 3D continuous overall model with a preset map.
[0032] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute the method provided in the first aspect of the embodiment of the present application.
[0033] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which includes a stored program, wherein when the program is running, the device where the computer-readable storage medium is located is controlled to execute the method provided in the first aspect of the embodiment of the present application.
[0034] By adopting the solution provided in the embodiment of the present application, a three-dimensional continuous overall model is dynamically generated through the three-dimensional model template file data and the main path point set, so that the three-dimensional model can be adjusted in real time by extending, shortening, turning, and other operations according to the actual situation. By subdividing and smoothing the main path point set, the performance of the three-dimensional continuous overall model and the performance of the three-dimensional virtual scene program can be dynamically adjusted. That is, the more path points are subdivided and smoothed, the higher the realism of the three-dimensional virtual scene, and vice versa, the lower the realism of the three-dimensional virtual scene, but the amount of calculation is smaller. In addition, this solution makes it easier to achieve the generation of three-dimensional virtual images of curved and arc-shaped objects, reducing the work of manually adjusting the three-dimensional model. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0036] Figure 1 A logical schematic diagram of a method for constructing a three-dimensional virtual scene provided in an embodiment of the present application;
[0037] Figure 2 A flow chart of a method for constructing a three-dimensional virtual scene provided in an embodiment of the present application;
[0038] Figure 3 A schematic diagram of a preset three-dimensional model template file data provided in an embodiment of the present application;
[0039] Figure 4 A schematic diagram of a device for constructing a three-dimensional virtual scene provided in an embodiment of the present application;
[0040] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0041] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0042] It should be clear that the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0043] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0044] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0045] In view of the above problems, the embodiments of the present application provide a method, device and electronic device for constructing a three-dimensional virtual scene to improve the realism of the three-dimensional virtual scene and meet the needs of dynamic scenes.
[0046] First, if Figure 1 As shown, the present application provides a method for constructing a three-dimensional virtual scene. The method sets a series of path points, converts the path straight lines into smooth curves through smoothing, and then generates a three-dimensional continuous overall model. At the same time, the grid UV value is dynamically calculated, and the map tiling value is calculated to dynamically generate the required three-dimensional scene.
[0047] See also Figure 2 , is a flow chart of a method for constructing a three-dimensional virtual scene provided in an embodiment of the present application, comprising the following steps:
[0048] S101: Acquire preset three-dimensional model template file data, wherein the preset three-dimensional model is a model composed of multiple triangular faces.
[0049] That is, the preset three-dimensional model is composed of triangular faces formed by each vertex and adjacent vertices, all vertices in the preset three-dimensional model are sorted by serial numbers, and all vertices and triangular faces of the preset three-dimensional model are organized into preset three-dimensional model template file data.
[0050] In some possible implementations, the preset 3D model template file data includes at least one of a vertex data set and a triangle face data set.
[0051] Among them, Figure 3 As shown, the vertex data set includes the three-dimensional position information (Vertice), UV value (UV), and normal direction data (Normal) of each vertex; the triangle data set includes the first vertex number (FirstVertice), the second vertex number (SecondVertice), and the third vertex number (ThirdVertice) of each triangle. The vertex number is the index value of the vertex in the vertex data set.
[0052] S102: Determine a main path point set according to preset 3D model template file data, and perform subdivision and smoothing processing on the main path point set, wherein the main path point set includes the main path point coordinates and the order of the main path points.
[0053] That is, the preset 3D model template file is usually a template file that can meet the needs of most 3D virtual scenes. Therefore, the number of path points in the preset 3D template file is relatively small. As a result, the realism of the 3D virtual scene generated directly using the preset 3D model template is low, so the main path points need to be subdivided and smoothed.
[0054] In some possible implementations, determining a main path point set according to the 3D model template file data includes:
[0055] Determine the shape of the three-dimensional model to be generated;
[0056] According to the shape of the three-dimensional model to be generated, multiple main path points are set, and the set multiple main path points constitute a main path point set.
[0057] That is, according to the shape of the three-dimensional model to be generated, multiple path points are set to form a main path point set, and then continuous mesh geometry is generated according to the position sequence of the main path points in the main path point set, thereby forming a three-dimensional model of the required shape.
[0058] In order to ensure that the details between the main path points are richer, it is necessary to further subdivide the main path points, that is, to subdivide and smooth the main path point set, which will be described in detail below.
[0059] In some possible implementations, the segmentation process includes the following steps:
[0060] Determine the segmentation granularity;
[0061] Sub-path points are set between two adjacent main path points according to the subdivision granularity, so that the total number of path points becomes (subdivision granularity * number of sub-paths + number of main path points), where the total number of path points is the sum of the number of main path points and the number of sub-path points, and the number of sub-paths is (number of main path points - 1).
[0062] The subdivision granularity is the subdivision nodes set between the main path points. For example, if the subdivision granularity is n, n subdivision nodes are set between two adjacent main path points, so that there are (n-1) sub-paths between the two adjacent main path points. In this way, the main path points can be further subdivided.
[0063] The smoothing process includes the following steps:
[0064] Based on the smoothing method of Bezier curve, the tail slope of the previous sub-path is used as the head slope of the next sub-path;
[0065] The main path points and sub-path points are sampled by a second-order Bezier curve to obtain the position information of the sub-path points.
[0066] That is, in order to ensure a smoother transition between all path points and lines, the path needs to be processed by a smoothing algorithm. In the smoothing process, the automatic Bezier curve smoothing method is adopted. First, the tail slope of the previous sub-path is selected as the head slope of the next sub-path, and so on, so that the slopes between the sub-paths are connected to each other, ensuring that the slopes of all sub-paths are consistent; then, the total path nodes are sampled through the second-order Bezier curve to obtain the position information of the subdivided nodes.
[0067] It should be noted that the specific segmentation granularity can be adjusted according to usage and performance details. The higher the segmentation granularity, the better the performance effect and the lower the program performance; otherwise, the performance effect is reduced and the program performance is improved.
[0068] S103: Constructing a three-dimensional continuous overall model according to the three-dimensional model template file data and the main path point set.
[0069] In some possible implementations, constructing a three-dimensional continuous overall model according to the three-dimensional model template file data and the main path point set includes:
[0070] The main path point coordinates, sub-path point coordinates, and the order of the main path point and sub-path point form a total path point set;
[0071] Construct a three-dimensional continuous overall model based on the three-dimensional model template file data and the total path point set.
[0072] That is, since the total path point set has more path points and more details than the main path point set, the constructed three-dimensional continuous overall model performs better.
[0073] In some possible implementations, constructing a three-dimensional continuous overall model according to the preset three-dimensional model template file data and the total path point set includes:
[0074] According to the preset 3D model template file data, a preset model template is set at each main path point and each sub-path point, and a triangular surface is constructed between two adjacent preset model templates;
[0075] A three-dimensional continuous overall model is constructed based on the triangular surfaces between two adjacent preset model templates.
[0076] In some embodiments, according to the preset 3D model template file data, a preset model template is set at each main path point and each sub-path point, and constructing a triangular surface between two adjacent preset model templates includes:
[0077] According to the preset 3D model template data file, the vertex information therein is obtained, and the three vertex information of the triangular surface connecting the two path points is calculated, and each four vertices are composed of two triangular surfaces;
[0078] The three vertex information of the first triangle is:
[0079] 1. The first vertex index value is FirstVertice;
[0080] 2. The second vertex index value is FirstVertice+1;
[0081] 3. The third vertex index value is FirstVertice + the total number of vertices of the preset 3D model template.
[0082] The three vertex information of the second triangle is:
[0083] 1. The first vertex index value is FirstVertice + the total number of vertices in the model template
[0084] 2. The second vertex index value is FirstVertice+1+the total number of vertices in the model template
[0085] 3. The third vertex index value is FirstVertice+1.
[0086] In some embodiments, after step S103, the method further includes adding a head and a tail sub-grid to the three-dimensional continuous overall model to generate a cross section of the three-dimensional continuous overall model. In this way, the three-dimensional continuous overall model is a set of dynamic grid models, which is convenient for modifying the three-dimensional continuous overall model when requirements are added.
[0087] S104: Matching the three-dimensional continuous overall model with the preset map.
[0088] In some possible implementations, matching the three-dimensional continuous overall model with the preset map includes:
[0089] Determine the UV value of the three-dimensional continuous overall model;
[0090] Determine the tiling value of the preset map based on the UV value;
[0091] Matches a 3D continuous monolithic model to a preset map based on the preset map's tiling values.
[0092] That is, the UV value and tiling value of the dynamically constructed three-dimensional continuous overall model are matched with the texture, and finally a three-dimensional virtual scene with texture details is generated. Among them, the model section direction is used as the U value direction, and the model trend direction is used as the V value direction.
[0093] The UV value is, U value = the length from the vertex to the starting vertex / the total length of the entire closed path,
[0094] V value = path length from current vertex to starting point / total length of the path of this series of vertices.
[0095] Since the maps used are basically squares with an aspect ratio of 1:1, but the section length and strike length of the dynamically generated model are dynamic, this application adopts a longitudinal tiling method to ensure that the maps are not distorted.
[0096] Then the tiling value Tiling = (1, total length of the direction / total length of the section).
[0097] Exemplarily, the present application provides a method for constructing a three-dimensional virtual urban road scene, comprising the following steps:
[0098] In the simulated urban road traffic scene, the urban road model is dynamically constructed. A road model template is prepared, and road path points are set according to requirements. Then, according to the above technical solution steps S101-S104, the required urban road model is dynamically generated.
[0099] When it is necessary to change the roads in the three-dimensional virtual scene, path points are added, deleted or displaced, and the above technical solution steps S101-S104 are re-executed to dynamically generate a three-dimensional virtual city road scene.
[0100] See also Figure 4 , is a three-dimensional virtual pipeline drawing device provided in an embodiment of the present application, such as Figure 4 As shown, the device comprises:
[0101] The determination unit 401 is used to obtain preset 3D model template file data, wherein the preset 3D model is a model composed of multiple triangular faces;
[0102] Processing unit 402 is used to determine a main path point set based on preset three-dimensional model template file data, and to perform subdivision and smoothing processing on the main path point set, wherein the main path point set includes the main path point coordinates and the order of the main path points; construct a three-dimensional continuous overall model based on the three-dimensional model template file data and the main path point set; and match the three-dimensional continuous overall model with a preset map.
[0103] As a possible implementation method, the processing unit 402 is specifically used to determine the shape of the three-dimensional model to be generated; according to the shape of the three-dimensional model to be generated, multiple main path points are set, and the set multiple main path points constitute a main path point set.
[0104] As a possible implementation method, the processing unit 402 is specifically used to determine the subdivision granularity; according to the subdivision granularity, sub-path points are set between two adjacent main path points so that the total number of path points becomes (subdivision granularity*number of sub-paths+number of main path points), where the total number of path points is the sum of the number of main path points and the number of sub-path points, and the number of sub-paths is (number of main path points-1); the smoothing processing includes the following steps: based on the smoothing method of the Bezier curve, the tail slope of the previous sub-path is used as the head slope of the next sub-path; the above-mentioned main path points and sub-path points are sampled through the second-order Bezier curve to obtain the position information of the sub-path points.
[0105] As a possible implementation method, the processing unit 402 is specifically used to combine the main path point coordinates, sub-path point coordinates, and the order of main path points and sub-path points into a total path point set; and construct a three-dimensional continuous overall model based on the three-dimensional model template file data and the total path point set.
[0106] As a possible implementation method, the processing unit 402 is specifically used to set a preset model template on each main path point and each sub-path point according to the preset three-dimensional model template file data, and construct a triangular surface between two adjacent preset model templates; based on the triangular surface between two adjacent preset model templates, a three-dimensional continuous overall model is constructed.
[0107] As a possible implementation method, the processing unit 402 is specifically used to determine the UV value of the three-dimensional continuous overall model; determine the tiling value of the preset map according to the UV value; and match the three-dimensional continuous overall model with the preset map according to the tiling value of the preset map.
[0108] Corresponding to the above embodiments, the present application also provides an electronic device. Figure 5 The schematic diagram of the structure of an electronic device provided in an embodiment of the present invention is as follows. The electronic device 500 may include: a processor 501, a memory 502, and a communication unit 503. These components communicate via one or more buses. It can be understood by those skilled in the art that the structure of the electronic device shown in the figure does not constitute a limitation on the embodiment of the present invention. It may be a bus structure or a star structure, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0109] The communication unit 503 is used to establish a communication channel so that the electronic device can communicate with other devices, receive user data sent by other devices or send user data to other devices.
[0110] The processor 501 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. It runs or executes software programs and / or modules stored in the memory 502, and calls data stored in the memory to perform various functions of the electronic device and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of multiple packaged ICs with the same or different functions. For example, the processor 501 can include only a central processing unit (CPU). In an embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.
[0111] The memory 502 is used to store the execution instructions of the processor 501. The memory 502 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0112] When the execution instruction in the memory 502 is executed by the processor 501, the electronic device 500 can execute Figure 1 Some or all of the steps in the illustrated embodiments.
[0113] In a specific implementation, the present invention further provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment of the method for constructing a three-dimensional virtual scene provided by the present invention. The storage medium may be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0114] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention can be essentially or partly contributed to the prior art in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention or certain parts of the embodiments.
[0115] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the device embodiment and the terminal embodiment, since they are basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.
Claims
1. A method for constructing a three-dimensional virtual scene, It is characterized in that The steps include: Acquire preset 3D model template file data, wherein the preset 3D model is a model composed of multiple triangular faces; Determine a main path point set according to the preset 3D model template file data, and perform subdivision processing and smoothing processing on the main path point set, wherein the main path point set includes the main path point coordinates and the order of the main path points; determining the main path point set according to the 3D model template file data includes: Determine the shape of the three-dimensional model to be generated; According to the shape of the three-dimensional model to be generated, a plurality of main path points are set, and the set plurality of main path points constitute the main path point set; The subdivision process comprises the following steps: Determine the segmentation granularity; According to the subdivision granularity, sub-path points are set between two adjacent main path points, so that the total number of path points becomes subdivision granularity*number of sub-paths+number of main path points, where the total number of path points is the sum of the number of main path points and the number of sub-path points, and the number of sub-paths is the number of main path points-1; The smoothing process comprises the following steps: Based on the smoothing method of Bezier curve, the tail slope of the previous sub-path is used as the head slope of the next sub-path; The main path points and sub-path points are sampled by a second-order Bezier curve to obtain the position information of the sub-path points; Constructing a three-dimensional continuous overall model according to the three-dimensional model template file data and the main path point set; The three-dimensional continuous overall model is matched with a preset map.
2. The method according to claim 1, It is characterized in that The preset three-dimensional model template file data includes at least one of a vertex data set and a triangle surface data set.
3. The method according to claim 1, It is characterized in that The constructing of the three-dimensional continuous overall model according to the three-dimensional model template file data and the main path point set comprises: The main path point coordinates, the sub-path point coordinates, and the order of the main path points and the sub-path points form a total path point set; The three-dimensional continuous overall model is constructed according to the three-dimensional model template file data and the total path point set.
4. The method according to claim 3, It is characterized in that The constructing the three-dimensional continuous overall model according to the preset three-dimensional model template file data and the total path point set comprises: According to the preset 3D model template file data, a preset model template is set at each main path point and each sub-path point, and a triangular surface is constructed between two adjacent preset model templates; The three-dimensional continuous overall model is constructed according to the triangular surfaces between two adjacent preset model templates.
5. The method according to claim 1, It is characterized in that The matching of the three-dimensional continuous overall model with the preset map comprises: Determine the UV value of the three-dimensional continuous overall model; Determine a tiling value of a preset map according to the UV value; The three-dimensional continuous overall model is matched with a preset map according to a tiling value of the preset map.
6. A device for constructing a three-dimensional virtual scene, It is characterized in that include: A determination unit, used to obtain preset three-dimensional model template file data, wherein the preset three-dimensional model is a model composed of multiple triangular faces; A processing unit is used to determine a main path point set according to the preset 3D model template file data, and perform subdivision processing and smoothing processing on the main path point set, wherein the main path point set includes the main path point coordinates and the order of the main path points; the determination of the main path point set according to the 3D model template file data includes: determining the shape of the 3D model to be generated; setting a plurality of main path points according to the shape of the 3D model to be generated, and forming the main path point set with the set plurality of main path points; the subdivision processing includes the following steps: determining the subdivision granularity; setting sub-path points between two adjacent main path points according to the subdivision granularity, The total number of path points is changed to the subdivision granularity * the number of sub-paths + the number of main path points, wherein the total number of path points is the sum of the number of main path points and the number of sub-path points, and the number of sub-paths is the number of main path points - 1; the smoothing process comprises the following steps: based on the smoothing method of the Bezier curve, the tail slope of the previous sub-path is used as the head slope of the next sub-path; the main path points and sub-path points are sampled by the second-order Bezier curve to obtain the position information of the sub-path points; a three-dimensional continuous overall model is constructed according to the three-dimensional model template file data and the main path point set; and the three-dimensional continuous overall model is matched with the preset map.
7. An electronic device, It is characterized in that The invention comprises a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute the method according to any one of claims 1 to 5.
8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 5.
