Method and device for generating virtual plant, storage medium and electronic device

By performing UV unwrapping and parameter generation on the original virtual plant model, the problems of low virtual plant generation efficiency in existing technologies are solved, avoiding skinning, binding, and skeleton adjustment, thus achieving efficient virtual plant generation.

CN116188650BActive Publication Date: 2026-07-14NETEASE (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
2023-03-09
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing methods for generating virtual plants have high performance overhead, long production cycles, low generation efficiency, and complex model modifications, requiring skinning, skeletal binding, and animation adjustments.

Method used

By performing UV unwrapping on the original virtual plant model, basic UV maps, world space vertex normal data, and position offset data are obtained. Model parameters are then determined, material data is generated, and the target virtual plant is rendered, avoiding skinning, rigging, and animation adjustments.

Benefits of technology

It reduces system performance overhead, improves the generation efficiency of virtual plants, simplifies the model modification process, and optimizes the generation workflow.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116188650B_ABST
    Figure CN116188650B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a virtual plant generation method and device, a storage medium and an electronic device, and relates to the technical field of computers. The method comprises the following steps: performing UV unfolding on an original virtual plant model to obtain a basic UV map, and obtaining world space vertex normal data and world position offset data of the original virtual plant model; determining first model parameters, second model parameters and third model parameters according to the basic UV map, the world space vertex normal data and the world position offset data; generating material data for the original virtual plant model according to the first model parameters, the second model parameters and the third model parameters; and rendering the original virtual plant model based on the material data to obtain a target virtual plant. The method improves the generation efficiency of the virtual plant.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and more specifically, to a method for generating virtual plants, a device for generating virtual plants, a computer-readable storage medium, and an electronic device. Background Technology

[0002] In existing methods for generating virtual plants, to realize the growth process of plants, it is necessary to create a specific model, and then achieve the specific effect through skinning, rigging, and adjusting animation.

[0003] However, this method has a high performance overhead, which makes the system more burdened; at the same time, the production cycle is long, which makes the generation efficiency of virtual plants low.

[0004] It should be noted that the information in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0005] The purpose of this disclosure is to provide a method for generating virtual plants, a device for generating virtual plants, a computer-readable storage medium, and an electronic device, thereby overcoming, to at least some extent, the problem of low efficiency in generating virtual plants due to limitations and defects in related technologies.

[0006] According to one aspect of this disclosure, a method for generating virtual plants is provided, comprising:

[0007] UV unwrapping is performed on the original virtual plant model to obtain the basic UV map, and the world space vertex normal data and world position offset data of the original virtual plant model are obtained.

[0008] Based on the base UV map, world space vertex normal data, and world position offset data, determine the first model parameters, the second model parameters, and the third model parameters;

[0009] Material data for the original virtual plant model is generated based on the first model parameters, the second model parameters, and the third model parameters;

[0010] The original virtual plant model is rendered based on the material data to obtain the target virtual plant.

[0011] According to one aspect of this disclosure, a device for generating virtual plants is provided, comprising:

[0012] The UV unwrapping module is used to unwrap the UVs of the original virtual plant model to obtain the basic UV map, and to obtain the world space vertex normal data and world position offset data of the original virtual plant model.

[0013] The model parameter determination module is used to determine the first model parameters, the second model parameters, and the third model parameters based on the base UV map, world space vertex normal data, and world position offset data.

[0014] The material data generation module is used to generate material data for the original virtual plant model based on the first model parameters, the second model parameters, and the third model parameters.

[0015] The virtual plant generation module is used to render the original virtual plant model based on the material data to obtain the target virtual plant.

[0016] According to one aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method for generating virtual plants as described in any of the preceding claims.

[0017] According to one aspect of this disclosure, an electronic device is provided, comprising:

[0018] Processor; and

[0019] Memory for storing the executable instructions of the processor;

[0020] The processor is configured to execute the virtual plant generation method described above by executing the executable instructions.

[0021] This disclosure provides a method for generating virtual plants. Firstly, it involves UV unwrapping an original virtual plant model to obtain a basic UV map, and acquiring world space vertex normal data and world position offset data of the original virtual plant model. Then, based on the basic UV map, world space vertex normal data, and world position offset data, it determines a first model parameter, a second model parameter, and a third model parameter. Next, it generates material data for the virtual plant model based on the first model parameter, the second model parameter, and the third model parameter. Finally, it renders the original virtual plant model based on the material data to obtain the target virtual plant. This method achieves the goal of generating the target virtual plant without the need for skinning, rigging, or animation adjustments, reducing system performance overhead and solving the problem of heavy system burden caused by existing technologies. Furthermore, since the target virtual plant can be obtained without skinning, rigging, or animation adjustments, the generation efficiency of virtual plants is improved.

[0022] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0023] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0024] Figure 1 The flowchart schematically illustrates a method for generating virtual plants according to an exemplary embodiment of the present disclosure.

[0025] Figure 2 The illustration schematically shows an example diagram of an original virtual plant model and a base UV map corresponding to the original virtual plant model according to an example embodiment of the present disclosure.

[0026] Figure 3 The illustration schematically depicts a scenario in which a first model material is applied to an original virtual plant model to obtain a first intermediate model, according to an example embodiment of the present disclosure.

[0027] Figure 4 An example diagram illustrating a first model parameter according to an exemplary embodiment of the present disclosure is shown.

[0028] Figure 5 The diagram schematically illustrates a method flowchart for realizing the process of a plant emerging from nothing, according to an exemplary embodiment of the present disclosure.

[0029] Figure 6 The illustration shows an example model obtained by color inversion processing of a first model parameter according to an example embodiment of the present disclosure.

[0030] Figure 7 The illustration schematically shows a scene example obtained by clipping channel values ​​below 0 included in a material according to an example embodiment of the present disclosure.

