Object generation method, river generation method, computing device and storage medium

By determining and adjusting the overlapping areas of the river line segment model in the game or animation scene, the problem of single river shape and poor intersection effects in the prior art is solved, and higher river authenticity and visual authenticity are achieved.

CN119180896APending Publication Date: 2024-12-24ZHUHAI KINGSOFT ONLINE GAME TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411209599.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-24

AI Technical Summary

Technical Problem

The prior art cannot achieve the effect of convergence between complex shapes and multiple rivers when generating rivers in game or animation scenes, resulting in the generated rivers being low in reality and unable to provide sufficient visual authenticity.

Method used

By determining at least two river line segment models, a reference model is generated, and mapping and adjustments are made according to overlapping areas, ensuring the intersection effect between river line segments and improving the authenticity of the river.

Benefits of technology

The natural intersection effect between rivers is achieved, the authenticity of the generated river is improved, and a more realistic visual experience is provided to users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119180896A_ABST
    Figure CN119180896A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the technical field of computers, in particular to an object generation method, a river generation method, computing equipment and a storage medium, and the object generation method comprises the following steps: determining at least two first object line segment models, and generating at least two reference first object models according to the at least two first object line segment models; determining an overlapped first object region between any two reference first object models in the at least two reference first object models; according to the overlapped first object region, mapping the at least two first object line segment models to obtain a mapping result; determining overlapped line segments in the overlapped first object line segment models under the condition of determining that the overlapped first object region is overlapped with any one of the at least two first object line segment models according to the mapping result; and according to the overlapped first object region, adjusting the overlapped line segments to obtain at least two target first object models.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification relate to the field of computer technology, and in particular to an object generation method, a river generation method, a computing device, and a storage medium. Background Art

[0002] With the development of Internet technology, 3D technology is increasingly used in the field of virtual scene rendering, such as game scene rendering, animation scene rendering, etc. In the field of game scene rendering, in order to create a relatively realistic environment and provide richer game scenes or animation scenes, a river as a natural landscape can be added during the production of games or animations.

[0003] Usually, a preset river model can be used to generate a river with one click, or a curve can be used to generate a river. This method of river generation is relatively simple and cannot achieve a more complex river shape. When there are multiple rivers in a game scene, the intersection effect between rivers is not considered, resulting in low realism of the generated river, and thus failing to provide users with a more realistic visual effect. Therefore, an effective technical solution is urgently needed to solve the above problems. Summary of the invention

[0004] In view of this, an embodiment of this specification provides an object generation method. One or more embodiments of this specification also relate to an object generation device, a river generation method, a river generation device, a computing device, a computer-readable storage medium and a computer program product to solve the technical defects existing in the prior art.

[0005] According to a first aspect of an embodiment of this specification, there is provided a method for generating an object, including:

[0006] Determine at least two first object line segment models, and generate at least two reference first object models according to the at least two first object line segment models;

[0007] determining an overlapping first object region between any two reference first object models among the at least two reference first object models;

[0008] Mapping the at least two first object line segment models according to the overlapping first object area to obtain a mapping result;

[0009] When it is determined according to the mapping result that the overlapping first object region and any one of the at least two first object line segment models overlap, determining overlapping line segments in the overlapping first object line segment models;

[0010] According to the overlapping first object area, the overlapping line segments are adjusted to obtain at least two target first object models.

[0011] According to a second aspect of an embodiment of this specification, there is provided an object generation device, including:

[0012] A first determination module is configured to determine at least two first object line segment models, and generate at least two reference first object models according to the at least two first object line segment models;

[0013] A second determining module is configured to determine an overlapping first object area between any two reference first object models among the at least two reference first object models;

[0014] A mapping module, configured to map the at least two first object line segment models according to the overlapping first object area to obtain a mapping result;

[0015] a third determining module configured to determine an overlapping line segment in the overlapping first object line segment model if it is determined according to the mapping result that the overlapping first object region and any one of the at least two first object line segment models overlap;

[0016] The adjustment module is configured to adjust the overlapping line segments according to the overlapping first object areas to obtain at least two target first object models.

[0017] According to a third aspect of an embodiment of this specification, a river generation method is provided, comprising:

[0018] Determine at least two river segment models, and generate at least two reference river models according to the at least two river segment models;

[0019] Determining an overlapping river area between any two reference river models in the at least two reference river models;

[0020] According to the overlapping river area, mapping the at least two river segment models to obtain a mapping result;

[0021] When it is determined according to the mapping result that the overlapping river area and any one of the at least two river segment models overlap, determining the overlapping segments in the overlapping river segment model;

[0022] According to the overlapping river areas, the overlapping line segments are adjusted to obtain at least two target river models.

[0023] According to a fourth aspect of the embodiments of this specification, a river generating device is provided, comprising:

[0024] A first determination module is configured to determine at least two river segment models, and generate at least two reference river models according to the at least two river segment models;

[0025] A second determination module is configured to determine an overlapping river area between any two reference river models among the at least two reference river models;

[0026] A mapping module is configured to map the at least two river segment models according to the overlapping river area to obtain a mapping result;

[0027] A third determination module is configured to determine an overlapping line segment in the overlapping river line segment model when it is determined according to the mapping result that the overlapping river area and any one of the at least two river line segment models overlap;

[0028] The adjustment module is configured to adjust the overlapping line segments according to the overlapping river areas to obtain at least two target river models.

[0029] According to a fifth aspect of an embodiment of this specification, a computing device is provided, including:

[0030] Memory and processor;

[0031] The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the above method are implemented.

[0032] According to a sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores a computer program / instruction, and the steps of the above method are implemented when the computer program / instruction is executed by a processor.

[0033] According to a seventh aspect of the embodiments of this specification, a computer program product is provided, comprising a computer program / instruction, which implements the steps of the above method when executed by a processor.

[0034] An embodiment of the present specification provides an object generation method, including determining at least two first object line segment models, and generating at least two reference first object models based on the at least two first object line segment models; determining an overlapping first object area between any two reference first object models in the at least two reference first object models; mapping the at least two first object line segment models based on the overlapping first object area to obtain a mapping result; when it is determined based on the mapping result that the overlapping first object area and any one of the at least two first object line segment models overlap, determining overlapping line segments in the overlapping first object line segment models; and adjusting the overlapping line segments based on the overlapping first object area to obtain at least two target first object models.

[0035] In the above method, after determining at least two first object line segment models, at least two reference first object models are generated according to the at least two first object line segment models, and an overlapping first object area between any two reference first object models in the at least two reference first object models is determined. The overlapping first object area is used as a reference to map the at least two first object line segment models to obtain a mapping result. When it is determined according to the mapping result that the overlapping first object area and any one of the at least two first object line segment models overlap, the overlapping line segments in the overlapping first object line segment model are determined, and the overlapping line segments are adjusted according to the overlapping first object area to adjust the overlapping line segments in the at least two first object line segment models, thereby ensuring the intersection of the overlapping parts between the at least two first object line segment models. When the first object line segment model is a river, the intersection effect between the rivers is ensured, thereby ensuring the authenticity of the generated river and providing a more realistic visual effect for the user. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 is a flow chart of an object generation method provided by an embodiment of this specification;

[0037] Figure 2 is a process flow chart of a method for generating an object provided by an embodiment of the present specification;

[0038] FIG. 3(a), FIG. 3(b), FIG. 3(c), FIG. 3(d), FIG. 3(e), FIG. 3(f) and FIG. 3(g) are schematic diagrams of object generation in an object generation method provided in one embodiment of the present specification;

[0039] Figure 4 is a schematic diagram of the structure of an object generation device provided by an embodiment of this specification;

[0040] Figure 5is a flow chart of a river generation method provided by an embodiment of this specification;

[0041] Figure 6 It is a structural schematic diagram of a river generating device provided by an embodiment of this specification;

