Mountain range model generation method and device, electronic equipment and storage medium

By generating the trend line and model scaling value screening of the mountain model, the complex and time-consuming problem of mountain model generation is solved, and efficient and automatic generation of mountain models with vein trends is achieved, reducing development costs.

CN120298609APending Publication Date: 2025-07-11YIDIAN LINGXI INFORMATION TECHNOLOGY (GUANGZHOU) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510194081.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-20
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

The generation process of Shanshan Mountain models in the prior art is complex, consuming a lot of manpower and time, resulting in slow and inefficient development progress.

Method used

By generating the trend line of the target mountain model, the base profile is determined based on the preset height field, and the model scaling value is determined based on the shortest distance from each generated point to the base profile, the target generation point is filtered, and the preset model is imported to generate the target mountain model.

Benefits of technology

This has improved the production speed of mountain models, reduced development costs, and realized the automatic generation of mountain models with vein trends.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120298609A_ABST
    Figure CN120298609A_ABST
Patent Text Reader

Abstract

The invention relates to a mountain range model generation method and device, electronic equipment and a storage medium, and the method comprises the steps: responding to an import instruction of a preset height field, and generating a trend line of a target mountain range model, the preset height field being used for determining a base contour of the target mountain range model; according to the shortest distance from each generation point on the trend line to the edge of the substrate contour, determining a model scaling value corresponding to each generation point; and screening the generation points based on the model scaling values, determining target generation points, and respectively importing a preset model into each target generation point to generate the target mountain range model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of model generation, and more particularly, to a method, apparatus, electronic device, and storage medium for generating a mountain range model. Background Art

[0002] With the rapid development of the game industry, virtual scenes, as an important part of games, provide a virtual space for users to explore, interact, and challenge. Currently, in order to create a more realistic virtual scene, the virtual scene needs to include virtual objects such as vegetation, rivers, mountains, and roads. The generation of mountain range models is relatively complex, which involves a huge amount of production or editing work. Although manual step-by-step production can achieve the goal, it requires a huge amount of manpower and time. Moreover, due to being too complicated in parallel, post-error correction is also required, resulting in slow and inefficient development progress. Summary of the Invention

[0003] An object of an embodiment of the present disclosure is to provide a new technical solution for generating a mountain range model.

[0004] According to a first aspect of the present disclosure, there is provided a method for generating a mountain range model, the method comprising:

[0005] Responding to an import instruction of a preset height field, generating a trend line of a target mountain range model, wherein the preset height field is used to determine a base contour of the target mountain range model;

[0006] Determining a model scaling value corresponding to each generation point according to a shortest distance from each generation point on the trend line to an edge of the base contour;

[0007] Based on the model scaling value, screening the generation points to determine target generation points, and respectively importing a preset model into each of the target generation points to generate the target mountain range model.

[0008] Optionally, the generating the trend line of the target mountain range model includes:

[0009] Removing a part with a height of zero in the preset height field to obtain the base contour;

[0010] Determining the trend line of the target mountain range model according to a contour line of the base contour, and refining the trend line.

[0011] Optionally, the refining the trend line includes:

[0012] Dividing the trend line into a plurality of line segments, and using endpoints of each of the line segments as the generation points;

[0013] Merge continuous line segments and determine the length of the line segment where the end generation point on the trend line is located, where the end generation point is adjacent to one generation point;

[0014] Delete the line segments with lengths less than the first threshold and the corresponding end generation points.

[0015] Optionally, after streamlining the trend line, the method further includes:

[0016] Determine the orientation of the cross-generation point based on the distance between the cross-generation point and the adjacent generation points, where the cross-generation point is adjacent to at least three different generation points.

[0017] Optionally, the screening the generation points based on the model scaling value to determine the target generation points includes:

[0018] Construct a planar geometric body at each generation point according to the model scaling value;

[0019] Detect each planar geometric body in turn, and delete the generation points of the planar geometric body that overlap or are tangent to other planar geometric bodies to obtain the target generation points.

