Plant model generation method based on mixed reality and application

By obtaining the virtual plant model and its topological relationship and using map technology, the target material is assigned to the plant growth model and a mixed reality sub-model is generated, which solves the problem of difficult to simulate plant growth animation on the mixed reality platform, and improves the authenticity of the plant model and Interactiveness.

CN119206007APending Publication Date: 2024-12-27TIANAN STAR CONTROL (BEIJING) TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411150753.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The prior art is difficult to effectively simulate plant growth animations on mixed reality platforms, especially because ABC format animations are not supported, resulting in insufficient authenticity and interactive flexibility of plant models.

Method used

By obtaining the virtual plant model and its topological relationship, using maps to assign the target material to the plant growth model, generating mixed reality sub-models, and creating K-frame animations through the Unity engine to achieve control of plant growth animations.

Benefits of technology

It improves the authenticity and interactive flexibility of mixed reality plant models, solves the problem that animation cannot be played on mixed reality platforms, and realizes the details and sense of hierarchy of plant growth process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119206007A_ABST
    Figure CN119206007A_ABST
Patent Text Reader

Abstract

The invention provides a mixed reality-based plant model generation method and application, and the embodiment of the method comprises the steps: firstly, obtaining a virtual plant model and a topological relation corresponding to the virtual plant model; secondly, obtaining a target material library corresponding to the plant growth node based on triggering of a user on any plant growth node in the topological relation; when it is detected that any target material in the target material library is pulled to the plant growth model corresponding to the plant growth node, endowing the plant growth model with the target material, and generating a mixed reality sub-model; and then, based on the mixed reality sub-model corresponding to each plant growth node in the topological relation, generating a mixed reality plant model. Therefore, the target material is endowed to the plant growth model in a mapping manner, so that the authenticity of the mixed reality plant model is improved on the basis of reducing the surface number of the plant model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer technology, and in particular relates to a plant model generation method based on mixed reality and an application thereof. Background Art

[0002] Potted plants such as lemons and kumquats generally go through a process of germination, green leaves, flowering, fruit growth, and fruit maturity. In order to simulate the growth process of different plants, it is necessary to make 3D models of different growth stages of selected plants, including green leaves, flowers, green fruits, red fruits, etc. Plant model making will use a variety of 3D modeling software, and Speedtree software will be used to make the main plant model. Speedtree software is a software specifically used to make tree plants. Its software nodes are more suitable for the characteristics of plant branch and leaf growth, but it is not as easy to make other plants that can bloom and bear fruit as it is to make trees.

[0003] Virtual plant growth is based on the production of plant 3D models, simulating the growth process of each stage in the form of animation. SpeedTree software provides output of simulated growth animation from bottom to top by node, which can be played in the Unity engine through ABC format animation, but due to the particularity of the mixed reality development platform, this format of animation is not supported.

[0004] Therefore, there is an urgent need to provide a plant model generation method based on mixed reality to meet the realism and controllability of plant growth animation, and to achieve effective control of plant growth animation in the Unity engine, thereby improving the flexibility of interaction in the mixed reality plant growth process. Summary of the invention

[0005] In response to the above-mentioned problems existing in the prior art, an embodiment of the present invention provides a plant model generation method and application based on mixed reality; the target material can be assigned to the plant growth model by means of mapping, thereby improving the authenticity of the mixed reality plant model while reducing the number of faces of the plant model.

[0006] According to a first aspect of an embodiment of the present invention, a plant model generation method based on mixed reality includes: obtaining a virtual plant model and a topological relationship corresponding to the virtual plant model; wherein the topological relationship is used to indicate a network structure formed by plant growth nodes corresponding to each plant growth model in the virtual plant model; based on a user triggering any plant growth node in the topological relationship, obtaining a target material library corresponding to the plant growth node; when it is detected that any target material in the target material library is pulled to the plant growth model corresponding to the plant growth node, assigning the target material to the plant growth model to generate a mixed reality sub-model; based on the mixed reality sub-model corresponding to each of the plant growth nodes in the topological relationship, generating a mixed reality plant model.

[0007] Optionally, the plant growth node corresponding to the plant growth model is selected from any one of a trunk node, a branch node, a leaf node, a flower node, and a fruit node.

[0008] Optionally, the method further includes: adjusting the form of the mixed reality sub-model based on a user triggering a parameter option in the mixed reality sub-model.