[0042] Figure 7 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION

[0043] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.

[0044] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0045] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0046] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0047] In this specification, an object generation method is provided. This specification also relates to an object generation device, a river generation method, a river generation device, a computing device, a computer-readable storage medium and a computer program product, which are described in detail one by one in the following embodiments.

[0048] See also Figure 1 , Figure 1 A flowchart of an object generation method provided according to an embodiment of the present specification is shown, which specifically includes the following steps.

[0049] Step 102: Determine at least two first object line segment models, and generate at least two reference first object models according to the at least two first object line segment models.

[0050] Specifically, the object generation method provided in the embodiments of this specification can be applied to the field of virtual scene generation. For example, it can be virtual scene generation in the field of games, that is, rendering and generating game scenes in games. It can also be applied to virtual scene generation in other fields, such as film and television fields, architectural design fields, education fields, and product design fields. Specifically, in the field of film and television, movie special effects, animated films, and TV programs can use virtual scene rendering to create visual effects. In the field of architectural design, virtual scene rendering can be used to display unbuilt buildings or interior designs to achieve a preview of the final effect of architectural design. In the field of education, scene rendering in virtual reality and augmented reality can provide students with an immersive learning experience. In the field of product design, virtual scene rendering can be used to simulate the appearance and function of a product, so as to achieve product display to users and performance testing of products under different conditions. This embodiment of this specification does not limit this. For ease of understanding, this embodiment of this specification takes the application of the object generation method to the generation of waters in a game scene as an example for explanation.

[0051] The first object can be understood as a virtual object in a virtual scene. In the field of games, the virtual object can be a water object in a virtual game scene, such as a river, a lake, or magma. When the virtual object is a river, the first object line segment model can be understood as a river line segment model, and the reference to the first object model can be understood as a reference to the river model. For ease of understanding, the embodiments of this specification are described by taking the first object being a river as an example.

[0052] Based on this, at least two river segment models can be determined, and at least two reference river models can be generated based on the at least two river segment models. It can be understood that there is a one-to-one correspondence between the at least two river segment models and the at least two reference river models. For example, after determining the river segment model A1, the river segment model A2, and the river segment model A3, the reference river model B1 can be generated based on the river segment model A1, the reference river model B2 can be generated based on the river segment model A2, and the reference river model B3 can be generated based on the river segment model A3.

[0053] In practical applications, the generation of the target first object model in the object generation method provided in the embodiments of this specification can be implemented through a 3D graphics software package. The 3D graphics software package can be used to create advanced visual effects, and can be used for animation and special effects production in the film, television, advertising and game industries. The 3D graphics software package includes a procedural tool set, and complex scenes and effects can be constructed through the node system provided by the 3D graphics software package.

[0054] It is understandable that in one embodiment of the present specification, a river segment model can also be determined. In this case, other river segment models overlapping with the river segment model cannot be determined. At this time, the river confluence effect can be processed without processing, and the target river model can be directly generated based on the river segment model, and the subsequent steps of generating the target river valley model and the target river beach model can be continued. Here, generating the target river model based on the river segment model is similar to the process of generating the reference river model based on the river segment model, and will not be repeated here.

[0055] In a specific implementation, the determining of at least two first object line segment models includes:

[0056] Determining a first curve and a second curve, wherein virtual nodes included in the first curve and the second curve are arranged according to a node arrangement order;

[0057] Drawing node lines between virtual nodes of the first curve and virtual nodes of the second curve according to the node arrangement order corresponding to the first curve to obtain a first object line segment model;

[0058] The steps of determining the first curve and the second curve are continuously performed until at least two first object line segment models are obtained.

[0059] Among them, the first curve and the second curve can be understood as two curves (i.e., hyperbolas) used to generate a virtual river, and each curve contains virtual nodes arranged in a node arrangement order. In the process of generating the first curve and the second curve, the virtual nodes can be determined in sequence, and the virtual nodes can be connected in sequence to form a curve. After the first curve and the second curve are generated, the shapes of the first curve and the second curve can be adjusted according to needs. The node arrangement order can be understood as the arrangement order of the virtual nodes contained in the curve in the curve. Any endpoint of the curve can be used as the starting point to determine the node arrangement order corresponding to the curve.

[0060] Specifically, taking the generation of a river segment model as an example, the outline of the river can be depicted by drawing a first curve and a second curve, the direction of the river can be determined according to the drawing direction of the curve, or the direction of the river can be customized according to actual needs. The virtual nodes contained in the first curve and the second curve are arranged according to the node arrangement order; the direction of the river can be determined according to the arrangement order of the virtual nodes. According to the node arrangement order corresponding to the first curve, the virtual nodes on the first curve are traversed, and the virtual nodes on the second curve determine the virtual nodes corresponding to the virtual nodes on the first curve, and the virtual nodes on the first curve are connected to the corresponding virtual nodes on the second curve, that is, node lines are drawn between the virtual nodes on the first curve and the virtual nodes on the second curve. When drawing the node lines, it is necessary to ensure that there is no intersection between the node lines. After drawing the node lines for all the virtual nodes on the first curve, a river segment model is obtained. Continue the above steps to generate at least two river segment models.

[0061] In addition, after drawing node lines for virtual nodes on the first curve, the original first curve and the second curve may be deleted, and the drawn node lines may be retained to obtain a river segment model.

[0062] In practical applications, a hyperbola can be constructed as a horizontal line segment, which is convenient for calculating the height difference of a river, and the opposite bank of the river can also remain level. When drawing node lines between hyperbolas, the node lines can be connected according to the principle of connecting the nearest points on opposite sides.

[0063] For example, the user can use the client to draw a first curve and a second curve on the terrain displayed on the display interface of the client, and draw node lines between the virtual nodes of the first curve and the virtual nodes of the second curve according to the node arrangement order corresponding to the first curve to generate a river segment model A1. Similar to the above process, river segment models A2 and A3 are generated.

[0064] In summary, by generating a river segment model, it is convenient to subsequently generate a target river model based on the river segment model.

[0065] In one embodiment of the present specification, the first curve and the second curve may be generated according to curve values ​​input by a user, may be drawn by a user, or may be generated according to a preset curve template.

[0066] In another embodiment of the present specification, the first curve and the second curve may be obtained by converting a single curve (ie, the third curve), and the specific implementation method is as follows:

[0067] The determining of the first curve and the second curve comprises:

[0068] Determining a third curve, wherein the third curve includes a plurality of virtual nodes;

[0069] Creating line segments at each virtual node included in the third curve, and setting the width of each line segment according to a preset creation rule;

[0070] The third curve and the line segments are converted to obtain the first curve and the second curve.

[0071] The third curve may be a single curve input by a user, and the third curve includes virtual nodes arranged in a node arrangement order. The preset creation rule may be understood as a rule for creating the width of a line segment, and the preset creation rule may be, for example, setting the width of each line segment according to a preset width range.

[0072] Based on this, the third curve input by the user can be determined, line segments can be created for each virtual node on the third curve, the width of each line segment can be set according to a preset width range, the third curve and each line segment can be converted to obtain the first curve and the second curve.

[0073] In practical applications, when creating a river segment model based on a single curve, the third curve input by the user can be determined. The third curve is a single curve. Line segments are created at each virtual node contained in the third curve. The width of the line segment can match the pscale value of each virtual node of the third curve. Usually, the width of the line segment can be that the width on both sides of the line segment is smaller than the width in the middle of the line segment. In addition, when it is determined that the river corresponding to the third curve needs to merge into the lake model, the width of the line segment corresponding to the virtual node where the third curve merges into the lake model can be increased. This can be achieved by increasing the pscale value of the virtual node to simulate the width change when the river merges into other waters. On this basis, random width changes can be added to the line segments created at each virtual node, and line segment distortion effects can be added. The processed third curve and each line segment are converted to obtain the first curve and the second curve, which is equivalent to a hyperbola.

