Plant model processing method and device and electronic equipment

By acquiring the initial plant model and generating a solid model based on texture maps, the problems of high-precision model generation cost and low efficiency caused by low-precision plant models in the existing technology are solved, and a method of efficiently generating high-precision plant models is realized.

CN119850814AActive Publication Date: 2025-04-18NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411596252.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-08
Publication Date
2025-04-18
Estimated Expiration
2044-11-08

AI Technical Summary

Technical Problem

The prior art uses low-precision plant models due to performance optimization in game production, resulting in high-precision models being generated at high cost and inefficient.

Method used

By obtaining the initial plant model, including multiple sub-models and texture maps, determining the face model based on the texture map and generating a solid model, the target plant model is finally generated, which improves the generation efficiency of high-precision models and reduces labor costs.

Benefits of technology

A method of generating higher-precision models based on low-precision plant models is realized, which improves the generation efficiency of high-precision models and reduces labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119850814A_ABST
    Figure CN119850814A_ABST
Patent Text Reader

Abstract

The invention provides a plant model processing method and apparatus, and an electronic device. The method comprises the steps of obtaining an initial plant model; the initial plant model comprises a plurality of sub-models and a texture map; the texture maps are used for indicating colors displayed on the surfaces of the sub-models and transparency of the surfaces of the sub-models; based on the texture map, determining a surface patch model in the plurality of sub-models, and generating an entity model corresponding to the surface patch model; and generating a target plant model based on the initial plant model and the entity model. According to the mode, the high-precision plant model can be generated based on the low-precision plant model, the generation efficiency of the high-precision plant model is improved, and the labor cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of virtual three-dimensional models, and in particular to a method, device and electronic equipment for processing plant models. Background Art

[0002] In the traditional game production process, in order to optimize performance, the polygon count (i.e., the number of faces) of plant models is usually very low. Some leaf-like or clump-like leaves are represented by plug-in technology, which accumulates a large number of low-precision plant assets.

[0003] However, since the improvement of Unreal Engine 5, it is no longer necessary to create low-precision models for games developed with Unreal Engine and running on personal computers (PC). Developers can directly use high-precision plant models in the game while still maintaining good performance. However, the cost of making high-precision plant models is high and the efficiency is low. Summary of the invention

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

[0005] In a first aspect, an embodiment of the present disclosure provides a method for processing a plant model, the method comprising: obtaining an initial plant model; the initial plant model comprises multiple 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, determining a patch model in the multiple sub-models, and generating a solid model corresponding to the patch model; based on the initial plant model and the solid model, generating a target plant model.

[0006] In a second aspect, an embodiment of the present disclosure provides a device for processing a plant model, the device comprising: an initial plant model acquisition module, used to acquire an initial plant model; a target plant model comprising multiple 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; a solid model generation module, used to determine a patch model in the multiple sub-models based on the texture map, and generate a solid model corresponding to the patch model; a target plant model generation module, used to generate a target plant model based on the initial plant model and the solid model.

[0007] In a third aspect, an embodiment of 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 above-mentioned plant model processing method.

[0008] In a fourth aspect, an embodiment of the present invention provides a machine-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the above-mentioned plant model processing method.

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

[0010] The above-mentioned method, device and electronic device for processing plant models obtain 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-model and the transparency of the surface of the sub-model; based on the texture maps, the patch models in the multiple sub-models are determined, and the entity models corresponding to the patch models are generated; based on the initial plant model and the entity model, the target plant model is generated. This method can generate a higher-precision plant model based on a low-precision plant model, improve the efficiency of generating high-precision plant models, and reduce labor costs.

[0011] Other features and advantages of the present disclosure will be described in the following description, and partly become apparent from the description, or understood by practicing the present disclosure. The purpose and other advantages of the present disclosure are realized and obtained by the structures particularly pointed out in the description, claims and drawings.

[0012] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.

[0014] Figure 1 A flow chart of a method for processing a plant model provided by an embodiment of the present disclosure;

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

[0016] Figure 3 A schematic diagram of a transparency map provided by an embodiment of the present disclosure;

[0017] Figure 4 A schematic diagram of a grid model provided in an embodiment of the present disclosure;

[0018] Figure 5 A schematic diagram of a patch model and a mesh model overlapped with each other provided in an embodiment of the present 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 the present disclosure;