[0009] Optionally, the method further includes: creating a trunk model based on Speedtree, and adding the trunk node corresponding to the trunk model to the topological relationship; and / or, creating a leaf model based on Speedtree or importing a fruit model of Speedtree from the outside, and adding the leaf nodes corresponding to the leaf model or the fruit nodes corresponding to the fruit model as child nodes of the trunk node to the topological relationship; and / or, creating a branch model based on Speedtree, and adding the branch nodes corresponding to the branch model as child nodes of the trunk node to the topological relationship; and / or, creating a leaf model based on Speedtree or importing a fruit model of Speedtree from the outside, and adding the leaf nodes corresponding to the leaf model or the fruit nodes corresponding to the fruit model as child nodes of the trunk node. The child nodes of the branch nodes are added to the topological relationship; and / or, a branch model is created based on Speedtree, and the branch nodes corresponding to the branch model are added to the topological relationship as child nodes of the branch nodes; a leaf model is created based on Speedtree or a fruit model is imported from the outside into Speedtree, and the leaf nodes corresponding to the leaf model or the fruit nodes corresponding to the fruit model are added to the topological relationship as child nodes of the molecular nodes; and / or, a flower skeleton model is created based on Speedtree, and the skeleton nodes corresponding to the flower skeleton model are added to the topological relationship as child nodes of the branch nodes; a flower model is created based on Speedtree, and the flower nodes corresponding to the flower model are added to the topological relationship as child nodes of the skeleton nodes.

[0010] Optionally, the method also includes: obtaining actual fruit coordinates corresponding to the fruit model made by the three-dimensional software Maya; converting the fruit coordinates to the coordinate system of Speedtree to obtain converted fruit coordinates; and importing the fruit model into the Speedtree based on the converted fruit coordinates.

[0011] Optionally, the method further includes: removing the number of faces of the flower skeleton node from the mixed reality plant model by adjusting the parameters of the flower skeleton node.

[0012] According to a second aspect of an embodiment of the present invention, there is also provided an application method of the plant model as described in the first aspect, the application method comprising: importing the mixed reality plant model into three-dimensional software, and based on a model center point modification request, performing center point modification processing on each mixed reality sub-model in the mixed reality plant model to obtain a modified mixed reality plant model; according to the plant growth stage, performing model grouping processing on the modified mixed reality plant model to output a plurality of model groups; making each of the model groups into a K-frame animation through the Unity engine, and setting control parameters corresponding to the growth of the plant for the K-frame animation.

[0013] Optionally, the application method further includes: based on the triggering of different control parameters of the plant growth stage, performing a playback operation on a plurality of the K-frame animations to generate an animation result of a mixed reality plant model.

[0014] Optionally, the several model groups include at least: a trunk model group, a branch model group, a flower model group, and a fruit model group; wherein the trunk model group or the branch model group includes leaves; the materials of the leaves, flowers or fruits in the model group are detected to obtain a detection result; if the detection result indicates that the materials of the leaves, flowers or fruits in the model group include at least two types, the three-dimensional software is controlled to output the model group to the Unity engine.

[0015] According to the third aspect of an embodiment of the present invention, a plant model generation device based on mixed reality is also provided, and the device includes: a first acquisition module, used to acquire a virtual plant model and a topological relationship corresponding to the virtual plant model; wherein the topological relationship is used to indicate a network structure formed by plant growth nodes corresponding to each plant growth model in the virtual plant model; a first generation module, used to acquire a target material library corresponding to any plant growth node in the topological relationship based on a user triggering the plant growth node; when it is detected that any target material in the target material library is pulled to the plant growth model corresponding to the plant growth node, the target material is assigned to the plant growth model to generate a mixed reality sub-model; a second generation module, used to generate a mixed reality plant model based on the mixed reality sub-model corresponding to each of the plant growth nodes in the topological relationship.

[0016] According to a fourth aspect of an embodiment of the present invention, there is further provided a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the method described in the first aspect is implemented.

[0017] The present invention provides a method and application for generating a plant model based on mixed reality. An embodiment of the method includes: first, obtaining a virtual plant model and a topological relationship corresponding to the virtual plant model; wherein the topological relationship is used to indicate a network structure formed by plant growth nodes corresponding to each plant growth model in the virtual plant model; second, based on a user triggering any plant growth node in the topological relationship, obtaining a target material library corresponding to the plant growth node; when it is detected that any target material in the target material library is pulled to the plant growth model corresponding to the plant growth node, assigning the target material to the plant growth model to generate a mixed reality sub-model; then, based on the mixed reality sub-model corresponding to each plant growth node in the topological relationship, generating a mixed reality plant model. Thus, by using a texture to assign the target material to the plant growth model, the authenticity of the mixed reality plant model is improved on the basis of reducing the number of faces of the plant model. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Hereinafter, some specific embodiments of the present invention will be described in detail in an exemplary and non-limiting manner with reference to the accompanying drawings. The same reference numerals in the accompanying drawings indicate the same or similar components or parts. It should be understood by those skilled in the art that these drawings are not necessarily drawn to scale. In the accompanying drawings:

[0019] Figure 1 A schematic diagram of a flow chart of a method for generating a plant model based on mixed reality provided by an embodiment of the present invention;

