Virtual road model generation method and system and computer program product

By obtaining and processing road splines, and automatically extracting and generating the fork crossing model of virtual roads, the problem of manual drawing efficiency in the prior art is solved, and more efficient and flexible model generation is achieved.

CN119559304APending Publication Date: 2025-03-04NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411588127.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-03-04

AI Technical Summary

Technical Problem

In the prior art, the generation of the fork-way model of virtual roads is inefficient and requires a lot of manual drawing, which leads to high time and energy consumption and low model generation efficiency.

Method used

By obtaining a preset number of road splines, determining the fork range area based on road width information, extracting the fork crossing splines, determining the fork crossing type based on material information, generating the fork crossing feature curve, and finally generating the fork crossing model based on the feature curve.

Benefits of technology

The cost of generating a fork model is reduced, the generation efficiency and model flexibility is improved, and the automated generation process maintains the unity of the art effects of the same type of road.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119559304A_ABST
    Figure CN119559304A_ABST
Patent Text Reader

Abstract

The invention provides a virtual road model generation method and system and a computer program product, and relates to the technical field of computer animation. The virtual road model generation method comprises the steps that a preset number of road splines are obtained, and at least two splines in the preset number of road splines intersect or intersect on extension lines of the splines; determining a crossroad range area based on the road width information corresponding to the road splines, and extracting crossroad splines in the crossroad range area from the preset number of road splines; determining the turnout type of the turnout spline line based on the material information corresponding to the turnout spline line; generating a fork characteristic curve based on the fork type of the fork spline line and the road width information corresponding to the fork spline line; and generating a crossroad model based on the crossroad characteristic curve.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer animation technology, and in particular to a method, system and computer program product for generating a virtual road model. Background Art

[0002] In computer 3D animation, virtual road scenes are often needed, such as virtual city roads, virtual highways, etc. With the development of computer technology, tools for making virtual road scenes emerge in an endless stream, but the generation of virtual road forks has always been a difficult point. At present, the method of generating virtual road forks can be achieved by manual drawing, such as manually drawing the road fork grid model, manually mapping the road fork grid model, etc., but manual drawing requires a lot of time and effort, and the model generation efficiency is low.

[0003] In view of this, some embodiments of the present specification provide a method, system and computer program product for generating a virtual road model, aiming to reduce the cost of generating a turnout model and improve the efficiency of generating a turnout model. Summary of the invention

[0004] One or more embodiments of the present specification provide a method for generating a virtual road model, the method comprising: obtaining a preset number of road splines, wherein at least two of the preset number of road splines intersect or intersect on their extension lines; determining a fork range area based on road width information corresponding to the road splines, and extracting fork splines within the fork range area from the preset number of road splines; determining a fork type of the fork spline based on material information corresponding to the fork spline; generating a fork characteristic curve based on the fork type of the fork spline and the road width information corresponding to the fork spline; and generating a fork model based on the fork characteristic curve.

[0005] According to the method provided by one or more embodiments of the present specification, a fork range area is determined based on road width information corresponding to a road spline, and a fork spline within the fork range area is extracted from a preset number of road splines, including: determining the fork range area based on a first vertex and a second vertex whose distance between vertices in the road spline is less than a first preset length; cutting the road spline based on the fork range area, and extracting the fork spline within the fork range area; wherein the first preset length is determined based on the road width information corresponding to the road spline; the first vertex and the second vertex are located in different road splines, or the first vertex and the second vertex are located in the same road spline and the distance between the first vertex and the second vertex along the same road spline is greater than a second preset length.

[0006] According to the method provided by one or more embodiments of the present specification, determining the range of the fork in the road based on the first vertex and the second vertex whose distance between vertices in the road spline is less than a first preset length includes: determining a preset range with the first vertex as the center and the first preset length as the radius; determining a second vertex within the preset range that meets a preset condition, and establishing a temporary connecting line between the first vertex and the second vertex that meets the preset condition; and determining the fork range area based on vertices whose number of temporary connecting lines is greater than 1.

[0007] According to the method provided by one or more embodiments of the present specification, the preset condition includes at least one of the following: the height difference between the first vertex and the second vertex is less than the preset height difference; when the first vertex overlaps with the second vertex, the first vertex and the second vertex are located in different road splines.

[0008] According to the method provided by one or more embodiments of the present specification, the fork type includes a continuous fork and a discontinuous fork, and determining the fork type of the fork spline based on the material information corresponding to the fork spline includes: determining the material corresponding to each spline in the fork spline based on the material information corresponding to the fork spline; when the materials corresponding to each spline in the fork spline are the same, the fork type of the fork spline is a continuous fork; when the materials corresponding to each spline in the fork spline are different, the fork type of the fork spline is a discontinuous fork.

[0009] According to the method provided by one or more embodiments of the present specification, when the fork type of the fork spline is a continuous fork, generating a fork characteristic curve based on the fork type of the fork spline and the road width information corresponding to the fork spline includes: generating a fork road off-section model characteristic curve based on a preset overall road surface width corresponding to the fork spline; generating a fork road on-section model characteristic curve based on a preset on-section width corresponding to the fork spline; wherein, the fork road on-section model characteristic curve is nested within the fork road off-section model characteristic curve.

[0010] According to the method provided by one or more embodiments of the present specification, generating a model characteristic curve of an off-road section of a fork in the road based on a preset overall road width corresponding to a fork in the road spline includes: based on the preset overall road width corresponding to the fork in the road spline, lofting the fork in the road spline in a preset vector direction and in a direction opposite to the preset vector direction, generating more than two first patch curves; merging the more than two first patch curves, and removing shared edges in the first patch curves, to obtain a model characteristic curve of an off-road section of a fork in the road; generating a model characteristic curve of an on-road section of a fork in the road based on a preset on-road section width corresponding to the fork in the road spline includes: based on the preset on-road section width corresponding to the fork in the road spline, lofting the fork in the road spline in a preset vector direction and in a direction opposite to the preset vector direction, generating more than two second patch curves; merging the more than two second patch curves, and removing shared edges in the second patch curves; generating a road centerline of the second patch curve, and obtaining a model characteristic curve of an on-road section of a fork in the road.

[0011] According to the method provided in one or more embodiments of the present specification, generating a fork model based on the fork characteristic curve includes: skinning the fork off-road section model characteristic curve and the fork on-road section model characteristic curve to generate the fork off-road section model and the fork on-road section model; merging the fork off-road section model with the fork on-road section model to obtain a fork model with a continuous fork type.

[0012] The method provided according to one or more embodiments of the present specification also includes: determining a main spline in the fork spline based on weight information corresponding to each spline in the fork spline, wherein the weight information includes at least one of the following information: preset main spline information, material information, spline continuity information, and road width information.

[0013] According to the method provided by one or more embodiments of the present specification, determining the main spline in the fork spline based on the weight information corresponding to each spline in the fork spline includes: setting the spline with the largest weight in the fork spline as the main spline, wherein the setting of the weight information satisfies at least one of the following conditions: the weight of the preset main spline information is greater than the weight of the material information; the weight of the material information is greater than the weight of the spline continuity information; the weight of the spline continuity information is greater than the weight of the road width information.

[0014] According to the method provided by one or more embodiments of the present specification, when the fork type of the fork spline is a discontinuous fork, generating a fork characteristic curve based on the fork type and the road width information corresponding to the fork spline includes: generating a fork off-road segment model characteristic curve based on a preset overall road surface width corresponding to the fork spline; generating a fork on-road segment model characteristic curve based on a preset on-road segment width corresponding to the fork spline; generating a main road on-road segment model characteristic curve based on a preset on-road segment width corresponding to the main spline; wherein, the fork on-road segment model characteristic curve is nested within the fork off-road segment model characteristic curve.

[0015] According to the method provided by one or more embodiments of the present specification, generating a main road in-road segment model characteristic curve based on a preset in-road segment width corresponding to a main spline includes: lofting the main spline in a preset vector direction and in the opposite direction of the preset vector direction based on the preset in-road segment width corresponding to the main spline to generate a third patch curve; removing shared edges in the third patch curve; generating a road centerline of the third patch curve to obtain the main road in-road segment model characteristic curve.

