Plant model processing method and apparatus, and electronic device

By determining the patch model of the plant model and generating the solid model, the problem of high cost in generating high-precision plant models is solved, and high-precision models are generated efficiently while maintaining good performance in Unreal Engine.

CN119850814BActive Publication Date: 2026-06-02NETEASE (HANGZHOU) NETWORK CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NETEASE (HANGZHOU) NETWORK CO LTD
Filing Date
2024-11-08
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

In existing technologies, the cost of producing high-precision plant models is high and the efficiency is low, making it difficult to generate high-precision plant models while maintaining good performance.

Method used

By acquiring multiple sub-models and texture maps of the initial plant model, the patch model is determined and the corresponding solid model is generated. Based on the initial plant model and the solid model, the target plant model is generated. Boolean operations and detail processing are performed using the color and transparency information in the texture map to improve the model accuracy.

Benefits of technology

It enables the generation of higher-precision models based on low-precision plant models, improving generation efficiency and reducing labor costs, while maintaining excellent performance in Unreal Engine.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119850814B_ABST
    Figure CN119850814B_ABST
Patent Text Reader

Abstract

The present disclosure provides a plant model processing method and device and electronic equipment. An initial plant model is obtained. The initial plant model includes a plurality of sub-models and a texture map. The texture map is used to indicate the color displayed on the surface of the sub-model and the transparency of the surface of the sub-model. Based on the texture map, a patch model in the plurality of sub-models is determined, and a corresponding entity model of the patch model is generated. Based on the initial plant model and the entity model, a target plant model is generated. This way can generate a high-precision plant model based on a low-precision plant model, improve the generation efficiency of the high-precision plant model, and reduce the labor cost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of virtual 3D model technology, and more specifically, to a method, apparatus, and electronic device for processing plant models. Background Technology

[0002] In traditional game development, to optimize performance, plant models typically have a very low polygon count (i.e., face count). Some leaf-like or clump-like forms are represented using interpolation techniques, resulting in a large number of low-resolution plant assets.

[0003] However, since the improvements made to Unreal Engine 5, games developed using Unreal Engine and running on PCs no longer need to create low-resolution models. Developers can directly use high-resolution plant models in their games while still maintaining good performance. However, creating high-resolution plant models is costly and inefficient. Summary of the Invention

[0004] In view of this, the purpose of this disclosure is to provide a method, apparatus and electronic device for processing plant models, so as to generate higher precision plant models based on low precision plant models, improve the generation efficiency of high precision plant models and reduce labor costs.

[0005] In a first aspect, embodiments of this disclosure provide a method for processing a plant model, the method comprising: obtaining an initial plant model; the initial plant model including multiple sub-models and a texture map; the texture map being used to indicate the color displayed on the surface of the sub-models and the transparency of the surface of the sub-models; based on the texture map, determining the patch models among the multiple sub-models and generating solid models corresponding to the patch models; and generating a target plant model based on the initial plant model and the solid models.

[0006] Secondly, embodiments of this disclosure provide a plant model processing apparatus, which includes: an initial plant model acquisition module for acquiring an initial plant model; a target plant model including multiple sub-models and a texture map; the texture map indicating the color displayed on the surface of the sub-models and the transparency of the sub-model surfaces; a solid model generation module for determining the patch models among the multiple sub-models based on the texture map and generating solid models corresponding to the patch models; and a target plant model generation module for generating a target plant model based on the initial plant model and the solid model.

[0007] Thirdly, embodiments of the present invention provide 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 above-described plant model processing method.

[0008] Fourthly, embodiments of the present invention provide a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are invoked and executed by a processor, the machine-executable instructions cause the processor to implement the above-described processing method for the plant model.

[0009] The embodiments of the present invention bring the following beneficial effects:

[0010] The aforementioned method, apparatus, and electronic device for processing plant models involve: acquiring an initial plant model; the initial plant model including multiple sub-models and texture maps; the texture maps indicating the colors and transparency of the sub-model surfaces; determining the patch models among the multiple sub-models based on the texture maps, and generating corresponding solid models; and generating a target plant model based on the initial plant model and the solid models. This method can generate higher-precision plant models from low-precision plant models, improving the efficiency of high-precision plant model generation and reducing labor costs.