[0074] Among them, the pscale value is often used when processing the CopyToPoints node (this is a built-in node in the 3D graphics software package, and its function is to place one or more models on the target point). The pscale value represents the scaling factor of the model placed on the point. For example, after placing a 1 cubic meter cube on a point with a pscale value of 1, the volume of the model is still 1 cubic meter; if it is placed on a point with a pscale value of 3, the volume of the model is 3 cubic meters. In one embodiment of the present specification, several horizontal lines (the original lengths of these horizontal lines are all 1) are placed on each point of the third curve. The reason for their different lengths is that the pscale values ​​of each point are different, so the line segments originally of the same length can finally present different lengths.

[0075] In one embodiment of the present specification, a hyperbola can be used to generate a river mainstream, and a single curve can be used to generate a river tributary. In another embodiment of the present specification, a hyperbola can be used to generate a river tributary, and a single curve can be used to generate a river mainstream. This embodiment of the present specification does not limit this.

[0076] In summary, by realizing the conversion from a single curve to a hyperbola, the wiring forms of the single curve and the hyperbola are unified, thereby realizing the generation of a river segment model according to the single curve or the hyperbola.

[0077] In a specific implementation, when at least two reference first object models are generated based on at least two first object line segment models, the generation of a corresponding reference first object model based on one of the first object line segment models is taken as an example for explanation. The virtual nodes of the second curve in the first object line segment model can be traversed according to the node arrangement order corresponding to the second curve in the first object line segment model, and an initial first object model containing polygonal patches can be generated according to the traversal results. The polygonal patches contained in the initial first object model can be merged according to the node coordinates of the virtual nodes in the initial first object model and the node coordinates, and the reference first object model can be generated according to the merged result.

[0078] Step 104: Determine an overlapping first object region between any two reference first object models among the at least two reference first object models.

[0079] The overlapping first object area may be, for example, an overlapping river area.

[0080] Specifically, the overlapping river area between any two reference river models in at least two reference river models may be determined.

[0081] Continuing with the above example, among the reference river models B1, B2 and B3, the overlapping river area between the reference river models B1 and B2, the overlapping river area between the reference river models B2 and B3, and the overlapping river area between the reference river models B1 and B3 can be determined. It can be understood that the process of determining each overlapping river area is similar. The embodiment of this specification is explained by taking the determination of one of the overlapping river areas as an example.

[0082] In a specific implementation, the determining the overlapping first object area between any two reference first object models in the at least two reference first object models includes:

[0083] Determining a reference first object model to be processed from the at least two reference first object models, wherein the reference first object model to be processed is any one of the at least two reference first object models;

[0084] Performing mapping processing on the reference first object model to be processed to obtain a reference mapping result;

[0085] When it is determined according to the reference mapping result that the reference first object model to be processed overlaps with other reference first object models, extracting an overlapping first object region between the reference first object model to be processed and the other reference first object models;

[0086] The other reference first object models are other reference first object models among the at least two reference first object models except the reference first object model to be processed.

[0087] Based on this, the above processing can be performed on each of the at least two reference first object models, so as to determine the overlapping first object area between each reference first object model and the other reference first object models. It can be understood that the embodiment of this specification takes the processing of one of the reference first object models to be processed as an example for explanation, and the process of processing each reference first object model to be processed is similar.

[0088] In practical applications, any one of at least two reference river models can be determined as the reference river model to be processed, and each point of the reference river model to be processed is mapped in the vertical direction to obtain a reference mapping result. When it is determined that multiple faces are detected based on the reference mapping result, it can be determined that the reference river model to be processed and the other reference river models overlap, and the face where the point is located is regarded as an overlapping face, that is, the confluence of the rivers. The overlapping river area between the reference river model to be processed and the other reference river models can be extracted.

[0089] In summary, by mapping the reference river model to be processed, it is convenient to determine the overlapping river area between the reference model to be processed and other reference river models, to determine the river confluence, and to facilitate the subsequent leveling of the river confluence to achieve a natural and smooth river confluence effect.

[0090] In addition, after determining the overlapping first object area between any two reference first object models among the at least two reference first object models, the method further includes:

[0091] The heights of the overlapping first object regions are adjusted to be the same height to obtain adjusted overlapping first object regions.

[0092] Specifically, after the overlapping river regions are determined, the heights of the overlapping river regions may be set to be the same height.

[0093] In another embodiment of the present specification, since the overlapping first object region includes a surface of the reference first object model to be processed and overlapping surfaces of other reference first object models, one of the surfaces may be deleted to achieve height adjustment of the overlapping first object region.

[0094] In summary, by adjusting the height of the overlapping first object area to the same height, the river confluence can be leveled. Since the water flow models need to overlap when the water flows converge, it is difficult to achieve an overlapping effect if there are multiple slanted river models. Therefore, the water flow confluence effect can be achieved through ranking processing.

[0095] Step 106: Mapping the at least two first object line segment models according to the overlapping first object region to obtain a mapping result.

[0096] In a specific implementation, mapping the at least two first object line segment models according to the overlapping first object area to obtain a mapping result includes:

[0097] According to the overlapping first object area, mapping the at least two first object line segment models in a vertical direction to obtain a mapping result;

[0098] The mapping result is used to indicate whether the at least two first object line segment models include a line segment overlapping the overlapping first object region.

[0099] Specifically, each of the at least two first object line segment models may be vertically mapped to the overlapping first object region to obtain a mapping result.

[0100] In practical applications, at least two river segment models can be mapped vertically according to the overlapping river area. In addition, at least two river segment models can be mapped according to the lake model to determine the overlapping segments in at least two river segment models that overlap with the lake model, and then the height of the overlapping segments is adjusted to achieve a smooth and natural effect of the river merging into the lake.

[0101] Step 108: when it is determined according to the mapping result that the overlapping first object region and any one of the at least two first object line segment models overlap, determining the overlapping line segments in the overlapping first object line segment models.

[0102] Specifically, when any face is detected according to the mapping result, it can be determined that the overlapping first object area and any one of the at least two first object line segment models overlap, and at this time, the overlapping line segments in the overlapping first object line segment models can be determined.

[0103] In practical applications, the line segments at the arbitrary surface can be regarded as line segments at the confluence of rivers, that is, overlapping line segments.

[0104] Step 110: adjusting the overlapping line segments according to the overlapping first object regions to obtain at least two target first object models.

[0105] In a specific implementation, adjusting the overlapping line segments according to the overlapping first object area to obtain at least two target first object models includes:

[0106] According to the overlapping first object area, adjusting the overlapping line segments to obtain at least two adjusted first object line segment models;

[0107] Performing smoothing processing on the at least two first object line segment models to obtain at least two smoothed first object line segment models;

[0108] At least two target first object models are generated according to the at least two smoothed first object line segment models.

[0109] Specifically, the overlapping line segments can be adjusted according to the overlapping river areas to obtain at least two adjusted river line segment models, the at least two river line segment models can be smoothed to obtain at least two smoothed river line segment models, and at least two target river models can be generated based on the at least two smoothed river line segment models.

[0110] In summary, by smoothing at least two river segment models, a smooth transition of the river confluence is achieved.

[0111] In practical applications, adjusting the overlapping line segments according to the overlapping first object regions to obtain at least two adjusted first object line segment models includes:

[0112] According to the height of the overlapping first object area, the height of the overlapping line segments is adjusted to obtain at least two adjusted first object line segment models.

[0113] Specifically, the height of the overlapping line segments may be adjusted to be consistent with the height of the overlapping river regions, thereby obtaining at least two adjusted river line segment models, and smoothing of the at least two river line segment models can be achieved.