[0016] According to the method provided by one or more embodiments of the present specification, generating a fork model based on the fork characteristic curve includes: skinning the fork off-road section model characteristic curve, the fork on-road section model characteristic curve and the main road on-road section model characteristic curve to generate the fork off-road section model, the fork on-road section model and the main road on-road section model; trimming the fork on-road section model based on the main road on-road section model, and merging the trimmed fork on-road section model with the main road on-road section model and the fork off-road section model to obtain a fork model with a discontinuous fork type.

[0017] The method provided according to one or more embodiments of the present specification further includes: generating corresponding texture coordinates based on the fork intersection characteristic curve.

[0018] According to the method provided in one or more embodiments of the present specification, generating corresponding texture coordinates based on the fork characteristic curve includes: mapping texture coordinates to the lane area and / or the middle area in the fork characteristic curve, wherein the lane area includes the area formed between two adjacent characteristic curves in the fork characteristic curve, and the middle area includes a closed area formed by more than two adjacent lane areas.

[0019] According to the method provided in one or more embodiments of the present specification, mapping texture coordinates for lanes and / or middle areas in a fork intersection characteristic curve includes: mapping texture coordinates corresponding to the lane area based on the length of the lane area and the width of the lane area; and / or mapping texture coordinates corresponding to the middle area based on the coordinate values ​​of the middle area on a first preset axial direction and a second preset axial direction in a three-dimensional coordinate system.

[0020] According to the method provided by one or more embodiments of the present specification, it also includes: sampling in the texture map based on the texture coordinates, and rendering the fork model. One or more embodiments of the present specification also provide a virtual road model generation system, the system including: a spline acquisition module, used to acquire a preset number of road splines, wherein at least two of the preset number of road splines intersect or intersect on their extension lines; an extraction module, used to determine the fork range area based on the road width information corresponding to the road spline, and extract the fork spline within the fork range area from the preset number of road splines; a fork type determination module, used to determine the fork type of the fork spline based on the material information corresponding to the fork spline; a characteristic curve generation module, used to generate a fork characteristic curve based on the fork type of the fork spline and the road width information corresponding to the fork spline; a fork model generation module, used to generate a fork model based on the fork characteristic curve.

[0021] One or more embodiments of the present specification further provide a computer program product, including a computer program, which, when at least a portion of the computer program is executed by a processor, can implement the virtual road model generation method described in some embodiments of the present specification.

[0022] The beneficial effects that may be brought about by the embodiments of this specification include but are not limited to: (1) by obtaining a preset number of road splines, determining the fork range area based on the road width information corresponding to the road splines, and extracting the fork splines within the fork range area from the preset number of road splines, further determining the fork type of the fork splines based on the material information corresponding to the fork splines, generating a fork characteristic curve based on the fork type of the fork splines and the road width information corresponding to the fork splines, and then generating a fork model based on the fork type and the fork characteristic curve, thereby reducing the cost of generating the fork model, improving the efficiency of generating the fork model and the flexibility of the fork model; (2) by automatically generating the corresponding fork model, thereby maintaining the uniformity of the artistic effects of the same type of roads ; (3) Determine the type of the fork of the fork spline as a continuous fork or a discontinuous fork through the materials corresponding to each spline in the fork spline, and generate different fork models based on different fork types, thereby improving the flexibility of generating fork models; (4) The characteristic curve of the model of the inner section of the fork is nested in the characteristic curve of the model of the outer section of the fork, thereby generating a virtual road that is closer to the actual road conditions, thereby improving the authenticity and aesthetics of the generated fork model; (5) Determine the main spline in the fork spline based on the weight information corresponding to each spline in the fork spline, thereby improving the accuracy of determining the main spline of the fork spline; (6) By mapping texture coordinates for the characteristic curve of the fork, the reusability of the road surface map can be improved, saving the development cost of the road surface map. It should be noted that different embodiments may produce different beneficial effects. In different embodiments, the beneficial effects that may be produced may be any one or a combination of the above, or any other beneficial effects that may be obtained. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] This specification will be further explained by way of exemplary embodiments, which will be described in detail by way of the accompanying drawings. The same numbers in the drawings represent the same structures or steps.

[0024] Figure 1 This is an exemplary flow chart of a method for generating a virtual road model according to some embodiments of this specification.

[0025] Figure 2 It is a schematic diagram of a road spline according to some embodiments of the present specification.

[0026] Figure 3 It is a schematic diagram of road splines and branch road range areas according to some embodiments of this specification.

[0027] Figure 4 It is an exemplary flow chart of a method for generating a characteristic curve of a turnout of a continuous turnout according to some embodiments of the present specification.

[0028] Figure 5-a It is a schematic diagram of a first facet curve shown in some embodiments of this specification.

[0029] Figure 5-b It is a schematic diagram of the characteristic curve of the off-road section model of the fork intersection shown in some embodiments of this specification.

[0030] Figure 6-a It is a schematic diagram of a second facet curve shown in some embodiments of this specification.

[0031] Figure 6-b It is a schematic diagram of a characteristic curve of a fork in-road section model according to some embodiments of this specification.

[0032] Figure 7 It is a schematic diagram of a characteristic curve of a fork intersection shown in some embodiments of this specification.

[0033] Figure 8 is an exemplary flow chart of a method for determining a main spline according to some embodiments of the present specification.

[0034] Fig. 9 It is an exemplary flow chart of a method for generating a characteristic curve of a turnout for a discontinuous turnout according to some embodiments of the present specification.

[0035] Figure 10-a It is a schematic diagram of a third facet curve shown in some embodiments of this specification.

[0036] Figure 10-b It is a schematic diagram of a characteristic curve of an in-road segment model of a main road according to some embodiments of this specification.

[0037] Fig.11 It is an exemplary flow chart of a method for generating texture coordinates of a fork intersection characteristic curve according to some embodiments of this specification.

[0038] Fig.12 It is a schematic diagram of lane area A1 shown in some embodiments of this specification.

[0039] Fig.13 is an exemplary block diagram of a virtual road model generation system according to some embodiments of the present specification. DETAILED DESCRIPTION

[0040] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the embodiments will be described in detail below with reference to the accompanying drawings. Obviously, the contents described below are some examples or embodiments of this specification. For ordinary technicians in this field, without paying creative work, the technical solutions or means disclosed in this specification can also be applied to other scenarios based on these technical contents.

[0041] It should be understood that the "system", "device", "unit" and / or "module" used in this specification is a method for distinguishing different components, elements, parts, portions or assemblies at different levels. However, if other words can achieve the same purpose, the words can be replaced by other expressions.

[0042] Unless otherwise specified, technical terms used in this specification to describe components, elements, etc. do not refer to the singular, but may also include the plural. Generally speaking, terms such as "include", "comprise", etc. only indicate that the steps, elements, or components that have been clearly identified are included, and these steps, elements, and components do not constitute an exclusive list, such as the method or device described may also include other steps or components.

[0043] Flowcharts are used in this specification to illustrate the operation steps performed by the device or system of the relevant embodiments, but unless otherwise specified, the order used to describe these steps should not be understood as a limitation on the order in which the steps are performed. A person of ordinary skill in the art can adjust the order in which these steps are performed based on the knowledge and information conveyed by the embodiments of this specification, and the adjustment includes but is not limited to swapping the order, merging multiple steps, and splitting a certain step.

[0044] Computer three-dimensional animation technology, also known as three-dimensional computer animation, refers to the technology of visual representation of virtual objects or scenes in three-dimensional space through computer simulation. This technology is widely used in movie stunts, virtual reality, animation and video games. Virtual objects or scenes in three-dimensional animation are often represented by three-dimensional models. For example, three-dimensional models can be character models (such as characters and animals in animation), static object models (such as buildings, furniture, props, etc.), and environmental models (such as virtual roads). Taking the virtual road model in the virtual road scene as an example, the three-dimensional model can include multiple polygonal meshes (also called meshes). The polygonal mesh can be, for example, a triangular mesh or a quadrilateral mesh. A polygonal mesh can be composed of vertices, edges, and faces. Two vertices are connected by an edge, and multiple edges constitute a face, thereby forming a mesh.