[0020] Figure 2 A schematic flow chart of an application method of a plant model based on mixed reality provided by an embodiment of the present invention;

[0021] Figure 3 A schematic diagram of a network topology structure provided by an embodiment of the present invention;

[0022] Figure 4 A schematic diagram of the structure of a plant model generation device based on mixed reality provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0023] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0024] Making a mixed reality plant model usually requires making the generated plant model close to reality while saving the number of faces. In fact, these two requirements are in conflict with each other. For example, if you want to show more details of the distortion of the branches of the mixed reality plant model, then its number of faces will naturally become more, because only with more faces can more turning points and bending degrees be expressed. If the number of faces is too small, it will not be able to bend more, and the effect will not be good. To this end, this embodiment makes a target material for the model, and then assigns the target material to the corresponding plant growth model. When making the target material, tens of thousands of faces are required to produce the effect of the plant growth model, so the target material is assigned to the corresponding plant growth model, thereby achieving the effect of displaying tens of thousands of faces through single-digit faces, thereby improving the authenticity of the mixed reality plant model.

[0025] like Figure 1 As shown in FIG. 1 , a flow chart of a method for generating a plant model based on mixed reality is provided in one embodiment of the present invention. Figure 3 FIG. 1 is a schematic diagram of a network topology structure provided by an embodiment of the present invention.

[0026] A plant model generation method based on mixed reality, the method comprising at least the following steps:

[0027] S101, obtaining a virtual plant model and a topological relationship corresponding to the virtual plant model; wherein the topological relationship is used to indicate a network structure formed by plant growth nodes corresponding to each plant growth model in the virtual plant model;

[0028] S102, based on the user triggering any plant growth node in the topological relationship, obtaining a target material library corresponding to the plant growth node; when it is detected that any target material in the target material library is pulled to the plant growth model corresponding to the plant growth node, assigning the target material to the plant growth model to generate a mixed reality sub-model;

[0029] S103, generating a mixed reality plant model based on the mixed reality sub-model corresponding to each plant growth node in the topological relationship.

[0030] In S101, the plant growth node corresponding to the plant growth model is selected from any one of a trunk node, a branch node, a leaf node, a flower node, and a fruit node.

[0031] The actual fruit coordinates corresponding to the fruit model made by the three-dimensional software Maya are obtained; the fruit coordinates are converted into the coordinate system of the Speedtree to obtain the converted fruit coordinates; based on the converted fruit coordinates, the fruit model is imported into the Speedtree.

[0032] A trunk model is created based on Speedtree, and the trunk nodes corresponding to the trunk model are added to the topological relationship; and / or, a leaf model is created based on Speedtree or a fruit model is imported from Speedtree from the outside, and the leaf nodes corresponding to the leaf model or the fruit nodes corresponding to the fruit model are added to the topological relationship as child nodes of the trunk node; and / or, a branch model is created based on Speedtree, and the branch nodes corresponding to the branch model are added to the topological relationship as child nodes of the trunk node; and / or, a leaf model is created based on Speedtree or a fruit model is imported from Speedtree from the outside, and the leaf nodes corresponding to the leaf model or the fruit nodes corresponding to the fruit model are added to the topological relationship as child nodes of the branch node. system; and / or, making a branch model based on Speedtree, and adding the branch nodes corresponding to the branch model as child nodes of the branch nodes to the topological relationship; making a leaf model based on Speedtree or importing a fruit model from the outside into Speedtree, and adding the leaf nodes corresponding to the leaf model or the fruit nodes corresponding to the fruit model as child nodes of the molecular nodes to the topological relationship; and / or, making a flower skeleton model based on Speedtree, and adding the skeleton nodes corresponding to the flower skeleton model as child nodes of the branch nodes to the topological relationship; making a flower model based on Speedtree, and adding the flower nodes corresponding to the flower model as child nodes of the skeleton nodes to the topological relationship; thereby obtaining a topological relationship corresponding to the virtual plant model.

[0033] In S102, based on the user triggering the parameter option in the mixed reality sub-model, the form of the mixed reality sub-model is adjusted.

[0034] For example: according to the order of growth between different parts of the plant, start making the main trunk model of the plant model and create a new trunk node; then assign the height map as the target material to the main trunk model to generate a mixed reality main trunk model. Based on the user's triggering of the target material parameter option in the mixed reality main trunk model, the concave and convex value of the surface of the mixed reality main trunk model can be adjusted; thus, the uneven material effect on the surface of the mixed reality main trunk model can be produced with a smaller number of faces, while saving the number of faces, increasing the authenticity and detail of the mixed reality main trunk model. During production, you can also switch to hand-drawing mode to adjust the distorted shape of the branches of the mixed reality main trunk model.