[0114] Furthermore, the step of smoothing the at least two first object line segment models to obtain the at least two smoothed first object line segment models includes:

[0115] Determining a line segment to be processed from the at least two first object line segment models;

[0116] When it is determined that the line segment to be processed is adjacent to the overlapping line segment, the line segment to be processed is smoothed to obtain at least two first object line segment models after smoothing.

[0117] The line segments to be processed may be understood as line segments in at least two first object line segment models that need to be smoothed, for example, line segments adjacent to overlapping line segments.

[0118] Based on this, a line segment to be processed adjacent to the overlapping line segment can be determined from at least two first object line segment models, and the line segment to be processed can be smoothed to obtain at least two smoothed first object line segment models.

[0119] In summary, by smoothing the line segments to be processed that are adjacent to the overlapping line segments, the natural effect of the intersection of rivers can be achieved.

[0120] Specifically, from the at least two first object line segment models, line segments adjacent to the overlapping line segments may be used as line segments to be processed, and the line segments to be processed may be smoothed to obtain at least two smoothed first object line segment models.

[0121] In a specific implementation, the smoothing process of the line segment to be processed includes:

[0122] Determining, from the at least two first object line segment models, an associated line segment of the line segment to be processed;

[0123] Determining a target height range according to the height of the line segment to be processed and the height of the associated line segment;

[0124] Within the target height range, an interpolation process is performed on the height of the line segment to be processed and the height of the associated line segment to smooth the line segment to be processed.

[0125] Specifically, when smoothing at least two river segment models, the segment adjacent to the overlapping segment can be used as the segment to be processed, and the segment adjacent to the segment to be processed can be determined as the associated segment. According to the heights of the segment to be processed and the associated segment, the target height range is determined, and within the target height range, the height of the segment to be processed and the height of the associated segment are interpolated, thereby achieving smoothing of the segment to be processed.

[0126] In practical applications, generating at least two target first object models according to the at least two smoothed first object line segment models includes:

[0127] Determining a first object line segment model to be processed from the at least two smoothed first object line segment models, wherein the first object line segment model to be processed is any one of the at least two first object line segment models;

[0128] Adding a plurality of line segments to the line segment model of the first object to be processed to obtain the added line segment model of the first object to be processed;

[0129] Constructing a surface model of the first object to be processed according to the added line segment model of the first object to be processed;

[0130] Performing mesh conversion processing on the to-be-processed first object mesh model to obtain at least two target first object models.

[0131] In practical applications, when generating at least two target river models based on at least two smoothed river line segment models, the target river model is generated based on one of the river line segment models as an example, the line segments in the river line segment model are resampled, multiple virtual nodes are added, the line segments in the river line segment model are converted into line segments in another direction perpendicular to the direction of the line segments, and the resampling is continued to make the points on the line segments evenly distributed. According to the above-mentioned adjusted river line segment model, the target river model is constructed. Specifically, the multiple line segments of the adjusted river line segment model can be simplified into multiple hyperbolas, polygonal patches are generated and merged, the obtained river line segment model is straightened to obtain UV, the UV is retopologically re-topologically, and the river line segment model containing polygonal patches is converted into a target river model containing uniformly wired triangular patches.

[0132] In summary, the generation of the target river model can be achieved.

[0133] In addition, after obtaining at least two target first object models, the method further includes:

[0134] Determining a target first object model to be processed from the at least two target first object models, wherein the target first object model to be processed is any one of the at least two target first object models;

[0135] According to the first curve and the second curve corresponding to the first object model of the target to be processed, mapping processing is performed on the first object model of the target to be processed to obtain a mapping surface;

[0136] According to the normal direction of the mapping surface, the moving directions of the first curve and the second curve are adjusted to generate at least two target second object models.

[0137] The second object can be understood as a river valley, and the target second object model can be understood as a target river valley model.

[0138] Based on this, the target river valley model corresponding to each target river model can be determined. Taking one of them as an example, the first curve and the second curve corresponding to the target river model to be processed can be determined, and the river model to be processed can be mapped according to the first curve and the second curve to obtain a mapping surface, and the moving direction of the first curve and the second curve can be adjusted according to the normal direction of the mapping surface to generate the target river valley model corresponding to the target river model to be processed. According to similar steps, the target river valley model corresponding to each target river model in at least two target river models is generated.

[0139] In practical applications, the input first curve and second curve can be used as the base line of the valley model. The first curve and second curve can be used to map the height of the target river model, and the target river model can be extruded to ensure that each virtual node of the first curve and the second curve can be mapped to the target river model. After each virtual node is mapped to the model height, the normal direction of the mapped mapping surface can be read, and the first curve and the second curve can be guided to move downward according to the normal direction to form a concave shape of the river channel, thereby generating a target valley model.

[0140] In summary, by generating the target valley model, the subsequent virtual scene generation is realized to ensure the authenticity of the generated virtual scene.

[0141] In addition, after obtaining at least two target first object models, the method further includes:

[0142] Determine a curve to be processed from the first curve and the second curve corresponding to the first object model of the target to be processed, wherein the curve to be processed is any one of the first curve and the second curve corresponding to the first object model of the target to be processed;

[0143] Adjusting the shape of the to-be-processed curve to obtain an adjusted to-be-processed curve;

[0144] Determine the plane of the adjusted curve to be processed in the vertical direction, and map the adjusted curve to be processed according to the normal line to obtain a target curve;

[0145] Perform terrain height mapping on the target curve to obtain at least two target third object models.

[0146] The third object can be understood as a river beach, and the target third object model can be understood as a target river beach model.

[0147] Specifically, the target beach model corresponding to each target river model can be determined. Taking one of them as an example, the first curve and the second curve corresponding to the target river model to be processed can be determined, and the first curve and the second curve can be processed. Taking the processing of one of the curves to be processed as an example, the shape of the curve to be processed can be adjusted to obtain the adjusted curve to be processed, and the plane of the adjusted curve to be processed in the vertical direction can be determined, and the adjusted curve to be processed can be mapped according to the normal of the plane to obtain the target curve, and the target curve is mapped to the terrain height to obtain the target beach model corresponding to the target river model to be processed. According to similar steps, the target beach model corresponding to each target river model in at least two target river models is generated.

[0148] In practical applications, a beach model can be generated based on the input first curve and second curve. Specifically, taking one of the curves as an example, the curve is smoothed multiple times with the maximum intensity value to destroy the shape of the curve, and the beach range at the inner bend of the river is obtained. The smoothed curve is vertically extruded to obtain a plane, and the smoothed curve is mapped along the normal. If the mapping is successful, the position of the curve is adsorbed to the mapping position to obtain the curve and the plane. Similar processing is performed on each curve to obtain the shape of the beach curve, and the beach curve is extended to both sides by a preset distance to generate a model of the transition area between the beach and the terrain. The outward-expanded beach curve is mapped to the terrain height to facilitate the subsequent generation of the transition plane, thereby obtaining the target beach model.

[0149] In summary, by generating the target river beach model, the subsequent virtual scene generation is realized to ensure the authenticity of the generated virtual scene.

[0150] In one embodiment of the present specification, after generating at least two target second object models and at least two target third object models, the method further includes:

[0151] Merging the at least two target second object models and the at least two target third object models to obtain at least two target merged object models;

[0152] A target virtual scene is generated according to the at least two target first object models and the at least two target merged object models.

[0153] Specifically, at least two target river valley models and at least two target river beach models may be merged to obtain at least two target river channel models.

[0154] In practical applications, in the process of mapping the target river model and the target river channel model included in the initial virtual scene, the voxels of the terrain can be converted into a terrain model, the range affected by the river and the river channel can be extracted from the terrain model, the extracted range of influence can be expanded, the target river channel model can be mapped to the terrain model, the target river channel model can be subjected to noise processing and set distortion processing to obtain a terrain height simulation model, the terrain height simulation model can be mapped to the terrain model to obtain a terrain result, the target river model can be merged with the terrain result to obtain the target virtual scene.