[0020] Optionally, the preset model includes a mountain body model, a mountain ridge model, and a mountain foot model. The importing the preset model into each of the target generation points to generate the target mountain range model includes:

[0021] Based on a preset occurrence probability, randomly determine the mountain foot generation points among the target generation points other than the cross-generation points;

[0022] Import the mountain body model into the target generation points other than the cross-generation points and the mountain foot generation points, import the mountain ridge model into the cross-generation points, and import the mountain foot model into the mountain foot generation points;

[0023] Merge the lines of all the models to generate the target mountain range model.

[0024] Optionally, the preset model includes at least two different mountain body models. The importing the mountain body model into the target generation points other than the cross-generation points and the mountain foot generation points includes:

[0025] Randomly import the at least two different mountain body models into the target generation points other than the cross-generation points and the mountain foot generation points;

[0026] Before merging the lines of all the models to generate the target mountain range model, the method further includes: randomly adjusting the orientation in the mountain foot model.

[0027] According to a second aspect of the present disclosure, there is also provided a generating device for a mountain range model, the device including:

[0028] A response module, configured to generate a trend line of a target mountain range model in response to an import instruction of a preset height field, where the preset height field is used to determine a base contour of the target mountain range model;

[0029] A determination module, configured to determine a model scaling value corresponding to each generation point according to the shortest distance from each generation point on the trend line to an edge of the base contour;

[0030] A generation module, configured to screen the generation points based on the model scaling value, determine target generation points, and respectively import a preset model into each of the target generation points to generate the target mountain range model.

[0031] According to a third aspect of the present disclosure, there is also provided an electronic device, including a memory and a processor, where a computer program is stored in the memory, and the processor is configured to execute the above-mentioned method for generating a mountain range model through the computer program.

[0032] According to a fourth aspect of the present disclosure, there is also provided a computer-readable storage medium, in which a computer program is stored, where the computer program is configured to execute the above-mentioned method for generating a mountain range model when running.

[0033] One beneficial effect of the embodiments of the present disclosure is that the method for generating a mountain range model provided by the embodiments of the present disclosure can generate a trend line of a target mountain range model based on the import of a preset height field, and determine a model scaling value corresponding to each generation point according to the shortest distance from each generation point on the trend line to an edge of the base contour. Then, the generation points are screened based on the model scaling value, target generation points are determined, and a preset model is imported into the target generation points to generate the target mountain range model. In this way, the user can automatically generate a mountain range model with a vein trend according to the preset height field, improving the production speed of the mountain range model and reducing the development cost.

[0034] Through the following detailed description of the exemplary embodiments of the present specification with reference to the accompanying drawings, the features and advantages of the embodiments of the present specification will become clear. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] The drawings incorporated in the specification and constituting a part of the specification illustrate embodiments of the present specification, and together with the description are used to explain the principles of the embodiments of the present specification.

[0036] Figure 1 Shows a schematic hardware structure diagram of an electronic device that can be used to implement the method for generating a mountain range model according to an embodiment of the present disclosure;

[0037] Figure 2 A flowchart showing a method for generating a mountain range model according to some embodiments;

[0038] Figure 3 A schematic diagram showing a base contour according to some embodiments;

[0039] Figure 4 A schematic diagram showing generation points and planar geometric bodies according to some embodiments;

[0040] Figure 5 A schematic structural diagram showing a device for generating a mountain range model according to some embodiments;

[0041] Figure 6 A schematic diagram of the hardware structure of an electronic device according to some embodiments. Detailed implementation manners

[0042] Various exemplary embodiments of the present specification will now be described in detail with reference to the accompanying drawings.

[0043] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the embodiments of the present specification, their applications, or uses.

[0044] It should be noted that like reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further discussed in subsequent drawings.

[0045] It should be noted that all actions of obtaining signals, information, or data in the embodiments of the present disclosure are carried out on the premise of complying with the corresponding data protection regulations and policies of the country where it is located and with the authorization given by the corresponding device owner.

[0046] The embodiments of the present disclosure provide a new method, device, electronic device, and computer program for generating a mountain range model.