[0031] Figure 8 The illustration shows an example model obtained by smoothing the transition of the second U-channel value and the second V-channel value included in the first model parameters according to an example embodiment of the present disclosure.

[0032] Figure 9 The illustration shows an example diagram of a texture displacement processing result obtained by displacing the second U channel value and the second V channel value included in the first model parameters based on a third preset parameter, according to an example embodiment of the present disclosure.

[0033] Figure 10 The illustration shows a scene example of the process of a virtual plant appearing from nothing according to an exemplary embodiment of the present disclosure.

[0034] Figure 11 The diagram illustrates an example of an overall control result obtained by performing overall control of the overall thickness and tail thickness of a model according to an exemplary embodiment of the present disclosure.

[0035] Figure 12 The illustration shows an example of a target virtual plant obtained by adding textures and parameters to material data according to an example embodiment of the present disclosure.

[0036] Figure 13 The illustration shows an example of a target virtual plant obtained by adding edge lighting parameters to material data according to an example embodiment of the present disclosure.

[0037] Figure 14 The illustration schematically shows an example diagram of a virtual vine with a growth binding effect according to an exemplary embodiment of the present disclosure.

[0038] Figure 15 A block diagram schematically illustrates a virtual plant generation apparatus according to an exemplary embodiment of the present disclosure.

[0039] Figure 16 An electronic device for implementing the above-described method for generating virtual plants, according to an exemplary embodiment of this disclosure, is illustrated schematically. Detailed Implementation

[0040] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make this disclosure more comprehensive and complete, and to fully convey the concept of the example embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of this disclosure. However, those skilled in the art will recognize that the technical solutions of this disclosure can be practiced with one or more of the specific details omitted, or other methods, components, apparatus, steps, etc., can be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of this disclosure.

[0041] Furthermore, the accompanying drawings are merely illustrative of this disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0042] Achieving plant growth and binding effects around the model using existing methods is quite complex. Specifically, it requires first creating a model, and then using skinning, rigging, and adjusting the animation to achieve the desired effect.

[0043] However, the above solutions have the following drawbacks: First, the model size of existing technologies is fixed. Once skinning, rigging bones, and adjusting animation are done, modifying the model will cause repetitive work and increase the workload. Second, when the vines are long, more bones need to be rigging, which makes the animation debugging process complicated. Third, the performance overhead is large, the production cycle is long, and the process is tedious and complicated.

[0044] Based on this, this exemplary embodiment first provides a method for generating virtual plants, which can run on terminal devices, servers, server clusters, or cloud servers, etc. Of course, those skilled in the art can also run the method disclosed herein on other platforms as needed, and this exemplary embodiment does not impose any special limitations on this. Specifically, refer to... Figure 1 As shown, the method for generating this virtual plant may include the following steps:

[0045] Step S110. Unwrap the UVs of the original virtual plant model to obtain the basic UV map, and obtain the world space vertex normal data and world position offset data of the original virtual plant model.

[0046] Step S120. Determine the first model parameters, the second model parameters, and the third model parameters based on the base UV map, world space vertex normal data, and world position offset data;

[0047] Step S130. Generate material data for the original virtual plant model based on the first model parameters, the second model parameters, and the third model parameters;

[0048] Step S140. Render the original virtual plant model based on the material data to obtain the target virtual plant.

[0049] In the aforementioned method for generating virtual plants, on the one hand, the original virtual plant model is UV unwrapped to obtain a basic UV map, and the world space vertex normal data and world position offset data of the original virtual plant model are obtained; then, based on the basic UV map, world space vertex normal data, and world position offset data, the first model parameters, the second model parameters, and the third model parameters are determined; then, material data for the virtual plant model is generated based on the first model parameters, the second model parameters, and the third model parameters; finally, the original virtual plant model is rendered based on the material data to obtain the target virtual plant. The target virtual plant can be obtained without skinning, rigging, and animation adjustments, reducing the system's performance overhead and thus solving the problem of heavy system burden caused by using existing technologies; on the other hand, since the target virtual plant can be obtained without skinning, rigging, and animation adjustments, the generation efficiency of virtual plants is improved.

[0050] The following will provide a detailed explanation and description of the method for generating virtual plants according to an example embodiment of this disclosure, in conjunction with the accompanying drawings.

[0051] First, the terms used in the exemplary embodiments of this disclosure will be explained.

[0052] UV refers to texture information distribution coordinates, which has two coordinate axes, U and V. UV is essential data for rendering 3D models; it can be understood as the "skin" of a 3D model. This "skin" is unfolded and then drawn on a 2D plane to be applied to the object. Furthermore, each vertex of a 3D model has its corresponding UV texture coordinates. In practical applications, 3D models typically have texture maps used for drawing surfaces. UV is the rule for drawing textures on the object's surface. Based on the UV coordinates of the vertices, the texture map is sampled to complete the texture rendering of the model's surface.

[0053] VertexNormalWS: World space vertex normals, which can be used to perform material input in the vertex shader.

[0054] World Position Offset: This allows you to manipulate the vertices of a model in world space using materials, enabling effects such as movement, shape deformation, and rotation.

[0055] SmoothStep: A smooth step function that can be used to generate smooth transition values ​​from 0 to 1.

[0056] OneMinus: Reverse, meaning color reversed.

[0057] Secondly, the inventive purpose of the exemplary embodiments of this disclosure will be explained and described. Specifically, the virtual plant generation method described in the exemplary embodiments of this disclosure can be used to realize the generation, growth, and binding effects of virtual plants; furthermore, the virtual plant generation method described in the exemplary embodiments of this disclosure is applicable to 3D games on mobile and PC terminals; in practical applications, functions such as model UV coordinates, VertexNormalWS, WorldPositionOffset, and SmoothStep are required; among them, UV is the coordinate information of the model texture distribution, belonging to a two-dimensional coordinate system where U is horizontal and V is vertical; the VertexNormalWS expression outputs the world space vertex normals, which can only be used for material input executed in the vertex shader; World Position Offset can be understood as the world position offset, allowing the manipulation of the model's vertices in world space through materials, causing the model to move, deform, rotate, and produce other effects; SmoothStep can be used to generate a smooth transition value from 0 to 1, also called a smooth step function; Max can be simply understood as comparing two values ​​and taking the maximum value.