[0035] Continue to add leaf nodes to the trunk node to make the leaf model growing on the main branch model; then, assign the target material to the corresponding leaf model through mapping to generate a mixed reality leaf model. By marking different ID numbers on the leaf nodes, different models can be generated. For example: different ID numbers generate leaves, flowers and fruits. By adjusting the parameters of the mixed reality leaf model, some of its distortions can be changed.

[0036] Continue to add branch nodes on the trunk node to make a branch model growing on the main trunk model; then, assign the corresponding branch model to the target material through mapping to generate a mixed reality branch model.

[0037] When making a mixed reality leaf model, it is necessary to select a generation method according to the different types of leaf generation of the plant model. For example, by using the effect of interlacing patches, twigs and leaves growing on branches are made. This embodiment makes a mixed reality leaf model by making an integrated texture.

[0038] The principle of integrated mapping is to create a high-polygon branch to create its details, export it as a texture, and give the target material in the form of a texture to the created leaf node. In this way, while saving the number of polygons, the realism and detail of the mixed reality leaf model are increased.

[0039] When making a mixed reality flower model, since there is no node for making flowers in Speedtree, considering the similarity between flowers and leaves, a flower skeleton model is made through Speedtree, and the skeleton nodes corresponding to the flower skeleton model are added to the topological relationship as child nodes of the branch nodes; a flower model is made based on Speedtree, and the flower nodes corresponding to the flower model are added to the topological relationship as child nodes of the skeleton nodes; thereby, the petals of the flower can be made.

[0040] By adjusting the selection of various parameter options in the mixed reality flower model, the shape of the mixed reality flower model can be adjusted. For example: when making the top of the flower, by adjusting the parameters of the calyx option in the mixed reality flower model, the calyx shape can be effectively adjusted. By adjusting the flower orientation parameters in the mixed reality flower model, the flower face can be made to face upward. By adjusting the parameters of the flower leaf structure in the mixed reality flower model, the style of the flower can be set to whorled. By adjusting the parameters of the internode length in the mixed reality flower model, the number of petals can be increased. By adjusting the height parameters in the mixed reality flower model, the fluffiness of the entire flower can be adjusted to make the flower look fuller. By making a target material of multiple gradient flower maps, the mixed reality flower model can be adjusted in a gradient form, so that the flowers of the mixed reality plant model have a gradient effect.

[0041] When making a mixed reality fruit model, by adding a fruit node and importing an externally made fruit model, the target material as a fruit map is assigned to the fruit model to generate a mixed reality fruit model.

[0042] It should be noted that the number of faces of the prepared mixed reality flower model can be optimized; for example: by adjusting the parameters of the flower skeleton node, the number of faces of the flower skeleton node can be removed from the mixed reality plant model; by adjusting the segmentation ratio of the length and width of the branches, the number of faces can be reduced.

[0043] In S103, a mixed reality plant model is generated based on the mixed reality main branch model corresponding to the trunk node, the mixed reality branch model corresponding to the branch node, the mixed reality branch model corresponding to the branch node, the mixed reality leaf model corresponding to the leaf node, the mixed reality flower model corresponding to the flower node, and the mixed reality fruit model corresponding to the fruit node in the topological relationship.

[0044] This embodiment uses a texture to assign the target material to the plant growth model, thereby improving the authenticity of the mixed reality plant model while reducing the number of faces of the plant model; and uses the leaf nodes of Speedtree to make branches, leaves, flowers, etc. of various potted plants, thereby improving the production effect and efficiency of the plant model.

[0045] In the preferred implementation of this embodiment, this embodiment needs to first add two target materials of the leaf node, and specify the nodes of the two target materials as the previous nodes of the leaf node. By adjusting the curve options of the mixed reality leaf model, two leaves of different shapes can be made on the same branch material, which is more in line with the characteristics of new branches in nature being shorter and thinner, and the closer to the root, the thicker the effect.

[0046] like Figure 2 , which is a flow chart of an application method of a plant model based on mixed reality provided by an embodiment of the present invention.

[0047] A method for applying a plant model based on mixed reality includes at least the following steps:

[0048] S201, importing the mixed reality plant model into the three-dimensional software, and performing center point modification processing on each mixed reality sub-model in the mixed reality plant model based on the model center point modification request, to obtain a modified mixed reality plant model;

[0049] S202, grouping the modified mixed reality plant model according to the plant growth stage, and outputting a plurality of model groups;

[0050] S203, making each model group into a K-frame animation through the Unity engine, and setting control parameters corresponding to plant growth for the K-frame animation.

[0051] In S201, the 3D software modifies the center point of each mixed reality sub-model based on the user's modification request for the center point of each mixed reality sub-model, and generates a modified mixed reality plant model. For example, the center point of the mixed reality sub-model is modified to the growth point, for example, the center point of the mixed reality fruit model cannot be the physical center point of the initial model, but is located at the connection with the branch.