[0047] Figure 1 A schematic diagram of the hardware structure of an alternative electronic device 1000 for implementing the virtual asset trading method according to the embodiments of the present disclosure is shown. The electronic device 1000 is installed with a programmed modeling tool or program. The electronic device 1000 can be any terminal device such as a mobile phone, a tablet computer, a PC, etc. that can run a virtual asset trading platform.

[0048] As Figure 1 shown, the electronic device 1000 may include a processor 1101, a memory 1102, an interface device 1103, a communication device 1104, an output device 1105, an input device 1106, and so on. Figure 1The hardware configuration shown is merely illustrative and is in no way intended to limit the present disclosure, its applications, or uses.

[0049] The processor 1101 is used to execute a computer program, which can be written in an instruction set of architectures such as x86, Arm, RISC, MIPS, SSE, etc. The memory 1102 includes, for example, ROM (read-only memory), RAM (random access memory), non-volatile memory such as a hard disk, etc. The interface device 1103 includes, for example, a USB interface, a network cable interface, a headphone interface, etc. The communication device 1104 can perform wired or wireless communication, for example. The communication device 1104 can include at least one short-range communication module, for example, any module that performs short-range wireless communication based on short-range wireless communication protocols such as the Hilink protocol, WiFi (IEEE 802.11 protocol), Mesh, Bluetooth, ZigBee, Thread, Z-Wave, NFC, UWB, LiFi, etc. The communication device 1104 can also include a remote communication module, for example, any module that performs WLAN, GPRS, 2G / 3G / 4G / 5G remote communication. The output device 1105 can include, for example, a liquid crystal display screen or a touch display screen, a speaker, etc. The input device 1106 can include, for example, a touch screen, a keyboard, a microphone, various sensors, etc.

[0050] In this embodiment, the memory 1102 of the electronic device 1000 is used to store a computer program, which is used to control the processor 1101 to operate to execute the method for generating a mountain model according to any embodiment of the present disclosure.

[0051] Next, taking the electronic device 1000 as an example of the implementation subject, various embodiments of the method for generating a mountain model will be described. Figure 1 For example, various embodiments of the method for generating a mountain model will be described by taking the electronic device 1000 as the implementation subject.

[0052] <First Embodiment>

[0053] Figure 2 A method for generating a mountain model according to some embodiments is shown. It can be implemented by a procedural modeling tool, such as Houdini, Blender, or Archimatix Pro, etc. Each step in the method can also be implemented based on various node functions in the procedural modeling tool. The method for generating a mountain model can include the following steps S210 to step S240:

[0054] Step S210, in response to an import instruction of a preset height field, generate a trend line of the target mountain model, where the preset height field is used to determine the base contour of the target mountain model.

[0055] In the embodiments of the present application, the preset height field refers to a field in which each point in the reference horizontal plane has a corresponding height value. It is a two-dimensional array composed of height values. The user can roughly determine those positions in the reference horizontal plane where mountains need to be generated, that is, the base contour of the target mountain model, by inputting the preset height field. Taking the base horizontal plane (X - Y) of the mountain body model as an example, the base horizontal plane is perpendicular to the height field extension direction Z-axis of the mountain body model, and the base contour is the two-dimensional projection boundary definition of the mountain body model on this plane. In this example, when the user imports the preset height field, specific height values do not need to be imported, and only 0 or non-zero values are required to distinguish the base contour of the mountain model.

[0056] In this example, the preset height field can be imported in the form of a mask (Mask) map. A mask map is a tool used to identify or control specific areas in an image, usually existing in a binary form to mark the target area. In this example, it can be used to mark the base contour of the mountain model. As Figure 3 shown, Figure 3 The outside is the base horizontal plane of the mountain model, and there are three irregular figures inside which are the base contours of the mountain models to be generated.