[0011] Other features and advantages of this disclosure will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the disclosure. The objects and other advantages of this disclosure are realized and obtained through the structures particularly pointed out in the description, claims and drawings.

[0012] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0013] To more clearly illustrate the technical solutions in the specific embodiments of this disclosure or 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 this disclosure. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0014] Figure 1 A flowchart illustrating a method for processing a plant model provided in this embodiment of the disclosure;

[0015] Figure 2 A schematic diagram of a color map provided in an embodiment of this disclosure;

[0016] Figure 3 A schematic diagram of a transparency texture provided in an embodiment of this disclosure;

[0017] Figure 4 A schematic diagram of a mesh model provided in an embodiment of this disclosure;

[0018] Figure 5 This is a schematic diagram illustrating the overlap of a patch model and a mesh model, provided in an embodiment of this disclosure.

[0019] Figure 6 A schematic diagram of a model generated by taking the intersection of a patch model and a mesh model, provided in an embodiment of this disclosure;

[0020] Figure 7 A schematic diagram of a detailed solid model provided in an embodiment of this disclosure;

[0021] Figure 8 A schematic diagram of the structure of a plant model processing device provided in an embodiment of this disclosure;

[0022] Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0024] In traditional game development, to optimize performance, plant models often need to be created in multiple versions at different resolutions—a process known as Level of Detail (LOD) processing. Meanwhile, the polygon count (i.e., number of faces) of plant models in many games is typically very low. Some leaf-like or clump-like forms are represented using interpolation techniques, resulting in a large number of low-resolution plant assets on the market.

[0025] However, since the introduction of the Nanite system in Unreal Engine 5, games developed using Unreal Engine and running on PCs no longer need to create LOD (Level of Detail) models and low-resolution models. Developers can directly use high-resolution plant models in their games while still maintaining good performance. However, creating high-resolution plant models is costly and inefficient.

[0026] Based on this, the present disclosure provides a method, apparatus, and electronic device for processing plant models, which can be applied to scenarios where it is necessary to convert low-precision plant models into high-precision plant models.

[0027] See Figure 1First, a method for processing a plant model provided by an embodiment of the present invention will be introduced. This method includes the following steps:

[0028] Step S102: Obtain the initial plant model; the initial plant model includes multiple sub-models and texture maps; the texture maps are used to indicate the colors displayed on the surface of the sub-models and the transparency of the sub-model surfaces.

[0029] The initial plant model described above is typically designed for a specific virtual scene or virtual object. For example, a plant model can be designed for a particular plant to display its stems, leaves, flowers, etc.

[0030] An initial plant model typically includes multiple sub-models, which may be the same or different. The initial plant model is usually a low-precision asset, and its sub-models typically include patch models, but may also include solid models.

[0031] The aforementioned patch models are typically composed of multiple connected polygons. Each polygon consists of multiple connected vertices, which are usually located on the same plane. Commonly, triangles or quadrilaterals are used to form patch models. In practical applications, other types of polygons can also be used to form patch models; this is not a limitation here. Solid models, on the other hand, are typically closed virtual 3D models, composed of multiple planes and curved surfaces.

[0032] The aforementioned texture maps can include various types, such as color maps, normal maps, roughness maps, and alpha maps. Among these, color maps are the most basic texture maps, used to simulate the color of an object's surface. Normal maps are used to simulate the bumps and depressions of an object's surface. Roughness maps are used to simulate the smoothness or roughness of an object's surface, affecting how light is distributed on the surface. Alpha maps are typically used to define the transparency of a model; when some parts of the model are transparent and others are opaque, the human eye actually observes the shape and color of the opaque parts.

[0033] To reduce the data space occupied by plant models, a single color map is typically used to store the color textures of all sub-models. When multiple patch models have the same shape and displayed color, the color textures of these sub-models are usually represented by the same area in the color map. Similarly, a single transparency map is typically used to store the transparency information of all sub-models. In practical applications, plant models can also have multiple color maps, multiple transparency maps, etc., and this is not a limitation here.