[0052] In S202 and S203, the plurality of model groups include at least: a trunk model group, a branch model group, a flower model group, and a fruit model group; wherein the trunk model group or the branch model group includes leaves.

[0053] Before each of the model groups is made into a K-frame animation through the Unity engine, the application method also includes: detecting the materials of the leaves, flowers or fruits in the model group to obtain a detection result; if the detection result indicates that the materials of the leaves, flowers or fruits in the model group include at least two types, controlling the three-dimensional software to output the model group to the Unity engine.

[0054] In a preferred implementation of this embodiment, based on the triggering of different control parameters of the plant growth stage, a playback operation is performed on a plurality of the K-frame animations to generate an animation result of a mixed reality plant model.

[0055] This embodiment re-merges and groups the various parts of the mixed reality plant model produced by SpeedTree, and then uses the K-frame animation method to complete the plant growth animation. This method has a smooth production process and a high degree of control over the various parts of the model, and can produce more detailed and layered growth animations; and the control of this type of animation in the Unity engine is also very convenient, which can provide more flexible effects for subsequent interactions and enhance the immersiveness of the system; it solves the problem in the prior art that ABC format animations cannot be played on the mixed reality platform, and at the same time solves the problem of flexible control of animations.

[0056] It should be understood that in various embodiments of the present invention, the size of the serial numbers of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0057] The present invention uses the leaf nodes of Speedtree to make branches, leaves, flowers, etc. of various potted plants, which can basically solve the demand for making models of all plant growth stages; uses K-frame animation format animation to make plant growth animation, which solves the problem in the prior art that ABC format animation cannot be played on the mixed reality platform, and at the same time solves the problem of flexible control of animation.

[0058] The following describes in detail the application method of the mixed reality-based plant model provided in this embodiment in conjunction with specific application method scenarios.

[0059] A method for applying a plant model based on mixed reality includes at least the following steps:

[0060] S1, acquiring a virtual plant model and a topological relationship corresponding to the virtual plant model; wherein the topological relationship is used to indicate a network structure formed by plant growth nodes corresponding to each plant growth model in the virtual plant model;

[0061] S2, based on the user triggering any plant growth node in the topological relationship, obtaining a target material library corresponding to the plant growth node; when it is detected that any target material in the target material library is pulled to the plant growth model corresponding to the plant growth node, assigning the target material to the plant growth model to generate a mixed reality sub-model;

[0062] S3, generating a mixed reality plant model based on the mixed reality sub-model corresponding to each of the plant growth nodes in the topological relationship;

[0063] S4, importing the mixed reality plant model into the three-dimensional software, and performing center point modification processing on each mixed reality sub-model in the mixed reality plant model based on the model center point modification request, to obtain a modified mixed reality plant model;

[0064] S5, grouping the modified mixed reality plant model according to the plant growth stage, and outputting a plurality of model groups; wherein the plurality of model groups at least include: a trunk model group, a branch model group, a flower model group, and a fruit model group; wherein the trunk model group or the branch model group both include leaves;

[0065] S6, detecting the materials of the leaves, flowers or fruits in the model group to obtain a detection result; if the detection result indicates that the materials of the leaves, flowers or fruits in the model group include at least two, controlling the three-dimensional software to output the model group to the Unity engine;

[0066] S7, making each of the model groups into a K-frame animation through the Unity engine, and setting control parameters corresponding to the growth of the plants for the K-frame animation.

[0067] Specifically,

[0068] 1) Create mixed reality plant models

[0069] By making leaf nodes in Speedtree, the method of making plant flowers is expanded, providing a new idea for making flowering plants. The method of making flowers, fruits, etc. on potted plants is extended from making branch nodes. The flowers of plants are mainly made by generating flower nodes as petals on branch nodes. Branch nodes are mainly used to make branches of trees in Speedtree. Because flowers have richer morphological changes than other plant leaves, and directly adding flower nodes on branch nodes cannot make the deformation of flowers. The deformation of flowers can be indirectly adjusted by adding skeleton nodes to branch nodes as support for the skeleton model of flowers, but adding skeleton nodes between branch nodes and flower nodes will increase the number of faces of the entire plant. The present invention can adjust the parameters of skeleton nodes, while retaining the function of skeleton nodes, without counting the number of skeleton node faces into the entire plant. Use skeleton nodes as skeletons for flower distortion. Make the shape of flowers by adjusting parameters such as gravity and distortion in skeleton nodes.