[0057] After determining the base contour, first, the coordinate information of the contour line needs to be extracted. Subsequently, using the distance transformation technique, calculate the shortest Euclidean distance from each point inside the contour to the nearest contour boundary to generate a distance field image. At this time, the area where the maximum distance value is located corresponds to the geometric center trend line of the object. On this basis, perform topological processing on the distance field through a thinning algorithm, layer by layer peeling off the outer points until a single-width central skeleton line is retained. To optimize the result, morphological opening operations are often combined to remove small branches, the depth-first search algorithm is used to trace the main skeleton path, and key nodes are smoothed through curvature analysis. Finally, a skeleton line that can reflect both the topological characteristics of the object and geometric symmetry is obtained as the trend line of the mountain model.

[0058] Step S220, determine the model scaling value corresponding to each generation point according to the shortest distance from each generation point on the trend line to the edge of the base contour.

[0059] In the embodiments of the present application, after obtaining the trend line of the mountain body model, based on a preset rule, sampling can be performed on the trend line to obtain multiple points as generation points. In this example, sampling points can be sequentially determined on the trend line according to a preset distance. In this example, to make the mountain model more realistic and continuous, as many points as possible can be sampled as generation points. Then, screening is performed.

[0060] After determining the generation points, the shortest distance from each generation point to the base contour can be calculated in sequence. Then, based on the shortest distance of each generation point, the model scaling value when the point is imported into the model can be determined. For example, the product of the global scaling coefficient, the scaling intensity parameter, and the shortest distance can be used as the model scaling value corresponding to the point. In another example, the minimum value of the model scaling value can also be set, and the minimum value and the maximum value in the aforementioned product can be used as the model scaling value to avoid numerical problems or model problems caused by too small a size.

[0061] Step S230: Screen the generation points based on the model scaling value, determine the target generation points, and import the preset model into each target generation point respectively to generate the target mountain model.

[0062] In this example, since the number of generation points is large, generating models for all of them will cause a problem of waste of processing resources. Therefore, the generation points can be screened based on the model scaling value first. For example, taking one end point of each trend line as the starting point, the distance between each generation point and the previous generation point can be determined in sequence. Whether it is less than the product of the sum of the model scaling values of this point and the previous point and the preset coefficient. If it is less, it means that the distance between the model generated by this point and the model generated by the previous point is too close, and the mountain generation effect is poor. Therefore, this point can be deleted and the next generation point can be screened continuously. Finally, multiple target generation points with appropriate distances are determined.

[0063] In another example of this embodiment, screening the generation points based on the model scaling value to determine the target generation points includes: constructing a planar geometric body at each generation point according to the model scaling value; detecting each planar geometric body in sequence, and deleting the generation points of the planar geometric bodies that overlap or are tangent to other planar geometric bodies to obtain the target generation points.

[0064] In this example, a planar geometric body can be constructed according to the model scaling value. The planar geometric body can be a regular polygon or a circle, etc. Then, each planar geometric body at each generation point can be detected in sequence. For example, taking one end point of each trend line as the starting point, it is determined in sequence whether the planar geometric body of each generation point overlaps or is tangent to the remaining planar geometric bodies. If so, delete this generation point. If not, retain this generation point. Finally, all target generation points are obtained, as Figure 4 shown.

[0065] In another example, the above method can be implemented through various nodes in a procedural modeling tool such as Houdini. For example, through a foreach node group, a for loop is established with the aim of sequentially executing the loop point by point on the generated points for detection. Specifically, through an intersectionanalysis node, the planar geometries of two generated points are cross-detected, and the intersection points based on the detected objects are judged. Then, through a switch3 node, the intersection node is referenced to determine whether the number of intersection points is greater than 0. If it is greater, channel 1 is returned; otherwise, channel 0 is returned. The purpose is to filter out the points that fail the collision detection. After that, through a group node, the points determined to be target generated points through the detection are named, and the generated points that fail and the corresponding planar geometries are filtered through a switch2 node or merged with an empty node through a merge node for screening and removal.

[0066] After determining the target generated points, a preset model can be imported into the generated points, the model is scaled based on the model scaling value, and all the models are fused to obtain a target mountain range model.