[0034] Step S104: Based on the texture map, determine the patch model among the multiple sub-models and generate the solid model corresponding to the patch model.

[0035] Typically, multiple patch models share the same display texture to represent the same virtual object. For example, a tree model might have multiple patch models representing leaves. These leaf patch models usually display the same texture, or their texture is one of several preset textures. In this case, the corresponding areas of these patch models in the texture map overlap. This characteristic can be used to determine the patch model from multiple sub-models.

[0036] The difference between patch models and solid models can also be used to determine the patch model within a sub-model. The vertices of a patch model are typically on the same plane, while the vertices of a solid model are usually not on the same plane. You can iterate through the vertices of the sub-model and distinguish between patch models and solid models based on whether the vertices are on the same plane.

[0037] If names are pre-assigned to sub-models when creating the initial plant model, and the names are used to distinguish between patch models and solid models, then after obtaining the initial art assets, the names of the sub-models can be read, and the characters in the names can be used to determine whether the sub-model is a patch model or a solid model. Various methods can be used, and no restrictions are placed here.

[0038] After determining the patch model, a corresponding solid model needs to be generated. The shape of the patch model is usually not refined; instead, its display shape is precisely defined by the pixel values ​​and positions of pixels in the transparency map. A model can be generated first based on the display shape of the patch model. Since this model is generated based on a planar shape, it is usually also a patch model, but its shape is consistent with the initial patch model's display shape. Alternatively, a solid model can be formed by adding thickness to this model. To make the model more realistic, noise can be added to the model's vertices to create undulations and wrinkles on the model's surface, thus forming a solid model. Specific settings can be configured according to requirements and are not limited here.

[0039] Step S106: Generate the target plant model based on the initial plant model and the physical model.

[0040] After generating the solid models corresponding to the patch models, the patch models in the initial plant model can be replaced with solid models. Then, the replaced model, the other unreplaced models, and the texture maps are defined as the target plant model. Compared to the initial plant model, the target plant model has more sub-models with higher precision.

[0041] The above-described method for processing plant models involves obtaining an initial plant model, which includes multiple sub-models and texture maps. The texture maps indicate the colors and transparency of the sub-model surfaces. Based on the texture maps, patch models among the multiple sub-models are identified, and corresponding solid models are generated. Finally, a target plant model is generated based on the initial plant model and the solid models. This method can generate higher-precision plant models from lower-precision models, improving the efficiency of high-precision plant model generation and reducing labor costs.

[0042] The following embodiments provide a specific method for determining patch models among multiple sub-models based on texture mapping and generating corresponding solid models of the patch models.

[0043] In practical applications, the aforementioned texture mapping typically includes color mapping. The display colors of multiple sub-models are recorded using color mapping. This can be achieved using a single color mapping or multiple color mappings; no restriction is placed here. Since patch models often need to represent a large number of repetitive model parts, such as leaves or snowflakes, the texture mappings of patch models with the same display effect usually overlap. In the specific implementation, we can first determine the first texture mapping region corresponding to each sub-model in the color mapping based on the texture coordinates of multiple sub-models. Then, for each sub-model, we determine whether the first texture mapping region corresponding to the sub-model overlaps with the first texture mapping regions corresponding to other sub-models; if there is overlap, the sub-model is determined to be a patch model. The criterion for judgment can be that the first texture mapping regions corresponding to two sub-models completely overlap or partially overlap; the specific setting can be determined according to requirements and is not restricted here.

[0044] After determining the patch model, a corresponding solid model needs to be generated. To ensure the shape of the solid model matches the display shape of the patch model, a transparency map from the texture map is required. First, based on the texture coordinates of the patch model, the second texture map region corresponding to that patch model in the transparency map can be determined. The transparency map typically consists of a first pixel and a second pixel, where the first pixel is black with a value of 0, and the second pixel is white with a value of 255. In the second texture map region, the area containing black pixels represents the transparent portion of the patch model, while the area containing white pixels represents the portion of the patch model that needs to be displayed.