[0045] A virtual road model is a type of three-dimensional model. A virtual road model can be generated based on one or more road splines. A road spline is composed of one or more line segments, and each line segment is formed by two vertices. Among them, the vertex can store vertex position information, road width information, rotation information, material information, identification information, normal information, texture coordinates, color information or other custom data, etc., and this information can be stored in the vertex attributes in the form of fields to define the characteristics of the vertex. The road spline can store spline continuity information, spline length information, etc., and this information can be stored in the spline attributes in the form of fields to define the characteristics of the spline. The corresponding characteristic curve can be generated by lofting the road spline, and the corresponding virtual road model can be generated by skinning the road characteristic curve.

[0046] The fork in the road is an important component of the virtual road model. The design of the fork in the road can make the virtual road model have a diversified road structure, avoid monotony and repetition, and enhance the player's visual experience. In some embodiments, the method of generating a fork in the road of a virtual road can be achieved by manual drawing, such as manually drawing a road fork grid model, manually mapping the road fork grid model, etc., but manual drawing requires a lot of time and effort, and the model generation efficiency is low. In other embodiments, the method of generating a fork in the road of a virtual road can also be generated by a preset mode in a three-dimensional production software, such as generating a fork in the road based on some preset road templates, but the fork in the road generated based on the preset mode lacks flexibility and is difficult to handle complex, multi-fork situations and the diverse needs of game maps.

[0047] To this end, some embodiments of this specification propose a method for generating a virtual road model, by obtaining a preset number of road splines, determining the fork range area based on the road width information corresponding to the road splines, and extracting the fork splines in the fork range area from the preset number of road splines, further determining the fork type of the fork splines based on the material information corresponding to the fork splines, generating a fork characteristic curve based on the fork type of the fork splines and the road width information corresponding to the fork splines, and then generating a fork model based on the fork characteristic curve. This reduces the cost of generating a fork model, improves the efficiency of generating a fork model, and improves the flexibility of the fork model.

[0048] Figure 1 is an exemplary flow chart of a method for generating a virtual road model according to some embodiments of this specification. In some embodiments, Figure 1The process 100 shown can be executed by a computing device, for example, it can be implemented by a virtual road model generation system 1300 deployed on the computing device. In some embodiments, the computing device can be a desktop computer, a laptop computer, a mobile phone, a VR device, a tablet computer, etc. In some embodiments, the computing device can be a terminal device, a server device, or a cloud device. In some embodiments, part of the process 100 can be executed by a computing device as a terminal, and another part can be executed by a computing device as a server. Figure 1 As shown, process 100 may include the following steps.

[0049] Step 110 , obtaining a preset number of road splines. In some embodiments, step 110 may be implemented by the spline obtaining module 1310 .

[0050] In some embodiments, one or more pre-drawn road splines may be obtained in an engine (such as a game engine), and various preset information may be stored in the road splines, such as vertex position information, road width information, rotation information, material information, identification information, and texture coordinates, and for example, continuity information corresponding to the road spline, length information of the spline, etc.

[0051] In some embodiments, the position information of the vertex can be represented by the coordinate position of the vertex in a three-dimensional coordinate system (such as a world coordinate system). The road width information of the vertex may include one or more, used to represent the road width of different roads. For example, the road width information of the vertex may include the overall road width and the road segment width. The rotation information of the vertex may include the angle of rotation of the vertex around different axes, such as the angle of rotation of the vertex around the x-axis, y-axis or z-axis of the three-dimensional coordinate system. The material information of the vertex may include asphalt, concrete, etc.

[0052] In some embodiments, at least two of the preset number of road splines intersect or intersect on their extension lines. The intersection of two splines may include that the two splines have an intersection point in the same plane, or that the two splines have an intersection point when they are mapped to the same plane. The intersection of two splines on their extension lines may include that the two splines are in the same plane and have an intersection point on their extension lines.

[0053] Figure 2 is a schematic diagram of a road spline according to some embodiments of this specification, such as Figure 2 As shown, the road spline "0" and the road spline "1" include multiple vertices, and the road spline "0" and the road spline "1" have an intersection in the same plane.

[0054] Step 120 , determining a fork range area based on the road width information corresponding to the road spline, and extracting fork splines within the fork range area from a preset number of road splines. In some embodiments, step 120 may be implemented by an extraction module 1320 .

[0055] In some embodiments, the first preset length can be determined based on the road width information corresponding to the road spline, and the fork range area can be determined based on the first preset length corresponding to the road spline. Wherein, the road width information corresponding to the road spline can be the road width information of the vertex in the road spline, and the road width information of the vertex can include the overall width of the road surface and the width of the inner section of the road. The first preset length can be determined based on the overall width of the road surface at the vertex. In some embodiments, the overall width of the road surface can be added to the preset variation to obtain the first preset length, wherein the preset variation can be the customized information in the vertex attribute, which can be a positive value or a negative value. The overall width of the road surface can be added to the preset variation to obtain a first preset length that is longer or shorter than the overall width of the road surface, thereby flexibly adjusting the value of the first preset length.

[0056] In some embodiments, the fork range area can be determined based on the first vertex and the second vertex whose distance between vertices in the road spline is less than the first preset length. Wherein, the first vertex and the second vertex can be two vertices in the road spline, and the first vertex and the second vertex can be located in different road splines. By calculating the spatial distance between the two vertices located in different road splines, it can be determined whether the first vertex and the second vertex are located near the fork. In other embodiments, the first vertex and the second vertex can be located in the same road spline, and the distance between the first vertex and the second vertex along the same road spline is greater than the second preset length. Wherein, the second preset length can be determined based on the first preset length, for example, the second preset length can be four times the first preset length. Exemplarily, in some curved road splines, the first vertex and the second vertex can be located at both ends of the road spline, and the distance between them along the road spline is greater than the second preset length. At this time, although the first vertex and the second vertex are located in the same road spline, due to the certain curvature of the road spline, the first vertex and the second vertex are also located in the fork range area.

[0057] In some embodiments, determining the branch road range area based on the first vertex and the second vertex whose distance between vertices in the road spline is less than the first preset length can be specifically implemented by the following method.

[0058] First, a preset range can be determined with a first vertex as the center and a first preset length as the radius, wherein the first vertex can be any vertex in the road spline. Exemplarily, a circle can be drawn with each first vertex in the road spline as the center and the first preset length as the radius, and the range enclosed by the circular area is determined as the preset range.

[0059] Secondly, a second vertex that meets the preset conditions within the preset range can be further determined, and a temporary connection line can be established between the first vertex and the second vertex that meets the preset conditions. In some embodiments, the preset condition can include that the height difference between the first vertex and the second vertex is less than the preset height difference. Among them, the height difference between the first vertex and the second vertex can be calculated by the coordinate values ​​of the first vertex and the second vertex in the three-dimensional coordinate system. The preset height difference can be a custom attribute corresponding to the spline, and the value of the preset height difference can be determined by configuring the custom attribute corresponding to the spline. The preset condition can also include that when the first vertex overlaps with the second vertex, the first vertex and the second vertex must be located in different road splines, thereby excluding the first vertex and the second vertex that overlap head to tail in the same road spline. In some embodiments, all or part of the vertices in the road spline can be used as the first vertex, and a temporary connection line can be established between each first vertex and the second vertex that meets the preset conditions.

[0060] Figure 3 is a schematic diagram of a road spline and a branch road range area according to some embodiments of the present specification. For example, all vertices in the road spline can be used as first vertices and second vertices that meet the preset conditions can be determined. The temporary connection lines established between each first vertex and the second vertex that meets the preset conditions can be as follows: Figure 3 shown.

[0061] Then, the fork range area is determined based on the vertices with a number of temporary connection lines greater than 1. Specifically, the vertices with a number of temporary connection lines greater than 1 can be determined as vertices within the fork range area, and the vertices with a number of temporary connection lines equal to 1 can be determined as boundary points.

[0062] In some embodiments, after determining the fork range area, the road spline can be further cut based on the fork range area to extract the fork spline in the fork range area. Specifically, the boundary point can be used as the starting point or end point to extract the fork spline in the fork range area, and the temporary connection line can be deleted.

[0063] Step 130 , determining the type of the fork road spline based on the material information corresponding to the fork road spline. In some embodiments, step 130 may be implemented by a fork road type determination module 1330 .