[0155] In addition, the terrain result can be obtained by mapping the processing nodes in the 3D graphics software package, avoiding unnecessary time-consuming processing under large-scale terrain. The rivers and lakes in the target virtual scene can also be distinguished by color, and the overlapping surfaces can achieve transition effects in the rendering engine.

[0156] In one embodiment of the present specification, the target first object model is a river model, the target second object model is a river valley model, the target third object model is a river beach model, and the target merged object model is a river channel model.

[0157] In summary, the mapping efficiency is high by mapping the target river model, the target valley model and the target river beach model to the terrain model. The simulation is performed by a model matching the terrain accuracy, and the model simulation results are mapped to the terrain, thereby reducing the time consumption of the terrain mapping operation.

[0158] To summarize, in the above method, after determining at least two first object line segment models, at least two reference first object models are generated according to the at least two first object line segment models, and an overlapping first object area between any two reference first object models in the at least two reference first object models is determined, and the overlapping first object area is used as a reference to map the at least two first object line segment models to obtain a mapping result. When it is determined according to the mapping result that the overlapping first object area and any one of the at least two first object line segment models overlap, the overlapping line segments in the overlapping first object line segment model are determined, and the overlapping line segments are adjusted according to the overlapping first object area to adjust the overlapping line segments in the at least two first object line segment models, thereby ensuring the intersection of the overlapping parts between the at least two first object line segment models. When the first object line segment model is a river, the intersection effect between the rivers is ensured, thereby ensuring the authenticity of the generated river, and providing a more realistic visual effect for the user.

[0159] The following combination Figure 2 Taking the application of the object generation method provided in this specification in the generation of a virtual scene including a river as an example, the object generation method is further described. Figure 2 A processing flow chart of an object generation method provided by an embodiment of the present specification is shown, which specifically includes the following steps.

[0160] Step 202: Determine at least two river segment models.

[0161] Specifically, at least two river segment models can be created according to the hyperbola (i.e., the first curve and the second curve) or the single curve (i.e., the third curve) input by the user. Figures 3(a), 3(b), 3(c), 3(d), 3(e), 3(f), and 3(g) show schematic diagrams of object generation in an object generation method provided according to an embodiment of the present specification. a1 in Figure 3(a) shows a schematic diagram of a single curve input by the user on the terrain model, and a2 in Figure 3(a) shows a schematic diagram of a hyperbola input by the user on the terrain model. It can be understood that the river segment model can be directly created according to the hyperbola, and when creating the river segment model according to the single curve, the single curve can be converted into a hyperbola, and then the river segment model can be created according to the hyperbola. a3 in Figure 3(a) shows a schematic diagram of a virtual scene containing rivers on a terrain model. The terrain model in the figure includes a patch model, which can be used to represent a lake, and the curve on the terrain model can be used to represent a river. The figure shows a virtual scene of multiple rivers and lakes, wherein there is interaction between rivers and rivers, and between rivers and lakes.

[0162] In a specific implementation, when creating a river segment model based on a hyperbola, the first curve and the second curve input by the user can be determined, wherein the first curve and the second curve contain multiple virtual nodes, and the virtual nodes contained in the first curve and the second curve are arranged according to the node arrangement order, and node lines are drawn between the virtual nodes of the first curve and the virtual nodes of the second curve according to the node arrangement order corresponding to the first curve to obtain the river segment model, a4 in FIG3 (a) shows the hyperbola input by the user, and a5 in FIG3 (a) is the river segment model created according to the hyperbola. The above steps can be continued to obtain at least two river segment models.

[0163] When creating a river segment model based on a single curve, the third curve input by the user can be determined. The third curve is a single curve. Line segments are created at each virtual node contained in the third curve. The width of the line segment can match the psca le of each virtual node of the third curve. Generally, the width of the line segment can be that the width on both sides of the line segment is smaller than the width in the middle of the line segment. In addition, when it is determined that the river corresponding to the third curve needs to merge into the lake model, the width of the line segment corresponding to the virtual node where the third curve merges into the lake model can be increased. This can be achieved by increasing the psca le value of the virtual node to simulate the width change when the river merges into other waters. On this basis, random width changes can be added to the line segments created at each virtual node, and line segment distortion effects can be added. The processed third curve and each line segment are converted to obtain the first curve and the second curve, which is equivalent to a hyperbola. a6 in Figure 3(a) shows the process of creating line segments at each virtual node, a7 in Figure 3(a) shows the situation where the river corresponding to the third curve merges into the lake model, a8 in Figure 3(a) shows the process of adding random width changes to each line segment, b1 in Figure 3(b) shows a schematic diagram of adding line segment distortion effect, b2 in Figure 3(b) shows the process of converting the third curve into the first curve and the second curve, and b3 in Figure 3(b) shows at least two river line segment models generated.

[0164] Step 204: Generate at least two reference river models based on at least two river segment models.

[0165] Specifically, when generating at least two reference river models based on at least two river segment models, one of the river segment models is taken as an example for explanation, as shown in b4 in Figure 3(b). The virtual nodes of the second curve in the river segment model can be traversed according to the node arrangement order corresponding to the second curve in the river segment model, and an initial river model containing polygonal patches can be generated according to the traversal results. The polygonal patches contained in the initial river model can be merged according to the node coordinates of the virtual nodes in the initial river model and the node coordinates, and a reference river model can be generated according to the merged results. b5 in Figure 3(b) shows a schematic diagram of the generated at least two reference river models.

[0166] Step 206: Determine a reference river model to be processed from at least two reference river models.

[0167] Specifically, any one of the at least two reference river models may be determined as a reference river model to be processed, that is, each reference river model needs to be subsequently processed.

[0168] Step 208: Mapping the reference river model to be processed to obtain a reference mapping result.

[0169] Specifically, the reference river model to be processed may be mapped in the vertical direction to obtain a reference mapping result.

[0170] Step 210: When it is determined according to the reference mapping result that the reference river model to be processed and other reference river models overlap, the overlapping river area between the reference river model to be processed and the other reference river models is extracted.

[0171] Specifically, b6 in Fig. 3(b) shows a schematic diagram of the overlapping river area between at least two reference river models. In addition, after the overlapping river area is determined, the heights of the overlapping river areas can be set to the same height.

[0172] Step 212: Map at least two river segment models according to the overlapping river areas to obtain a mapping result.

[0173] Specifically, c1 in FIG3(c) shows the process of mapping at least two river segment models according to the overlapping river area. In addition, at least two river segment models can be mapped according to the lake model to determine the overlapping segments in at least two river segment models that overlap with the lake model, and then the height of the overlapping segments is adjusted to achieve a smooth and natural effect of the river merging into the lake. c2 in FIG3(c) shows the process of mapping at least two river segment models according to the lake model.

[0174] Step 214: when it is determined according to the mapping result that the overlapping river area and any one of the at least two river line segment models overlap, the overlapping line segments in the overlapping river line segment models are determined.

[0175] Step 216: adjusting the height of the overlapping line segments according to the height of the overlapping river areas, and obtaining at least two adjusted river line segment models.

[0176] Specifically, the height of the overlapping line segments may be adjusted to be consistent with the height of the overlapping river regions, thereby obtaining at least two adjusted river line segment models.

[0177] Step 218: Smoothing the at least two river line segment models to obtain at least two smoothed river line segment models.