[0045] Then, based on the second texture region and the patch model, the corresponding solid model is generated. This can be achieved by first converting the transparency map into a mesh model based on the pixels in the transparency map; for example, converting the area containing white pixels into a mesh model while ignoring the black pixel areas. Then, the patch model is controlled to coincide with the model area corresponding to the second texture region in the mesh model. In practice, the transformation relationship between texture coordinates and virtual space coordinates can be determined based on the position coordinates of the vertices on the patch model in virtual space and their texture coordinates. Based on this transformation relationship, the placement position of the mesh model in virtual space is then determined. After placing the mesh model, the patch model coincides with the model area corresponding to the second texture region in the mesh model. Alternatively, the mesh model can be placed on a coordinate plane in virtual space, such as the XOY plane, and then the position of the patch model can be adjusted to make it coincide with the model area corresponding to the second texture region in the placed mesh model.

[0046] After the two overlap, Boolean operations need to be performed on the patch model and the model region to obtain the calculation results; based on the calculation results, the solid model corresponding to the patch model is generated. Boolean operations on 3D models are a basic model merging method, which combines multiple models into a new model through operations such as union, intersection, and difference.

[0047] In practical implementation, the intersection of the patch model and the model region can be determined based on the calculation results, and a solid model corresponding to the patch model can be generated based on the intersection. First, the intersection can be defined as the initial model corresponding to the patch model; at this point, the shape of the initial model is the same as the displayed shape of the patch model. Then, to add details, the initial model needs to be refined, and the refined initial model is defined as the solid model corresponding to the patch model.

[0048] Detailing can include various methods, such as increasing the face count of the initial model or adding noise. When adding noise to the initial model, a random noise value needs to be determined for each vertex. Then, the vertex information is updated based on the random noise. Vertex information typically includes vertex position and normal direction; random noise can be added to only one type of information or both, without restriction. Further, based on the updated vertex information, the initial model undergoes retopology processing. Retopology is a process in 3D modeling where the arrangement of vertices, edges, and faces in the 3D mesh needs to be optimized or reprocessed to create a more efficient 3D model.

[0049] This disclosure also provides another method for processing plant models. This method in... Figure 1This method is implemented based on the method shown. Taking a low-precision plant asset as an example, it introduces the process of automatically converting low-precision plant assets into high-precision model assets. Ultimately, these high-precision models achieve excellent performance in Unreal Engine. The low-precision vegetation assets mainly refer to vegetation assets where leaves are created using low-precision polygons.

[0050] The following two test scenarios demonstrate the functionality of the Nanite system in Unreal Engine:

[0051] Test Scenario 1: In Unreal Engine 5.4, without Nanite enabled, there are 8192 Megascan native vegetation plants in the scene with LOD. The GPU takes about 22ms to render one frame of the current scene.

[0052] Test Scenario 2: In Unreal Engine 5.4, the scene contained 8192 vegetation models with higher polygon counts and greater detail after pipeline calculations. LOD was disabled, and Nanite was enabled for the models. Rendering one frame took approximately 18ms on the GPU. This demonstrates that not only was the polygon count accuracy of the models significantly improved, but performance was also optimized by about 20%.

[0053] Therefore, when using the Nanite system, high-precision plant models (also known as "vegetation assets") can be used to save on device performance while displaying better visual effects.

[0054] This method involves extracting the model, UV, and alpha information from low-precision vegetation assets, processing them in Houdini using a specific algorithm, and restoring the detailed information from the alpha texture to the model, resulting in a more detailed model outline. Procedural noise is then used to add reasonable details to the newly generated leaf model. The new model is then imported into Unreal Engine and, in Nanite mode, achieves better performance than the original low-precision Megascan asset with LOD. Finally, a batch processing tool is built to automatically import more vegetation assets from the Unreal Engine project into Houdini for processing, and then export them back to Unreal Engine, completing the vegetation asset upgrade. This method can turn low-precision vegetation assets into high-precision assets in batches.