[0020] Figure 7 A schematic diagram of a detailed entity model provided in an embodiment of the present disclosure;

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

[0022] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0024] In the traditional game production process, in order to optimize performance, plant models usually need to create multiple versions of different resolutions. This process is called multi-level detail (LOD) processing. At the same time, the number of polygons (i.e. the number of faces) of plant models in many games is usually very low. Some leaf or clump leaves are represented by insert technology, which has accumulated a large number of low-precision plant assets on the market.

[0025] However, since the launch of the Nanite system in Unreal Engine 5, games developed with Unreal Engine and running on personal computers (PC) no longer need to create LOD models and low-precision models. Developers can directly use high-precision plant models in the game while still maintaining good performance. However, the cost of making high-precision plant models is high and the efficiency is low.

[0026] Based on this, the embodiments of the present disclosure provide a method, device and electronic device for processing a plant model. This technology can be applied to scenarios where a low-precision plant model needs to be converted into a high-precision plant model.

[0027] See also Figure 1First, a method for processing a plant model provided by an embodiment of the present invention is introduced. The method comprises the following steps:

[0028] Step S102, obtaining an initial plant model; 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.

[0029] The initial plant model is usually set for a certain virtual scene or a certain virtual object. For example, the plant model can be set for a certain plant to display the stem, leaves, flowers, etc. of the plant.

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

[0031] The above-mentioned patch model is usually formed by connecting multiple polygons. Each polygon is connected by multiple vertices, and these vertices are usually on the same plane. In a common way, triangles or quadrilaterals are usually used to connect to form a patch model. In practical applications, other types of polygons can also be used to form a patch model, which is not limited here. The solid model is usually a closed virtual three-dimensional model, consisting of multiple planes and curved surfaces.

[0032] The above texture maps can include multiple types, such as color maps, normal maps, roughness maps, transparency maps, etc. Among them, color maps are the most basic texture maps, which are used to simulate the color of the object surface. Normal maps are used to simulate the concave and convex effects of the object surface. Roughness maps are used to simulate the smoothness or roughness of the object surface, affecting the distribution of light on the object surface. Transparency maps are usually used to limit the transparency of the model. When some parts of the model are transparent and some parts are opaque, the human eye actually observes the shape, color, etc. of the opaque part of the model.

[0033] In order to reduce the data space occupied by the plant model, a color map is usually used to save the color textures of all sub-models. When the shapes and displayed colors of multiple patch models are the same, the color textures of these sub-models are usually represented by the same area in the color map. Similarly, a transparency map is usually used to save the transparency information of all sub-models. In practical applications, the plant model can also have multiple color maps, multiple transparency maps, etc., which are not limited here.

[0034] Step S104, based on the texture map, determine the patch model in the plurality of sub-models, and generate a solid model corresponding to the patch model.

[0035] Generally speaking, there are multiple patch models with the same display texture to represent the same virtual item. For example, a tree model may have multiple patch models representing leaves. The patch models representing leaves usually display the same texture, or the texture they display is one of several preset textures. In this case, the corresponding areas of these patch models in the texture map have overlapping parts. Based on this feature, the patch model can be determined from multiple sub-models.

[0036] The mesh model in the sub-model can also be determined based on the difference between the mesh model and the solid model. The vertices of the mesh model are usually in the same plane, while the multiple vertices of the solid model are usually not in the same plane. The vertices of the sub-model can be traversed to distinguish the mesh model from the solid model based on whether the vertices are in the same plane.

[0037] If a name is added to the sub-model in advance when the initial plant model is established, and the patch model and the solid model are distinguished by some characters in the name, then after obtaining the initial art resources, the name of the sub-model can be read, and the sub-model can be determined whether it is a patch model or a solid model according to the characters in the name. There are many ways to do this, which are not limited here.

[0038] After the patch model is determined, it is necessary to generate a solid model corresponding to the patch model. The shape of the patch model is usually not precise, but the pixel value and pixel position of the pixel in the transparency map are used to precisely define the display shape of the patch model. A model can be first generated based on the display shape of the patch model. Since the model is generated based on a plane shape, it is usually also a patch model, but the shape is consistent with the display shape of the initial patch model. A solid model can also be formed by adding thickness to the model. In order to make the model more realistic, noise can be added to the vertices of the model to make the surface of the model have undulations and wrinkles, etc., to form a solid model. The specific settings can be made according to the needs and are not limited here.