[0064] In some embodiments, the divergence types may include continuous divergence and non-continuous divergence.

[0065] In some embodiments, the material corresponding to each spline in the fork spline can be determined based on the material information corresponding to the fork spline. The material information corresponding to the fork spline can be the material information contained in the vertices in the fork spline, and the material information can include asphalt, concrete, etc. The material information corresponding to each vertex in the same fork spline can be the same or different, and the material corresponding to each spline in the fork spline can be determined based on the material information with the largest number among the material information corresponding to each vertex. Exemplarily, among the material information corresponding to each vertex of a certain fork spline, the number of asphalt materials is the largest, and the material corresponding to the fork spline is determined to be asphalt.

[0066] In some embodiments, when the materials corresponding to each spline in the fork spline are the same, the fork type of the fork spline is a continuous fork; when the materials corresponding to each spline in the fork spline are different, the fork type of the fork spline is a discontinuous fork. Exemplarily, assuming that the fork spline contains two splines, one of which corresponds to asphalt and the other corresponds to concrete, the fork type of the fork spline is determined to be a discontinuous fork; when the materials corresponding to both splines in the fork spline are concrete, the fork type of the fork spline is determined to be a continuous fork. The fork type of the fork spline is determined to be a continuous fork or a discontinuous fork by the materials corresponding to each spline in the fork spline, thereby generating different fork models based on different fork types, thereby improving the flexibility of generating fork models.

[0067] Step 140 , based on the fork type of the fork spline and the road width information corresponding to the fork spline, generate a fork characteristic curve. In some embodiments, step 140 may be implemented by a characteristic curve generating module 1340 .

[0068] In some embodiments, when the fork type of the fork spline is a continuous fork, a fork road inner section model characteristic curve and a fork road outer section model characteristic curve can be generated based on the road width information corresponding to the fork spline. Among them, the fork road inner section model characteristic curve can be nested in the fork road outer section model characteristic curve, so as to generate a virtual road closer to the real road condition. The description of generating a fork road characteristic curve for a continuous fork will be described in detail in process 400 later.

[0069] In some embodiments, when the fork type of the fork spline is a discontinuous fork, a fork road inner section model characteristic curve and a fork road outer section model characteristic curve can be generated based on the road width information corresponding to the fork spline, and a main road inner section model characteristic curve can be generated based on the road width information corresponding to the main spline in the fork spline. Among them, the fork road inner section model characteristic curve can be nested in the fork road outer section model characteristic curve. The description of determining the main spline in the fork spline will be described in detail in process 800, and the description of generating a fork characteristic curve for a discontinuous fork will be described in detail in process 900.

[0070] Step 150 , generating a turnout model based on the turnout characteristic curve. In some embodiments, step 150 may be implemented by the turnout model generating module 1350 .

[0071] In some embodiments, the turnout characteristic curve may be skinned to generate a turnout model, and each vertex in the turnout characteristic curve may be connected by skinning to form a polygonal mesh, and multiple meshes may be connected to form a turnout model.

[0072] In some embodiments, when the fork type is a continuous fork, the fork intersection road section model characteristic curve and the fork intersection road section model characteristic curve can be skinned respectively to generate the fork intersection road section model and the fork intersection road section model, and the fork intersection road section model and the fork intersection road section model are merged to obtain the fork intersection model with the fork intersection road section model being a continuous fork. The fork intersection road section model is nested in the fork intersection road section model.

[0073] In some embodiments, when the fork type is a discontinuous fork, the fork off-road section model characteristic curve, the fork on-road section model characteristic curve and the main road on-road section model characteristic curve can be skinned to generate the fork off-road section model, the fork on-road section model and the main road on-road section model. Among them, the fork on-road section model is nested in the fork off-road section model. Further, the fork on-road section model can be trimmed based on the main road on-road section model. For example, the main road on-road section model and the fork on-road section model can be Boolean subtracted, so that the part overlapping with the main road on-road section model is subtracted from the fork on-road section model, and the trimmed fork on-road section model is merged with the main road on-road section model and the fork off-road section model to obtain a fork model with a discontinuous fork type.

[0074] Figure 4 It is an exemplary flow chart of a method for generating a characteristic curve of a turnout of a continuous turnout according to some embodiments of the present specification. Figure 4The process 400 shown may be executed by a computing device, for example, may be implemented by a characteristic curve generation module 1340 in a virtual road model generation system 1300 deployed on the computing device. Figure 4 As shown, process 400 may include the following steps.

[0075] Step 410, generating a characteristic curve of the off-road segment model of the fork intersection based on a preset overall road width corresponding to the fork intersection spline.

[0076] In some embodiments, the preset overall width of the road surface corresponding to the fork spline can be the preset overall width of the road surface contained in the vertices of the fork spline, or it can be the preset overall width of the road surface contained in the spline attributes corresponding to the fork spline. When obtaining a preset number of road splines, the preset overall width of the road surface contained in its vertices or spline attributes can be obtained accordingly.

[0077] In some embodiments, the fork spline can be lofted in a preset vector direction and in the opposite direction of the preset vector direction based on the preset overall road width corresponding to the fork spline, to generate more than two first patch curves. The preset vector direction can be determined based on the rotation information of the vertices in the fork spline. For example, the value corresponding to the Z axis in the rotation information of the vertex can be used as the preset vector direction. Since the fork spline is obtained by cutting a preset number of road splines, and the preset number of road splines includes at least two splines, the fork spline can include at least two splines. When the fork spline is lofted, more than two first patch curves can be generated accordingly.

[0078] As an example, each spline in the fork spline can be staked out based on the preset overall width of the road surface, and each vertex in each spline in the fork spline can be moved along the preset vector direction and the opposite direction of the preset vector direction by half of the preset overall width of the road surface, thereby determining the position of the vertex after moving to the preset vector direction and the opposite direction of the preset vector direction. Figure 5-a is a schematic diagram of a first patch curve according to some embodiments of the present specification. For example, after two splines in the fork spline are respectively lofted based on the preset overall road width, the following can be obtained: Figure 5-a The two first patch curves are shown in , where numbers 0-17 are the surface numbers of one of the first patch curves, and numbers 18-34 are the surface numbers of the other first patch curve, and the surface numbers are used to identify the respective surfaces in the first patch curve formed after lofting.

[0079] In some embodiments, after generating two or more first patch curves, the two or more first patch curves may be further merged, and the shared edges in the first patch curves may be removed to obtain the off-road segment model characteristic curve of the fork intersection. The shared edges may be edges shared by two faces in each first patch curve. Specifically, the two or more first patch curves may be added together by Boolean operations, thereby merging the two or more first patch curves, and then the shared edges in the merged two or more first patch curves may be removed. For example, Figure 5-a As shown in , the shared edge can be the edge shared by the faces "33" and "34". Further, the edges at both ends of the first face curve can be removed, such as Figure 5-a The edge to the left of face "34" and the edge to the right of face "18". Figure 5-b is a schematic diagram of a characteristic curve of a fork road section model according to some embodiments of the present specification. For example, after adding two or more first patch curves and removing the shared edges in the added first patch curves, the following can be obtained: Figure 5-b The characteristic curve of the off-road section model of the fork intersection is shown.

[0080] Step 420, generating a model characteristic curve of the road section at the fork intersection based on the preset road section width corresponding to the fork intersection spline.

[0081] In some embodiments, the preset road segment width corresponding to the fork spline can be the preset road segment width information contained in the vertices of the fork spline, or the preset road surface overall width information contained in the spline attributes corresponding to the fork spline. When obtaining a preset number of road splines, the preset road segment width contained in the vertices or spline attributes can be obtained accordingly. In some embodiments, the preset road surface overall width can be greater than the preset road segment width.

[0082] In some embodiments, the fork spline can be lofted in a preset vector direction and in a direction opposite to the preset vector direction based on the preset road segment width corresponding to the fork spline to generate more than two second patch curves. The preset vector direction can be determined based on the rotation information of the vertices in the fork spline, for example, the value corresponding to the Z axis in the rotation information of the vertex can be used as the preset vector direction.