[0055] The following demonstration uses vegetation assets within Megascan and Houdini software to build the workflow. The specific steps are as follows:

[0056] 1. Import the model assets into Houdini. Then, distinguish which parts of the model are leaves and which are trunks. Generally, the trunk is made using a solid model, which is not the optimization target. The goal is to recreate each leaf as a high-precision model.

[0057] This step can be automatically determined based on the overlap of UVs. Since there are many leaves on a plant, low-precision assets often overlap the UVs of the leaves together and reuse the texture in order to improve the utilization rate of UVs.

[0058] Therefore, by simply detecting which UVs overlap, the model parts corresponding to these UVs can be classified as leaves.

[0059] For example, Figure 2 In the image, the UVs on the left overlap, representing the leaves. The UVs on the two on the right do not overlap, forming a single layer, representing the tree trunk.

[0060] 2. After extracting the leaf portion, each leaf is calculated separately.

[0061] For the UV of a leaf, the UV space can actually be understood as a Cartesian coordinate system, where the X and Y axes both range from 0 to 1. The UV of a leaf lies within this coordinate system.

[0062] While the leaf model has three axes (X, Y, and Z) in three-dimensional space, it can be programmed to set the Z-axis to 0 for each leaf model, while keeping the X and Y axis information consistent with the UV space information.

[0063] Vector Position = uv;

[0064] In this way, the leaf appears in the X / Y plane of three-dimensional space, which is consistent with its UV position in UV space.

[0065] 3. Low-resolution leaf models are typically rendered in games using a semi-transparent method. Therefore, their assets will always include an alpha texture representing the semi-transparency information, such as... Figure 3 As shown, the black areas are the semi-transparent parts that need to be removed.

[0066] After obtaining this image, import it into Houdini and convert it into a model mesh based on the tonal information, such as... Figure 4 (This step can be achieved using the trace node in Houidni), and also place this model mesh in the world space XY plane (Z-axis information is 0).

[0067] In this way, the leaves that need to be calculated will coincide with the model mesh, such as... Figure 5 As shown.

[0068] 4. Perform a Boolean operation on the two overlapping parts and take the intersection to obtain a more detailed leaf model.

[0069] 5. Restore this new model to its original position in step S1, and automatically subdivide its vertices to ensure that the total number of faces does not exceed four, thus conforming to the game engine's model specifications. Figure 6 As shown.

[0070] 6. Add some noise details to the leaf surface. For each vertex, calculate a random noise value and add it to the original vertex information. Then, use the `lab_instance_mesh` node on the model to recalculate the topology, making the wiring more aesthetically pleasing, such as... Figure 7 As shown.

[0071] 7. For all leaves, repeat steps 2-6 above to obtain the final, more accurate leaf model file.

[0072] 8. Many similar vegetation types exist in the Unreal Engine project. A batch script was developed to automatically import them into Houdini. After executing steps 1-7, they were then automatically imported into Unreal Engine in FBX format. This batch processing yields a higher-precision set of model resources for use in the game.

[0073] For the above method embodiments, see Figure 9 A plant model processing device is shown, the device comprising:

[0074] The initial plant model acquisition module 802 is used to acquire an initial plant model; the initial plant model includes multiple sub-models and texture maps; the texture maps are used to indicate the color displayed on the surface of the sub-models and the transparency of the sub-model surfaces;

[0075] The solid model generation module 804 is used to determine the patch model among multiple sub-models based on texture mapping and generate the solid model corresponding to the patch model.

[0076] The target plant model generation module 806 is used to generate a target plant model based on the initial plant model and the entity model.

[0077] The aforementioned plant model processing apparatus acquires an initial plant model, which includes multiple sub-models and a texture map. The texture map indicates the color and transparency of the sub-model surfaces. Based on the texture map, it identifies patch models among the multiple sub-models and generates corresponding solid models. Based on the initial plant model and the solid models, it generates a target plant model. This method can generate higher-precision plant models from low-precision models, improving the efficiency of high-precision plant model generation and reducing labor costs.