[0039] Step S106: generating a target plant model based on the initial plant model and the entity model.

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

[0041] The above-mentioned method for processing a plant model obtains 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-model and the transparency of the surface of the sub-model; based on the texture maps, the patch models in the multiple sub-models are determined, and the entity models corresponding to the patch models are generated; based on the initial plant model and the entity model, the target plant model is generated. This method can generate a higher-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.

[0042] The following embodiment provides a specific method for determining a patch model in a plurality of sub-models based on a texture map and generating a solid model corresponding to the patch model.

[0043] In practical applications, the above-mentioned texture map usually includes a color map. The display colors of multiple sub-models are recorded through color maps. Specifically, it can be recorded through one color map or multiple color maps, which is not limited here. Since the patch model usually needs to represent a large number of repeated model parts, such as leaves, snowflakes, etc., the texture maps of the patch models with the same display effect usually overlap. In specific implementation, the first map area corresponding to each sub-model in the color map can be determined based on the texture coordinates of the multiple sub-models. Then, for each of the multiple sub-models, it is determined whether the first map area corresponding to the sub-model has an overlapping part with the first map area corresponding to other sub-models; if there is an overlapping part, the sub-model is determined as a patch model. The judgment standard can be that the first map areas corresponding to the two sub-models completely overlap, or partially overlap, which can be set according to the needs and is not limited here.

[0044] After the patch model is determined, it is necessary to generate a solid model corresponding to the patch model. In order to make the shape of the solid model consistent with the display shape of the patch model, the transparency map in the texture map is needed. First, based on the texture coordinates of the patch model, the second map area corresponding to the patch model in the transparency map can be determined. The transparency map is usually composed of a first pixel and a second pixel, where the first pixel is a black pixel with a pixel value of 0, and the second pixel is a white pixel with a pixel value of 255. In the second map area, the area where the black pixels are located represents the transparent part of the patch model, and the area where the white pixels are located represents the part of the patch model that needs to be displayed.

[0045] Then, based on the second mapping area and the patch model, a solid model corresponding to the patch model is generated. First, based on the pixels in the transparency map, the transparency map can be converted into a mesh model, for example, the area where the white pixels are located is converted into a mesh model, while the black pixel area is ignored. Then the patch model is controlled to overlap with the model area corresponding to the second mapping area in the mesh model. In a specific implementation, the coordinate conversion relationship between the texture coordinates and the virtual space can be determined based on the position coordinates and texture coordinates of the vertices on the patch model in the virtual space, and then the placement position of the mesh model in the virtual space is determined based on the conversion relationship. After the mesh model is placed, the patch model overlaps with the model area corresponding to the second mapping area in the mesh model. The mesh model can also be placed on a certain coordinate plane in the virtual space, such as the XOY plane, and then the position of the patch model is adjusted so that the patch model overlaps with the model area corresponding to the second mapping area in the placed mesh model.

[0046] After the two overlap, it is necessary to perform Boolean operations on the patch model and the model area 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 merges multiple models into a new model through operations such as union, intersection and difference.

[0047] In specific implementation, the intersection of the mesh model and the model area can be determined based on the calculation results, and the entity model corresponding to the mesh model can be generated based on the intersection. The intersection can be first determined as the initial model corresponding to the mesh model, and the shape of the initial model is the same as the display shape of the mesh model. Then, in order to add details, the initial model needs to be detailed, and the processed initial model is determined as the entity model corresponding to the mesh model.

[0048] Detailed processing can include many methods, such as increasing the number of faces of the initial model, adding noise to the initial model, etc. When adding noise to the initial model, it is necessary to determine the random noise value corresponding to each vertex of the initial model; then update the vertex information of the vertex based on the random noise. The vertex information usually includes the vertex position, normal direction, etc. Random noise values ​​can be added to only one of the information, or to both information, without limitation. Further, based on the vertices after the vertex information is updated, the initial model is retopologically processed. Retopology is a process in 3D modeling, in which 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] The present disclosure also provides another method for processing a plant model. Figure 1This method is based on the method shown in . This method takes the initial plant model as a low-precision plant asset as an example, and introduces the process of automatically converting low-precision plant assets into high-precision model assets. Ultimately, these high-precision models can achieve excellent performance in Unreal Engine. Among them, low-precision vegetation assets mainly refer to vegetation assets that use low-precision patches to make leaves.

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