[0178] Specifically, when smoothing at least two river segment models, the segments adjacent to the overlapping segments can be used as segments to be processed. c3 in Figure 3(c) shows the segments to be processed adjacent to the overlapping segments, and the segments adjacent to the segments to be processed are determined as associated segments. According to the heights of the segments to be processed and the associated segments, the target height range is determined, and within the target height range, the heights of the segments to be processed and the heights of the associated segments are interpolated, thereby achieving smoothing of the segments to be processed. c4 in Figure 3(c) shows the effect after smoothing.

[0179] Step 220: Generate at least two target river models based on the at least two smoothed river segment models.

[0180] Specifically, when generating at least two target river models based on at least two smoothed river line segment models, an example is taken to generate a target river model based on one of the river line segment models. The river line segment model is shown as c5 in Figure 3(c). The line segments in the river line segment model are resampled, and multiple virtual nodes are added, as shown by c6 in Figure 3(c). The line segments in the river line segment model are converted into line segments in another direction perpendicular to the direction of the line segments, and resampling is continued, as shown by c7 in Figure 3(c), so that the points on the line segments are evenly distributed, as shown by c8 in Figure 3(c). According to the above-mentioned adjusted river segment model, a target river model is constructed in a manner similar to the process described in the aforementioned step 204, as shown in d1 and d2 in FIG3(d). The multiple segments of the adjusted river segment model can be simplified into multiple hyperbolas, as shown in d3 in FIG3(d). Polygonal patches are generated and merged, as shown in d4 in FIG3(d). The obtained river segment model is straightened to obtain UV (Unwrapping refers to the process of unfolding the surface of a 3D model into a 2D plane. This process is usually used to add texture maps to 3D models. UV coordinates define how each pixel in the map is mapped to the position on the surface of the 3D model. UV coordinates include two components, U and V, which are similar to X and Y coordinates in 2D space. By UV unfolding, it is possible to ensure that the texture is correctly applied to the model and avoid distortion or stretching), as shown in d5 in FIG3(d). The UV is retopologically performed once, and the river segment model containing polygonal patches is converted into a target river model containing uniformly wired triangular patches, as shown in d6 in FIG3(d).

[0181] Step 222: Generate at least two target river valley models.

[0182] Specifically, in order to ensure that the river shape is close to the input, the input first curve and the second curve can be used as the base line of the valley model. d7 in Figure 3(d) shows the input first curve and the second curve. The first curve and the second curve can be used to map the height of the target river model generated in step 220, and the target river model is extruded to ensure that each virtual node of the first curve and the second curve can be mapped to the target river model. d8 in Figure 3(d) shows the mapping process. After each virtual node is mapped to the model height, the normal direction of the mapped mapping surface can be read, and the first curve and the second curve are guided to move downward according to the normal direction to form the concave shape of the river channel shown by e1 in Figure 3(e), thereby generating the target valley model.

[0183] Step 224: Generate at least two target riverbank models.

[0184] Similar to the above, a beach model can be generated based on the input first curve and second curve. Specifically, taking one of the curves as an example, the curve is smoothed multiple times with the maximum intensity value to destroy the shape of the curve, and the beach range at the inner bend of the river shown in e2 in Figure 3 (e) is obtained. The smoothed curve is vertically extruded to obtain a plane, and the smoothed curve is mapped along the normal. In the case of successful over-mapping, the position of the curve is adsorbed to the mapping position to obtain the curve and plane shown in e3 and e4 in Figure 3 (e). Each curve is processed similarly to the above to obtain the beach curve shape shown in e5 in Figure 3 (e). The beach curve is extended to both sides by a preset distance to generate a model of the transition area between the beach and the terrain, as shown in e6 in Figure 3 (e). The expanded beach curve is mapped to the terrain height, as shown in e7 in Figure 3 (e), so as to facilitate the subsequent generation of the transition plane, thereby obtaining the target beach model.

[0185] Step 226: merge at least two target river valley models and at least two target river beach models to generate at least two target river channel models.

[0186] Specifically, the at least two target river valley models obtained in step 222 and the at least two target river beach models obtained in step 224 can be merged to obtain at least two target river channel models, one of which is shown as e8 in FIG. 3( e) and f1 in FIG. 3( f).

[0187] Step 228: Generate a target virtual scene based on at least two target river models and at least two target river channel models.

[0188] Specifically, at least two target river models and at least two target river channel models can be merged to obtain the initial virtual scene shown in f2 in Figure 3(f), and the target river model and target river channel model included in the initial virtual scene can be mapped to the terrain to obtain the target virtual scene shown in g2 in Figure 3(g). Specifically, in the process of mapping the target river model and the target river channel model included in the initial virtual scene, the voxel shown in f3 in Figure 3(f) can be converted into the terrain model shown in f4 in Figure 3(f), and the range affected by the river and the river channel can be extracted from the terrain model, as shown in f5 in Figure 3(f). The extracted influence range is expanded, as shown in f6 in Figure 3(f), and the target river channel model is mapped to the terrain model, as shown in f7 in Figure 3(f). The target river channel model is subjected to noise processing and set distortion processing to obtain a terrain height simulation model, as shown in f8 in Figure 3(f). The terrain height simulation model is mapped to the terrain model to obtain the terrain result described in g1 in Figure 3(g), and the target river model is merged with the terrain result to obtain the target virtual scene shown in g2 in Figure 3(g).

[0189] In the above method, after determining at least two river segment models, at least two reference river models are generated based on the at least two river segment models, and the overlapping river area between any two reference river models in the at least two reference river models is determined. The overlapping river area is used as a reference to map the at least two river segment models to obtain a mapping result. When it is determined according to the mapping result that the overlapping river area and any one of the at least two river segment models overlap, the overlapping segments in the overlapping river segment model are determined, and the overlapping segments are adjusted according to the overlapping river area to adjust the overlapping segments in the at least two river segment models, thereby ensuring the intersection of the overlapping parts between the at least two river segment models, ensuring the intersection effect between the rivers, and then ensuring the authenticity of the generated river, providing users with a more realistic visual effect.

[0190] Corresponding to the above method embodiment, this specification also provides an object generation device embodiment, Figure 4 FIG. 1 shows a schematic diagram of the structure of an object generation device provided by an embodiment of the present specification. Figure 4 As shown, the device comprises:

[0191] A first determining module 402 is configured to determine at least two first object line segment models, and generate at least two reference first object models according to the at least two first object line segment models;

[0192] A second determining module 404 is configured to determine an overlapping first object region between any two reference first object models among the at least two reference first object models;

[0193] A mapping module 406 is configured to map the at least two first object line segment models according to the overlapping first object area to obtain a mapping result;

[0194] A third determining module 408 is configured to determine an overlapping line segment in the overlapping first object line segment model if it is determined according to the mapping result that the overlapping first object region and any one of the at least two first object line segment models overlap;

[0195] The adjustment module 410 is configured to adjust the overlapping line segments according to the overlapping first object regions to obtain at least two target first object models.

[0196] In an optional embodiment, the mapping module 406 is further configured to:

[0197] According to the overlapping first object area, mapping the at least two first object line segment models in a vertical direction to obtain a mapping result;

[0198] The mapping result is used to indicate whether the at least two first object line segment models include a line segment overlapping the overlapping first object region.

[0199] In an optional embodiment, the second determining module 404 is further configured to:

[0200] Determining a reference first object model to be processed from the at least two reference first object models, wherein the reference first object model to be processed is any one of the at least two reference first object models;

[0201] Performing mapping processing on the reference first object model to be processed to obtain a reference mapping result;

[0202] When it is determined according to the reference mapping result that the reference first object model to be processed overlaps with other reference first object models, extracting an overlapping first object region between the reference first object model to be processed and the other reference first object models;

[0203] The other reference first object models are other reference first object models among the at least two reference first object models except the reference first object model to be processed.

[0204] In an optional embodiment, the second determining module 404 is further configured to:

[0205] The heights of the overlapping first object regions are adjusted to be the same height to obtain adjusted overlapping first object regions.