[0078] The texture mapping mentioned above includes color mapping; the display colors of multiple sub-models are recorded through color mapping; the solid model generation module is also used to: determine the first mapping region in the color mapping corresponding to each sub-model based on the texture coordinates of multiple sub-models; for each sub-model among the multiple sub-models, determine whether the first mapping region corresponding to the sub-model overlaps with the first mapping regions corresponding to other sub-models; if so, determine the sub-model as a patch model.

[0079] The texture mapping mentioned above includes a transparency map; the solid model generation module is also used to: determine the second texture map region corresponding to the patch model in the transparency map based on the texture coordinates of the patch model; and generate the solid model corresponding to the patch model based on the second texture map region and the patch model.

[0080] The aforementioned transparency map includes a first pixel and a second pixel; the first pixel is a black pixel, and the second pixel is a white pixel; the solid model generation module is also used to: convert the transparency map into a mesh model based on the pixels in the transparency map; control the overlap between the patch model and the model area in the mesh model corresponding to the second texture area; perform Boolean operations on the patch model and the model area to obtain the calculation result; and generate the solid model corresponding to the patch model based on the calculation result.

[0081] The aforementioned solid model generation module is also used to: determine the intersection of the patch model and the model region based on the calculation results; and generate the solid model corresponding to the patch model based on the intersection.

[0082] The aforementioned entity model generation module is also used to: determine the intersecting part as the initial model corresponding to the patch model; perform detailed processing on the initial model, and determine the processed initial model as the entity model corresponding to the patch model.

[0083] The initial model mentioned above includes multiple vertices; the entity model generation module is also used to: determine the random noise value corresponding to each vertex of the initial model; update the vertex information of the vertex based on the random noise; and perform retopological processing on the initial model based on the updated vertex information.

[0084] This embodiment also provides an electronic device, including a processor and a memory. The memory stores machine-executable instructions that can be executed by the processor. The processor executes the machine-executable instructions to implement the above-described plant model processing method, for example:

[0085] Obtain an initial plant model; the initial plant model includes multiple sub-models and texture maps; the texture maps are used to indicate the colors displayed on the surfaces of the sub-models and the transparency of the sub-model surfaces; based on the texture maps, determine the patch models among the multiple sub-models and generate the solid models corresponding to the patch models; based on the initial plant model and the solid models, generate the target plant model.

[0086] The above method can generate higher-precision plant models based on low-precision plant models, improving the efficiency of generating high-precision plant models and reducing labor costs.

[0087] Optionally, the texture mapping mentioned above includes color mapping; the display colors of multiple sub-models are recorded through color mapping; the step of determining the patch model among the multiple sub-models based on the texture mapping includes: determining the first mapping region in the color mapping corresponding to each sub-model based on the texture coordinates of the multiple sub-models; for each sub-model among the multiple sub-models, determining whether the first mapping region corresponding to the sub-model overlaps with the first mapping regions corresponding to other sub-models; if so, determining the sub-model as a patch model.

[0088] Optionally, the texture map mentioned above includes a transparency map; the step of generating a solid model corresponding to the patch model includes: determining a second texture map region corresponding to the patch model in the transparency map based on the texture coordinates of the patch model; and generating a solid model corresponding to the patch model based on the second texture map region and the patch model.

[0089] Optionally, the aforementioned transparency map includes a first pixel and a second pixel; the first pixel is a black pixel, and the second pixel is a white pixel; the step of generating a solid model corresponding to the patch model based on the second texture area and the patch model includes: converting the transparency map into a mesh model based on the pixels in the transparency map; controlling the patch model and the model area in the mesh model to coincide with the model area corresponding to the second texture area; performing Boolean operations on the patch model and the model area to obtain the calculation result; and generating a solid model corresponding to the patch model based on the calculation result.

[0090] Optionally, the step of generating the solid model corresponding to the patch model based on the calculation results includes: determining the intersection of the patch model and the model region based on the calculation results; and generating the solid model corresponding to the patch model based on the intersection.