[0067] In this example, a method for generating a mountain range model is provided. Based on the import of a preset height field, the trend line of the target mountain range model can be generated, and according to the shortest distance from each generated point on the trend line to the edge of the base contour, the model scaling value corresponding to each generated point is determined. Then, based on the model scaling value, the generated points are screened to determine the target generated points, and the preset model is imported into the target generated points to generate the target mountain range model. In this way, users can automatically generate a mountain range model with a vein trend according to the preset height field, improving the production speed of the mountain range model and reducing the development cost.

[0068] <Second Embodiment>

[0069] In the second embodiment, in order to simplify the mountain range model optimization process and processing volume and improve the generation speed of the mountain range model, the trend line can be streamlined during the process of generating the trend line.

[0070] In these embodiments, compared with the above first embodiment, in this step S210, it may include the following steps S310 and S320:

[0071] Step S310, removing the part with a height of zero in the preset height field to obtain the base contour.

[0072] In this example, the part with a height of zero in the preset height field, that is, the non-mountain part, can be deleted, and then imported in the form of a Mask map, and the base contour of the mountain range model can be directly obtained.

[0073] In another example, the above method can be implemented through various nodes in procedural modeling tools such as Houdini. For example, in the heightfield_file node, load the Mask map, convert the heightfield node, and convert the heightfield into the base polygon of the mountain model. Then, through the divide node, delete the internal face of the polygon and only keep the edge outline, which provides conditions for the subsequent calculation of trend lines and edge distances, reduces the amount of calculation, and improves the preview speed.

[0074] Step S320, determining the trend line of the target mountain model according to the contour line of the base contour, and simplifying the trend line.

[0075] In one example, in addition to the method of determining the trend line of the target mountain model in the first embodiment, the polygon skeleton line can also be calculated as the trend line through the straight_skeleton_2D node in a procedural modeling tool such as Houdini.

[0076] After obtaining the trend line, there may be redundant lines, overlapping lines, etc. in the trend line, which can be deleted or merged to simplify the trend line and reduce the amount of subsequent calculations.

[0077] In an example of the present embodiment, the trend line is simplified, including: dividing the trend line into multiple line segments, and using the endpoint of each line segment as a generating point; merging continuous line segments, and determining the length of the line segment where the terminal generating point on the trend line is located, wherein the terminal generating point is adjacent to one generating point; and deleting line segments whose length is less than a first threshold and the corresponding terminal generating points.

[0078] In this example, the trend line can be divided into multiple line segments based on preset conditions, and the endpoints of each line segment are used as generating points. In this example, the preset conditions can be set based on the spacing and / or based on the slope of the curve. The generating points can be further simplified, and the generating points with a distance less than a threshold can be merged. After that, the continuous line segments can be merged into one line segment. Specifically, the adjacent line segments whose slope difference is within a preset interval can be merged into one line segment.

[0079] In this example, the spawn points can be divided into three categories, which can be distinguished based on the number of spawn points adjacent to the spawn point on the trend line. In this example, the spawn points adjacent to only one spawn point are terminal spawn points, the spawn points adjacent to two spawn points are regular spawn points in the trend line, and the spawn points adjacent to three or more spawn points are intersection spawn points at the intersection of the trend lines.

[0080] In one example, line segments adjacent to the end generation points can be extracted, and then it is detected whether the length of the line segment is less than a preset threshold. If the line segment is less than the threshold, it indicates that the trend line corresponding to the end generation point is a relatively thin branch. At this time, the end generation point and the corresponding line segment can be deleted to further optimize the trend line.

[0081] In one example of this embodiment, after streamlining the trend line, the method further includes: determining the orientation of the intersection generation point based on the distance between the intersection generation point and adjacent generation points, where the intersection generation point is adjacent to at least 3 different generation points.

[0082] In this example, since the intersection point corresponds to multiple trend lines, when generating the mountain range model, in order to make the model more natural, it is necessary to determine the orientation corresponding to the intersection generation point. In this example, it can be determined based on the distances between the intersection generation point and all other adjacent generation points. In this example, the direction of the adjacent point with the shortest distance can be used as the orientation of the intersection generation point. In another example, through the Vex (Vector Expression Language) script in the procedural modeling tool, the orientation of the intersection point can be determined based on the distances between the intersection generation point and adjacent generation points through the corresponding Vex code.