[0206] In an optional embodiment, the adjustment module 410 is further configured to:

[0207] According to the overlapping first object area, adjusting the overlapping line segments to obtain at least two adjusted first object line segment models;

[0208] Performing smoothing processing on the at least two first object line segment models to obtain at least two smoothed first object line segment models;

[0209] At least two target first object models are generated according to the at least two smoothed first object line segment models.

[0210] In an optional embodiment, the adjustment module 410 is further configured to:

[0211] According to the height of the overlapping first object area, the height of the overlapping line segments is adjusted to obtain at least two adjusted first object line segment models.

[0212] In an optional embodiment, the adjustment module 410 is further configured to:

[0213] Determining a line segment to be processed from the at least two first object line segment models;

[0214] When it is determined that the line segment to be processed is adjacent to the overlapping line segment, the line segment to be processed is smoothed to obtain at least two first object line segment models after smoothing.

[0215] In an optional embodiment, the adjustment module 410 is further configured to:

[0216] Determining, from the at least two first object line segment models, an associated line segment of the line segment to be processed;

[0217] Determining a target height range according to the height of the line segment to be processed and the height of the associated line segment;

[0218] Within the target height range, an interpolation process is performed on the height of the line segment to be processed and the height of the associated line segment to smooth the line segment to be processed.

[0219] In an optional embodiment, the adjustment module 410 is further configured to:

[0220] Determining a first object line segment model to be processed from the at least two smoothed first object line segment models, wherein the first object line segment model to be processed is any one of the at least two first object line segment models;

[0221] Adding a plurality of line segments to the line segment model of the first object to be processed to obtain the added line segment model of the first object to be processed;

[0222] Constructing a surface model of the first object to be processed according to the added line segment model of the first object to be processed;

[0223] Performing mesh conversion processing on the to-be-processed first object mesh model to obtain at least two target first object models.

[0224] In an optional embodiment, the first determining module 402 is further configured to:

[0225] Determining a first curve and a second curve, wherein virtual nodes included in the first curve and the second curve are arranged according to a node arrangement order;

[0226] Drawing node lines between virtual nodes of the first curve and virtual nodes of the second curve according to the node arrangement order corresponding to the first curve to obtain a first object line segment model;

[0227] The steps of determining the first curve and the second curve are continuously performed until at least two first object line segment models are obtained.

[0228] In an optional embodiment, the first determining module 402 is further configured to include:

[0229] Determining a third curve, wherein the third curve includes a plurality of virtual nodes;

[0230] Creating line segments at each virtual node included in the third curve, and setting the width of each line segment according to a preset creation rule;

[0231] The third curve and the line segments are converted to obtain the first curve and the second curve.

[0232] In an optional embodiment, the device further includes a generating module configured to:

[0233] Determining a target first object model to be processed from the at least two target first object models, wherein the target first object model to be processed is any one of the at least two target first object models;

[0234] According to the first curve and the second curve corresponding to the first object model of the target to be processed, mapping processing is performed on the first object model of the target to be processed to obtain a mapping surface;

[0235] According to the normal direction of the mapping surface, the moving directions of the first curve and the second curve are adjusted to generate at least two target second object models.

[0236] In an optional embodiment, the generating module is further configured to:

[0237] Determine a curve to be processed from the first curve and the second curve corresponding to the first object model of the target to be processed, wherein the curve to be processed is any one of the first curve and the second curve corresponding to the first object model of the target to be processed;

[0238] Adjusting the shape of the to-be-processed curve to obtain an adjusted to-be-processed curve;

[0239] Determine the plane of the adjusted curve to be processed in the vertical direction, and map the adjusted curve to be processed according to the normal line to obtain a target curve;

[0240] Perform terrain height mapping on the target curve to obtain at least two target third object models.

[0241] In an optional embodiment, the generating module is further configured to:

[0242] Merging the at least two target second object models and the at least two target third object models to obtain at least two target merged object models;

[0243] A target virtual scene is generated according to the at least two target first object models and the at least two target merged object models.

[0244] In an optional embodiment, the target first object model is a river model, the target second object model is a river valley model, the target third object model is a river beach model, and the target merged object model is a river channel model.

[0245] In the above-mentioned device, after determining at least two first object line segment models, at least two reference first object models are generated according to the at least two first object line segment models, and an overlapping first object area between any two reference first object models in the at least two reference first object models is determined. The overlapping first object area is used as a reference to map the at least two first object line segment models to obtain a mapping result. When it is determined according to the mapping result that the overlapping first object area and any one of the at least two first object line segment models overlap, the overlapping line segments in the overlapping first object line segment model are determined, and the overlapping line segments are adjusted according to the overlapping first object area to adjust the overlapping line segments in the at least two first object line segment models, thereby ensuring the intersection of the overlapping parts between the at least two first object line segment models. When the first object line segment model is a river, the intersection effect between the rivers is ensured, thereby ensuring the authenticity of the generated river and providing a more realistic visual effect for the user.

[0246] The above is a schematic scheme of an object generation device of this embodiment. It should be noted that the technical scheme of the object generation device and the technical scheme of the object generation method described above are of the same concept, and the details not described in detail in the technical scheme of the object generation device can be found in the description of the technical scheme of the object generation method described above.

[0247] See also Figure 5 , Figure 5 A flow chart of a river generation method provided according to an embodiment of the present specification is shown, which specifically includes the following steps.

[0248] Step 502: determining at least two river segment models, and generating at least two reference river models according to the at least two river segment models;

[0249] Step 504: determining an overlapping river area between any two reference river models in the at least two reference river models;

[0250] Step 506: mapping the at least two river segment models according to the overlapping river area to obtain a mapping result;

[0251] Step 508: when it is determined according to the mapping result that the overlapping river area and any one of the at least two river segment models overlap, determining the overlapping line segments in the overlapping river segment models;

[0252] Step 510: According to the overlapping river areas, the overlapping line segments are adjusted to obtain at least two target river models.

[0253] Specifically, after determining at least two river line segment models, at least two reference river models are generated based on the at least two river line segment models, and an overlapping river area between any two reference river models in the at least two reference river models is determined. The overlapping river area is used as a reference to map the at least two river line segment models to obtain a mapping result. When it is determined based on the mapping result that the overlapping river area and any one of the at least two river line segment models overlap, the overlapping line segments in the overlapping river line segment model are determined, and the overlapping line segments are adjusted based on the overlapping river area, so as to adjust the overlapping line segments in the at least two river line segment models, thereby ensuring the intersection of the overlapping parts between the at least two river line segment models, ensuring the intersection effect between the rivers, and then ensuring the authenticity of the generated river, providing users with a more realistic visual effect.

[0254] The above is a schematic scheme of a river generation method of this embodiment. It should be noted that the technical scheme of the river generation method and the technical scheme of the object generation method described above are of the same concept, and the details not described in detail in the technical scheme of the river generation method can be found in the description of the technical scheme of the object generation method described above.

[0255] Corresponding to the above method embodiment, this specification also provides a river generating device embodiment, Figure 6 FIG. 1 shows a schematic diagram of a river generating device provided by an embodiment of the present specification. Figure 6 As shown, the device comprises:

[0256] A first determination module 602 is configured to determine at least two river segment models, and generate at least two reference river models according to the at least two river segment models;

[0257] A second determining module 604 is configured to determine an overlapping river area between any two reference river models in the at least two reference river models;

[0258] A mapping module 606 is configured to map the at least two river segment models according to the overlapping river area to obtain a mapping result;

[0259] A third determining module 608 is configured to determine an overlapping line segment in the overlapping river line segment model if it is determined according to the mapping result that the overlapping river area and any one of the at least two river line segment models overlap;

[0260] The adjustment module 610 is configured to adjust the overlapping line segments according to the overlapping river areas to obtain at least two target river models.