[0051] Test scene 1: In Unreal Engine 5.4, Nanite is not enabled. There are 8192 Megascan original vegetation in the scene with LOD. The GPU takes about 22ms to render one frame of the current scene.

[0052] Test scene 2: In Unreal Engine 5.4, there are 8192 vegetation models with higher face count and finer details after pipeline calculation in the scene, without LOD, and Nanite is enabled for the model. It takes about 18ms for the GPU to render one frame. It can be seen that not only the face count accuracy of the model has been greatly improved, but the performance has also been optimized by about 20%.

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

[0054] This method requires extracting the model, UV, and Alpha information of low-precision vegetation assets, entering Houdini and processing them comprehensively through a certain algorithm to restore the detailed information on the Alpha map to the model, forming a more detailed model outline. And through procedural noise, add reasonable details to the newly generated leaf model. Then import the new model into the Unreal Engine, and in Naniate mode, it runs better than the original low-precision Megascan asset with LOD. Finally, build a batch processing tool to automatically import more vegetation assets in the Unreal project into Houdini for processing, and then export them to Unreal to complete the upgrade of vegetation assets. This method can turn waste into treasure in batches and restore low-precision vegetation assets to high-precision assets.

[0055] The following is a demonstration using vegetation assets in Megascan, and the process is built using Houdini. This is achieved by the following steps:

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

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

[0058] Therefore, we only need to detect which UVs are overlapping, and then we can classify the model parts corresponding to these UVs as leaves.

[0059] For example, Figure 2 In the figure, the UVs on the left overlap, they are leaves. The two UVs on the right do not overlap, only one layer, they are tree trunks.

[0060] 2After extracting the leaf parts, calculate each leaf separately.

[0061] For the UV of leaves, the UV space can actually be understood as a plane rectangular coordinate system, with the range of the X-axis and Y-axis both being 0-1. The UV of leaves is in this coordinate system.

[0062] Although the leaf model has three axes, X, Y, and Z, in three-dimensional space, we can use code to make the Z axis of each leaf model 0, and the information of the X and Y axes consistent with the information in the UV space.

[0063] Vector Position = uv;

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

[0065] 3. Low-precision leaf models are usually presented in the game using a semi-transparent method, so its assets must contain an alpha map representing semi-transparent information, such as Figure 3 As shown, the black part is the semi-transparent part that needs to be removed.

[0066] After getting this picture, import it into Houdini and convert it into a model mesh based on the black and white information. Figure 4 . (The trace node in Houidni can implement this step), and let this model grid be placed in the XY plane of the world space (the Z axis information is 0).

[0067] In this case, the leaves that need to be calculated coincide with the model grid, such as Figure 5 shown.

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

[0069] 5. Restore the new model to the original position corresponding to step S1, and automatically subdivide its vertices so that the number of its faces does not exceed 4 sides, so that it meets the model specifications of the game engine, such as Figure 6 shown.

[0070] 6 Add some noise details to the leaf surface. Based on each vertex, calculate a random noise value and add it to the original vertex information. After that, use the lab_instance_mesh node on the model to recalculate the topology and make the wiring more beautiful. Figure 7 shown.

[0071] 7 For all leaves, repeat steps 2-6 above to obtain a final leaf model file with higher precision.

[0072] 8 There are many similar vegetation in the Unreal Engine project. Develop a batch processing script to automatically import them into Houdini. After executing steps 1-7, they are automatically imported into the Unreal Engine in FBX format. Batch processing obtains a batch of model resources with higher precision for use in games.

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

[0074] The initial plant model acquisition module 802 is used to acquire the 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-model and the transparency of the surface of the sub-model;

[0075] A solid model generation module 804 is used to determine the patch model in the plurality of sub-models based on the texture map, and generate a solid model corresponding to the patch model;

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