[0058] Furthermore, in practical applications, the exemplary embodiments of this disclosure calculate the black, white, and gray textures, and then use a combination of VertexNormalWS (model world space vertex normals) and World Position Offset to control the size and thickness of the model. At the same time, by comparing the calculated black, white, and gray values ​​of the model with fixed values, when the values ​​are less than 0, the parts below 0 are clipped, and the position of the black, white, and gray textures is offset to control the growth process and disappearance of the model.

[0059] Furthermore, in the method for generating virtual plants provided in the exemplary embodiments of this disclosure:

[0060] In step S110, the original virtual plant model is UV unwrapped to obtain the basic UV map, and the world space vertex normal data and world position offset data of the original virtual plant model are obtained.

[0061] In this example embodiment, firstly, an original virtual plant model is obtained; wherein, the original virtual plant model described herein may be a vine model with a twining effect, as detailed in the following reference. Figure 2As shown; meanwhile, the vine model with a winding effect described here is pre-generated using a corresponding game engine; of course, in actual applications, a corresponding original virtual plant model can also be created in the game engine according to actual needs, and this example does not impose any special restrictions on this; secondly, the original virtual plant model can be UV unwrapped to obtain a basic UV map. Specifically, in the process of UV unwrapping, that is, unfolding the original virtual plant model from a 3D model into a 2D plane, the basic UV map can be obtained; the obtained basic UV map can be referenced. Figure 2 As shown. Further, in order to generate material data for the original virtual plant model, it is also necessary to obtain the world space vertex normal (Vertex NormalWS) data and world position offset data of the original virtual plant. The world space vertex normal data described here can be used to control the model's scaling, and the world position offset data described here can be used to control the model's displacement and deformation.

[0062] In step S120, the first model parameters, the second model parameters, and the third model parameters are determined based on the base UV map, world space vertex normal data, and world position offset data.

[0063] In this example embodiment, the first model parameter, the second model parameter, and the third model parameter are determined based on the base UV map, world space vertex normal data, and world position offset data. This can be achieved as follows: In response to the assignment operation on the base UV map, world space vertex normal data, and world position offset data, the first model parameter corresponding to the base UV map, the second model parameter corresponding to the world space vertex normal data, and the third model parameter corresponding to the world position offset data are determined. The first model parameter described here can be used to characterize the grayscale values ​​of the original virtual plant model, the second model parameter can be used to characterize the scaling degree of the original virtual plant model, and the third model parameter can be used to characterize the displacement deformation degree of the original virtual plant model. That is, the first model parameter can be used to control the grayscale level required by the original virtual plant model, the second model parameter can be used to control the scaling degree of the original virtual model, and the third model parameter can be used to control the displacement deformation of the original virtual model. Through the first model parameter, the second model parameter, and the third model parameter, one or more virtual plants with different shapes, different color levels, and different thicknesses can be obtained.

[0064] The following will explain and illustrate the specific generation process of the first model parameters, the second model parameters, and the third model parameters with specific examples and embodiments. Specifically:

[0065] In one example embodiment, in response to the assignment operation on the base UV map, a first model parameter corresponding to the base UV map is determined. This can be achieved as follows: First, a first model material corresponding to the original virtual plant model is obtained, and in response to the assignment operation on the original virtual plant model, the first model material is assigned to the original virtual plant model to obtain a first intermediate model; second, the base UV map is subjected to coordinate separation to obtain horizontal UV information and vertical UV information, and in response to the assignment operation on the vertical UV information in the base UV map, a first difference between the vertical UV information and a first preset parameter is calculated; finally, the first V channel value included in the first intermediate model is replaced using the first difference to obtain the first model parameter.

[0066] In one example embodiment, the first model parameters described above may include a first black model texture parameter, a first gray model texture parameter, and a first white model texture parameter, etc.; the first preset parameters described above may include a first sub-preset parameter corresponding to the first black model texture parameter, a second sub-preset parameter corresponding to the first gray model texture parameter, and a third sub-preset parameter corresponding to the first white model texture parameter, etc.; based on this, calculating the first difference between the vertical UV information and the first preset parameter can be achieved in the following ways: calculating the first sub-difference between the vertical UV information and the first preset sub-parameter; and / or calculating the second sub-difference between the vertical UV information and the second preset sub-parameter; and / or calculating the third sub-difference between the vertical UV information and the third preset sub-parameter. Furthermore, under this premise, the first model parameters are obtained by replacing the first V channel value included in the first intermediate model with the first difference. This can be achieved in the following ways: on the one hand, the first V channel value included in the first intermediate model is replaced with the first sub-difference to obtain the first black model texture parameters; on the other hand, the first V channel value included in the first intermediate model is replaced with the second sub-difference to obtain the first gray model texture parameters; and on yet another hand, the first V channel value included in the first intermediate model is replaced with the third sub-difference to obtain the first white model texture parameters.