[0083] <Third Embodiment>

[0084] In this embodiment, in order to construct a more diverse mountain range model, the specific generation method of the mountain range model can be optimized.

[0085] In these embodiments, compared with the above-mentioned second embodiment, step S230 may include the following steps S410 to S430:

[0086] Step S410, based on a preset appearance probability, randomly determine the foot-of-the-mountain generation points among the target generation points other than the intersection generation points.

[0087] Step S420, import the mountain body model into the target generation points other than the intersection generation points and the foot-of-the-mountain generation points, import the mountain ridge model into the intersection generation points, and import the foot-of-the-mountain model into the foot-of-the-mountain generation points.

[0088] Step S430, merge the lines of all the models to generate the target mountain range model.

[0089] In this embodiment, in order to make the mountain range model more realistic, the preset model may include a mountain body model, a mountain ridge model, and a mountain foot model. The number of each type of model may include one or more, and those skilled in the art can set it according to diversity requirements and costs. In this example, based on the preset probability of the appearance of the mountain foot, the mountain foot generation points can be randomly determined among the generation points outside the intersection generation points, so as to generate the mountain foot, making the mountain range model undulate and improving the authenticity of the mountain range model. After that, the mountain foot model can be imported into the mountain foot generation points, the mountain ridge model into the intersection generation points, the mountain body model into the remaining generation points, and all the model lines can be merged to generate the mountain range model.

[0090] In another example of this embodiment, the preset model includes at least two different mountain body models. Importing the mountain body models into the target generation points outside the intersection generation points and the mountain foot generation points includes: randomly importing at least two different mountain body models into the target generation points outside the intersection generation points and the mountain foot generation points; before merging all the model lines to generate the target mountain range model, the method further includes: randomly adjusting the orientation in the mountain foot model.

[0091] In this example, the mountain body model may include multiple models, and these multiple models can be randomly imported into the generation points. In addition, for the mountain foot model, when generating, the orientation of the mountain foot model can be randomly adjusted to make the generated model more diverse.

[0092] In this example, a method for generating a mountain range model is provided. A complete mountain range model can be generated with only a small number of models. At the same time, because the model scaling values of each generation point are different, and the mountain foot and mountain body models are randomly distributed, and the orientation of the mountain foot model is also random, the mountain range model as a whole will not be simply considered by users as a stack of models, and the model effect that meets the user's needs can be generated with the least model resources.

[0093] <Device Embodiment>

[0094] Figure 5 The composition structure diagram of the device for generating a mountain range model according to an embodiment of the present disclosure is shown. As Figure 5 shown, the device 500 for generating a mountain range model includes a response module 510, configured to generate a trend line of a target mountain range model in response to an import instruction of a preset height field, where the preset height field is used to determine the base contour of the target mountain range model; a determination module 520, configured to determine the model scaling value corresponding to each generation point according to the shortest distance from each generation point on the trend line to the edge of the base contour; a generation module 530, configured to screen the generation points based on the model scaling value to determine the target generation points, and import the preset models into each target generation point respectively to generate the target mountain range model.

[0095] In some embodiments, the response module 510 is specifically configured to: remove the part with a height of zero in the preset height field to obtain the base contour; determine the trend line of the target mountain model according to the contour line of the base contour, and streamline the trend line.

[0096] In some embodiments, streamlining the trend line includes: dividing the trend line into multiple line segments, and using the endpoints of each line segment as generation points; merging consecutive line segments, determining the length of the line segment where the end generation point on the trend line is located, where the end generation point is adjacent to one generation point; deleting the line segments with a length less than the first threshold and the corresponding end generation points.

[0097] In some embodiments, the device further includes: an orientation determination module, configured to determine the orientation of the intersection generation point based on the distance between the intersection generation point and the adjacent generation points after streamlining the trend line, where the intersection generation point is adjacent to at least three different generation points.