[0091] Optionally, the above steps for generating the solid model corresponding to the patch model based on the intersecting parts include: determining the intersecting parts as the initial model corresponding to the patch model; performing detailed processing on the initial model, and determining the processed initial model as the solid model corresponding to the patch model.

[0092] Optionally, the initial model includes multiple vertices; the steps for refining the initial model include: for each vertex of the initial model, determining the random noise value corresponding to the vertex; updating the vertex information based on the random noise; and performing retopological processing on the initial model based on the updated vertex information.

[0093] See Figure 9As shown, the electronic device includes a processor 100 and a memory 101. The memory 101 stores machine-executable instructions that can be executed by the processor 100. The processor 100 executes the machine-executable instructions to implement the above-described plant model processing method.

[0094] Furthermore, Figure 9 The electronic device shown also includes a bus 102 and a communication interface 103, with the processor 100, the communication interface 103 and the memory 101 connected via the bus 102.

[0095] The memory 101 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 103 (which can be wired or wireless), such as the Internet, wide area network, local area network, or metropolitan area network. The bus 102 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 9 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.

[0096] The processor 100 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 the processor 100 or by instructions in software form. The processor 100 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may 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 may 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 readily available 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 101, and the processor 100 reads the information from memory 101 and, in conjunction with its hardware, completes the steps of the method described in the foregoing embodiments.

[0097] This embodiment also provides a machine-readable storage medium storing machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions cause the processor to implement the above-described processing method for the plant model.

[0098] The present disclosure provides a method, apparatus, and electronic device for processing a plant model, including a computer-readable storage medium storing program code. The program code includes instructions that can be used to execute the methods described in the preceding method embodiments, for example:

[0099] Obtain an initial plant model; the initial plant model includes multiple sub-models and texture maps; the texture maps are used to indicate the colors displayed on the surfaces of the sub-models and the transparency of the sub-model surfaces; based on the texture maps, determine the patch models among the multiple sub-models and generate the solid models corresponding to the patch models; based on the initial plant model and the solid models, generate the target plant model.

[0100] The above method can generate higher-precision plant models based on low-precision plant models, improving the efficiency of generating high-precision plant models and reducing labor costs.

[0101] Optionally, the texture mapping mentioned above includes color mapping; the display colors of multiple sub-models are recorded through color mapping; the step of determining the patch model among the multiple sub-models based on the texture mapping includes: determining the first mapping region in the color mapping corresponding to each sub-model based on the texture coordinates of the multiple sub-models; for each sub-model among the multiple sub-models, determining whether the first mapping region corresponding to the sub-model overlaps with the first mapping regions corresponding to other sub-models; if so, determining the sub-model as a patch model.

[0102] Optionally, the texture map mentioned above includes a transparency map; the step of generating a solid model corresponding to the patch model includes: determining a second texture map region corresponding to the patch model in the transparency map based on the texture coordinates of the patch model; and generating a solid model corresponding to the patch model based on the second texture map region and the patch model.

[0103] Optionally, the aforementioned transparency map includes a first pixel and a second pixel; the first pixel is a black pixel, and the second pixel is a white pixel; the step of generating a solid model corresponding to the patch model based on the second texture area and the patch model includes: converting the transparency map into a mesh model based on the pixels in the transparency map; controlling the patch model and the model area in the mesh model to coincide with the model area corresponding to the second texture area; performing Boolean operations on the patch model and the model area to obtain the calculation result; and generating a solid model corresponding to the patch model based on the calculation result.

[0104] Optionally, the step of generating the solid model corresponding to the patch model based on the calculation results includes: determining the intersection of the patch model and the model region based on the calculation results; and generating the solid model corresponding to the patch model based on the intersection.

[0105] Optionally, the above steps for generating the solid model corresponding to the patch model based on the intersecting parts include: determining the intersecting parts as the initial model corresponding to the patch model; performing detailed processing on the initial model, and determining the processed initial model as the solid model corresponding to the patch model.

[0106] Optionally, the initial model includes multiple vertices; the steps for refining the initial model include: for each vertex of the initial model, determining the random noise value corresponding to the vertex; updating the vertex information based on the random noise; and performing retopological processing on the initial model based on the updated vertex information.