[0067] The following will further explain and illustrate the specific generation process of the first model parameters. Specifically, the original virtual plant model can be imported into a game engine; the game engine mentioned here can include, but is not limited to, Unreal Engine 4, Unity Engine, or Maya Engine, etc.; then, a new material is created in the game engine and assigned to the model, generating the corresponding first model parameters. In practical applications, firstly, the first model material is assigned to the original virtual plant model, thus obtaining, as shown... Figure 3 The first intermediate model is shown; secondly, coordinate separation is performed on the base UV map to extract horizontal and vertical UV information; further, in response to the assignment operation on the vertical UV information in the base UV map, the first difference between the vertical UV information and the first preset parameter is calculated; wherein, the first preset parameter described here can be used to dynamically control the changes in black, white, and gray of the model; that is, in order to obtain first intermediate models of different colors, different first preset parameters can be set here, and then plant models with different degrees of black, white, and gray can be generated through different first preset parameters. For example, refer to Figure 4 As shown, when the first preset parameter is the third sub-parameter corresponding to the first white model texture, the specific value of the third sub-parameter can be -0.5; when the first preset parameter is the second sub-parameter corresponding to the first gray model texture, the specific value of the second sub-parameter can be 0.5; when the first preset parameter is the first sub-parameter corresponding to the first black model texture, the specific value of the first sub-parameter can be 1.

[0068] Furthermore, in practical applications, to obtain the first white model texture parameters, one can subtract -0.5 from the vertical UV information to obtain the result. Figure 4 The white plant model shown here is obtained by subtracting -0.5 from the vertical UV information, which is equivalent to subtracting -0.5 from the V channel value in the base UV map and adding 0.5 to the V channel value in the base UV map. The specific calculation process for the gray and black models is similar and will not be described further here.

[0069] In one example embodiment, in practical applications, to achieve the special effects of plants during their growth process, it is also necessary to achieve the special effects of plants appearing from nothing. Specifically, refer to... Figure 5 As shown, achieving the special effect of a plant appearing from nothing can include the following steps:

[0070] Step S510: Perform color inversion processing on the first black model texture parameters, the first gray model texture parameters, and the first white model texture parameters to obtain the second white model texture parameters, the second gray model texture parameters, and the second black model texture parameters.

[0071] Step S520: Assign the second white model texture parameters, the second gray model texture parameters, and the second black model texture parameters to the second model material corresponding to the first model material to obtain the third white model texture parameters, the third gray model texture parameters, and the third black model texture parameters.

[0072] Step S530: Calculate the difference between the second preset parameter and the three white model texture parameters, the third gray model texture parameters and the third black model texture parameters to obtain black model textures with different shapes.

[0073] The following will explain and illustrate steps S510-S530. Specifically, firstly, the color inversion processing is performed on the first black model texture parameters, the first gray model texture parameters, and the first white model texture parameters to obtain the following: Figure 6 The diagram shows white, gray, and black models; the color inversion described here is also known as OneMinus, meaning black to white or white to black, etc.; next, the second model material is assigned texture parameters to the second white model, the second gray model, and the second black model, thereby obtaining the third white model, the third gray model, and the third black model texture parameters; the second model material described here is essentially the first model material whose mode is changed from a transparent template to an opaque template (Opacity). The parameters are obtained by masking the second white model texture, the second gray model texture, and the second black model texture. Then, the parameters are connected to the second model material to obtain the third white model texture, the third gray model texture, and the third black model texture. Furthermore, in order to control the appearance of the model through the second preset parameters, it is necessary to display the parts of the V channel values ​​in the third white model texture, the third gray model texture, and the third black model texture parameters that are greater than zero, and to clip the parts that are less than zero, thereby realizing the process of the model appearing from nothing, that is, multiple black model textures with different shapes can be obtained. The specific details of the obtained black model textures can be found in [reference needed]. Figure 7 As shown. Furthermore, in Figure 7 The black models shown have different shapes. By subtracting different second preset parameters, black models of different sizes can be obtained. In actual applications, different second preset parameters can be set according to actual needs. This is just an example and there are no special restrictions on this.

[0074] In one example embodiment, in response to the assignment operation on the world space vertex normal data and world position offset data, determining the second model parameter corresponding to the world space vertex normal data and the third model parameter corresponding to the world position offset data can be achieved as follows: First, the second U-channel value and the second V-channel value included in the first model parameter are smoothed based on a preset smooth transition function to obtain intermediate parameters; second, in response to the assignment operation on the world space vertex normal data, the product between the world space vertex normal data and the first preset scaling factor is calculated to obtain the second model parameter, and the product operation result between the second model parameter and the intermediate parameter is calculated; finally, in response to the assignment operation on the world position offset data, the product operation result is fused with the world position offset data to perform displacement processing on the product operation result through the world position offset data to obtain the third model parameter.

[0075] The following will explain the specific generation process of the second and third model parameters. Specifically, firstly, the second U-channel and second V-channel values ​​included in the first model parameters are smoothed using a smoothing transition function (SmoothStep), thus obtaining... Figure 8The plant model shown can be implemented as follows during the smooth transition process: First, set a maximum and minimum value limit; the maximum value is set to 1.2 and the minimum value to 0. Of course, in actual applications, these can be set according to specific needs; this example does not impose any special restrictions. Second, use SmoothStep to achieve a smooth transition, obtaining multiple smooth transition values. If the smooth transition value is greater than 1.2, it is replaced with 1.2; if the smooth transition value is less than 0, it is replaced with 0, thus obtaining intermediate parameters. Then, calculate the product (Multiply) between the world space vertex normal (Vertex Normal WS) and the first preset scaling factor (Scale_01) to obtain the second model parameters. The second model parameters described here can be considered as scaling the entire model. That is, the scaling of the model can be controlled by multiplying the changes in the model's position values ​​by the scaling factor, then calculating the product (Multiply) between the second model parameters and the intermediate parameters, and finally connecting the product result to the World Position Offset (i.e., through WorldPosition). The Offset (scales the tail of the second product result) is used to obtain the third model parameters. The reason for connecting the product result to the World Position Offset is to scale the tail of the model corresponding to the product result. It's worth noting that translating the model serves two main purposes: one is to depict the process of the model appearing from nothing; the other is to change the grayscale values ​​on the model's surface, multiplying them by a scaling factor to achieve scaling at different positions. Based on this, by translating the texture, the model can be scaled to achieve the desired virtual plant.