[0077] The above-mentioned plant model processing device obtains 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-model and the transparency of the surface of the sub-model; based on the texture maps, the patch models in the multiple sub-models are determined, and the entity models corresponding to the patch models are generated; based on the initial plant model and the entity model, the target plant model is generated. This method can generate a higher-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.

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

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

[0080] The above-mentioned 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 of the model area corresponding to the second map area in the mesh model with the patch model; perform Boolean operations on the patch model and the model area to obtain calculation results; and generate a solid model corresponding to the patch model based on the calculation results.

[0081] The above-mentioned entity model generation module is also used to: determine the intersection of the patch model and the model area based on the calculation results; and generate the entity model corresponding to the patch model based on the intersection.

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

[0083] The above-mentioned initial model 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 retopologically process the initial model based on the vertex after the vertex information is updated.

[0084] This embodiment also 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 above-mentioned plant model processing method, for example:

[0085] 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-model and the transparency of the surface of the sub-model; based on the texture maps, determine the patch models in the multiple sub-models, and generate the entity models corresponding to the patch models; based on the initial plant model and the entity model, generate the target plant model.

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

[0087] Optionally, the texture map includes a color map; the display colors of multiple sub-models are recorded through the color map; based on the texture map, the step of determining the patch model in the multiple sub-models includes: based on the texture coordinates of the multiple sub-models, determining the first map area corresponding to each sub-model in the color map; for each sub-model in the multiple sub-models, determining whether the first map area corresponding to the sub-model has an overlapping part with the first map area corresponding to other sub-models; if so, determining the sub-model as a patch model.

[0088] Optionally, the above-mentioned texture map includes a transparency map; the step of generating a solid model corresponding to the patch model includes: determining a second mapping area 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 mapping area and the patch model.

[0089] Optionally, the above-mentioned 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; based on the second map area and the patch model, the step of generating a solid model corresponding to the patch model includes: based on the pixels in the transparency map, converting the transparency map into a mesh model; controlling the patch model to overlap with the model area corresponding to the second map area in the mesh model; performing Boolean operations on the patch model and the model area to obtain calculation results; based on the calculation results, generating a solid model corresponding to the patch model.

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

[0091] Optionally, the step of generating a solid model corresponding to the mesh model based on the intersection part includes: determining the intersection part as an initial model corresponding to the mesh model; performing detail processing on the initial model, and determining the processed initial model as the solid model corresponding to the mesh model.

[0092] Optionally, the above-mentioned initial model includes multiple vertices; the step of performing detailed processing on the initial model includes: determining the random noise value corresponding to each vertex of the initial model; updating the vertex information of the vertex based on the random noise; and retopologically processing the initial model based on the vertices after the vertex information is updated.

[0093] See also Fig. 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-mentioned plant model processing method.

[0094] Further, Fig. 9 The electronic device shown further includes a bus 102 and a communication interface 103 , and the processor 100 , the communication interface 103 and the memory 101 are connected via the bus 102 .

[0095] The memory 101 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk storage. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 103 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used. The bus 102 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0096] The processor 100 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 100. The above processor 100 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 gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present disclosure can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in conjunction with the embodiments of the present disclosure can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module may be located in a storage medium mature in the art, such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 101, and the processor 100 reads the information in the memory 101 and completes the steps of the method of the above embodiment in combination with its hardware.

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

[0098] A method, device and electronic device for processing a plant model provided in an embodiment of the present disclosure include a computer-readable storage medium storing a program code, wherein the program code includes instructions that can be used to execute the method described in the above method embodiments, for example:

[0099] 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-model and the transparency of the surface of the sub-model; based on the texture maps, determine the patch models in the multiple sub-models, and generate the entity models corresponding to the patch models; based on the initial plant model and the entity model, generate the target plant model.

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

[0101] Optionally, the texture map includes a color map; the display colors of multiple sub-models are recorded through the color map; based on the texture map, the step of determining the patch model in the multiple sub-models includes: based on the texture coordinates of the multiple sub-models, determining the first map area corresponding to each sub-model in the color map; for each sub-model in the multiple sub-models, determining whether the first map area corresponding to the sub-model has an overlapping part with the first map area corresponding to other sub-models; if so, determining the sub-model as a patch model.

[0102] Optionally, the above-mentioned texture map includes a transparency map; the step of generating a solid model corresponding to the patch model includes: determining a second mapping area 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 mapping area and the patch model.