[0083] As an example, each spline in the fork spline can be staked out based on a preset road section width, and each vertex in each spline in the fork spline can be moved by half of the preset road section width along a preset vector direction and in the opposite direction of the preset vector direction, respectively, so as to determine the position of the vertex after moving to the preset vector direction and in the opposite direction of the preset vector direction. Figure 6-ais a schematic diagram of a second patch curve according to some embodiments of the present specification. For example, after two splines in the fork spline are respectively lofted based on the preset road section width, the following can be obtained: Figure 6-a The two second patch curves shown in , wherein numbers 0-17 are the surface numbers of one of the second patch curves, and numbers 18-34 are the surface numbers of the other second patch curve, and the surface numbers are used to identify the respective surfaces in the second patch curve formed after lofting.

[0084] In some embodiments, after generating two or more second patch curves, the two or more second patch curves may be further merged, and the shared edges in the second patch curves may be removed. Specifically, the two or more second patch curves may be added together through a Boolean operation, thereby merging the two or more second patch curves, and then the shared edges in the merged two or more second patch curves may be removed.

[0085] In some embodiments, after removing the shared edge in the second patch curve, the road centerline of the second patch curve can be further generated to obtain the characteristic curve of the road section model of the fork intersection. Specifically, one of the curves in the second patch curve with the shared edge removed can be moved inward by half of the preset road section width to obtain the road centerline of the second patch curve. Figure 6-b is a schematic diagram of a characteristic curve of a fork in-road section model according to some embodiments of this specification, for example, Figure 6-b As shown, the curve a2 (characteristic curve number is 1) in the second patch curve after removing the shared edge can be moved inward in the opposite direction of the preset vector direction by half of the preset road section width, thereby obtaining one of the road center lines a1 (characteristic curve number is 0) of the second patch curve. The remaining three curves (characteristic curve numbers are 3, 5, and 7) in the second patch curve after removing the shared edge can be moved according to the above method to obtain the other three road center lines of the second patch curve (characteristic curve numbers are 2, 4, and 6).

[0086] In some embodiments, the model characteristic curve of the inner section of the fork intersection is nested within the model characteristic curve of the outer section of the fork intersection, thereby generating a virtual road that is closer to the actual road conditions and improving the authenticity and aesthetics of the generated fork model. Figure 7 is a schematic diagram of a fork characteristic curve according to some embodiments of the present specification, wherein the nested fork road section model characteristic curve and the fork road section model characteristic curve can be as follows Figure 7 shown.

[0087] Figure 8 is an exemplary flow chart of a method for determining a main spline according to some embodiments of the present specification. Figure 8The process 800 shown may be executed by a computing device, for example, may be implemented by a main spline determination module 1360 in a virtual road model generation system 1300 deployed on the computing device. Figure 8 As shown, process 800 may include the following steps.

[0088] Step 810: Determine the type of the fork road spline based on the material information corresponding to the fork road spline.

[0089] The description of this step is similar to that in the previous text. For details, please refer to the description in the previous step 130, which will not be repeated here.

[0090] Step 820: determining the main spline in the fork spline based on the weight information corresponding to each spline in the fork spline.

[0091] In some embodiments, the weight information includes at least one of the following information: preset main spline information, material information, spline continuity information, and road width information. Among them, the preset main spline information can be attribute information customized in the road spline, used to indicate which spline is the main spline. The material information can be the material information contained in the vertices of the fork spline. The spline continuity information can indicate whether the spline is continuous. For example, when the face sequence number corresponding to the spline is one, it indicates that the spline is a continuous spline. When the face sequence number corresponding to the spline is multiple, it indicates that the spline is discontinuous and consists of multiple line segments.

[0092] In some embodiments, the spline with the largest weight in the fork spline is set as the main spline, wherein the setting of the weight information satisfies at least one of the following conditions: the weight of the preset main spline information is greater than the weight of the material information; the weight of the material information is greater than the weight of the spline continuity information; the weight of the spline continuity information is greater than the weight of the road width information. As an example, when a spline in the fork spline contains more vertices with the same material information, the weight of the material information of the spline is higher. When a spline in the fork spline has fewer face numbers corresponding to it, the weight of the continuity information of the spline is higher. When a spline in the fork spline has wider road width information corresponding to it, the weight of the road width information of the spline is higher. By determining the main spline in the fork spline based on the weight information corresponding to each spline in the fork spline, the accuracy of determining the main spline of the fork spline is improved.

[0093] Fig. 9 It is an exemplary flow chart of a method for generating a characteristic curve of a turnout for a discontinuous turnout according to some embodiments of the present specification. Fig. 9The process 900 shown may be executed by a computing device, for example, may be implemented by a characteristic curve generation module 1340 in a virtual road model generation system 1300 deployed on the computing device. Fig. 9 As shown, process 900 may include the following steps.

[0094] Step 910, generating a characteristic curve of the off-road segment model of the fork intersection based on the preset overall road width corresponding to the fork intersection spline.

[0095] The description of this step is similar to the previous one. For details, please refer to the description in the previous step 410, which will not be repeated here.

[0096] Step 920, generating a fork intersection road section model characteristic curve based on a preset road section width corresponding to the fork intersection spline.

[0097] Among them, the model characteristic curve of the inner section of the fork intersection is nested in the model characteristic curve of the outer section of the fork intersection.

[0098] The description of this step is similar to that in the previous text. For details, please refer to the description in the previous step 420, which will not be repeated here.

[0099] Step 930: Generate a main road in-road segment model characteristic curve based on a preset in-road segment width corresponding to the main spline.

[0100] In some embodiments, the main spline can be lofted in a preset vector direction and in the opposite direction of the preset vector direction based on the preset road segment width corresponding to the main spline to generate a third patch curve. The preset vector direction can be determined based on the rotation information of the vertices in the main spline, for example, the value corresponding to the Z axis in the rotation information of the vertex can be used as the preset vector direction.

[0101] As an example, the main spline can be lofted based on a preset road segment width, and each vertex in the main spline can be moved by half of the preset road segment width along a preset vector direction and in the opposite direction of the preset vector direction, respectively, so as to determine the position of each vertex after moving to the preset vector direction and in the opposite direction of the preset vector direction. Figure 10-a is a schematic diagram of a third patch curve according to some embodiments of this specification. For example, after lofting the main spline based on the preset road segment width, the following can be obtained: Figure 10-a In some embodiments, since the main spline is one of the fork splines, the two or more second patch curves generated based on the preset road segment width corresponding to the fork spline in step 920 include the third patch curve corresponding to the main spline, so the patch curve corresponding to the main spline in the two or more second patch curves can be directly used as the third patch curve to avoid repeated calculation.

[0102] In some embodiments, after the third patch curve is generated, the shared edges in the third patch curve may be further removed, and the road centerline of the third patch curve may be generated to obtain the main road in-road segment model characteristic curve. As an example, one of the curves in the third patch curve may be moved inward by half of the preset in-road segment width to obtain the road centerline of the third patch curve. Figure 10-b is a schematic diagram of a characteristic curve of the main road in-road segment model according to some embodiments of this specification, for example, Figure 10-b As shown in FIG. 1 , one of the curves in the third patch curve (characteristic curve number 1) can be moved inward in the opposite direction of the preset vector direction by half of the preset road section width, thereby generating the road centerline of the third patch curve, and then obtaining the following: Figure 10-b The model characteristic curve of the in-road section of the main road is shown.

[0103] In some embodiments, after generating the fork characteristic curve, corresponding texture coordinates may be further generated for the fork characteristic curve, so as to subsequently perform mapping based on the texture coordinates corresponding to the fork characteristic curve. Fig.11 It is an exemplary flow chart of a method for generating texture coordinates of a fork intersection characteristic curve according to some embodiments of this specification. Fig.11 The process 1100 shown may be executed by a computing device, for example, may be implemented by a texture coordinate generation module 1370 in a virtual road model generation system 1300 deployed on the computing device. Fig.11 As shown, process 1100 may include the following steps.

[0104] Step 1110: Generate a fork characteristic curve based on the fork type of the fork spline and the road width information corresponding to the fork spline.

[0105] This step is similar to the previous one. For details, please refer to the description in the previous step 140, which will not be repeated here.