[0076] In one example embodiment, in practical applications, it is also necessary to consider the overall thickness of the virtual plant's vines and the issue of the head and tail not shrinking and closing after overall enlargement or reduction. Based on this, the method for generating the virtual plant may further include: performing displacement processing on the third U-channel value and the third V-channel value included in the third model parameters based on a third preset parameter to obtain a texture displacement processing result, and determining whether the fourth U-channel value and the fourth V-channel value included in the texture displacement processing result are greater than a preset threshold; when it is determined that any fourth U-channel value and / or fourth V-channel value included in the texture displacement processing result is greater than the preset threshold, controlling the texture at the tail position in the texture displacement processing result. That is, in practical applications, firstly, the U-channel value and V-channel value included in the first texture processing result are displacement processed based on the third preset parameter to obtain... Figure 9The second texture displacement processing result is shown; the third preset parameter described here can be used to control the size and thickness of the model; furthermore, in practical applications, multiplying by a negative number can achieve the shrinkage and closure of the model's head. For example, in Figure 9 In the example diagram shown, the third preset parameter can be set to -20, -10, and 0.5, etc., and the resulting texture displacement processing results are as follows: Figure 9 The corresponding part is shown in the image; simultaneously, by multiplying by the first preset parameter, it can be seen that when the value exceeds a certain range, the top of the model will scale in the opposite direction; to avoid this problem, a restriction needs to be placed on the tail of the model to ensure that this situation does not occur at the tail; that is, in practical applications, it can be controlled in the following way: first, a fixed black-white-gray gradient can be added to the tail, and then a Max comparison can be used. When the scaling value exceeds a certain range, the maximum value is taken, thus ensuring that the model will not scale in the opposite direction; finally, the values ​​of the model are adjusted to obtain models with different thicknesses; the scene example image of the virtual plant appearing from nothing can be referred to. Figure 10 As shown.

[0077] In one example embodiment, during practical application, the maximum value (End_Max) and minimum value (End_Min) of the U channel and V channel values ​​at the tail position included in the second texture displacement processing result can be obtained. Then, a smooth transition processing is performed, and the result of the smooth transition processing is compared with the second model texture by Max. After obtaining the maximum value, it is multiplied by the second model parameters to obtain the corresponding product operation result. Then, the product operation result is connected to World PositionOffset, which can perform displacement processing on the tail of the texture corresponding to the product operation result, thereby ensuring that the model will not scale backward.

[0078] At this point, the specific control process for the model's growth has been fully implemented. Further, to increase model diversity, it's necessary to add model size scaling to control the overall model thickness. The specific control process for the overall model thickness can be achieved as follows: First, calculate the product of the world space vertex normal (WS) data and the required scaling factor Scale_02. Then, sum the product results obtained by multiplying the maximum value by the second model parameter and the product results obtained by combining the world space vertex normal data and the required scaling factor Scale_02. Finally, connect the sum to the World PositionOffset to achieve overall thickness and tail thickness control. The obtained overall control results can be referenced... Figure 11 As shown.

[0079] In step S130, material data for the original virtual plant model is generated based on the first model parameters, the second model parameters, and the third model parameters.

[0080] Specifically, after obtaining the first, second, and third model parameters mentioned above, material data corresponding to the original virtual plant model can be generated based on these parameters. It should be noted that the first model parameter can characterize the grayscale level of the original virtual plant model, the second model parameter can characterize the scaling degree of the original virtual plant model, and the third model parameter can characterize the displacement and deformation degree of the original virtual plant model. Therefore, the material data generated based on these parameters has already defined the original virtual plant model from multiple different dimensions, including grayscale level, scaling degree, and deformation degree. This allows for the generation of appropriate material data according to actual needs, improving the accuracy of the obtained material data while reducing the system load, thereby improving the accuracy of the resulting target virtual plant.

[0081] In step S140, the original virtual plant model is rendered based on the material data to obtain the target virtual plant.

[0082] In this example embodiment, rendering the original virtual plant model based on the material data to obtain the target virtual plant can be achieved in the following way: One implementation method is to obtain a model texture map corresponding to the original virtual plant model; wherein, the model texture map includes one or more of a model base texture map, a normal map, and a roughness map; add the model texture map to the material data, and use the material data with the added model texture map to render the original virtual plant model to obtain the target virtual plant. That is, a base texture map, a normal map, a roughness map, etc., can be added to the material data to obtain the target virtual plant. Figure 12 The target virtual plant is shown. Further, another implementation method is: obtaining preset model parameters corresponding to the original virtual plant model; wherein, the preset model parameters include one or more of roughness parameters, specular parameters, metallic parameters, and rimlight parameters; adding a base texture and / or model parameters to the material data, and rendering the original virtual plant model using the material data after adding the base texture and / or model parameters to obtain the target virtual plant; that is, roughness parameters, specular parameters, metallic parameters, and rimlight parameters, etc., can also be added to the material data to obtain the target virtual plant; wherein, the target virtual plant obtained by conditionally adjusting the roughness parameters, specular parameters, and metallic parameters can be further referenced. Figure 12As shown, the target virtual plant obtained by adding edge light parameters can be used as a reference. Figure 13 As shown.

[0083] Finally, after obtaining the target virtual plant, the method for generating the virtual plant further includes: combining target virtual plants with different forms, and configuring different growth parameters for each target virtual plant included in the plant combination to obtain virtual vines with a growth binding effect. That is, models of different forms can be combined together, and the growth rhythm of the models can be controlled through growth parameters (Grow_Param) to achieve the growth binding process of the vines; the resulting virtual vines with a growth binding effect can be referenced... Figure 14 As shown.