[0070] By adding a fruit node and importing an externally made fruit model, first make the material, import the fruit model, and assign the fruit material to the fruit model. When importing an externally made fruit model into Speedtree, make sure that the fruit model and Speedtree are in the same coordinate system. In addition to the main trunk node and branch node, all other nodes of this plant are implemented by adding leaf nodes. By expanding the scope of use of leaf nodes, it can be used not only as a leaf in Speedtree, but also as a branch, a petal, a stamen, a fruit, and any specified object can be generated on the trunk of the plant by adding leaf nodes.

[0071] 2) Make K-frame animation

[0072] After obtaining the plant model made by SpeedTree, you first need to import it into the 3D software Maya for preprocessing. In Maya, you first need to reassign the model center point to each part of the plant, and modify the center point to the growth point. For example, the center point of the fruit cannot be the initial physical center point of the model, but is located at the connection with the branch. The same principle applies to branches, flowers, etc. In addition, in the process of modifying the center point, due to the characteristics of SpeedTree exporting models, a model that logically belongs to one object may be divided into multiple models, such as a flower model but each petal is separated as a model. At this time, the model needs to be merged and its center point modified. After the center point is modified, the model will be divided into many small parts, which is not convenient for subsequent K-frame animation. The model needs to be merged into groups according to a certain logic. The main logic is to group branches on the same trunk, leaves on the same branch, inflorescences on the same branch, and fruits under the same inflorescence. Small groups belong to large groups, which is convenient for step-by-step control of growth animation and achieves a real plant growth simulation effect. After the grouping is completed, you need to check the materials of the leaves, flowers and fruits before exporting the model. The same model should be divided into at least two materials. In this way, controlling the material changes separately can increase the layering and realism of the growth animation.

[0073] After importing several model groups into the engine, start making K-frame animations for the model groups, step by step according to the growth stage. For example, bolting, flowering, and fruiting are divided into three animation clips. The main control is to scale each part of the model, and control the color map of the material to transition between the two pictures by interpolation, so as to achieve the layer-by-layer growth of the plant from bottom to top, the process from flower blooming to flower falling, the fruit from small to large, and the leaves from green to yellow. In terms of details, the changes of each flower and each leaf should not be simultaneous, but should be staggered and consistent with real plants. After completing the production of all K-frame animations, it is necessary to control their playback order and conditions through Animator. Most plants need to be controlled in two layers, and the plant growth and leaf color change should be controlled separately, because the yellowing of leaves and wormholes may occur at any growth stage and need to be controlled separately. Parameter conditions also need to be added in Animator as conditions for switching between different animation clips. The most important one is the step parameter, which marks the growth stage of the plant. It is needed in both long-term and short-term interactions to control the growth stage of the animation. In addition, corresponding parameters need to be added according to the characteristics of different plants and the characteristics of long-term care interactions, which mainly serve the subsequent interactive control.

[0074] In this embodiment, the leaf nodes of Speedtree are first used to make branches, leaves, flowers, etc. of various potted plants, which can basically solve the demand for making models of all plant growth stages; and the target material is assigned to the plant growth model by means of mapping, thereby improving the authenticity of the mixed reality plant model on the basis of reducing the number of faces of the plant model; then, the various parts of the mixed reality plant model made by SpeedTree are re-merged and grouped, and the K-frame animation method is used to complete the plant growth animation, which solves the problem of the prior art that ABC format animation cannot be played on the mixed reality platform, and solves the problem of flexible control of animation.

[0075] like Figure 4 , which is a schematic diagram of the structure of a plant model generating device based on mixed reality provided by an embodiment of the present invention.

[0076] A plant model generation device based on mixed reality, the device 400 includes: a first acquisition module 401, used to acquire a virtual plant model and a topological relationship corresponding to the virtual plant model; wherein the topological relationship is used to indicate a network structure formed by plant growth nodes corresponding to each plant growth model in the virtual plant model; a first generation module 402, used to acquire a target material library corresponding to any plant growth node in the topological relationship based on a user triggering the plant growth node; when it is detected that any target material in the target material library is pulled to the plant growth model corresponding to the plant growth node, the target material is assigned to the plant growth model to generate a mixed reality sub-model; a second generation module 403, used to generate a mixed reality plant model based on the mixed reality sub-model corresponding to each plant growth node in the topological relationship.

[0077] In a preferred implementation manner of this embodiment, the plant growth node corresponding to the plant growth model is selected from any one of a trunk node, a branch node, a leaf node, a flower node, and a fruit node.

[0078] In a preferred implementation manner of this embodiment, the device further includes an adjustment module for adjusting the form of the mixed reality sub-model based on a user triggering a parameter option in the mixed reality sub-model.