[0098] In some embodiments, the generation module is specifically configured to: construct a planar geometric body at each generation point according to the model scaling value; sequentially detect each planar geometric body, and delete the generation points of the planar geometric body that overlap or are tangent to other planar geometric bodies to obtain the target generation points.

[0099] In some embodiments, the preset model includes a mountain body model, a mountain ridge model, and a mountain foot model. The generation module is further configured to: randomly determine mountain foot generation points among the target generation points other than the intersection generation points based on the preset appearance probability; import the mountain body model into the target generation points other than the intersection generation points and the mountain foot generation points, import the mountain ridge model into the intersection generation points, and import the mountain foot model into the mountain foot generation points; merge the lines of all the models to generate the target mountain model.

[0100] In some embodiments, the preset model includes at least two different mountain body models. Importing the mountain body model into the target generation points other than the intersection generation points and the mountain foot generation points includes: randomly importing at least two different mountain body models into the target generation points other than the intersection generation points and the mountain foot generation points; before merging the lines of all the models to generate the target mountain model, the method further includes: randomly adjusting the orientation in the mountain foot model.

[0101] <Device Embodiment>

[0102] Figure 6 The hardware structure diagram of an electronic device according to some other embodiments is shown. As Figure 6 shown, the electronic device 600 includes a processor 610 and a memory 620. The memory 620 is used to store a computer program, and the computer program is used to control the processor 610 to operate to control the electronic device 600 to execute the method for generating a mountain model according to any embodiment of the present disclosure.

[0103] An embodiment of the present disclosure also provides a computer-readable storage medium storing a computer program, which when executed by a processor, implements the method for generating a mountain model according to any embodiment of the present disclosure.

[0104] An embodiment of the present disclosure also provides a computer program product, which includes a computer program or instruction that, when executed by a processor, implements the method for generating a mountain model according to any embodiment of the present disclosure. The computer program product is, for example, a game client.

[0105] The embodiments in this specification are all described in a progressive manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the device and equipment embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can refer to the description of the method embodiments.

[0106] The specific embodiments of this specification have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be executed in a different order from that in the embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require the specific order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0107] The embodiments of this specification can be devices, methods, and / or computer program products. The computer program products can include computer-readable storage media having computer-readable program instructions thereon for causing a processor to implement various aspects of the embodiments of this specification.

[0108] A computer-readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device. A computer-readable storage medium may be, for example—but not limited to—an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disc (DVD), a memory stick, a floppy disk, a mechanically encoded device such as a punch card or raised structures in grooves having instructions stored thereon, and any suitable combination of the foregoing. The computer-readable storage medium as used herein is not construed as an instantaneous signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated through a waveguide or other transmission medium (e.g., an optical pulse through an optical fiber cable), or an electrical signal transmitted through a wire.

[0109] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to respective computing / processing devices, or can be downloaded to an external computer or an external storage device through a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network may include a copper transmission cable, an optical fiber transmission, a wireless transmission, a router, a firewall, a switch, a gateway computer, and / or an edge server. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing / processing device.

[0110] The computer program instructions for performing the operations of the embodiments of this specification may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state-setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or it may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, by using the state information of the computer-readable program instructions to customize an electronic circuit, such as a programmable logic circuit, a field-programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit may execute the computer-readable program instructions to implement various aspects of the embodiments of this specification.

[0111] Aspects of the embodiments of this specification are described herein with reference to the flowcharts and / or block diagrams of methods, apparatus (devices), and computer program products according to the embodiments of this specification. It should be understood that each block of the flowcharts and / or block diagrams, and the combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.

[0112] These computer-readable program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus, thereby producing a machine such that when these instructions are executed by the processor of the computer or other programmable data processing apparatus, a device is produced that implements the functions / acts specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions may also be stored in a computer-readable storage medium, which causes a computer, a programmable data processing apparatus, and / or other devices to operate in a specific manner, so that the computer-readable medium storing the instructions includes a manufacture that includes instructions for implementing various aspects of the functions / acts specified in one or more blocks of the flowchart and / or block diagram.

