A path export method and terminal
By obtaining and filtering intersection points and normals in 3D scenes, 2D paths are automatically generated, which solves the complex problem of path point generation in the existing technology, and improves the efficiency and flexibility of game production.
Patent Information
- Application Number
- CN202110104219.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-26
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2041-01-26
AI Technical Summary
When generating 2D paths in 3D scenes, it is difficult for the prior art to quickly obtain path points, resulting in complex and inconvenient game production process.
By obtaining the intersection points and normals in preset planes and 3D scenes, filtering intersection points within the normal constraint range, generating target paths with directions, and using the characteristics of Unity3D to automate the generation and sorting of path points, reducing the need for developers to manually set them up. .
The rapid automatic generation of 2D paths in 3D scenes is realized, which improves generation efficiency, reduces the workload of developers, and allows adjustment of preset planes to meet different needs.
Smart Images

Figure CN114792362B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing, and in particular to a path exporting method and a terminal. Background Art
[0002] In game production, it is often necessary to determine a 2D path in a 3D scene, such as in parkour games or sports games, where the tasks are mainly based on moving on a plane in the 3D scene. However, when making a 3D scene, the 3D scene producers may not necessarily export the path points on the corresponding plane, and it is relatively complicated to obtain the required path points after generating the 3D scene, causing inconvenience to the subsequent game production. Summary of the invention
[0003] The technical problem to be solved by the present invention is to provide a path exporting method and a terminal to realize the rapid generation of path points on a surface in a 3D scene.
[0004] In order to solve the above technical problems, a technical solution adopted by the present invention is:
[0005] A path export method comprises the steps of:
[0006] S1. Obtain a preset plane and a preset 3D scene, and obtain a first normal line set consisting of a first normal line corresponding to each first intersection point in the preset plane and the target surface in the preset 3D scene and a first normal line set;
[0007] S2. Filtering the first normal in the first normal set according to a preset normal constraint range to obtain a second normal set, and filtering the first intersection point set according to the second normal set to obtain a second intersection point set;
[0008] S3. Obtain a starting point value, set a second intersection point in the second intersection point set as a starting point according to the starting point value, and generate a directional target path according to the starting point and each of the remaining second intersection points in the second intersection point set.
[0009] In order to solve the above technical problems, another technical solution adopted by the present invention is:
[0010] A path export terminal comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0011] S1. Obtain a preset plane and a preset 3D scene, and obtain a first normal line set consisting of a first normal line corresponding to each first intersection point in the preset plane and the target surface in the preset 3D scene and a first normal line set;
[0012] S2. Filtering the first normal in the first normal set according to a preset normal constraint range to obtain a second normal set, and filtering the first intersection point set according to the second normal set to obtain a second intersection point set;
[0013] S3. Obtain a starting point value, set a second intersection point in the second intersection point set as a starting point according to the starting point value, and generate a directional target path according to the starting point and each of the remaining second intersection points in the second intersection point set.
[0014] The beneficial effects of the present invention are: presetting a plane, obtaining the intersection points of the preset plane and the target surface in the preset 3D scene and the normals corresponding to the intersection points, implementing the screening of the intersection points by constraining the normal lines, and obtaining the starting point values to sort the unnecessary intersection sets to generate a target path with a direction. Only the preset plane is required to realize the automatic generation of the path on the target surface in the preset 3D scene, without the need for the developer to manually set the path points, and the position of the preset plane can be adjusted as needed, thereby improving the generation efficiency of 2D paths in 3D scenes. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 A flow chart of the steps of a path derivation method according to an embodiment of the present invention;
[0016] Figure 2 A schematic diagram of the structure of a path export terminal according to an embodiment of the present invention;
[0017] Figure 3 A schematic diagram of a tangent point and a first normal vector according to an embodiment of the present invention;
[0018] Figure 4 A schematic diagram of a first intersection point of a preset section and a preset 3D scene according to an embodiment of the present invention;
[0019] Figure 5-Figure 7 A schematic diagram of a target path adjustment method according to an embodiment of the present invention;
[0020] Figure 8 A target path schematic diagram of an embodiment of the present invention.
[0021] Description of labels:
[0022] 1. A path export terminal; 2. A processor; 3. A memory. DETAILED DESCRIPTION
[0023] In order to explain the technical content, achieved objectives and effects of the present invention in detail, the following is an explanation in combination with the implementation modes and the accompanying drawings.
[0024] Please refer to Figure 1 and Figures 3 to 8, a path export method, comprising the steps of:
[0025] S1. Obtain a preset plane and a preset 3D scene, and obtain a first normal line set consisting of a first normal line corresponding to each first intersection point in the preset plane and the target surface in the preset 3D scene and a first normal line set;
[0026] S2. Filtering the first normal in the first normal set according to a preset normal constraint range to obtain a second normal set, and filtering the first intersection point set according to the second normal set to obtain a second intersection point set;
[0027] S3. Obtain a starting point value, set a second intersection point in the second intersection point set as a starting point according to the starting point value, and generate a directional target path according to the starting point and each of the remaining second intersection points in the second intersection point set.
[0028] From the above description, it can be seen that the beneficial effects of the present invention are: presetting a plane, obtaining the intersection points of the preset plane and the target surface in the preset 3D scene and the normals corresponding to the intersection points, screening the intersection points by constraining the normal lines, and sorting the unnecessary intersection sets by obtaining the starting point values to generate a target path with a direction. Only a preset plane is needed to realize the automatic generation of the path on the target surface in the preset 3D scene. There is no need for the developer to manually set the path points. The position of the preset plane can be adjusted as needed, which improves the generation efficiency of 2D paths in 3D scenes.
[0029] Furthermore, the S1 is specifically:
[0030] S11, obtaining the triangular face indexes corresponding to the target face of all models in the preset 3D scene through Unity3D, obtaining the triangular face points corresponding to each triangular face in the triangular face indexes, deduplicating all the triangular face points to obtain a triangular face point set, and marking the corresponding relationship between the triangular face and the triangular face points;
[0031] S12, obtaining a preset tangent point, and obtaining a first normal vector of the preset plane;
[0032] S13, subtracting the coordinates of each of the triangular surface points from the coordinates of the tangent point to obtain a first vector, multiplying the first vector by the first normal vector to obtain a value to be determined, and if the signs of the values to be determined of the triangular surface points corresponding to a triangular surface are different, marking the triangular surface as a target triangular surface;
[0033] S14. Acquire the first intersection point according to the target triangle surface point corresponding to the target triangle surface, and the second normal line of the target triangle surface is the first normal line of the first intersection point.
[0034] From the above description, it can be seen that by utilizing the characteristics of Unity3D, the coordinates of the three points of the triangular surface are obtained, and the first vector is obtained by subtracting the coordinates of the tangent point. If the signs of the values to be judged obtained by multiplying the first vector corresponding to the three points by the first normal vector are different, it means that the three points of the triangular surface are located on both sides of the preset plane, and the intersection of the preset plane and the target surface is on the triangular surface. Obtaining the intersection in this way improves the calculation efficiency.
[0035] Furthermore, between S2 and S3, the following is also included:
[0036] S31, obtaining the distance between two adjacent second intersection points in the second intersection point set;
[0037] S32: If the distance is greater than a threshold, randomly remove one of two adjacent second intersection points.
[0038] From the above description, it can be seen that by deleting one of the two points in the second intersection point set that are too close to each other, the file size corresponding to the target path finally generated is reduced. When a high-precision path is required, an interpolation algorithm can be used to obtain a path with high point density, which saves storage space while not affecting the application effect of the target path.
[0039] Furthermore, the S3 is specifically:
[0040] Obtaining a starting point value, setting a second intersection point in the second intersection point set to a position with an index of 0 using the swap point position function in Unity according to the starting point value, and generating a target path with a direction according to the starting point and each of the remaining second intersection points in the second intersection point set using the path point sorting function in Unity;
[0041] The target path is exported in JSON data format.
[0042] From the above description, it can be seen that the order of each point in the second intersection set is determined by sorting the index in Unity, and finally the target path with direction is determined, and the input starting point value can be received to freely set the starting point, which improves the flexibility of generating the target path.
[0043] Further, the step of acquiring the first intersection point according to the target triangle surface point corresponding to the target triangle surface in S14 is specifically:
[0044] S141, obtaining first target triangular surface points v0, v1 and v2 corresponding to a first target triangular surface; wherein v0 is located on one side of the preset plane, and v1 and v2 are located on the other side of the preset plane, and obtaining the tangent point v3;
[0045] S142, calculate the first direction vector d1=v1-v0; the second direction vector d2=v2-v0, and the third direction vector d3=v3-v0;
[0046] S143, multiplying the first direction vector by the first normal vector to obtain a first projection p1; multiplying the second direction vector by the second normal vector to obtain a second projection p2; and multiplying the third direction vector by the first normal vector to obtain a third projection p0;
[0047] S144, the first intersection point pv1 corresponding to the first target triangle is: pv1 = v0 + d1*(p0 / p1); pv2 = v0 + d2*(p0 / p2);
[0048] S145, looping from S141 to S144 until all the target triangular faces are calculated, and the first intersection points corresponding to all the target triangular faces form the first intersection point set.
[0049] It can be seen from the above description that after the target triangular surface is determined, the first intersection point corresponding to each target triangular surface is obtained through the relationship between the target triangular surface and the preset plane, and finally the first intersection point set is calculated.
[0050] Please refer to Figure 2 , a path export terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0051] S1. Obtain a preset plane and a preset 3D scene, and obtain a first normal line set consisting of a first normal line corresponding to each first intersection point in the preset plane and the target surface in the preset 3D scene and a first normal line set;
[0052] S2. Filtering the first normal in the first normal set according to a preset normal constraint range to obtain a second normal set, and filtering the first intersection point set according to the second normal set to obtain a second intersection point set;
[0053] S3. Obtain a starting point value, set a second intersection point in the second intersection point set as a starting point according to the starting point value, and generate a directional target path according to the starting point and each of the remaining second intersection points in the second intersection point set.
[0054] The beneficial effects of the present invention are: presetting a plane, obtaining the intersection points of the preset plane and the target surface in the preset 3D scene and the normals corresponding to the intersection points, implementing the screening of the intersection points by constraining the normal lines, and obtaining the starting point values to sort the unnecessary intersection sets to generate a target path with a direction. Only the preset plane is required to realize the automatic generation of the path on the target surface in the preset 3D scene, without the need for the developer to manually set the path points, and the position of the preset plane can be adjusted as needed, thereby improving the generation efficiency of 2D paths in 3D scenes.
[0055] Furthermore, the S1 is specifically:
[0056] S11, obtaining the triangular face indexes corresponding to the target face of all models in the preset 3D scene through Unity3D, obtaining the triangular face points corresponding to each triangular face in the triangular face indexes, deduplicating all the triangular face points to obtain a triangular face point set, and marking the corresponding relationship between the triangular face and the triangular face points;
[0057] S12, obtaining a preset tangent point, and obtaining a first normal vector of the preset plane;
[0058] S13, subtracting the coordinates of each of the triangular surface points from the coordinates of the tangent point to obtain a first vector, multiplying the first vector by the first normal vector to obtain a value to be determined, and if the signs of the values to be determined of the triangular surface points corresponding to a triangular surface are different, marking the triangular surface as a target triangular surface;
[0059] S14. Acquire the first intersection point according to the target triangle surface point corresponding to the target triangle surface, and the second normal line of the target triangle surface is the first normal line of the first intersection point.
[0060] From the above description, it can be seen that by utilizing the characteristics of Unity3D, the coordinates of the three points of the triangular surface are obtained, and the first vector is obtained by subtracting the coordinates of the tangent point. If the signs of the values to be judged obtained by multiplying the first vector corresponding to the three points by the first normal vector are different, it means that the three points of the triangular surface are located on both sides of the preset plane, and the intersection of the preset plane and the target surface is on the triangular surface. Obtaining the intersection in this way improves the calculation efficiency.
[0061] Furthermore, between S2 and S3, the following is also included:
[0062] S31, obtaining the distance between two adjacent second intersection points in the second intersection point set;
[0063] S32: If the distance is greater than a threshold, randomly remove one of two adjacent second intersection points.
[0064] From the above description, it can be seen that by deleting one of the two points in the second intersection point set that are too close to each other, the file size corresponding to the target path finally generated is reduced. When a high-precision path is required, an interpolation algorithm can be used to obtain a path with high point density, which saves storage space while not affecting the application effect of the target path.
[0065] Furthermore, the S3 is specifically:
[0066] Obtaining a starting point value, setting a second intersection point in the second intersection point set to a position with an index of 0 using the swap point position function in Unity according to the starting point value, and generating a target path with a direction according to the starting point and each of the remaining second intersection points in the second intersection point set using the path point sorting function in Unity;
[0067] The target path is exported in JSON data format.
[0068] From the above description, it can be seen that the order of each point in the second intersection set is determined by sorting the index in Unity, and finally the target path with direction is determined, and the input starting point value can be received to freely set the starting point, which improves the flexibility of generating the target path.
[0069] Further, the step of acquiring the first intersection point according to the target triangle surface point corresponding to the target triangle surface in S14 is specifically:
[0070] S141, obtaining first target triangular surface points v0, v1 and v2 corresponding to a first target triangular surface; wherein v0 is located on one side of the preset plane, and v1 and v2 are located on the other side of the preset plane, and obtaining the tangent point v3;
[0071] S142, calculate the first direction vector d1=v1-v0; the second direction vector d2=v2-v0, and the third direction vector d3=v3-v0;
[0072] S143, multiplying the first direction vector by the first normal vector to obtain a first projection p1; multiplying the second direction vector by the second normal vector to obtain a second projection p2; and multiplying the third direction vector by the first normal vector to obtain a third projection p0;
[0073] S144, the first intersection point pv1 corresponding to the first target triangle is: pv1 = v0 + d1*(p0 / p1); pv2 = v0 + d2*(p0 / p2);
[0074] S145, looping from S141 to S144 until all the target triangular faces are calculated, and the first intersection points corresponding to all the target triangular faces form the first intersection point set.
[0075] It can be seen from the above description that after the target triangular surface is determined, the first intersection point corresponding to each target triangular surface is obtained through the relationship between the target triangular surface and the preset plane, and finally the first intersection point set is calculated.
[0076] Please refer to Figure 1 , Figures 3 to 8 , Embodiment 1 of the present invention is:
[0077] A path export method comprises the steps of:
[0078] S1. Obtain a preset plane and a preset 3D scene, and obtain a first normal line set consisting of a first normal line corresponding to each first intersection point in the preset plane and the target surface in the preset 3D scene and a first normal line set;
[0079] In an optional implementation, a point selection request is received, a target point on a target surface is acquired according to the point selection request, and a preset plane is determined according to the target point and a normal line of the target surface; a first intersection point set and a first normal line set are stored in an array;
[0080] S2. Filtering the first normal in the first normal set according to a preset normal constraint range to obtain a second normal set, and filtering the first intersection point set according to the second normal set to obtain a second intersection point set;
[0081] In an optional implementation, the normal constraint range is a normal angle constraint range: Figure 4 The normals from the positive direction of the Z axis (0 degrees) to the positive direction of the Y axis in the coordinates shown are eliminated to obtain a second intersection point set;
[0082] Eliminate points according to the normal angle to eliminate redundant points, such as Figure 4 In the slide shown, the normals of the triangles on the slide tend to be upward, while the normals of the triangles below the slide tend to be downward. In this way, the downward points cut out can be eliminated to obtain the desired path;
[0083] S3, obtaining a distance between two adjacent second intersection points in the second intersection point set, and if the distance is greater than a threshold, randomly removing one of the two adjacent second intersection points to obtain a new second intersection point set;
[0084] S4, obtaining a starting point value, setting a second intersection in the second intersection set to a position with an index of 0 using a point exchange function in Unity according to the starting point value, and generating a target path with a direction according to the starting point and the positions of each of the remaining second intersections in the second intersection set using a path point sorting function in Unity;
[0085] Please refer to Figure 4 , where the path line is a representation of points connected by drawing lines. When doing this representation, you need to fix the first point, otherwise you can Figure 4 From the performance of some lines in the figure, it can be seen that its endpoint is not above the ramp, which affects the use of the path;
[0086] Specifically, if each second intersection point in the second intersection point set has a recorded export order, a second intersection point in the second intersection point set corresponding to the starting point value is exchanged with the first point exported; if the export order is not recorded, an exchange request is received, and according to the exchange request, a second intersection point corresponding to the starting point value is exchanged with a point at a preset position; Figure 4 , exchange a second intersection point corresponding to the starting point value with the point at the top of the slope;
[0087] In an optional implementation, please refer to Figure 5-Figure 7 , after generating the target path, it also includes: displacing or rotating some target path points in the target path; obtaining new points by interpolating the target path points, and adding the new points to the target path; receiving a new request, obtaining a new point according to the new request, and adding the new point to the target path;
[0088] Please refer to Figure 8 , is the target path after processing, which makes the lines connecting the target path points smoother;
[0089] Export the target path in JSON data format;
[0090] Specifically, the target path point, the preset plane, and the first discovery corresponding to the target path point are exported in JSON data format.
[0091] Please refer to Figure 1 , Figures 3 to 8 , Embodiment 2 of the present invention is:
[0092] A path derivation method, which is different from the first embodiment in that:
[0093] S1 is specifically:
[0094] S11, obtaining the triangular face indexes corresponding to the target face of all models in the preset 3D scene through Unity3D, obtaining the triangular face points corresponding to each triangular face in the triangular face indexes, deduplicating all the triangular face points to obtain a triangular face point set, and marking the corresponding relationship between the triangular face and the triangular face points;
[0095] S12, obtaining a preset tangent point, and obtaining a first normal vector of the preset plane;
[0096] Please refer to Figure 3In an optional implementation, receiving the coordinates of the tangent point, presetting the tangent point according to the tangent point, and determining the preset plane according to the tangent point and the normal of the triangle where the tangent point is located;
[0097] The coordinates of the tangent point can be set by the developer. In an optional implementation, the angle range is limited to 0-360°;
[0098] Please refer to Figure 4 , the rectangular border is the preset plane, and the arrow pointing out of the screen is the normal vector of the preset plane;
[0099] Please refer to Figure 3 , is the coordinate of the normal vector of the preset plane;
[0100] S13, subtracting the coordinates of each of the triangular surface points from the coordinates of the tangent point to obtain a first vector, multiplying the first vector by the first normal vector to obtain a value to be determined, and if the signs of the values to be determined of the triangular surface points corresponding to a triangular surface are different, marking the triangular surface as a target triangular surface;
[0101] S14, acquiring the first intersection point according to the target triangular surface point corresponding to the target triangular surface, wherein the second normal line of the target triangular surface is the first normal line of the first intersection point, specifically:
[0102] S141, obtaining first target triangular surface points v0, v1 and v2 corresponding to a first target triangular surface; wherein v0 is located on one side of the preset plane, and v1 and v2 are located on the other side of the preset plane, and obtaining the tangent point v3;
[0103] S142, calculate the first direction vector d1=v1-v0; the second direction vector d2=v2-v0, and the third direction vector d3=v3-v0;
[0104] S143, multiplying the first direction vector by the first normal vector to obtain a first projection p1; multiplying the second direction vector by the second normal vector to obtain a second projection p2; and multiplying the third direction vector by the first normal vector to obtain a third projection p0;
[0105] S144, the first intersection point pv1 corresponding to the first target triangle is: pv1 = v0 + d1*(p0 / p1); pv2 = v0 + d2*(p0 / p2);
[0106] S145, looping from S141 to S144 until all the target triangular faces are calculated, and the first intersection points corresponding to all the target triangular faces form the first intersection point set.
[0107] Please refer to Figure 2 , Embodiment 3 of the present invention is:
[0108] A path export terminal 1 includes a processor 2, a memory 3, and a computer program stored in the memory 3 and executable on the processor 2. When the processor 2 executes the computer program, each step in the first or second embodiment is implemented.
[0109] In summary, the present invention provides a path export method and terminal, presets a plane and a target surface of a 3D scene, obtains the intersection of the preset plane and the target surface, obtains the normal corresponding to the intersection, filters the intersection by filtering the angle of the normal, and removes one of the two adjacent intersections that are too close to obtain a second intersection set, and then determines a corresponding second intersection in the second intersection set as the starting point according to the received starting point value to obtain a directional target path, and performs operations such as displacement and rotation on the points in the target path and adds new points to achieve optimization of the target path; by presetting the plane and using the triangular surface characteristics in Unity to obtain the intersection, the automatic generation of the target path is achieved, and the development speed is improved.
[0110] The above descriptions are merely embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent transformations made using the contents of the present invention's specification and drawings, or directly or indirectly applied in related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A path derivation method, characterized in that: Includes steps: S1. Obtain a preset plane and a preset 3D scene, and obtain a first normal line set consisting of a first normal line corresponding to each first intersection point in the preset plane and the target surface in the preset 3D scene and a first normal line set; S2. Filtering the first normal in the first normal set according to a preset normal constraint range to obtain a second normal set, and filtering the first intersection point set according to the second normal set to obtain a second intersection point set; S3, obtaining a starting point value, setting a second intersection point in the second intersection point set as a starting point according to the starting point value, and generating a target path with a direction according to the starting point and each of the remaining second intersection points in the second intersection point set; The S1 is specifically: S11, obtaining the triangular face indexes corresponding to the target face of all models in the preset 3D scene through Unity3D, obtaining the triangular face points corresponding to each triangular face in the triangular face indexes, deduplicating all the triangular face points to obtain a triangular face point set, and marking the corresponding relationship between the triangular face and the triangular face points; S12, obtaining a preset tangent point, and obtaining a first normal vector of the preset plane; S13, subtracting the coordinates of each of the triangular surface points from the coordinates of the tangent point to obtain a first vector, multiplying the first vector by the first normal vector to obtain a value to be determined, and if the signs of the values to be determined of the triangular surface points corresponding to a triangular surface are different, marking the triangular surface as a target triangular surface; S14, acquiring the first intersection point according to the target triangular surface point corresponding to the target triangular surface, wherein the second normal line of the target triangular surface is the first normal line of the first intersection point; The step of obtaining the first intersection point according to the target triangle surface point corresponding to the target triangle surface in S14 is specifically as follows: S141, obtaining first target triangular surface points v0, v1 and v2 corresponding to a first target triangular surface; wherein v0 is located on one side of the preset plane, and v1 and v2 are located on the other side of the preset plane, and obtaining the tangent point v3; S142, find the first direction vector d1=v1-v0; The second direction vector d2=v2-v0, the third direction vector d3=v3-v0; S143, multiplying the first direction vector by the first normal vector to obtain a first projection p1; multiplying the second direction vector by the second normal vector to obtain a second projection p2; and multiplying the third direction vector by the first normal vector to obtain a third projection p0; S144, the first intersection point pv1 corresponding to the first target triangle is: pv1=v0+d1*(p0 / p1); pv2=v0+d2*(p0 / p2); S145, looping from S141 to S144 until all the target triangular faces are calculated, and the first intersection points corresponding to all the target triangular faces form the first intersection point set.
2. A path derivation method according to claim 1, characterized in that: The S2 and S3 also include: S31, obtaining the distance between two adjacent second intersection points in the second intersection point set; S32: If the distance is greater than a threshold, randomly remove one of two adjacent second intersection points.
3. A path derivation method according to claim 1, characterized in that: The S3 is specifically: Obtaining a starting point value, setting a second intersection point in the second intersection point set to a position with an index of 0 using the swap point position function in Unity according to the starting point value, and generating a target path with a direction according to the starting point and each of the remaining second intersection points in the second intersection point set using the path point sorting function in Unity; The target path is exported in JSON data format.
4. A path export terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the following steps are implemented: S1. Obtain a preset plane and a preset 3D scene, and obtain a first normal line set consisting of a first normal line corresponding to each first intersection point in the preset plane and the target surface in the preset 3D scene and a first normal line set; S2. Filtering the first normal in the first normal set according to a preset normal constraint range to obtain a second normal set, and filtering the first intersection point set according to the second normal set to obtain a second intersection point set; S3, obtaining a starting point value, setting a second intersection point in the second intersection point set as a starting point according to the starting point value, and generating a target path with a direction according to the starting point and each of the remaining second intersection points in the second intersection point set; The S1 is specifically: S11, obtaining the triangular face indexes corresponding to the target face of all models in the preset 3D scene through Unity3D, obtaining the triangular face points corresponding to each triangular face in the triangular face indexes, deduplicating all the triangular face points to obtain a triangular face point set, and marking the corresponding relationship between the triangular face and the triangular face points; S12, obtaining a preset tangent point, and obtaining a first normal vector of the preset plane; S13, subtracting the coordinates of each of the triangular surface points from the coordinates of the tangent point to obtain a first vector, multiplying the first vector by the first normal vector to obtain a value to be determined, and if the signs of the values to be determined of the triangular surface points corresponding to a triangular surface are different, marking the triangular surface as a target triangular surface; S14, acquiring the first intersection point according to the target triangular surface point corresponding to the target triangular surface, wherein the second normal line of the target triangular surface is the first normal line of the first intersection point; The step of obtaining the first intersection point according to the target triangle surface point corresponding to the target triangle surface in S14 is specifically as follows: S141, obtaining first target triangular surface points v0, v1 and v2 corresponding to a first target triangular surface; wherein v0 is located on one side of the preset plane, and v1 and v2 are located on the other side of the preset plane, and obtaining the tangent point v3; S142, find the first direction vector d1=v1-v0; The second direction vector d2=v2-v0, the third direction vector d3=v3-v0; S143, multiplying the first direction vector by the first normal vector to obtain a first projection p1; multiplying the second direction vector by the second normal vector to obtain a second projection p2; and multiplying the third direction vector by the first normal vector to obtain a third projection p0; S144, the first intersection point pv1 corresponding to the first target triangle is: pv1=v0+d1*(p0 / p1); pv2=v0+d2*(p0 / p2); S145, looping from S141 to S144 until all the target triangular faces are calculated, and the first intersection points corresponding to all the target triangular faces form the first intersection point set.
5. A path export terminal according to claim 4, characterized in that: The S2 and S3 also include: S31, obtaining the distance between two adjacent second intersection points in the second intersection point set; S32: If the distance is greater than a threshold, randomly remove one of two adjacent second intersection points.
6. A path export terminal according to claim 4, characterized in that: The S3 is specifically: Obtaining a starting point value, setting a second intersection point in the second intersection point set to a position with an index of 0 using the swap point position function in Unity according to the starting point value, and generating a target path with a direction according to the starting point and each of the remaining second intersection points in the second intersection point set using the path point sorting function in Unity; The target path is exported in JSON data format.