[0079] In a preferred implementation manner of this embodiment, the device also includes: an adding module, which is used to create a trunk model based on Speedtree, and add the trunk node corresponding to the trunk model to the topological relationship; and / or, create a leaf model based on Speedtree or import a fruit model of Speedtree from the outside, and add the leaf nodes corresponding to the leaf model or the fruit nodes corresponding to the fruit model as child nodes of the trunk node to the topological relationship; and / or, create a branch model based on Speedtree, and add the branch nodes corresponding to the branch model as child nodes of the trunk node to the topological relationship; and / or, create a leaf model based on Speedtree or import a fruit model of Speedtree from the outside, and add the leaf nodes corresponding to the leaf model or the fruit nodes corresponding to the fruit model to the topological relationship. The fruit node is added as a child node of the branch node to the topological relationship; and / or, a branch model is made based on Speedtree, and the branch nodes corresponding to the branch model are added to the topological relationship as child nodes of the branch node; a leaf model is made based on Speedtree or a fruit model is imported from the outside into Speedtree, and the leaf nodes corresponding to the leaf model or the fruit nodes corresponding to the fruit model are added to the topological relationship as child nodes of the branch node; and / or, a flower skeleton model is made based on Speedtree, and the skeleton nodes corresponding to the flower skeleton model are added to the topological relationship as child nodes of the branch node; a flower model is made based on Speedtree, and the flower nodes corresponding to the flower model are added to the topological relationship as child nodes of the skeleton node.

[0080] In a preferred implementation of this embodiment, the device also includes: a second acquisition module, used to obtain the actual fruit coordinates corresponding to the fruit model made by the three-dimensional software Maya; a conversion module, used to convert the fruit coordinates into the coordinate system of Speedtree to obtain converted fruit coordinates; an import module, used to import the fruit model into the Speedtree based on the converted fruit coordinates.

[0081] In a preferred implementation manner of this embodiment, the device further includes: a culling module, which is used to cull the number of faces of the flower skeleton node from the mixed reality plant model by adjusting the parameters of the flower skeleton node.

[0082] The above device can execute a plant model generation method based on mixed reality provided by an embodiment of the present invention, and has the function modules and beneficial effects corresponding to the plant model generation method based on mixed reality. For technical details not described in detail in this embodiment, please refer to the plant model generation method based on mixed reality provided by an embodiment of the present invention.

[0083] A method and device for applying a plant model based on mixed reality, comprising: a center point modification module, used for importing the mixed reality plant model into three-dimensional software, and based on a model center point modification request, performing center point modification processing on each mixed reality sub-model in the mixed reality plant model to obtain a modified mixed reality plant model; a grouping module, used for performing model grouping processing on the modified mixed reality plant model according to the plant growth stage, and outputting a plurality of model groups; a production module, used for producing each of the model groups into a K-frame animation through a Unity engine, and setting control parameters corresponding to the growth of the plant for the K-frame animation.

[0084] In a preferred implementation manner of this embodiment, the device further includes: a generation module, which is used to perform a playback operation on a plurality of the K-frame animations based on the triggering of different control parameters of the plant growth stage, and generate an animation result of a mixed reality plant model.

[0085] In a preferred implementation manner of this embodiment, the several model groups include at least: a trunk model group, a branch model group, a flower model group, and a fruit model group; wherein the trunk model group or the branch model group includes leaves; the device also includes: a detection module, used to detect the material of the leaves, flowers or fruits in the model group to obtain a detection result; a control module, used to control the three-dimensional software to output the model group to the Unity engine if the detection result indicates that the materials of the leaves, flowers or fruits in the model group include at least two types.

[0086] The above device can execute a method for applying a plant model based on mixed reality provided by an embodiment of the present invention, and has functional modules and beneficial effects corresponding to the method for applying a plant model based on mixed reality. For technical details not described in detail in this embodiment, please refer to a method for applying a plant model based on mixed reality provided by an embodiment of the present invention.

[0087] The present invention also provides an electronic device, comprising: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement an application method of a plant model based on mixed reality described in the present invention.

[0088] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the method according to various embodiments of the present application described in the above-mentioned "Exemplary Method" section of this specification.

[0089] The computer program product may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0090] In addition, an embodiment of the present application may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps of the method according to the following embodiments of the present application described in the above "Exemplary Method" section of this specification.

[0091] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0092] The basic principles of the present application are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present application are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present application. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, not for limitation, and the above details do not limit the present application to being implemented by adopting the above specific details.

[0093] The block diagrams of the devices, apparatuses, equipment, and systems involved in this application are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.

[0094] It should also be noted that in the apparatus, device and method of the present application, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present application.

[0095] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present application. Therefore, the present application is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0096] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present application to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

[0097] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.

[0098] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0099] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A plant model generation method based on mixed reality, characterized in that: include: Acquire a virtual plant model and a topological relationship corresponding to the virtual plant model; wherein the topological relationship is used to indicate a network structure formed by plant growth nodes corresponding to each plant growth model in the virtual plant model; Based on the user triggering any plant growth node in the topological relationship, a target material library corresponding to the plant growth node is obtained; when it is detected that any target material in the target material library is pulled to the plant growth model corresponding to the plant growth node, the target material is assigned to the plant growth model to generate a mixed reality sub-model; A mixed reality plant model is generated based on the mixed reality sub-model corresponding to each of the plant growth nodes in the topological relationship.