[0084] Thus, the method for generating virtual plants described in the exemplary embodiments of this disclosure has been fully implemented. Based on the foregoing description, it can be understood that the method for generating virtual plants described in the exemplary embodiments of this disclosure, on the one hand, optimizes and improves the special effects production process, reduces repeated modifications to special effects, and improves the efficiency of art production; at the same time, it simplifies model complexity and reduces the performance consumption of special effects; on the other hand, it has strong controllability and can be quickly adjusted and verified (the rhythm and thickness of the model can be quickly adjusted); furthermore, the related graphics calculations in this technology are relatively simple, and there is no pressure on performance overhead. This technology can be used in PC or mobile 3D games if needed; furthermore, it simplifies the special effects production process, eliminating the need for skinning and skeletal animation creation, and allows for dynamic numerical control of model thickness and the rhythm of vine growth; finally, it simplifies art production costs, optimizes the special effects production process, reduces repeated modifications to models, and has a reasonable performance overhead.

[0085] This disclosure also provides an apparatus for generating virtual plants. Specifically, refer to... Figure 15 As shown, the virtual plant generation device may include a UV unwrapping module 1510, a model parameter determination module 1520, a material data generation module 1530, and a virtual plant generation module 1540.

[0086] in:

[0087] The UV unwrapping module 1510 can be used to unwrap the UVs of the original virtual plant model to obtain the basic UV map and acquire the world space vertex normal data and world position offset data of the original virtual plant model.

[0088] The model parameter determination module 1520 can be used to determine the first model parameters, the second model parameters, and the third model parameters based on the base UV map, world space vertex normal data, and world position offset data.

[0089] The material data generation module 1530 can be used to generate material data for the virtual plant model based on the first model parameters, the second model parameters, and the third model parameters.

[0090] The virtual plant generation module 1540 can be used to render the original virtual plant model based on the material data to obtain the target virtual plant.

[0091] In one example embodiment of this disclosure, the first model parameter is used to characterize the grayscale values ​​of the original virtual plant model; the second model parameter is used to characterize the scaling degree of the original virtual plant model; and the third model parameter is used to characterize the displacement and deformation degree of the original virtual plant model.

[0092] In one example embodiment of this disclosure, determining a first model parameter, a second model parameter, and a third model parameter based on the base UV map, world space vertex normal data, and world position offset data includes: in response to an assignment operation on the base UV map, world space vertex normal data, and world position offset data, determining a first model parameter corresponding to the base UV map, a second model parameter corresponding to the world space vertex normal data, and a third model parameter corresponding to the world position offset data.

[0093] In one example embodiment of this disclosure, in response to an assignment operation on the base UV map, determining the first model parameters corresponding to the base UV map includes: obtaining a first model material corresponding to the original virtual plant model, and in response to an assignment operation on the original virtual plant model, assigning the first model material to the original virtual plant model to obtain a first intermediate model; performing coordinate separation on the base UV map to obtain horizontal UV information and vertical UV information, and in response to an assignment operation on the vertical UV information in the base UV map, calculating a first difference between the vertical UV information and a first preset parameter; and using the first difference to replace the first V channel value included in the first intermediate model to obtain the first model parameters.

[0094] In one example embodiment of this disclosure, the first model parameters include at least one of a first black model texture parameter, a first gray model texture parameter, and a first white model texture parameter; the first preset parameters include at least one of a first sub-preset parameter corresponding to the first black model texture parameter, a second sub-preset parameter corresponding to the first gray model texture parameter, and a third sub-preset parameter corresponding to the first white model texture parameter; wherein, calculating the first difference between the vertical UV information and the first preset parameters includes: calculating the first sub-difference between the vertical UV information and the first sub-preset parameter; and / or calculating the second sub-difference between the vertical UV information and the second sub-preset parameter; and / or calculating the third sub-difference between the vertical UV information and the third sub-preset parameter.

[0095] In one example embodiment of this disclosure, the first model parameters are obtained by replacing the first V channel value included in the first intermediate model with the first difference, including: replacing the first V channel value included in the first intermediate model with the first sub-difference to obtain the first black model texture parameters; and / or replacing the first V channel value included in the first intermediate model with the second sub-difference to obtain the first gray model texture parameters; and / or replacing the first V channel value included in the first intermediate model with the third sub-difference to obtain the first white model texture parameters.

[0096] In one exemplary embodiment of this disclosure, the virtual plant generation device further includes:

[0097] The color inversion processing module can be used to invert the colors of the first black model texture parameters, the first gray model texture parameters, and the first white model texture parameters to obtain the second white model texture parameters, the second gray model texture parameters, and the second black model texture parameters.

[0098] The material assignment module can be used to assign the second model material corresponding to the first model material to the second white model texture parameters, the second gray model texture parameters, and the second black model texture parameters, so as to obtain the third white model texture parameters, the third gray model texture parameters, and the third black model texture parameters.

[0099] The difference calculation module can be used to calculate the difference between the second preset parameter and the three white model texture parameters, the third gray model texture parameters and the third black model texture parameters, to obtain black model textures with different shapes.

[0100] In one example embodiment of this disclosure, in response to the assignment operation on the world space vertex normal data and world position offset data, determining a second model parameter corresponding to the world space fixed-point normal data and a third model parameter corresponding to the world position offset data includes: performing a smooth transition processing on the second U-channel value and the second V-channel value included in the first model parameter based on a preset smooth transition function to obtain intermediate parameters; in response to the assignment operation on the world space vertex normal data, calculating the product between the world space vertex normal data and a first preset scaling factor to obtain the second model parameter, and calculating the product operation result between the second model parameter and the intermediate parameter; in response to the assignment operation on the world position offset data, fusing the product operation result with the world position offset data to perform displacement processing on the product operation result through the world position offset data to obtain the third model parameter.