[0107] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system and apparatus described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0108] Furthermore, in the description of the embodiments of this disclosure, unless otherwise expressly specified and limited, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in this disclosure based on the specific circumstances.

[0109] 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 solutions of this disclosure, in essence, or the parts that contribute to the prior art, or parts of the technical solutions, can be embodied in the form of software products. These computer software products are stored in a storage medium and include 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 disclosure. 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.

[0110] In the description of this disclosure, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing this disclosure and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this disclosure. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0111] Finally, it should be noted that the above embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.

Claims

1. A method of processing a plant model, characterized by, The method includes: Obtain an initial plant model; the initial plant model includes multiple sub-models and a texture map; the texture map is used to indicate the color displayed on the surface of the sub-models and the transparency of the surface of the sub-models; Based on the texture map, the patch model among the multiple sub-models is determined, and the solid model corresponding to the patch model is generated; Based on the initial plant model and the physical model, a target plant model is generated; The texture map includes a transparency map; the transparency map includes a first pixel and a second pixel; the first pixel is a black pixel, and the second pixel is a white pixel; The steps for generating the solid model corresponding to the patch model include: Based on the texture coordinates of the patch model, determine the second texture area corresponding to the patch model in the transparency texture; Based on the pixels in the transparency map, the transparency map is converted into a mesh model; Control the overlap between the patch model and the model region in the mesh model corresponding to the second texture region; Boolean operations are performed on the patch model and the model region to obtain the calculation results; Based on the calculation results, the intersection of the patch model and the model region is determined; Based on the intersecting portion, a solid model corresponding to the patch model is generated.

2. The method of claim 1, wherein, The texture map includes a color map; the display colors of the multiple sub-models are recorded through the color map; The step of determining the patch model among the plurality of sub-models based on the texture map includes: Based on the texture coordinates of the multiple sub-models, determine the first texture region in the color texture corresponding to each of the sub-models; For each of the plurality of sub-models, determine whether the first texture area corresponding to the sub-model overlaps with the first texture area corresponding to other sub-models; If so, the sub-model is determined to be a patch model.

3. The method of claim 1, wherein, The step of generating a solid model corresponding to the patch model based on the intersecting portion includes: The intersecting portion is determined as the initial model corresponding to the patch model; The initial model is refined, and the refined initial model is determined as the solid model corresponding to the patch model.

4. The method according to claim 3, characterized in that, The initial model includes multiple vertices; The steps for refining the initial model include: For each vertex of the initial model, determine the random noise value corresponding to that vertex; The vertex information of the vertex is updated based on the random noise; Based on the updated vertex information, the initial model undergoes retopological processing.

5. A processing device for a plant model, characterized in that, The device includes: An initial plant model acquisition module is used to acquire an initial plant model; the initial plant model includes multiple sub-models and texture maps; the texture maps are used to indicate the color displayed on the surface of the sub-models and the transparency of the surface of the sub-models; The solid model generation module is used to determine the patch model among the multiple sub-models based on the texture map, and generate the solid model corresponding to the patch model; The target plant model generation module is used to generate a target plant model based on the initial plant model and the entity model. The texture map includes a transparency map; the transparency map includes a first pixel and a second pixel; the first pixel is a black pixel, and the second pixel is a white pixel; The entity model generation module is also used for: Based on the texture coordinates of the patch model, determine the second texture area corresponding to the patch model in the transparency texture; Based on the pixels in the transparency map, the transparency map is converted into a mesh model; Control the overlap between the patch model and the model region in the mesh model corresponding to the second texture region; Boolean operations are performed on the patch model and the model region to obtain the calculation results; Based on the calculation results, the intersection of the patch model and the model region is determined; Based on the intersecting portion, a solid model corresponding to the patch model is generated.

6. 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 processing method of the plant model according to any one of claims 1-4.

7. A machine-readable storage medium, characterized in that, The machine-readable storage medium stores machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the processing method of the plant model according to any one of claims 1-4.