[0103] Optionally, the above-mentioned 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; based on the second map area and the patch model, the step of generating a solid model corresponding to the patch model includes: based on the pixels in the transparency map, converting the transparency map into a mesh model; controlling the patch model to overlap with the model area corresponding to the second map area in the mesh model; performing Boolean operations on the patch model and the model area to obtain calculation results; based on the calculation results, generating a solid model corresponding to the patch model.

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

[0105] Optionally, the step of generating a solid model corresponding to the mesh model based on the intersection part includes: determining the intersection part as an initial model corresponding to the mesh model; performing detail processing on the initial model, and determining the processed initial model as the solid model corresponding to the mesh model.

[0106] Optionally, the above-mentioned initial model includes multiple vertices; the step of performing detailed processing on the initial model includes: determining the random noise value corresponding to each vertex of the initial model; updating the vertex information of the vertex based on the random noise; and retopologically processing the initial model based on the vertices after the vertex information is updated.

[0107] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0108] In addition, in the description of the embodiments of the present disclosure, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present disclosure can be understood according to specific circumstances.

[0109] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.

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

[0111] Finally, it should be noted that the above embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above embodiments, those skilled in the art should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.

Claims

1. A method for processing a plant model, characterized in that: The method comprises: Acquire an initial plant model; 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, determine a patch model among the multiple sub-models, and generate a solid model corresponding to the patch model; A target plant model is generated based on the initial plant model and the entity model.

2. The method according to claim 1, characterized in that The texture map includes a color map; the display colors of the multiple sub-models are recorded by the color map; The step of determining a patch model in the plurality of sub-models based on the texture map comprises: Based on the texture coordinates of the multiple sub-models, determining a first map area in the color map corresponding to each of the sub-models; For each of the multiple sub-models, determining whether a first mapping area corresponding to the sub-model has an overlapping portion with first mapping areas corresponding to other sub-models; If yes, the sub-model is determined as a patch model.

3. The method according to claim 1, characterized in that The texture map includes a transparency map; The step of generating a solid model corresponding to the surface model comprises: Determining a second mapping area corresponding to the patch model in the transparency map based on the texture coordinates of the patch model; Based on the second mapping area and the mesh model, a solid model corresponding to the mesh model is generated.

4. The method according to claim 3, characterized in that: 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 step of generating a solid model corresponding to the patch model based on the second mapping area and the patch model comprises: Based on the pixels in the transparency map, converting the transparency map into a mesh model; Controlling the patch model to overlap with a model area corresponding to the second mapping area in the mesh model; Performing Boolean operations on the patch model and the model region to obtain calculation results; Based on the calculation result, a solid model corresponding to the mesh model is generated.

5. The method according to claim 4, characterized in that Based on the calculation result, the step of generating a solid model corresponding to the surface model comprises: Based on the calculation result, determining the intersection of the patch model and the model area; Based on the intersection portion, a solid model corresponding to the mesh model is generated.

6. The method according to claim 5, characterized in that The step of generating a solid model corresponding to the patch model based on the intersection portion comprises: Determine the intersection portion as an initial model corresponding to the patch model; The initial model is processed in detail, and the processed initial model is determined as a solid model corresponding to the surface model.

7. The method according to claim 6, characterized in that The initial model includes a plurality of vertices; The step of performing detail processing on the initial model comprises: For each vertex of the initial model, determining a random noise value corresponding to the vertex; updating vertex information of the vertex based on the random noise; Based on the vertices whose vertex information is updated, the initial model is retopologically processed.

8. A plant model processing device, characterized in that: The device comprises: An initial plant model acquisition module is used to acquire an initial plant model; 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; A solid model generation module, used to determine a patch model in the plurality of sub-models based on the texture map, and generate a 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.

9. An electronic device, characterized in that: The invention comprises 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 plant model processing method according to any one of claims 1 to 7.

10. A machine-readable storage medium, characterized in that: The machine-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the plant model processing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Vegetation model rendering method and device, readable storage medium and electronic device

    CN114283230A

  • Three-dimensional model chartlet generation method and device, computer equipment and storage medium

    CN116503559A

  • Digital vegetation modeling and displaying method based on LIM technology

    CN117197371A

  • Model rendering method and device

    WO2022041548A1