Methods, apparatus and electronic equipment for generating rock assets
By scanning and stitching real rock images and performing deformation processing to generate rock assets, the problem of difficulty in achieving artistic design in existing technologies has been solved. This has enabled the generation of rock assets that meet artistic requirements, avoiding issues such as clipping and high costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NETEASE (HANGZHOU) NETWORK CO LTD
- Filing Date
- 2023-03-03
- Publication Date
- 2026-05-26
Smart Images

Figure CN116206080B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus and electronic device for generating rock assets. Background Technology
[0002] In the production of games, movies, and animations, it is often necessary to model objects and creatures in related virtual scenes. Among related technologies, the procedural generation method for creating model assets is a relatively new technology. For example, when creating rock assets, the shape and surface texture of the rock can be designed by artists. Generally, the rock shape is generated by noise superposition. The rock shape generated by this method is easily limited by the algorithm of the selected noise, making it difficult to generate the rock shape designed by the artists. Furthermore, since procedurally generated rocks are mostly generated randomly, the resulting shapes are diverse. It is easy to encounter the problem that it is impossible to find an asset result that matches the shape design from multiple generated assets, making it difficult to control the development time and meet the artistic effect. Summary of the Invention
[0003] The purpose of this invention is to provide a method, apparatus and electronic device for generating rock assets, so as to generate rock shapes designed by artists, while ensuring the development time and satisfying the artistic effect.
[0004] This invention provides a method for generating rock assets, comprising: determining a target base model and multiple rock scan assets based on the shape type of the target rock asset to be generated; wherein the rock scan assets are three-dimensional rock images obtained by scanning real rocks; the target base model is a three-dimensional model whose surface does not contain rock texture; stitching and integrating the multiple rock scan assets based on the target base model to obtain an integrated rock asset; in response to a deformation operation on the integrated rock asset, deforming the integrated rock asset onto the target base model to obtain a deformed rock asset; wherein the deformed rock asset contains rock detail information of the rock scan assets; and generating the target rock asset based on the deformed rock asset.
[0005] This invention provides a rock asset generation apparatus, comprising: a determining module, used to determine a target base model and multiple rock scan assets according to the shape type of the target rock asset to be generated; wherein, the rock scan assets are three-dimensional rock images obtained by scanning real rocks; the target base model is a three-dimensional model whose surface does not contain rock texture; a stitching and integration processing module, used to stitch and integrate the multiple rock scan assets based on the target base model to obtain an integrated rock asset; a deformation processing module, used to deform the integrated rock assets towards the target base model in response to a deformation operation on the integrated rock assets to obtain a deformed rock asset; wherein, the deformed rock asset contains rock detail information of the rock scan assets; and a generation module used to generate the target rock asset based on the deformed rock asset.
[0006] The present invention provides an electronic device, including a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor executes the machine-executable instructions to implement the rock asset generation method described above.
[0007] The present invention provides a machine-readable storage medium storing machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement any of the above-mentioned methods for generating rock assets.
[0008] The rock asset generation method, apparatus, and electronic device provided by this invention determine a target base model and multiple rock scan assets based on the shape type of the target rock asset to be generated. The rock scan assets are three-dimensional rock images obtained by scanning real rocks; the target base model is a three-dimensional model whose surface does not contain rock texture. Based on the target base model, the multiple rock scan assets are stitched and integrated to obtain an integrated rock asset. In response to a deformation operation on the integrated rock asset, the integrated rock asset is deformed onto the target base model to obtain a deformed rock asset. The deformed rock asset contains the rock detail information of the rock scan assets. The target rock asset is generated based on the deformed rock asset. This method integrates multiple rock scan assets and then deforms them onto the target base model. The deformed rock asset contains the rock detail information of the rock scan assets. Furthermore, because the target base model is determined according to the shape type of the target rock asset, the target rock asset generated based on the deformed rock asset conforms to the design, satisfying both development time and aesthetic requirements. Attached Figure Description
[0009] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0010] Figure 1 A flowchart of a rock asset generation method provided in an embodiment of the present invention;
[0011] Figure 2 A schematic diagram of a target basic model provided in an embodiment of the present invention;
[0012] Figure 3 A schematic diagram of a reference sub-model provided in an embodiment of the present invention;
[0013] Figure 4 A schematic diagram of a rock scan asset provided in an embodiment of the present invention;
[0014] Figure 5 A schematic diagram of a deformed rock scan asset provided as an embodiment of the present invention;
[0015] Figure 6 This is a schematic diagram of the interior of a reference sub-model provided in an embodiment of the present invention;
[0016] Figure 7 A schematic diagram of a spliced rock asset provided in an embodiment of the present invention;
[0017] Figure 8 A schematic diagram of a spliced rock asset provided in an embodiment of the present invention;
[0018] Figure 9 This is a schematic diagram of a spliced rock asset provided in an embodiment of the present invention.
[0019] Figure 10 A schematic diagram of a spliced rock asset provided in an embodiment of the present invention;
[0020] Figure 11 A schematic diagram of a spliced rock asset provided in an embodiment of the present invention;
[0021] Figure 12 A schematic diagram of a combined rock asset provided in an embodiment of the present invention;
[0022] Figure 13 A cross-sectional view of a composite rock asset before voxelization, provided as an embodiment of the present invention;
[0023] Figure 14A cross-sectional view of a voxel rock asset provided in an embodiment of the present invention;
[0024] Figure 15 A schematic diagram of an integrated rock asset before deformation, provided as an embodiment of the present invention;
[0025] Figure 16 A schematic diagram of a deformed rock asset provided in an embodiment of the present invention;
[0026] Figure 17 A schematic diagram of a rock asset before sharpening, provided as an embodiment of the present invention;
[0027] Figure 18 A schematic diagram of a sharpened rock asset provided in an embodiment of the present invention;
[0028] Figure 19 This is a schematic diagram illustrating the effect of smoothing the surface of a rock asset before applying a smooth normal, as provided in an embodiment of the present invention.
[0029] Figure 20 A schematic diagram of a rock asset surface after smoothing normals, provided for an embodiment of the present invention;
[0030] Figure 21 This is a schematic diagram of a displacement effect provided in an embodiment of the present invention;
[0031] Figure 22 This is a schematic diagram of a displacement effect provided in an embodiment of the present invention;
[0032] Figure 23 A schematic diagram of rock assets before replacement is provided as an embodiment of the present invention;
[0033] Figure 24 A schematic diagram of a replaced rock asset provided in an embodiment of the present invention;
[0034] Figure 25 This is a schematic diagram of a rock asset generation device provided in an embodiment of the present invention;
[0035] Figure 26 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0036] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0037] In the production of games, movies, animations, etc., it is usually necessary to model objects and creatures in related virtual scenes. Traditional modeling methods mainly include using sculpting software, such as ZBrush, to create creatures and natural objects; using software such as 3ds Max to create mechanical structures; or creating corresponding digital models by scanning real-world objects. Procedural modeling methods, such as using Houdini software, can also be used to generate model assets.
[0038] The aforementioned technologies suffer from the following problems: Model assets created through sculpting or modeling have long production cycles, require high artistic skills, and exhibit varying quality and style among assets produced by different artists. Furthermore, if a batch of similar assets needs to be produced, each individual asset requires an equivalent amount of human resources. Using real-world object scanning to create models requires that the models be real-world objects. For games, films, and animations, virtual scenes that differ from the real world are often involved, and the models within these scenes are often artistically designed and differ from reality. Therefore, the real-world object scanning method is unsuitable in many situations. Procedural generation for model assets is a relatively new technology; however, this method typically uses noise perturbation to create rock textures, failing to represent the diverse rock textures found in nature. Converting procedural models to voxel assets and then back to mesh assets during the production process can easily result in the loss of model details. Additionally, when adding details to models through displacement techniques, clipping defects can easily occur in areas with sharp topological structures.
[0039] Among the aforementioned technologies, procedural generation is more in line with the art design style when generating rock assets. Rocks are fictional objects suspended in the air. Their shapes and surface textures are designed by artists. To save production costs and mass-produce similar types of rocks, procedural generation is the best option.
[0040] Previous methods of generating rock shapes using noise overlay are limited by the algorithm of the selected noise, and it is difficult to reproduce the rock shapes designed by artists. This makes development time difficult to control, and creating art tools by modifying noise parameters is not user-friendly for artists. Furthermore, since procedurally generated rocks are often randomly generated, the resulting shapes are diverse, which can lead to the problem of not being able to find a specific result that matches the desired shape design among multiple generated assets. In addition, displacement, as a way to add details to the model, is prone to clipping problems. This is mainly because displacement moves the model's vertex positions along the normal direction, and in areas of the model where the normal changes drastically, displacement can easily cause clipping problems. Based on this, embodiments of the present invention provide a method, apparatus, and electronic device for generating rock assets. This technology can be applied to applications that need to generate rock assets in virtual scenes.
[0041] To facilitate understanding of this embodiment, a method for generating rock assets disclosed in this embodiment of the invention will first be introduced, such as... Figure 1 As shown, the method includes the following steps:
[0042] Step S102: Based on the shape type of the target rock asset to be generated, determine the target base model and multiple rock scan assets; wherein, the rock scan assets are three-dimensional rock images obtained by scanning real rocks; the target base model is a three-dimensional model whose surface does not contain rock texture.
[0043] The target rock asset to be generated can be understood as the rock asset that the user ultimately wants to create. The shape of the target rock asset can be any shape, such as a cuboid, cube, or inverted cone. The target base model is usually a three-dimensional model that matches the shape of the target rock asset to be generated. For example, if the target rock asset is inverted cone, the target base model is usually also inverted cone. The target base model is usually a simple model, and its surface does not contain specific rock textures. The rock scan assets are usually three-dimensional rock images obtained by scanning real rocks that exist in reality. In actual implementation, when it is necessary to generate rock assets, a target base model with a matching shape can be determined first according to the shape of the target rock asset to be generated, and multiple rock scan assets can be obtained.
[0044] Step S104: Based on the target base model, multiple rock scan assets are stitched together to obtain integrated rock assets.
[0045] After determining the target base model and multiple rock scan assets, the multiple rock scan assets can be stitched together based on the target base model. For example, if the target base model is an inverted cone shape, a rock scan asset with a smooth upper surface that matches the shape can be selected from multiple rock scan assets and stitched together with a rock scan asset with an inverted cone shape on the lower surface to obtain integrated rock assets.
[0046] Step S106: In response to the deformation operation on the integrated rock asset, the integrated rock asset is deformed towards the target base model to obtain the deformed rock asset; wherein the deformed rock asset contains rock detail information of the rock scan asset.
[0047] After obtaining the integrated rock assets, the stitching marks of multiple scanned rock assets are usually quite obvious, and the connection between different scanned rock assets is clearly visible. At this time, the integrated rock assets can be deformed with reference to the target base model to obtain deformed rock assets. This deformation process does not completely transform the integrated rock assets into the shape of the target base model, but retains the rock detail information of the stitched rock scan assets in the deformed rock assets.
[0048] Step S108: Generate the target rock asset based on the deformed rock asset.
[0049] After obtaining the deformed rock assets, the target rock assets can be generated based on them. For example, the deformed rock assets can be sharpened, and detailed displacement processes can be added to obtain the final target rock assets to be generated.
[0050] The aforementioned method for generating rock assets determines a target base model and multiple scanned rock assets based on the shape type of the target rock asset to be generated. The scanned rock assets are 3D rock images obtained by scanning real rocks; the target base model is a 3D model whose surface does not contain rock texture. Based on the target base model, the multiple scanned rock assets are stitched together to obtain an integrated rock asset. In response to a deformation operation on the integrated rock asset, the integrated rock asset is deformed onto the target base model to obtain a deformed rock asset. The deformed rock asset contains the rock detail information of the scanned rock assets. The target rock asset is then generated based on the deformed rock asset. This method integrates multiple scanned rock assets and deforms them onto the target base model. The deformed rock asset not only contains the rock detail information of the scanned rock assets, but also, because the target base model is determined based on the shape type of the target rock asset, the target rock asset generated based on the deformed rock asset conforms to the design, satisfying both development time and aesthetic requirements.
[0051] In an optional implementation, the method is based on the method of the above embodiments, and includes the following steps:
[0052] Step 1: In response to the selection operation for the shape type of the target rock asset to be generated, the target base model and multiple rock scan assets are determined according to the selection operation; wherein, the rock scan assets are three-dimensional rock images obtained by scanning real rocks; the target base model is a three-dimensional model whose surface does not contain rock texture.
[0053] like Figure 2 The diagram illustrates a target base model. If the target rock asset to be generated has an inverted cone shape, the user can select an inverted cone from a variety of different shape types. In this case, an inverted cone-shaped target base model can be generated. This target base model is usually just a simple model with an appearance similar to the shape of the target rock asset, and its surface does not contain rock texture. This target base model can be a three-dimensional model with sharp edges that is suspended in the air. When selecting an inverted cone, the user can also adjust the size of the upper surface of the inverted cone, the height of the inverted cone, etc., by setting different parameters to make the determined target base model more compatible with the shape type of the target rock asset to be generated.
[0054] The aforementioned rock scan assets can be obtained from a large number of scan assets provided by Quixel (a scan resource library), or from other resource libraries. No limitation is made here.
[0055] Step two: Divide the target base model into layers to obtain multiple sub-models, and obtain reference sub-models that match the shape of each sub-model.
[0056] In practice, the target base model can be layered according to its specific shape to obtain multiple sub-models. The number of layers can be selected based on actual needs. For example, if the target base model is an inverted cone shape, it can be divided into three layers from top to bottom. The upper layer has a relatively flat upper surface, the lower layer has an inverted cone lower surface, and the middle layer connects the upper and lower layers. After determining the multiple sub-models, a reference sub-model can be determined to match each layer based on its shape. The shape of each reference sub-model can be the same as the matched sub-model, or it can be similar but not exactly the same. This is mainly to facilitate subsequent deformation and stitching of the rock scan assets. It should be noted that if the target base model itself is a very simple model, it may not need to be layered further; the target base model can be directly used as a single sub-model.
[0057] Step 3: For each reference sub-model, in response to the deformation operation for each rock scan asset, deform each rock scan asset to the reference sub-model to obtain multiple deformed rock scan assets.
[0058] The number of reference sub-models obtained above is usually multiple. For each reference sub-model, each rock scan asset can be deformed to that reference sub-model to obtain a set of deformed rock scan assets corresponding to each reference sub-model. The overall surface of the deformed rock scan assets will be relatively smoother. The degree of deformation for each rock scan asset can be different to facilitate subsequent stitching processing. For example, if the target base model is divided into three layers, the number of corresponding reference sub-models is also three. For the first reference sub-model, each rock scan asset is deformed to the first reference sub-model to obtain the first set of deformed rock scan assets; for the second reference sub-model, each rock scan asset is deformed to the second reference sub-model to obtain the second set of deformed rock scan assets; for the third reference sub-model, each rock scan asset is deformed to the third reference sub-model to obtain the third set of deformed rock scan assets. It can be understood that the number of reference sub-models usually corresponds to the number of times the original rock scan asset needs to be deformed to obtain multiple deformed rock scan assets corresponding to each reference sub-model.
[0059] like Figure 3 A schematic diagram of a reference sub-model is shown, as follows: Figure 4 The diagram shown illustrates a rock scan asset; as shown. Figure 5 The diagram shown is a schematic representation of a deformed rock scan asset. Figure 3 The reference sub-model in the middle is an inverted cone shape, which will Figure 4 The rock scan assets in the image are deformed into an inverted cone-shaped reference submodel to obtain... Figure 5 The deformed rock scan assets are used in the project. Multiple deformed rock scan assets can be uniformly named so that the desired assets can be identified by name later; for example, they can be named P0, P1, P2, etc. When selecting suitable materials, choosing materials with both suitable texture and shape is difficult. By deforming rock scan assets, any rock style that meets the usage requirements can be used as material.
[0060] Step four: stitch together the multiple rock scan assets after deformation to obtain the stitched rock asset corresponding to the reference sub-model.
[0061] This fourth step can be achieved through the following steps 40 to 43:
[0062] Step 40: Randomly generate multiple point data within the reference sub-model and obtain the rotation and scaling data corresponding to each point data.
[0063] like Figure 6 The diagram shows an internal schematic of a reference sub-model. Several point data points are randomly generated within this sub-model, and the position of each point data point within the model is typically random. Corresponding rotation and scaling data can be written to each point data point. This rotation and scaling data is usually limited random rotation and scaling data to ensure that the shape after subsequent stitching conforms to the shape of the reference sub-model. For example, if the lower surface of the reference sub-model is an inverted cone, then after allocating deformed rock scan assets to each point data point, it is necessary to ensure that the lower surface of the stitched shape is an inverted cone, rather than other shapes. This control can be achieved through limited rotation and scaling data.
[0064] Step 41: Randomly assign a deformed rock scan asset to each point data.
[0065] From the multiple deformed rock scan assets corresponding to this reference sub-model, one deformed rock scan asset is randomly assigned to each point data point. This assignment can be done by name, such as... Figure 6 As shown; for example, one point data is assigned a deformed rock scan asset with the name P0; another point data is assigned a deformed rock scan asset with the name P1, and so on. After assigning by name, the specific deformed rock scan asset corresponding to each name can be displayed. Specifically, for each deformed rock scan asset, the anchor point of the deformed rock scan asset can be placed in correspondence with the corresponding point data to determine the specific position of the deformed rock scan asset. The anchor point can be understood as the geometric center point of the deformed rock scan asset. The generation of the shape of different rock assets can be controlled by two parameters: random position and random combination of rock names.
[0066] Step 42: Rotate and scale the deformed rock scan asset corresponding to each point data according to the rotation and scaling data corresponding to that point data to obtain the rotated and scaled rock scan asset.
[0067] Step 43: Stitch together the rotated and scaled rock scan assets corresponding to each point data to obtain the stitched rock assets corresponding to the reference sub-model.
[0068] After determining the deformed rock scan asset corresponding to each point data, each determined deformed rock scan asset can be rotated and scaled according to the rotation and scaling data of the corresponding point data to obtain a processed rock scan asset. After stitching together each processed rock scan asset, a stitched rock asset corresponding to the reference sub-model is obtained. The shape of this stitched rock asset is usually similar to the shape of the reference sub-model. For example... Figure 7 The diagram shown illustrates a type of spliced rock asset, and Figure 8 The diagram shown illustrates a type of spliced rock asset, in which... Figure 7 This is a stitched rock asset image obtained by stitching together rock scans without rotating and scaling them. It can be seen that without rotation and scaling, the stitched rock scans tend to contain elements of uniform size and orientation, resulting in an unnatural overall effect. Figure 8 It is a stitched rock asset created by stitching together rock scans after rotation and scaling. By rotating and scaling the rock assets before stitching, it is not easy to tell that the same rock material was used, and the overall result is more natural.
[0069] Step 5: Combine the stitched rock assets corresponding to each reference sub-model to obtain the integrated rock assets.
[0070] By deforming each rock scan asset according to each reference sub-model and then stitching them together, the final generated target rock asset can match the shape design and ensure the artistic effect.
[0071] This fifth step can be achieved through the following steps 50 to 52:
[0072] Step 50: Combine the stitched rock assets corresponding to each reference sub-model in sequence to obtain the combined rock assets.
[0073] For example, if the target base model is an inverted cone shape and divided into three layers, then the corresponding number of reference sub-models is also three: the upper-layer reference sub-model, the middle-layer reference sub-model, and the lower-layer reference sub-model; Figure 9 The diagram shows a composite rock asset. The upper surface of the upper reference sub-model is relatively flat, and the composite uses a deformed rock scan asset with a relatively flat upper surface. Figure 10 The diagram illustrates a type of spliced rock asset, where a middle-layer reference sub-model is used to connect the upper and lower layers of the spliced rock asset; as shown... Figure 11 The diagram illustrates a type of rock asset stitching. The lower surface of the lower reference sub-model is inverted conical, and the stitching typically uses deformed rock scan assets with an inverted conical lower surface; for example... Figure 12 The diagram shows a composite rock asset, which integrates the spliced rock assets corresponding to the three reference sub-models to obtain the composite rock asset.
[0074] Step 51: In response to the voxelization operation for the composite rock asset, the composite rock asset is voxelized to obtain the voxel rock asset.
[0075] Because the composite rock assets are pieced together, each piece is still an independent mesh model, not yet unified into a single mesh model. By converting the mesh composite rock assets with voxel data assets, the pieced-together composite rock assets can be integrated into a single model, resulting in voxelized voxel rock assets. The voxelized voxel rock assets more closely resemble natural rock shapes.
[0076] See Figure 13 A cross-section of a pre-voxelized composite rock asset is shown, and Figure 14 The image shown is a cross-section of a voxel rock asset; it can be seen that through the analysis of... Figure 13 By voxelizing the composite rock assets in the data, we can obtain... Figure 14 In the middle, it is a unified whole mesh model.
[0077] Step 52: In response to the conversion operation for the voxel rock asset, the voxel rock asset is converted to a mesh to obtain the integrated rock asset.
[0078] The voxelized rock assets are then converted back into a mesh model to obtain integrated rock assets, which are mesh assets.
[0079] Step 6: In response to the deformation operation on the integrated rock asset, deform the integrated rock asset to the target base model to obtain the deformed rock asset; wherein, the deformed rock asset contains the rock detail information of the rock scan asset.
[0080] While the aforementioned integrated rock assets have become a complete model, the patchwork effect is still quite evident, with clear connections between different rock assets. The integrated rock assets will then undergo deformation processing to resemble the target base model. The result of this deformation is not a complete transformation into the target base model's shape, but rather a change in the overall form of the integrated rock assets towards the target base model while preserving details. See also... Figure 15 A schematic diagram of a pre-deformation integrated rock asset is shown, and Figure 16 The diagram shows a deformed rock asset. It can be seen that through voxelization and deformation operations on the composite rock asset, the edges and corners of the rock asset have become relatively softer.
[0081] Step 7: Generate the target rock asset based on the deformed rock asset.
[0082] Step seven may specifically include steps 70 to 71:
[0083] Step 70: In response to the sharpening operation on the deformed rock asset, the deformed rock asset is sharpened to obtain the sharpened rock asset.
[0084] After obtaining the deformed rock asset described above, it can be sharpened to make the edges of the deformed rock asset clearer, resulting in a sharpened rock asset, such as... Figure 17 The diagram shows a rock asset before sharpening, and Figure 18 The diagram shown illustrates a sharpened rock asset, demonstrating that the edges of the sharpened rock asset are more clearly defined.
[0085] Step 71: Apply a displacement texture to the sharpened rock asset to obtain the target rock asset.
[0086] Step 71 may specifically include the following steps A through D:
[0087] Step A: Obtain multiple vertices from the sharpened rock asset.
[0088] After obtaining the sharpened rock asset, multiple vertices can be selected from it. In practice, to achieve a better displacement effect, the sharpened rock asset can be subdivided to increase the number of vertices.
[0089] Step B, in response to the smoothing operation for the normal of each vertex, smooths the normal of each vertex to obtain the smoothed rock asset.
[0090] Before replacing the sharpened rock assets, the normal data of each vertex can be smoothed to obtain smoothed rock assets. These smoothed rock assets will not have locations with drastic changes in normals, thus avoiding clipping issues. Figure 19 The diagram shows the effect of smoothing the surface of a rock asset before the normal is applied. Figure 20 The diagram shows a rock asset surface after smoothing the normals. It can be seen that the rock asset surface is relatively smooth after the normal smoothing process. Figure 21 The diagram shows a displacement effect, and Figure 22 The diagram shown illustrates a displacement effect, in which... Figure 21 Without smoothing the normals, at a certain replacement strength, bad surface defects are likely to occur. Figure 22 To smooth the normals, no bad surface issues will occur under the same displacement strength. By softening the vertex normals, the clipping problem that easily occurs during displacement can be resolved in locations with rapidly changing rock assets.
[0091] Step C: Obtain the displacement height map and the texture coordinates of each vertex in the corresponding texture coordinate system of the smoothed rock asset.
[0092] The aforementioned displacement heightmap is typically a grayscale image. The texture coordinates can be represented using UVs, where U typically represents the distribution on the horizontal axis and V represents the distribution on the vertical axis. These texture coordinates allow each point on the displacement heightmap to be precisely mapped to the surface of the smoothed rock asset. In practice, the texture coordinate system corresponding to the smoothed rock asset can be obtained, and the texture coordinates of each vertex within that system can be determined. The texture coordinates are typically between 0 and 1.
[0093] Step D: Based on the permutation height map and the texture coordinates corresponding to each vertex, determine the target rock asset.
[0094] The above-described operation of replacing textures on the sharpened rock assets can be performed multiple times to obtain richer and more varied details.
[0095] Step D can be achieved through the following steps a to c:
[0096] Step a: For the texture coordinates of each vertex, sample the displacement height map to obtain the height value corresponding to each vertex.
[0097] This embodiment obtains the different offset of each vertex by sampling the permutation height map. Specifically, the permutation height map can be sampled according to the texture coordinates of each vertex to obtain the height value at the corresponding position of each vertex.
[0098] Step b: Offset each vertex according to its corresponding height value to obtain the offset vertex.
[0099] Step c: Determine the target rock asset based on the offset vertices.
[0100] The height value corresponding to each vertex can be determined as the vertex offset. For each vertex, offsetting it according to its corresponding height value yields the offset vertex and the final target rock asset to be generated. Substitution can be used to make the target rock asset contain more rock details; for example... Figure 23 The diagram shown illustrates a rock asset before replacement, and as follows: Figure 24 The diagram shown illustrates a replacement rock asset, illustrating that, relative to... Figure 23 , Figure 24 The surface of the rock assets in the game contains more rock details.
[0101] The aforementioned method for generating rock assets combines scanned rock assets obtained from scanning real rocks to construct the desired target rock asset. This method effectively reproduces the rock shapes envisioned by the artists, helps shorten development time, and better reflects the diverse shapes found in nature. Furthermore, the determined target base model better matches the rock structure desired by the artists. The target base model is simple to create; by deforming the integrated rock assets onto the target base model, the target rock asset is obtained. This method ensures that the target rock asset matches the specific design desired by the artists, and the deformation process retains the detailed rock information from the scanned rock assets, making the final target rock asset more closely resemble the natural rock shape and achieving better artistic results.
[0102] This method improves upon procedurally generated rock assets, enabling the production of a large batch of rock assets with similar design styles. The contours and variations of the rocks more closely resemble natural rock formations, while effectively avoiding modeling issues that commonly occur with meshes in procedurally generated rock production. Furthermore, it reduces the likelihood of clipping issues when refining rock surface details. This method significantly reduces the production cost of rock assets while ensuring consistency in quality across each asset.
[0103] This disclosure also provides a rock asset generation apparatus, such as... Figure 25 As shown, the apparatus includes: a determining module 250, used to determine a target base model and multiple rock scan assets based on the shape type of the target rock asset to be generated; wherein, the rock scan assets are three-dimensional rock images obtained by scanning real rocks; the target base model is a three-dimensional model whose surface does not contain rock texture; a stitching and integration processing module 251, used to stitch and integrate multiple rock scan assets based on the target base model to obtain an integrated rock asset; a deformation processing module 252, used to deform the integrated rock asset onto the target base model in response to a deformation operation on the integrated rock asset to obtain a deformed rock asset; wherein, the deformed rock asset contains rock detail information of the rock scan assets; and a generating module 253, used to generate the target rock asset based on the deformed rock asset.
[0104] The aforementioned rock asset generation device determines a target base model and multiple scanned rock assets based on the shape type of the target rock asset to be generated. The scanned rock assets are 3D rock images obtained by scanning real rocks; the target base model is a 3D model whose surface does not contain rock texture. Based on the target base model, the multiple scanned rock assets are stitched and integrated to obtain an integrated rock asset. In response to a deformation operation on the integrated rock asset, the integrated rock asset is deformed onto the target base model to obtain a deformed rock asset. The deformed rock asset contains the rock detail information of the scanned rock assets. The target rock asset is generated based on the deformed rock asset. This device integrates multiple scanned rock assets and then deforms them onto the target base model. The deformed rock asset not only contains the rock detail information of the scanned rock assets, but also, because the target base model is determined based on the shape type of the target rock asset, the target rock asset generated based on the deformed rock asset conforms to the design, satisfying both development time and aesthetic requirements.
[0105] In an alternative implementation, the determining module 250 is further configured to: determine a target base model and multiple rock scan assets based on a selection operation for the shape type of the target rock asset to be generated.
[0106] In an optional implementation, the stitching and integration processing module 251 is further configured to: layer the target base model to obtain multiple sub-models, and obtain a reference sub-model that matches the shape of each sub-model; for each reference sub-model, in response to a deformation operation for each rock scan asset, deform each rock scan asset to the reference sub-model to obtain multiple deformed rock scan assets; stitch the multiple deformed rock scan assets to obtain the stitched rock assets corresponding to the reference sub-model; and combine the stitched rock assets corresponding to each reference sub-model to obtain integrated rock assets.
[0107] In an optional implementation, the stitching and integration processing module 251 is further configured to: randomly generate multiple point data within the reference sub-model, and obtain rotation and scaling data corresponding to each point data; randomly assign a deformed rock scan asset to each point data; rotate and scale the deformed rock scan asset corresponding to each point data according to the rotation and scaling data corresponding to that point data to obtain a rotated and scaled rock scan asset; and stitch together the rotated and scaled rock scan assets corresponding to each point data to obtain the stitched rock asset corresponding to the reference sub-model.
[0108] In an optional implementation, the stitching and integration processing module 251 is further configured to: sequentially combine the stitched rock assets corresponding to each reference sub-model to obtain combined rock assets; in response to a voxelization operation on the combined rock assets, perform voxelization processing on the combined rock assets to obtain voxel rock assets; and in response to a conversion operation on the voxel rock assets, convert the voxel rock assets to a mesh to obtain integrated rock assets.
[0109] In an optional implementation, the generation module 253 is further configured to: sharpen the deformed rock asset in response to a sharpening operation on the deformed rock asset to obtain a sharpened rock asset; and perform a displacement mapping on the sharpened rock asset to obtain a target rock asset.
[0110] In an optional implementation, the generation module 253 is further configured to: acquire multiple vertices in the sharpened rock asset; in response to a smoothing operation on the normals of each vertex, smooth the normals of each vertex to obtain a smoothed rock asset; acquire a displacement height map and the texture coordinates of each vertex in the smoothed rock asset in the corresponding texture coordinate system; and determine the target rock asset based on the displacement height map and the texture coordinates corresponding to each vertex.
[0111] In an optional implementation, the generation module 253 is further configured to: sample the permutation height map for the texture coordinates of each vertex to obtain the height value corresponding to each vertex; offset each vertex according to the height value corresponding to that vertex to obtain the offset vertex; and determine the target rock asset based on the offset vertex.
[0112] The rock asset generation device provided in this embodiment of the invention has the same implementation principle and technical effect as the aforementioned rock asset generation method embodiment. For the sake of brevity, any parts not mentioned in the rock asset generation device embodiment can be referred to the corresponding content in the aforementioned rock asset generation method embodiment.
[0113] This disclosure also provides an electronic device, see [link to relevant documentation] Figure 26 As shown, the electronic device includes a processor 160 and a memory 161, the memory 161 storing machine-executable instructions that can be executed by the processor 130, the processor 160 executing the machine-executable instructions to implement the above-described rock asset generation method.
[0114] Furthermore, Figure 26 The electronic device shown also includes a bus 162 and a communication interface 163, with the processor 160, the communication interface 163 and the memory 161 connected via the bus 162.
[0115] The memory 161 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 163 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network. The bus 162 may be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 26 The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.
[0116] Processor 160 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 160 or by instructions in software form. Processor 160 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this disclosure. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this disclosure can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory 161. The processor 160 reads the information in memory 161 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiment, specifically executing the following steps:
[0117] Based on the shape type of the target rock asset to be generated, a target base model and multiple rock scan assets are determined. The rock scan assets are 3D rock images obtained by scanning real rocks. The target base model is a 3D model whose surface does not contain rock texture. Based on the target base model, the multiple rock scan assets are stitched together to obtain an integrated rock asset. In response to a deformation operation on the integrated rock asset, the integrated rock asset is deformed onto the target base model to obtain a deformed rock asset. The deformed rock asset contains the rock detail information of the rock scan assets. The target rock asset is generated based on the deformed rock asset.
[0118] The specific implementation methods and working processes can be referred to the corresponding processes in the above method embodiments, and will not be repeated here.
[0119] In an optional implementation, when the processor performs the task of determining a target base model and multiple rock scan assets based on the shape type of the target rock asset to be generated, it specifically performs the following: in response to a selection operation for the shape type of the target rock asset to be generated, it determines the target base model and multiple rock scan assets based on the selection operation.
[0120] In an optional implementation, when the processor performs stitching and integration processing on multiple rock scan assets based on a target base model to obtain integrated rock assets, it specifically performs the following: layering the target base model to obtain multiple sub-models, and obtaining a reference sub-model that matches the shape of each sub-model; for each reference sub-model, in response to a deformation operation on each rock scan asset, deforming each rock scan asset to the reference sub-model to obtain multiple deformed rock scan assets; stitching the multiple deformed rock scan assets to obtain the stitched rock assets corresponding to the reference sub-model; and combining the stitched rock assets corresponding to each reference sub-model to obtain integrated rock assets.
[0121] In an optional implementation, when the processor performs the stitching of multiple deformed rock scan assets to obtain the stitched rock asset corresponding to the reference sub-model, it specifically performs the following steps: randomly generating multiple point data within the reference sub-model and obtaining rotation and scaling data corresponding to each point data; randomly assigning a deformed rock scan asset to each point data; rotating and scaling the deformed rock scan asset corresponding to each point data according to the rotation and scaling data corresponding to that point data to obtain a rotated and scaled rock scan asset; and stitching the rotated and scaled rock scan assets corresponding to each point data to obtain the stitched rock asset corresponding to the reference sub-model.
[0122] In an optional implementation, when the processor performs the combination processing of the stitched rock assets corresponding to each reference sub-model to obtain the integrated rock assets, it specifically performs the following: sequentially combines the stitched rock assets corresponding to each reference sub-model to obtain the combined rock assets; in response to the voxelization operation for the combined rock assets, performs voxelization processing on the combined rock assets to obtain voxel rock assets; and in response to the conversion operation for the voxel rock assets, converts the voxel rock assets to a mesh to obtain the integrated rock assets.
[0123] In an optional implementation, when the processor performs the generation of target rock assets based on deformed rock assets, it specifically performs the following: in response to a sharpening operation on the deformed rock assets, it sharpens the deformed rock assets to obtain sharpened rock assets; and it performs a displacement mapping on the sharpened rock assets to obtain the target rock assets.
[0124] In an optional implementation, when the processor performs a displacement mapping on the sharpened rock asset to obtain the target rock asset, it specifically performs the following: acquiring multiple vertices in the sharpened rock asset; in response to a smoothing operation on the normals of each vertex, smoothing the normals of each vertex to obtain a smoothed rock asset; acquiring a displacement height map and the texture coordinates of each vertex in the smoothed rock asset in the corresponding texture coordinate system; and determining the target rock asset based on the displacement height map and the texture coordinates corresponding to each vertex.
[0125] In an optional implementation, when the processor determines the target rock asset based on the permutation height map and the texture coordinates corresponding to each vertex, it specifically performs the following steps: sampling the permutation height map for the texture coordinates of each vertex to obtain the height value corresponding to each vertex; offsetting each vertex according to the height value corresponding to that vertex to obtain the offset vertex; and determining the target rock asset based on the offset vertex.
[0126] The above method determines a target base model and multiple rock scan assets based on the shape type of the target rock asset to be generated. The rock scan assets are 3D rock images obtained by scanning real rocks; the target base model is a 3D model without rock texture on its surface. Based on the target base model, the multiple rock scan assets are stitched together to obtain an integrated rock asset. In response to a deformation operation on the integrated rock asset, the integrated rock asset is deformed onto the target base model to obtain a deformed rock asset. The deformed rock asset contains the rock detail information of the rock scan assets. The target rock asset is then generated based on the deformed rock asset. This method integrates multiple rock scan assets and deforms them onto the target base model. The deformed rock asset not only contains the rock detail information of the rock scan assets, but also, because the target base model is determined based on the shape type of the target rock asset, the target rock asset generated based on the deformed rock asset conforms to the design, satisfying both development time and aesthetic requirements.
[0127] This disclosure also provides a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to perform the following steps:
[0128] Based on the shape type of the target rock asset to be generated, a target base model and multiple rock scan assets are determined. The rock scan assets are 3D rock images obtained by scanning real rocks. The target base model is a 3D model whose surface does not contain rock texture. Based on the target base model, the multiple rock scan assets are stitched together to obtain an integrated rock asset. In response to a deformation operation on the integrated rock asset, the integrated rock asset is deformed onto the target base model to obtain a deformed rock asset. The deformed rock asset contains the rock detail information of the rock scan assets. The target rock asset is generated based on the deformed rock asset.
[0129] The specific implementation methods and working processes can be referred to the corresponding processes in the above method embodiments, and will not be repeated here.
[0130] In an optional implementation, when the processor performs the task of determining a target base model and multiple rock scan assets based on the shape type of the target rock asset to be generated, it specifically performs the following: in response to a selection operation for the shape type of the target rock asset to be generated, it determines the target base model and multiple rock scan assets based on the selection operation.
[0131] In an optional implementation, when the processor performs stitching and integration processing on multiple rock scan assets based on a target base model to obtain integrated rock assets, it specifically performs the following: layering the target base model to obtain multiple sub-models, and obtaining a reference sub-model that matches the shape of each sub-model; for each reference sub-model, in response to a deformation operation on each rock scan asset, deforming each rock scan asset to the reference sub-model to obtain multiple deformed rock scan assets; stitching the multiple deformed rock scan assets to obtain the stitched rock assets corresponding to the reference sub-model; and combining the stitched rock assets corresponding to each reference sub-model to obtain integrated rock assets.
[0132] In an optional implementation, when the processor performs the stitching of multiple deformed rock scan assets to obtain the stitched rock asset corresponding to the reference sub-model, it specifically performs the following steps: randomly generating multiple point data within the reference sub-model and obtaining rotation and scaling data corresponding to each point data; randomly assigning a deformed rock scan asset to each point data; rotating and scaling the deformed rock scan asset corresponding to each point data according to the rotation and scaling data corresponding to that point data to obtain a rotated and scaled rock scan asset; and stitching the rotated and scaled rock scan assets corresponding to each point data to obtain the stitched rock asset corresponding to the reference sub-model.
[0133] In an optional implementation, when the processor performs the combination processing of the stitched rock assets corresponding to each reference sub-model to obtain the integrated rock assets, it specifically performs the following: sequentially combines the stitched rock assets corresponding to each reference sub-model to obtain the combined rock assets; in response to the voxelization operation for the combined rock assets, performs voxelization processing on the combined rock assets to obtain voxel rock assets; and in response to the conversion operation for the voxel rock assets, converts the voxel rock assets to a mesh to obtain the integrated rock assets.
[0134] In an optional implementation, when the processor performs the generation of target rock assets based on deformed rock assets, it specifically performs the following: in response to a sharpening operation on the deformed rock assets, it sharpens the deformed rock assets to obtain sharpened rock assets; and it performs a displacement mapping on the sharpened rock assets to obtain the target rock assets.
[0135] In an optional implementation, when the processor performs a displacement mapping on the sharpened rock asset to obtain the target rock asset, it specifically performs the following: acquiring multiple vertices in the sharpened rock asset; in response to a smoothing operation on the normals of each vertex, smoothing the normals of each vertex to obtain a smoothed rock asset; acquiring a displacement height map and the texture coordinates of each vertex in the smoothed rock asset in the corresponding texture coordinate system; and determining the target rock asset based on the displacement height map and the texture coordinates corresponding to each vertex.
[0136] In an optional implementation, when the processor determines the target rock asset based on the permutation height map and the texture coordinates corresponding to each vertex, it specifically performs the following steps: sampling the permutation height map for the texture coordinates of each vertex to obtain the height value corresponding to each vertex; offsetting each vertex according to the height value corresponding to that vertex to obtain the offset vertex; and determining the target rock asset based on the offset vertex.
[0137] The above method determines a target base model and multiple rock scan assets based on the shape type of the target rock asset to be generated. The rock scan assets are 3D rock images obtained by scanning real rocks; the target base model is a 3D model without rock texture on its surface. Based on the target base model, the multiple rock scan assets are stitched together to obtain an integrated rock asset. In response to a deformation operation on the integrated rock asset, the integrated rock asset is deformed onto the target base model to obtain a deformed rock asset. The deformed rock asset contains the rock detail information of the rock scan assets. The target rock asset is then generated based on the deformed rock asset. This method integrates multiple rock scan assets and deforms them onto the target base model. The deformed rock asset not only contains the rock detail information of the rock scan assets, but also, because the target base model is determined based on the shape type of the target rock asset, the target rock asset generated based on the deformed rock asset conforms to the design, satisfying both development time and aesthetic requirements.
[0138] The computer program product of the rock asset generation method, apparatus and electronic device provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the methods described in the preceding method embodiments. For specific implementation, please refer to the method embodiments, which will not be repeated here.
[0139] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0140] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for generating rock assets, characterized in that, The method includes: Based on the shape type of the target rock asset to be generated, a target base model and multiple rock scan assets are determined; wherein, the rock scan assets are three-dimensional rock images obtained by scanning real rocks; and the target base model is a three-dimensional model whose surface does not contain rock texture. Based on the target base model, multiple rock scan assets are stitched together to obtain integrated rock assets. In response to the deformation operation on the integrated rock asset, the integrated rock asset is deformed towards the target base model to obtain the deformed rock asset; wherein the deformed rock asset contains the rock detail information of the rock scan asset; The target rock asset is generated based on the deformed rock asset. The process of stitching and integrating multiple rock scan assets based on the target base model to obtain integrated rock assets includes: The target base model is layered to obtain multiple sub-models, and a reference sub-model matching the shape of each sub-model is obtained. For each reference sub-model, in response to the deformation operation for each of the rock scan assets, each of the rock scan assets is deformed to the reference sub-model to obtain multiple deformed rock scan assets; Multiple rock scan assets after deformation are stitched together to obtain the stitched rock asset corresponding to the reference sub-model; The stitched rock assets corresponding to each reference sub-model are combined to obtain integrated rock assets; The process of stitching together multiple deformed rock scan assets to obtain the stitched rock assets corresponding to the reference sub-model includes: Within the reference sub-model, multiple point data are randomly generated, and the rotation and scaling data corresponding to each point data are obtained. Randomly assign a deformed rock scan asset to each data point; The deformed rock scan asset corresponding to each point data is rotated and scaled according to the rotation and scaling data corresponding to that point data to obtain the rotated and scaled rock scan asset. The rotated and scaled rock scan assets corresponding to each point data are stitched together to obtain the stitched rock assets corresponding to the reference sub-model.
2. The method according to claim 1, characterized in that, Based on the shape type of the target rock asset to be generated, the target base model and multiple rock scan assets are determined, including: In response to a selection operation for the shape type of the target rock asset to be generated, a target base model and multiple rock scan assets are determined based on the selection operation.
3. The method according to claim 1, characterized in that, The stitched rock assets corresponding to each reference sub-model are combined to obtain the integrated rock assets, including: By sequentially combining the spliced rock assets corresponding to each reference sub-model, the combined rock assets are obtained; In response to the voxelization operation on the composite rock asset, the composite rock asset is voxelized to obtain a voxel rock asset. In response to the conversion operation for the voxel rock asset, the voxel rock asset is converted to a mesh to obtain a consolidated rock asset.
4. The method according to claim 1, characterized in that, Generating the target rock asset based on the deformed rock asset includes: In response to the sharpening operation on the deformed rock asset, the deformed rock asset is sharpened to obtain a sharpened rock asset. The sharpened rock asset is subjected to a displacement map to obtain the target rock asset.
5. The method according to claim 4, characterized in that, The sharpened rock asset is subjected to a displacement map to obtain the target rock asset, which includes: Obtain multiple vertices from the sharpened rock asset; In response to the smoothing operation for the normals of each vertex, the normals of each vertex are smoothed to obtain the smoothed rock assets. Obtain the displacement height map and the texture coordinates of each vertex in the smoothed rock asset in the corresponding texture coordinate system; The target rock asset is determined based on the permutation height map and the texture coordinates corresponding to each vertex.
6. The method according to claim 5, characterized in that, The step of determining the target rock asset based on the permutation height map and the texture coordinates corresponding to each vertex includes: For the texture coordinates of each vertex, the permutation height map is sampled to obtain the height value corresponding to each vertex; Offset each vertex according to its corresponding height value to obtain the offset vertex; The target rock asset is determined based on the offset vertex.
7. A rock asset generation device, characterized in that, The device includes: The determination module is used to determine the target base model and multiple rock scan assets based on the shape type of the target rock asset to be generated; wherein, the rock scan assets are three-dimensional rock images obtained by scanning real rocks; and the target base model is a three-dimensional model whose surface does not contain rock texture. The stitching and integration processing module is used to stitch and integrate multiple rock scan assets based on the target base model to obtain integrated rock assets; The deformation processing module is used to deform the integrated rock asset in response to a deformation operation on the integrated rock asset, and to deform the integrated rock asset to the target base model to obtain the deformed rock asset; wherein the deformed rock asset contains rock detail information of the rock scan asset; The generation module is used to generate the target rock asset based on the deformed rock asset; The splicing and integration processing module is specifically used for: The target base model is layered to obtain multiple sub-models, and a reference sub-model matching the shape of each sub-model is obtained. For each reference sub-model, in response to the deformation operation for each of the rock scan assets, each of the rock scan assets is deformed to the reference sub-model to obtain multiple deformed rock scan assets; Multiple rock scan assets after deformation are stitched together to obtain the stitched rock asset corresponding to the reference sub-model; The stitched rock assets corresponding to each reference sub-model are combined to obtain integrated rock assets; The splicing and integration processing module is specifically used for: Within the reference sub-model, multiple point data are randomly generated, and the rotation and scaling data corresponding to each point data are obtained. Randomly assign a deformed rock scan asset to each data point; The deformed rock scan asset corresponding to each point data is rotated and scaled according to the rotation and scaling data corresponding to that point data to obtain the rotated and scaled rock scan asset. The rotated and scaled rock scan assets corresponding to each point data are stitched together to obtain the stitched rock assets corresponding to the reference sub-model.
8. An electronic device, characterized in that, It includes a processor and a memory, the memory storing machine-executable instructions that can be executed by the processor, the processor executing the machine-executable instructions to implement the rock asset generation method according to any one of claims 1-6.
9. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores machine-executable instructions that, when invoked and executed by a processor, cause the processor to implement the rock asset generation method according to any one of claims 1-6.