[0261] Specifically, after determining at least two river line segment models, at least two reference river models are generated based on the at least two river line segment models, and an overlapping river area between any two reference river models in the at least two reference river models is determined. The overlapping river area is used as a reference to map the at least two river line segment models to obtain a mapping result. When it is determined based on the mapping result that the overlapping river area and any one of the at least two river line segment models overlap, the overlapping line segments in the overlapping river line segment model are determined, and the overlapping line segments are adjusted based on the overlapping river area, so as to adjust the overlapping line segments in the at least two river line segment models, thereby ensuring the intersection of the overlapping parts between the at least two river line segment models, ensuring the intersection effect between the rivers, and then ensuring the authenticity of the generated river, providing users with a more realistic visual effect.

[0262] The above is a schematic scheme of a river generation device of this embodiment. It should be noted that the technical scheme of the river generation device and the technical scheme of the above object generation method belong to the same concept, and the details not described in detail in the technical scheme of the river generation device can be referred to the description of the technical scheme of the above object generation method.

[0263] Figure 7 The block diagram of a computing device 700 according to an embodiment of the present specification is shown. The components of the computing device 700 include but are not limited to a memory 710 and a processor 720. The processor 720 is connected to the memory 710 via a bus 730, and the database 750 is used to store data.

[0264] The computing device 700 also includes an access device 740 that enables the computing device 700 to communicate via one or more networks 760. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 740 may include one or more of any type of network interface (e.g., a network interface card (NIC)) of wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0265] In one embodiment of the present application, the above components of the computing device 700 and Figure 7 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 7 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as needed.

[0266] The computing device 700 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 700 may also be a mobile or stationary server.

[0267] The processor 720 is used to execute the following computer program / instructions, which implement the steps of the above method when executed by the processor.

[0268] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the computing device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0269] An embodiment of the present specification further provides a computer-readable storage medium storing a computer program / instruction, which implements the steps of the above method when executed by a processor.

[0270] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the computer-readable storage medium embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0271] An embodiment of the present specification also provides a computer program product, including a computer program / instruction, which implements the steps of the above method when executed by a processor.

[0272] The above is a schematic solution of a computer program product of this embodiment. It should be noted that the technical solution of the computer program product and the technical solution of the above method belong to the same concept, and the details not described in detail in the technical solution of the computer program product can be referred to the description of the technical solution of the above method.

[0273] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0274] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0275] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.

[0276] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0277] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to only the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.

Claims

1. A method for generating an object, characterized in that: include: Determine at least two first object line segment models, and generate at least two reference first object models according to the at least two first object line segment models; determining an overlapping first object region between any two reference first object models among the at least two reference first object models; According to the overlapping first object area, mapping the at least two first object line segment models to obtain a mapping result; When it is determined according to the mapping result that the overlapping first object region and any one of the at least two first object line segment models overlap, determining overlapping line segments in the overlapping first object line segment models; According to the overlapping first object area, the overlapping line segments are adjusted to obtain at least two target first object models.

2. The object generation method according to claim 1, characterized in that: The determining of an overlapping first object region between any two reference first object models among the at least two reference first object models comprises: Determining a reference first object model to be processed from the at least two reference first object models, wherein the reference first object model to be processed is any one of the at least two reference first object models; Performing mapping processing on the reference first object model to be processed to obtain a reference mapping result; When it is determined according to the reference mapping result that the reference first object model to be processed overlaps with other reference first object models, extracting an overlapping first object region between the reference first object model to be processed and the other reference first object models; The other reference first object models are other reference first object models among the at least two reference first object models except the reference first object model to be processed.

3. The object generation method according to claim 1, characterized in that: The step of adjusting the overlapping line segments according to the overlapping first object regions to obtain at least two target first object models includes: According to the overlapping first object area, adjusting the overlapping line segments to obtain at least two adjusted first object line segment models; Performing smoothing processing on the at least two first object line segment models to obtain at least two smoothed first object line segment models; At least two target first object models are generated according to the at least two smoothed first object line segment models.

4. The object generation method according to claim 3, characterized in that: The step of smoothing the at least two first object line segment models to obtain the at least two smoothed first object line segment models includes: Determining a line segment to be processed from the at least two first object line segment models; When it is determined that the line segment to be processed is adjacent to the overlapping line segment, the line segment to be processed is smoothed to obtain at least two first object line segment models after smoothing.

5. The object generation method according to claim 4, characterized in that: The step of smoothing the line segment to be processed comprises: Determining, from the at least two first object line segment models, an associated line segment of the line segment to be processed; Determining a target height range according to the height of the line segment to be processed and the height of the associated line segment; Within the target height range, an interpolation process is performed on the height of the line segment to be processed and the height of the associated line segment to smooth the line segment to be processed.

6. The object generation method according to claim 3, characterized in that: The step of generating at least two target first object models according to the at least two smoothed first object line segment models comprises: Determining a first object line segment model to be processed from the at least two smoothed first object line segment models, wherein the first object line segment model to be processed is any one of the at least two first object line segment models; Adding a plurality of line segments to the line segment model of the first object to be processed to obtain the added line segment model of the first object to be processed; Constructing a surface model of the first object to be processed according to the added line segment model of the first object to be processed; Performing mesh conversion processing on the to-be-processed first object mesh model to obtain at least two target first object models.

7. The object generation method according to claim 1, characterized in that: The determining of at least two first object line segment models comprises: Determining a first curve and a second curve, wherein virtual nodes included in the first curve and the second curve are arranged according to a node arrangement order; Drawing node lines between virtual nodes of the first curve and virtual nodes of the second curve according to the node arrangement order corresponding to the first curve to obtain a first object line segment model; The steps of determining the first curve and the second curve are continuously performed until at least two first object line segment models are obtained.

8. The object generation method according to any one of claims 1 to 7, characterized in that: After obtaining at least two target first object models, the method further includes: Determining a target first object model to be processed from the at least two target first object models, wherein the target first object model to be processed is any one of the at least two target first object models; According to the first curve and the second curve corresponding to the first object model of the target to be processed, mapping processing is performed on the first object model of the target to be processed to obtain a mapping surface; According to the normal direction of the mapping surface, the moving directions of the first curve and the second curve are adjusted to generate at least two target second object models.

9. The object generation method according to claim 8, characterized in that: After obtaining at least two target first object models, the method further includes: Determine a curve to be processed from the first curve and the second curve corresponding to the first object model of the target to be processed, wherein the curve to be processed is any one of the first curve and the second curve corresponding to the first object model of the target to be processed; Adjusting the shape of the to-be-processed curve to obtain an adjusted to-be-processed curve; Determine the plane of the adjusted curve to be processed in the vertical direction, and map the adjusted curve to be processed according to the normal line to obtain a target curve; Perform terrain height mapping on the target curve to obtain at least two target third object models.

10. The object generation method according to claim 9, characterized in that: Also includes: Merging the at least two target second object models and the at least two target third object models to obtain at least two target merged object models; A target virtual scene is generated according to the at least two target first object models and the at least two target merged object models.

11. A river generation method, characterized in that: include: Determine at least two river segment models, and generate at least two reference river models according to the at least two river segment models; Determining an overlapping river area between any two reference river models in the at least two reference river models; According to the overlapping river area, mapping the at least two river segment models to obtain a mapping result; When it is determined according to the mapping result that the overlapping river area and any one of the at least two river segment models overlap, determining the overlapping segments in the overlapping river segment model; According to the overlapping river areas, the overlapping line segments are adjusted to obtain at least two target river models.

12. A computing device, characterized in that: include: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the method described in any one of claims 1 to 11 are implemented.

13. A computer-readable storage medium, characterized in that: It stores a computer program / instruction, which implements the steps of the method described in any one of claims 1 to 11 when executed by a processor.