[0106] Step 1120: Generate corresponding texture coordinates based on the fork intersection characteristic curve.

[0107] In some embodiments, texture coordinates may be mapped to the lane area and / or the middle area in the fork feature curve, wherein the lane area includes the area formed between two adjacent feature curves in the fork feature curve, and the middle area includes a closed area formed by the intersection or encirclement of two or more adjacent lane areas. Figure 7 As shown in the schematic diagram of the characteristic curve of the fork intersection, the lane areas may be as shown by A1, A2, A3, A4, B1, B2, B3, B4, and the middle area may be as shown by A5.

[0108] In some embodiments, for a lane area, texture coordinates corresponding to the lane may be mapped based on the length of the lane and the width of the lane. Fig.12 is a schematic diagram of lane area A1 according to some embodiments of this specification, such as Fig.12 As shown, lane area A1 includes two feature curves with surface number "0" and surface number "1". The length of the feature curve with surface number "0" and the length of the feature curve with surface number "1" can be mapped to the V axis in the texture coordinate system, and the width of the corresponding vertices in the two feature curves with surface number "0" and surface number "1" can be mapped to the U axis in the texture coordinate system, so as to map texture coordinates for each vertex in lane area A1. Similarly, according to the method of mapping texture coordinates for lane area A1, texture coordinates are mapped for each vertex in lane areas A2, A3, A4, B1, B2, B3, and B4.

[0109] In some embodiments, for the middle area, the texture coordinates corresponding to the middle area can be mapped based on the coordinate values ​​of the middle area in the first preset axis and the second preset axis in the three-dimensional coordinate system. The first preset axis and the second preset axis in the three-dimensional coordinate system can be directions that are not perpendicular to the virtual road. Exemplarily, the coordinate values ​​of the x-axis of each vertex in the middle area in the three-dimensional coordinate system can be used as the U-axis coordinate value in the texture coordinate system, and the coordinate values ​​of the z-axis of each vertex in the middle area in the three-dimensional coordinate system can be used as the V-axis coordinate value in the texture coordinate system, so as to map the texture coordinates for each vertex in the middle area.

[0110] For example, for a continuous fork characteristic curve, such as Figure 7 As shown, it includes a nested fork intersection road section model characteristic curve and a fork intersection road section model characteristic curve. When mapping texture coordinates to a fork intersection characteristic curve with a continuous fork type, the texture coordinates can be mapped according to the above method.

[0111] For example, for a discontinuous fork characteristic curve, such as Figure 7 As shown, it includes a nested fork intersection road section model characteristic curve and a fork intersection road section model characteristic curve, and further includes the following Figure 10-b Therefore, for the fork intersection characteristic curve with discontinuous fork type, in addition to mapping the texture coordinates according to the above method, the texture coordinates can also be mapped to the main road inner section model characteristic curve. Specifically, Figure 10-b The length of each characteristic curve in the main road in-road section model characteristic curve shown is mapped to the V-axis in the texture coordinate system, and the width of the corresponding vertex in each characteristic curve in the main road in-road section model characteristic curve is mapped to the U-axis in the texture coordinate system, thereby mapping the texture coordinates for the main road in-road section model characteristic curve.

[0112] In some embodiments, the texture coordinates of the fork characteristic curve can also be sampled in the texture map. For example, the texture coordinates corresponding to each vertex in the lane area of ​​the fork characteristic curve are sampled in the two-way continuous map. For another example, the texture coordinates corresponding to each vertex in the middle area of ​​the fork characteristic curve are sampled in the four-way continuous map. By mapping the texture coordinates for the fork characteristic curve, the reusability of the road surface map can be improved and the development cost of the road surface map can be saved. Furthermore, the fork model is rendered according to the sampling results of the texture map, so as to generate the corresponding texture for the fork model.

[0113] In some embodiments, the turnout model may also be generated by skinning the turnout characteristic curve.

[0114] According to one embodiment, when the fork type is a continuous fork, the lane area and / or the middle area in the fork characteristic curve can be skinned to generate a fork inner section model and a fork outer section model. Figure 7 The schematic diagram of the characteristic curve of the fork intersection shown in the figure can skin the lane areas A1, A2, A3, A4, B1, B2, B3, B4 and the middle area A5 respectively, and the skinned lane areas A1, A2, A3, A4 and the middle area A5 form the inner section model of the fork intersection, and the skinned lane areas B1, B2, B3, B4 form the outer section model of the fork intersection. Further, the outer section model of the fork intersection is merged with the inner section model of the fork intersection to obtain a fork intersection model with a continuous fork intersection type. Among them, the inner section model of the fork intersection is nested in the outer section model of the fork intersection.