[0113] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device, causing a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process such that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions / acts specified in one or more boxes of the flowchart and / or block diagram.

[0114] The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present specification. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a portion of an instruction, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two consecutive blocks may in fact be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block of the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented by a dedicated hardware-based system that performs the specified functions or acts, or by a combination of dedicated hardware and computer instructions. As will be apparent to those of ordinary skill in the art, implementations by hardware, by software, and by a combination of software and hardware are equivalent.

[0115] The embodiments of the present specification have been described above. The above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, the practical application, or improvements made to the technology in the market, or to enable other ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A method for generating a mountain range model, characterized in that, The method includes: Generating a trend line of a target mountain model in response to an import instruction of a preset height field, where the preset height field is used to determine the base contour of the target mountain model; Determining a model scaling value corresponding to each generation point according to the shortest distance from each generation point on the trend line to the edge of the base contour; Screening the generation points based on the model scaling value to determine target generation points, and respectively importing a preset model into each of the target generation points to generate the target mountain model.

2. The method according to claim 1, wherein The generating of the trend line of the target mountain model includes: Removing the part with a height of zero in the preset height field to obtain the base contour; Determining the trend line of the target mountain model according to the contour line of the base contour and streamlining the trend line.

3. The method according to claim 2, characterized in that, The streamlining of the trend line includes: Dividing the trend line into multiple line segments, and taking the endpoints of each line segment as the generation points; Merging consecutive line segments, determining the length of the line segment where the end generation point on the trend line is located, where the end generation point is adjacent to one generation point; Deleting the line segments with a length less than a first threshold and the corresponding end generation points.

4. The method according to claim 3, characterized in that, After streamlining the trend line, the method further includes: Determining the orientation of the intersection generation point based on the distance between the intersection generation point and adjacent generation points, where the intersection generation point is adjacent to at least three different generation points.

5. The method according to claim 1, wherein The screening of the generation points based on the model scaling value to determine target generation points includes: Constructing a planar geometric body at each generation point according to the model scaling value; Sequentially detecting each planar geometric body, and deleting the generation points of the planar geometric bodies that overlap or are tangent to other planar geometric bodies to obtain the target generation points.

6. The method according to claim 4, wherein The preset model includes a mountain body model, a mountain ridge model, and a mountain foot model. The respectively importing the preset model into each of the target generation points to generate the target mountain model includes: Based on a preset appearance probability, randomly determining mountain foot generation points among the target generation points other than the intersection generation points; Importing the mountain body model into the target generation points other than the intersection generation points and the mountain foot generation points, importing the mountain ridge model into the intersection generation points, and importing the mountain foot model into the mountain foot generation points; Merging the lines of all the models to generate the target mountain model.

7. The method according to claim 6, wherein The preset model includes at least two different mountain body models. The importing the mountain body model into the target generation points other than the intersection generation points and the mountain foot generation points includes: Randomly importing the at least two different mountain body models into the target generation points other than the intersection generation points and the mountain foot generation points; Before merging the lines of all the models to generate the target mountain model, the method further includes: randomly adjusting the orientation in the mountain foot model.

8. A generating device for a mountain range model, wherein, The device includes: A response module, configured to generate a trend line of a target mountain model in response to an import instruction of a preset height field, where the preset height field is used to determine the base contour of the target mountain model; A determination module, configured to determine a model scaling value corresponding to each generation point according to the shortest distance from each generation point on the trend line to the edge of the base contour; A generation module, configured to screen the generation points based on the model scaling value, determine target generation points, and respectively import a preset model into each of the target generation points to generate the target mountain range model.

9. An electronic device, wherein, It includes a memory and a processor, the memory is used to store a computer program, and the processor is configured to execute the method steps according to any one of claims 1 to 7 under the control of the computer program.

10. A computer-readable storage medium, the computer-readable storage medium including a stored computer program, wherein, When the computer program is run, it executes the method steps according to any one of claims 1 to 7.