[0101] In one exemplary embodiment of this disclosure, the virtual plant generation device further includes:

[0102] The displacement processing module can be used to perform displacement processing on the third U channel value and the third V channel value included in the third model parameters based on the third preset parameters, to obtain the texture displacement processing result, and to determine whether the fourth U channel value and the fourth V channel value included in the texture displacement processing result are greater than the preset threshold.

[0103] The texture control module can be used to control the tail position texture in the texture displacement processing result when it is determined that any U channel value and / or V channel value included in the texture displacement processing result is greater than the preset threshold.

[0104] In one example embodiment of this disclosure, rendering the original virtual plant model based on the material data to obtain a target virtual plant includes: obtaining a model texture map corresponding to the original virtual plant model; wherein the model texture map includes one or more of a model base texture map, a normal map, and a roughness map; adding the model texture map to the material data, and rendering the original virtual plant model using the material data after adding the model texture map to obtain the target virtual plant.

[0105] In one example embodiment of this disclosure, rendering the original virtual plant model based on the material data to obtain a target virtual plant further includes: obtaining preset model parameters corresponding to the original virtual plant model; wherein the preset model parameters include one or more of roughness parameters, specular parameters, metallicity parameters, and rim light parameters; adding a base texture and / or model parameters to the material data, and rendering the original virtual plant model using the material data after adding the base texture and / or model parameters to obtain the target virtual plant.

[0106] In one exemplary embodiment of this disclosure, the virtual plant generation device further includes:

[0107] The virtual plant combination module can be used to combine target virtual plants with different forms and configure different growth parameters for each target virtual plant included in the plant combination to obtain virtual vines with a growth binding effect.

[0108] The specific details of each module in the aforementioned virtual plant generation device have been described in detail in the corresponding virtual plant generation method, so they will not be repeated here.

[0109] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0110] Furthermore, although the steps of the method in this disclosure are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.

[0111] In an exemplary embodiment of this disclosure, an electronic device capable of implementing the above-described method is also provided.

[0112] Those skilled in the art will understand that various aspects of this disclosure can be implemented as a system, method, or program product. Therefore, various aspects of this disclosure can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or a combination of hardware and software aspects, collectively referred to herein as a "circuit," "module," or "system."

[0113] The following reference Figure 16 To describe an electronic device 1600 according to such an embodiment of the present disclosure. Figure 16 The electronic device 1600 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.

[0114] like Figure 16As shown, the electronic device 1600 is manifested in the form of a general-purpose computing device. The components of the electronic device 1600 may include, but are not limited to: at least one processing unit 1610, at least one storage unit 1620, a bus 1630 connecting different system components (including storage unit 1620 and processing unit 1610), and a display unit 1640.

[0115] The storage unit stores program code that can be executed by the processing unit 1610, causing the processing unit 1610 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure. For example, the processing unit 1610 can perform actions such as... Figure 1 Step S110: Unwrap the UVs of the original virtual plant model to obtain a basic UV map, and acquire the world space vertex normal data and world position offset data of the original virtual plant model; Step S120: Determine the first model parameters, the second model parameters, and the third model parameters based on the basic UV map, the world space vertex normal data, and the world position offset data; Step S130: Generate material data for the original virtual plant model based on the first model parameters, the second model parameters, and the third model parameters; Step S140: Render the original virtual plant model based on the material data to obtain the target virtual plant.

[0116] Storage unit 1620 may include readable media in the form of volatile storage units, such as random access memory (RAM) 16201 and / or cache memory 16202, and may further include read-only memory (ROM) 16203.

[0117] Storage unit 1620 may also include a program / utility 16204 having a set (at least one) of program modules 16205, such program modules 16205 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.

[0118] Bus 1630 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.

[0119] Electronic device 1600 can also communicate with one or more external devices 1700 (e.g., keyboard, pointing device, Bluetooth device, etc.), one or more devices that enable a user to interact with electronic device 1600, and / or any device that enables electronic device 1600 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 1650. Furthermore, electronic device 1600 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 1660. As shown, network adapter 1660 communicates with other modules of electronic device 1600 via bus 1630. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 1600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0120] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0121] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the methods described above is stored. In some possible implementations, various aspects of this disclosure may also be implemented as a program product including program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps of the various exemplary embodiments of this disclosure described in the "Exemplary Methods" section above.

[0122] The program product for implementing the above-described method according to embodiments of the present disclosure may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, the readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0123] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0124] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.

[0125] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0126] Program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0127] Furthermore, the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of this disclosure and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

[0128] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention described herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not invented by this disclosure. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.

Claims

1. A method for generating virtual plants, characterized in that, include: UV unwrapping is performed on the original virtual plant model to obtain the basic UV map, and the world space vertex normal data and world position offset data of the original virtual plant model are obtained. In response to the assignment operations on the base UV map, world space vertex normal data, and world position offset data, a first model parameter corresponding to the base UV map, a second model parameter corresponding to the world space vertex normal data, and a third model parameter corresponding to the world position offset data are determined. The first model parameter is determined by obtaining a first model material corresponding to the original virtual plant model, and in response to the assignment operation on the original virtual plant model, assigning the first model material to the original virtual plant model to obtain a first intermediate model. The base UV map is subjected to coordinate separation to obtain horizontal UV information and vertical UV information. In response to the assignment operation of the vertical UV information in the base UV map, the first difference between the vertical UV information and the first preset parameter is calculated. The first V channel value included in the first intermediate model is replaced using the first difference to obtain the first model parameters; Material data for the original virtual plant model is generated based on the first model parameters, the second model parameters, and the third model parameters; The original virtual plant model is rendered based on the material data to obtain the target virtual plant.

2. The method for generating virtual plants according to claim 1, characterized in that, The first model parameter is used to characterize the grayscale values ​​of the original virtual plant model; The second model parameter is used to characterize the degree of scaling of the original virtual plant model; The third model parameter is used to characterize the degree of displacement and deformation of the original virtual plant model.