[0115] According to a certain embodiment, when the fork type is a discontinuous fork, the lane area and / or the middle area in the fork characteristic curve can be skinned separately to generate the fork road outer section model, the fork road inner section model and the main road inner section model. Among them, the description of generating the fork road outer section model and the fork road inner section model is similar to the description of generating the fork road inner section model and the fork road outer section model in the above embodiment, and will not be repeated here. The following mainly describes how to generate the main road inner section model and how to generate the fork model of the discontinuous fork type based on the fork road outer section model, the fork road inner section model and the main road inner section model. In some embodiments, the main road inner section model characteristic curve may include more than one lane area, and the lane area may include the area formed between two adjacent characteristic curves in the main road inner section model characteristic curve. For example, Figure 10-bAs shown, the lane area can be as shown in C1 and C2, and the lane areas C1 and C2 can be skinned respectively to generate the main road inner section model. Further, based on the main road inner section model, the fork road inner section model is cut. For example, the main road inner section model (as shown in Figure 10-b The lane area C1, C2 behind the middle skin and the inner section model of the fork intersection (such as Figure 7 The lane areas A1, A2, A3, A4 and the middle area A5 after the middle skinning are subjected to Boolean subtraction operation, thereby subtracting the overlapping part with the main road inner section model in the fork road inner section model, and then the trimmed fork road inner section model is combined with the main road inner section model and the fork road outer section model (such as Figure 7 The lane areas B1, B2, B3, and B4 behind the middle skin are merged to obtain a turnout model with a discontinuous turnout type.

[0116] This specification also provides a virtual road model generation system. Fig.13 FIG. 1 is an exemplary block diagram of a virtual road model generation system according to some embodiments of the present specification. Fig.13 As shown, in some embodiments, the virtual road model generation system 1300 may include a spline acquisition module 1310 , an extraction module 1320 , a turnout type determination module 1330 , a characteristic curve generation module 1340 , and a turnout model generation module 1350 .

[0117] The spline acquisition module 1310 is used to acquire a preset number of road splines, wherein at least two of the preset number of road splines intersect with each other or intersect on their extension lines.

[0118] The extraction module 1320 is used to determine the fork range area based on the road width information corresponding to the road spline, and extract the fork spline in the fork range area from a preset number of road splines.

[0119] The fork type determination module 1330 is used to determine the fork type of the fork spline based on the material information corresponding to the fork spline.

[0120] The characteristic curve generating module 1340 is used to generate a fork crossing characteristic curve based on the fork crossing type of the fork crossing spline and the road width information corresponding to the fork crossing spline.

[0121] The turnout model generating module 1350 is used to generate a turnout model based on the turnout characteristic curve.

[0122] In some optional embodiments, the extraction module 1320 is also used to determine the fork range area based on the first vertex and the second vertex whose distance between vertices in the road spline is less than a first preset length; cut the road spline based on the fork range area, and extract the fork spline in the fork range area; wherein the first preset length is determined based on the road width information corresponding to the road spline; the first vertex and the second vertex are located in different road splines, or the first vertex and the second vertex are located in the same road spline and the distance between the first vertex and the second vertex along the same road spline is greater than the second preset length.

[0123] In some optional embodiments, the extraction module 1320 is also used to determine a preset range with the first vertex as the center and a first preset length as the radius; determine a second vertex within the preset range that meets the preset conditions, and establish a temporary connecting line between the first vertex and the second vertex that meets the preset conditions; and determine the branch range area based on vertices whose number of temporary connecting lines is greater than 1.

[0124] In some optional embodiments, the preset condition includes at least one of the following: a height difference between the first vertex and the second vertex is less than a preset height difference; when the first vertex overlaps with the second vertex, the first vertex and the second vertex are located in different road splines.

[0125] In some optional embodiments, the fork type includes a continuous fork and a discontinuous fork, and the fork type determination module 1330 is further used to determine the material corresponding to each spline in the fork spline based on the material information corresponding to the fork spline; when the materials corresponding to each spline in the fork spline are the same, the fork type of the fork spline is a continuous fork; when the materials corresponding to each spline in the fork spline are different, the fork type of the fork spline is a discontinuous fork.

[0126] In some optional embodiments, when the fork type of the fork spline is a continuous fork, the characteristic curve generation module 1340 is also used to generate a model characteristic curve of the off-road section of the fork based on the preset overall road width corresponding to the fork spline; and to generate a model characteristic curve of the on-road section of the fork based on the preset on-road section width corresponding to the fork spline; wherein the model characteristic curve of the on-road section of the fork is nested within the model characteristic curve of the off-road section of the fork.

[0127] In some optional embodiments, the characteristic curve generation module 1340 is also used to, based on the preset overall road width corresponding to the fork spline, stake out the fork spline in a preset vector direction and in the opposite direction of the preset vector direction to generate more than two first patch curves; merge the more than two first patch curves and remove the shared edges in the first patch curves to obtain the off-road section model characteristic curve of the fork spline; based on the preset on-road section width corresponding to the fork spline, stake out the fork spline in a preset vector direction and in the opposite direction of the preset vector direction to generate more than two second patch curves; merge the more than two second patch curves and remove the shared edges in the second patch curves; generate the road centerline of the second patch curve to obtain the on-road section model characteristic curve of the fork.

[0128] In some optional embodiments, the fork model generation module 1350 is also used to skin the characteristic curves of the fork road section model and the characteristic curves of the fork road section model to generate the fork road section model and the fork road section model; merge the fork road section model with the fork road section model to obtain a fork road model with a continuous fork type.

[0129] In some optional embodiments, the virtual road model generation system 1300 may further include a main spline determination module 1360, which is used to determine the main spline in the fork spline based on the weight information corresponding to each spline in the fork spline, wherein the weight information includes at least one of the following information: preset main spline information, material information, spline continuity information, and road width information.

[0130] In some optional embodiments, the main spline determination module 1360 is also used to set the spline with the largest weight among the fork splines as the main spline, wherein the setting of the weight information satisfies at least one of the following conditions: the weight of the preset main spline information is greater than the weight of the material information; the weight of the material information is greater than the weight of the spline continuity information; the weight of the spline continuity information is greater than the weight of the road width information.

[0131] In some optional embodiments, when the fork type of the fork spline is a discontinuous fork, the characteristic curve generation module 1340 is also used to generate a model characteristic curve of the off-road section of the fork based on the preset overall road width corresponding to the fork spline; generate a model characteristic curve of the on-road section of the fork based on the preset on-road section width corresponding to the fork spline; generate a model characteristic curve of the on-road section of the main road based on the preset on-road section width corresponding to the main spline; wherein the model characteristic curve of the on-road section of the fork is nested within the model characteristic curve of the off-road section of the fork.

[0132] In some optional embodiments, the characteristic curve generation module 1340 is also used to, based on the preset in-road segment width corresponding to the main spline, loft the main spline in a preset vector direction and in the opposite direction of the preset vector direction to generate a third patch curve; remove the shared edges in the third patch curve; generate the road centerline of the third patch curve, and obtain the characteristic curve of the in-road segment model of the main road.

[0133] In some optional embodiments, the fork model generation module 1350 is also used to skin the characteristic curves of the fork off-road section model, the characteristic curves of the fork on-road section model and the characteristic curves of the main road on-road section model to generate the fork off-road section model, the fork on-road section model and the main road on-road section model; to trim the fork on-road section model based on the main road on-road section model, and to merge the trimmed fork on-road section model with the main road on-road section model and the fork off-road section model to obtain a fork model with a discontinuous fork type.

[0134] In some optional embodiments, the virtual road model generation system 1300 may further include a texture coordinate generation module 1370 for generating corresponding texture coordinates based on the turnout characteristic curve.

[0135] In some optional embodiments, the texture coordinate generation module 1370 is also used to map texture coordinates to the lane area and / or the middle area in the fork characteristic curve, wherein the lane area includes the area formed between two adjacent characteristic curves in the fork characteristic curve, and the middle area includes a closed area formed by more than two adjacent lane areas.

[0136] In some optional embodiments, the texture coordinate generation module 1370 is also used to map the texture coordinates corresponding to the lane area based on the length of the lane area and the width of the lane area; and / or map the texture coordinates corresponding to the middle area based on the coordinate values ​​of the middle area on the first preset axis and the second preset axis in the three-dimensional coordinate system.

[0137] In some optional embodiments, the virtual road model generation system 1300 may further include a sampling and rendering module 1380 for sampling in a texture map based on texture coordinates and rendering the fork model.

[0138] For more information about each module, see Figure 1-12 The relevant description of will not be repeated here. It should be understood that Fig.13The system and its modules shown can be implemented in various ways. For example, in some embodiments, the system and its modules can be implemented by hardware, software, or a combination of software and hardware. Among them, the hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. Those skilled in the art will understand that the above methods and systems can be implemented using computer executable instructions and / or control codes contained in a processor, such as a disk, CD or DVD-ROM, etc., and such codes are provided in a carrier medium or a memory of a programmable device. The system and its modules of this specification can not only be implemented by hardware circuits such as ultra-large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., but can also be implemented by software executed by various types of processors, and can also be implemented by a combination of the above hardware circuits and software (e.g., firmware).

[0139] It should be noted that the above description of the system and its modules is only for convenience of description and does not limit this specification to the scope of the embodiments. It is understandable that for those skilled in the art, after understanding the principle of the system, it is possible to arbitrarily combine the modules without deviating from this principle to form a subsystem connected to other modules. Or some modules may be split to obtain more modules or multiple units under the module. Such variations are all within the scope of the disclosure of this specification.

[0140] Some embodiments of the present specification also provide a computer program product, including computer instructions. When at least part of the computer instructions are executed by a processor, the present specification can be implemented. Figure 1-12 In some embodiments, the computer program product may only involve computer instructions, which may be carried by a storage medium or a processing device. In other embodiments, the computer program product may also be a storage medium or a processing device containing the aforementioned computer instructions. The processing device may include one or more processors and a storage medium.

[0141] In some embodiments, the processor may be a combination of one or more of the following processors: a central processing unit (CPU), an application specific integrated circuit (ASIC), an application specific instruction set processor (ASIP), a graphics processing unit (GPU), a physical processing unit (PPU), a digital signal processor (DSP), a field programmable gate array (FPGA), a programmable logic device (PLD), a programmable logic controller (PLC), a reduced instruction set computer (RISC), and a microprocessor.

[0142] In some embodiments, the storage medium may include a combination of one or more of the following: a mass storage, a removable storage, a volatile read-write memory, and a read-only memory (ROM). Exemplary mass storage may include a magnetic disk, an optical disk, a solid-state hard disk, and the like. Exemplary removable storage may include a flash disk, a floppy disk, an optical disk, a memory card, a compressed hard disk, a magnetic tape, and the like. Exemplary volatile read-write memory may include a random access memory (RAM). Exemplary random access memory may include a dynamic random access memory (DRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), a static random access memory (SRAM), a thyristor random access memory (T-RAM), and a zero capacitance memory (Z-RAM), and the like. Exemplary read-only memory may include a masked read-only memory (MROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a compact disk read-only memory (CD-ROM), and a digital multifunction hard disk read-only memory, and the like.

[0143] The basic concepts have been described above. Obviously, for those skilled in the art, the above detailed disclosure is only for example and does not constitute a limitation of this specification. Although not explicitly stated here, those skilled in the art may make various modifications, improvements and corrections to this specification. Such modifications, improvements and corrections are taught in this specification, so such modifications, improvements and corrections still belong to the spirit and scope of the exemplary embodiments of this specification.

Claims

1. A method for generating a virtual road model, characterized in that: The method comprises: Acquire a preset number of road splines, wherein at least two of the preset number of road splines intersect with each other or intersect on their extension lines; Determine a fork road range area based on the road width information corresponding to the road spline, and extract a fork road spline within the fork road range area from the preset number of road splines; Determining the fork type of the fork spline based on the material information corresponding to the fork spline; Generate a fork crossing characteristic curve based on the fork crossing type of the fork crossing spline and the road width information corresponding to the fork crossing spline; A turnoff model is generated based on the turnoff characteristic curve.

2. The method according to claim 1, characterized in that The step of determining a fork road range area based on the road width information corresponding to the road spline, and extracting a fork road spline within the fork road range area from the preset number of road splines comprises: Determine a branch road range area based on a first vertex and a second vertex in the road spline whose distance between vertices is less than a first preset length; Cutting the road spline based on the fork range area to extract the fork spline in the fork range area; Wherein, the first preset length is determined based on the road width information corresponding to the road spline; The first vertex and the second vertex are located in different road splines, or the first vertex and the second vertex are located in the same road spline and a distance between the first vertex and the second vertex along the same road spline is greater than a second preset length.

3. The method according to claim 2, characterized in that The determining of the range of the fork in the road based on the first vertex and the second vertex whose distance between the vertices in the road spline is less than the first preset length comprises: Determine a preset range with the first vertex as the center and the first preset length as the radius; Determine a second vertex that meets a preset condition within the preset range, and establish a temporary connection line between the first vertex and the second vertex that meets the preset condition; The branch road range area is determined based on vertices whose number of temporary connection lines is greater than 1.

4. The method according to claim 1, characterized in that: The preset condition includes at least one of the following: The height difference between the first vertex and the second vertex is less than a preset height difference; When the first vertex overlaps with the second vertex, the first vertex and the second vertex are located in different road splines.

5. The method according to claim 1, characterized in that The fork type includes a continuous fork and a discontinuous fork, and the fork type of the fork spline determined based on the material information corresponding to the fork spline includes: Determining the material corresponding to each spline in the fork spline based on the material information corresponding to the fork spline; When the materials corresponding to the splines in the fork spline are the same, the fork type of the fork spline is a continuous fork; When the materials corresponding to the splines in the fork spline are different, the fork type of the fork spline is a discontinuous fork.

6. The method according to claim 1, characterized in that When the fork type of the fork spline is a continuous fork, generating a fork characteristic curve based on the fork type of the fork spline and the road width information corresponding to the fork spline includes: Generate a model characteristic curve of the off-road section of the fork in the road based on the preset overall width of the road surface corresponding to the fork in the road spline; Generate a model characteristic curve of the road section at the fork intersection based on the preset road section width corresponding to the fork intersection spline; Among them, the model characteristic curve of the inner section of the fork intersection is nested in the model characteristic curve of the outer section of the fork intersection.

7. The method according to claim 6, characterized in that The generating of the off-road section model characteristic curve of the fork intersection based on the preset overall road width corresponding to the fork intersection spline includes: Lofting the fork spline in a preset vector direction and in a direction opposite to the preset vector direction based on a preset overall road width corresponding to the fork spline to generate more than two first patch curves; Merging the two or more first patch curves and removing the shared edges in the first patch curves to obtain the off-road segment model characteristic curve of the fork intersection; The generating of the fork road section model characteristic curve based on the preset road section width corresponding to the fork road spline comprises: Lofting the fork spline in a preset vector direction and in a direction opposite to the preset vector direction based on a preset road section width corresponding to the fork spline to generate more than two second patch curves; Merging the two or more second patch curves, and removing shared edges in the second patch curves; The road centerline of the second patch curve is generated to obtain the model characteristic curve of the road section at the fork intersection.

8. The method according to claim 6 or 7, characterized in that: Generating a turnout model based on the turnout characteristic curve comprises: Skinning the characteristic curve of the off-road section model of the fork intersection and the characteristic curve of the on-road section model of the fork intersection to generate an off-road section model of the fork intersection and an on-road section model of the fork intersection; The outer section model of the fork intersection and the inner section model of the fork intersection are combined to obtain a fork model of a continuous fork.

9. The method according to claim 1, characterized in that: Also includes: The main spline in the fork spline is determined based on weight information corresponding to each spline in the fork spline, wherein the weight information includes at least one of the following information: preset main spline information, material information, spline continuity information, and road width information.

10. The method according to claim 9, characterized in that The determining of the main spline in the fork spline based on the weight information corresponding to each spline in the fork spline comprises: The spline with the largest weight among the fork splines is set as the main spline, wherein the setting of the weight information satisfies at least one of the following conditions: The weight of the preset main spline information is greater than the weight of the material information; The weight of the material information is greater than the weight of the continuity information of the spline; The weight of the continuity information of the spline is greater than the weight of the road width information.

11. The method according to claim 9, characterized in that When the fork type of the fork spline is a discontinuous fork, generating a fork characteristic curve based on the fork type and the road width information corresponding to the fork spline includes: Generate a model characteristic curve of the off-road section of the fork in the road based on the preset overall width of the road surface corresponding to the fork in the road spline; Generate a model characteristic curve of the road section at the fork intersection based on the preset road section width corresponding to the fork intersection spline; Generate a main road in-road segment model characteristic curve based on a preset in-road segment width corresponding to the main spline; Among them, the model characteristic curve of the inner section of the fork intersection is nested in the model characteristic curve of the outer section of the fork intersection.

12. The method according to claim 11, characterized in that The generating of the main road in-road segment model characteristic curve based on the preset in-road segment width corresponding to the main spline includes: Lofting the main spline in a preset vector direction and in the opposite direction of the preset vector direction based on the preset road section width corresponding to the main spline to generate a third patch curve; removing the shared edges in the third patch curve; The road centerline of the third patch curve is generated to obtain the characteristic curve of the in-road segment model of the main road.

13. The method according to claim 12, characterized in that Generating a turnout model based on the turnout characteristic curve comprises: Skinning the off-road section model characteristic curve of the fork intersection, the on-road section model characteristic curve of the fork intersection, and the on-road section model characteristic curve of the main road, to generate an off-road section model of the fork intersection, an on-road section model of the fork intersection, and an on-road section model of the main road; The inner section model of the fork intersection is cut based on the inner section model of the main road, and the cut inner section model of the fork intersection is merged with the inner section model of the main road and the outer section model of the fork intersection to obtain a fork road model with a discontinuous fork road type.

14. The method according to claim 1, characterized in that Also includes: Corresponding texture coordinates are generated based on the fork intersection characteristic curve.

15. The method according to claim 14, characterized in that Generating corresponding texture coordinates based on the fork intersection characteristic curve includes: Texture coordinates are mapped to the lane area and / or the middle area in the fork intersection characteristic curve, wherein the lane area includes an area formed between two adjacent characteristic curves in the fork intersection characteristic curve, and the middle area includes a closed area formed by more than two adjacent lane areas.

16. The method according to claim 15, characterized in that Mapping texture coordinates to the lane and / or middle area in the fork intersection characteristic curve includes: Mapping the texture coordinates corresponding to the lane area based on the length of the lane area and the width of the lane area; and / or The texture coordinates corresponding to the middle area are mapped based on the coordinate values ​​of the middle area in the first preset axial direction and the second preset axial direction in the three-dimensional coordinate system.

17. The method according to claim 14, characterized in that Also includes: A texture map is sampled based on the texture coordinates, and the fork model is rendered.

18. A virtual road model generation system, characterized in that: The system comprises: A spline acquisition module, used for acquiring a preset number of road splines, wherein at least two of the preset number of road splines intersect with each other or intersect on their extension lines; An extraction module, used for determining a fork road range area based on the road width information corresponding to the road spline, and extracting a fork road spline within the fork road range area from the preset number of road splines; A fork type determination module, used to determine the fork type of the fork spline based on the material information corresponding to the fork spline; A characteristic curve generating module, used for generating a fork crossing characteristic curve based on the fork crossing type of the fork crossing spline and the road width information corresponding to the fork crossing spline; A turnout model generation module is used to generate a turnout model based on the turnout characteristic curve.

19. A computer program product, characterized in that The invention comprises a computer program, and when at least a part of the computer program is executed by a processor, the method according to any one of claims 1 to 17 can be implemented.