2. The method according to claim 1, characterized in that The plant growth node corresponding to the plant growth model is selected from any one of a trunk node, a branch node, a leaf node, a flower node, and a fruit node.

3. The method according to claim 1, characterized in that: Also includes: Based on a user triggering a parameter option in the mixed reality sub-model, the shape of the mixed reality sub-model is adjusted.

4. The method according to claim 1, characterized in that Also includes: Create a trunk model based on Speedtree, and add the trunk nodes corresponding to the trunk model to the topological relationship; And / or, making a leaf model based on Speedtree or importing a fruit model of Speedtree from outside, and adding the leaf nodes corresponding to the leaf model or the fruit nodes corresponding to the fruit model as child nodes of the trunk node to the topological relationship; And / or, creating a branch model based on Speedtree, and adding the branch nodes corresponding to the branch model as child nodes of the trunk node to the topological relationship; And / or, making a leaf model based on Speedtree or importing a fruit model of Speedtree from outside, and adding the leaf nodes corresponding to the leaf model or the fruit nodes corresponding to the fruit model as child nodes of the branch node to the topological relationship; and / or, creating a branch model based on Speedtree, and adding the branch nodes corresponding to the branch model as child nodes of the trunk nodes to the topological relationship; Create a leaf model based on Speedtree or import a fruit model from Speedtree externally, and add the leaf node corresponding to the leaf model or the fruit node corresponding to the fruit model as a child node of the branch node to the topological relationship; And / or, making a flower skeleton model based on Speedtree, and adding the skeleton nodes corresponding to the flower skeleton model as child nodes of the branch nodes to the topological relationship; A flower model is created based on Speedtree, and a flower node corresponding to the flower model is added to the topological relationship as a child node of the skeleton node.

5. The method according to claim 1, characterized in that Also includes: Obtain the actual fruit coordinates corresponding to the fruit model made by the 3D software Maya; Converting the fruit coordinates into the Speedtree coordinate system to obtain converted fruit coordinates; Based on the converted fruit coordinates, the fruit model is imported into the Speedtree.

6. The method according to claim 4, characterized in that Also includes: By adjusting the parameters of the flower skeleton node, the number of faces of the flower skeleton node is removed from the mixed reality plant model.

7. A method for using the plant model according to any one of claims 1 to 6, characterized in that: include: The mixed reality plant model is imported into the three-dimensional software, and based on the model center point modification request, a center point modification process is performed on each mixed reality sub-model in the mixed reality plant model to obtain a modified mixed reality plant model; According to the plant growth stage, the modified mixed reality plant model is subjected to model grouping processing, and a plurality of model groups are output; Each of the model groups is made into a K-frame animation through the Unity engine, and control parameters corresponding to the growth of the plants are set for the K-frame animation.

8. The method according to claim 6, characterized in that Also includes: Based on the triggering of different control parameters in the plant growth stage, a playback operation is performed on a plurality of the K-frame animations to generate an animation result of a mixed reality plant model.

9. The method according to claim 6, characterized in that The plurality of model groups at least include: a trunk model group, a branch model group, a flower model group, and a fruit model group; wherein the trunk model group or the branch model group both include leaves; Detecting the material of the leaves, flowers or fruits in the model group to obtain a detection result; If the detection result indicates that the leaves, flowers or fruits in the model group include at least two materials, the three-dimensional software is controlled to output the model group to the Unity engine.

10. A plant model generation device based on mixed reality, characterized in that: include: A first acquisition module is used to acquire a virtual plant model and a topological relationship corresponding to the virtual plant model; wherein the topological relationship is used to indicate a network structure formed by plant growth nodes corresponding to each plant growth model in the virtual plant model; A first generation module is used to obtain a target material library corresponding to any plant growth node in the topological relationship based on a user triggering the plant growth node; when it is detected that any target material in the target material library is pulled to the plant growth model corresponding to the plant growth node, the target material is assigned to the plant growth model to generate a mixed reality sub-model; The second generating module is used to generate a mixed reality plant model based on the mixed reality sub-model corresponding to each plant growth node in the topological relationship.

Citation Information

Patent Citations

  • Virtual plant display method and device, equipment and storage medium

    CN112950753A

  • Model animation generation method and device and electronic equipment

    CN116452710A

  • Vegetation programmed generation method based on Speed tree engine

    CN116912378A

  • Plant growth animation generation method and device

    CN117173302A

  • Virtual object animation generation method and device, electronic equipment and storage medium

    CN118037910A