3. The method for generating virtual plants according to claim 1, characterized in that, The first model parameters include at least one of the following: first black model texture parameters, first gray model texture parameters, and first white model texture parameters; The first preset parameter includes at least one of a first sub-preset parameter corresponding to the first black model texture parameter, a second sub-preset parameter corresponding to the first gray model texture parameter, and a third sub-preset parameter corresponding to the first white model texture parameter; The calculation of the first difference between the longitudinal UV information and the first preset parameter includes: Calculate the first sub-difference between the longitudinal UV information and the first sub-preset parameter; and / or Calculate the second sub-difference between the longitudinal UV information and the second sub-preset parameter; and / or Calculate the third sub-difference between the longitudinal UV information and the third sub-preset parameter.

4. The method for generating virtual plants according to claim 3, characterized in that, The first model parameters are obtained by replacing the first V channel values ​​included in the first intermediate model with the first difference, including: The first V channel value included in the first intermediate model is replaced using the first sub-difference to obtain the first black model texture parameters; and / or The first V channel value included in the first intermediate model is replaced using the second sub-difference to obtain the first gray model texture parameters; and / or The first V channel value included in the first intermediate model is replaced by the third sub-difference to obtain the first white model texture parameters.

5. The method for generating virtual plants according to claim 4, characterized in that, The method for generating virtual plants also includes: The first black model texture parameters, the first gray model texture parameters, and the first white model texture parameters are subjected to color inversion processing to obtain the second white model texture parameters, the second gray model texture parameters, and the second black model texture parameters; Assign the second white model texture parameters, the second gray model texture parameters, and the second black model texture parameters to the second model material corresponding to the first model material to obtain the third white model texture parameters, the third gray model texture parameters, and the third black model texture parameters; The differences between the second preset parameter and the third white model texture parameter, the third gray model texture parameter and the third black model texture parameter are calculated to obtain black model textures with different shapes.

6. The method for generating virtual plants according to claim 1, characterized in that, In response to the assignment operations on the world space vertex normal data and world position offset data, the second model parameters corresponding to the world space vertex normal data and the third model parameters corresponding to the world position offset data are determined, including: Based on a preset smooth transition function, the second U-channel value and the second V-channel value included in the first model parameters are smoothed to obtain intermediate parameters. In response to the assignment operation on the world space vertex normal data, the product between the world space vertex normal data and the first preset scaling factor is calculated to obtain the second model parameter, and the product operation result between the second model parameter and the intermediate parameter is calculated. In response to the assignment operation on the world position offset data, the product operation result is fused with the world position offset data to perform displacement processing on the product operation result through the world position offset data, thereby obtaining the third model parameters.

7. The method for generating virtual plants according to claim 6, characterized in that, The method for generating virtual plants also includes: Based on the third preset parameters, the third U channel value and the third V channel value included in the third model parameters are subjected to displacement processing to obtain the texture displacement processing result, and it is determined whether the fourth U channel value and the fourth V channel value included in the texture displacement processing result are greater than the preset threshold. When any U channel value and / or V channel value included in the texture displacement processing result is greater than the preset threshold, the tail position texture in the texture displacement processing result is controlled.

8. The method for generating virtual plants according to claim 1, characterized in that, The original virtual plant model is rendered based on the material data to obtain the target virtual plant, including: Obtain the model texture map corresponding to the original virtual plant model; wherein, the model texture map includes one or more of the model base texture map, normal map, and roughness map; The model texture is added to the material data, and the original virtual plant model is rendered using the material data after adding the model texture to obtain the target virtual plant.

9. The method for generating virtual plants according to claim 1, characterized in that, The original virtual plant model is rendered based on the material data to obtain the target virtual plant, which also includes: Obtain the preset model parameters corresponding to the original virtual plant model; wherein, the preset model parameters include one or more of the following: roughness parameter, specular parameter, metallicity parameter, and rim light parameter; Add a base texture and / or model parameters to the material data, and render the original virtual plant model using the material data with the added base texture and / or model parameters to obtain the target virtual plant.

10. The method for generating virtual plants according to claim 1, characterized in that, The method for generating virtual plants also includes: By combining target virtual plants with different forms and configuring different growth parameters for each target virtual plant in the plant combination, virtual vines with a growth binding effect are obtained.

11. A device for generating virtual plants, characterized in that, include: The UV unwrapping module is used to unwrap the UVs of the original virtual plant model to obtain the basic UV map, and to obtain the world space vertex normal data and world position offset data of the original virtual plant model. The model parameter determination module is used to determine, in response to the assignment operations on the base UV map, world space vertex normal data, and world position offset data, a first model parameter corresponding to the base UV map, a second model parameter corresponding to the world space vertex normal data, and a third model parameter corresponding to the world position offset data; the first model parameter is determined by: obtaining a first model material corresponding to the original virtual plant model, and in response to the assignment operation on the original virtual plant model, assigning the first model material to the original virtual plant model to obtain a first intermediate model; The base UV map is subjected to coordinate separation to obtain horizontal UV information and vertical UV information. In response to the assignment operation of the vertical UV information in the base UV map, the first difference between the vertical UV information and the first preset parameter is calculated. The first V channel value included in the first intermediate model is replaced using the first difference to obtain the first model parameters; The material data generation module is used to generate material data for the original virtual plant model based on the first model parameters, the second model parameters, and the third model parameters. The virtual plant generation module is used to render the original virtual plant model based on the material data to obtain the target virtual plant.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method for generating virtual plants according to any one of claims 1-10.

13. An electronic device, characterized in that, include: processor; as well as Memory for storing the executable instructions of the processor; The processor is configured to execute the method for generating virtual plants according to any one of claims 1-10 by executing the executable instructions.