CN112184862B - Virtual object control method and device and electronic equipment - Google Patents

Virtual object control method and device and electronic equipment Download PDF

Info

Publication number
CN112184862B
CN112184862B CN202011087294.8A CN202011087294A CN112184862B CN 112184862 B CN112184862 B CN 112184862B CN 202011087294 A CN202011087294 A CN 202011087294A CN 112184862 B CN112184862 B CN 112184862B
Authority
CN
China
Prior art keywords
chest
bone
skeleton
target
virtual object
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202011087294.8A
Other languages
Chinese (zh)
Other versions
CN112184862A (en
Inventor
章文涵
黄振
林建锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN202011087294.8A priority Critical patent/CN112184862B/en
Publication of CN112184862A publication Critical patent/CN112184862A/en
Application granted granted Critical
Publication of CN112184862B publication Critical patent/CN112184862B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T13/00Animation
    • G06T13/203D [Three Dimensional] animation
    • G06T13/403D [Three Dimensional] animation of characters, e.g. humans, animals or virtual beings

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention provides a control method and device of a virtual object and electronic equipment, and relates to the technical field of animation rendering, wherein the method comprises the following steps: creating a basic skeleton for the virtual object in response to a skeleton creation operation for the virtual object; creating a thoracic bone for the thoracic model in response to a bone creation operation of the thoracic model for the virtual object; in response to the skinning operation for the chest model, binding relations are established between the chest model and the chest bone and the basic bone respectively, skin information is obtained, and movement of the chest model is controlled according to the chest bone, the basic bone and the skin information. The virtual object control method, the virtual object control device and the electronic equipment provided by the invention can build the binding relation between the chest model and the chest skeleton and between the chest model and the foundation skeleton, so that the chest skeleton and the foundation skeleton can contribute to rendering of the chest, the animation of the chest model is richer, and the effect of the chest model is similar to that of a real environment, and the visual experience of a user is improved.

Description

Virtual object control method and device and electronic equipment
Technical Field
The present invention relates to the field of animation rendering technologies, and in particular, to a method and an apparatus for controlling a virtual object, and an electronic device.
Background
Bone animation is one of model animations in which a model has a skeleton structure of interconnected "bones" and an animation is generated for the model by changing the orientation and position of the bones. When designing bone animation, a specified number of bones are usually erected on a required model part, skin information is allocated to the bones, animation corresponding to the model part is produced, a preset animation engine is imported, and the produced bone animation is played.
However, in the existing bone animation, bones of certain model parts are fewer in production, so that the bone animation produced in later period is hard in appearance, the animation is mostly produced manually, the consumption time is long, unreasonable phenomena exist in skin information distribution, the animation is unrealistic in appearance, and the visual experience of a user is reduced.
Disclosure of Invention
Accordingly, the present invention is directed to a method and apparatus for controlling a virtual object, and an electronic device, so as to alleviate the above technical problems.
In a first aspect, an embodiment of the present invention provides a method for controlling a virtual object, where the method includes: creating a basic skeleton for a virtual object in response to a skeleton creation operation for the virtual object; creating a chest bone for the chest model in response to a bone creation operation of the chest model for the virtual object; and responding to skin operation aiming at the chest model, respectively establishing binding relations between the chest model and the chest skeleton and between the chest model and the basic skeleton, and obtaining skin information so as to control the motion of the chest model according to the chest skeleton, the basic skeleton and the skin information.
In a preferred embodiment, in response to the skin operation for the chest model, the binding relationship between the chest model and the chest bone and the basic bone is established, so as to obtain skin information, which includes: in response to a skinning operation on a chest model, determining a target base bone to be bound to a target vertex in the chest model, the base bone comprising the target base bone; according to the distance between the target vertex and the target basic skeleton, determining weight information of the target vertex for the target basic skeleton, wherein the weight information is used for representing the control degree of the target basic skeleton on the target vertex; and establishing a binding relation between the target vertex and the target basic skeleton to obtain skin information, wherein the skin information comprises the binding relation and the weight information.
In a preferred embodiment, the distance and the weight in the weight information are in a negative correlation.
In a preferred embodiment, the target underlying skeleton includes a scapular skeleton and an arm skeleton.
In a preferred embodiment, the method further comprises: and determining the target vertex according to the vertex wiring of the chest model.
In a second aspect, an embodiment of the present invention provides a method for controlling a virtual object, where the method includes: receiving a rendering instruction for a virtual object, wherein the virtual object comprises a chest model; the method comprises the steps of obtaining skin information corresponding to a chest model, wherein the skin information comprises binding relations between vertexes of the chest model and basic bones and chest bones respectively; the base skeleton is a skeleton created for the virtual object, and the chest skeleton is a skeleton created for the chest model; and rendering the chest model of the virtual object according to the skin information.
In a preferred embodiment, the rendering the chest model of the virtual object according to the skin information includes: responding to the input operation of the rendering parameters, and rendering the chest model of the virtual object according to the rendering parameters corresponding to the input operation and the skin information; wherein the rendering parameters corresponding to the input operation include physical parameters for the chest bone.
In a preferred embodiment, the physical parameter includes at least one of: damping, elasticity, hardness, inertness.
In a third aspect, an embodiment of the present invention provides a control apparatus for a virtual object, where the apparatus includes: a first creation module for creating a basic skeleton for a virtual object in response to a skeleton creation operation for the virtual object; a second creation module for creating a chest bone for the chest model in response to a bone creation operation of the chest model for the virtual object; and the control module is used for responding to skin operation aiming at the chest model, establishing binding relation between the chest model and the chest skeleton and between the chest model and the basic skeleton respectively, and obtaining skin information so as to control the motion of the chest model according to the chest skeleton, the basic skeleton and the skin information.
In a fourth aspect, an embodiment of the present invention provides a control apparatus for a virtual object, including: the device comprises a receiving module, a rendering module and a rendering module, wherein the receiving module is used for receiving a rendering instruction aiming at a virtual object, and the virtual object comprises a chest model; the acquisition module is used for acquiring skin information corresponding to the chest model, wherein the skin information comprises binding relations between vertexes of the chest model and basic bones and chest bones respectively; the base skeleton is a skeleton created for the virtual object, and the chest skeleton is a skeleton created for the chest model; and the rendering module is used for rendering the chest model of the virtual object according to the skin information.
In a fifth aspect, an embodiment of the present invention provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the methods described in the first and second aspects.
In a sixth aspect, embodiments of the present invention provide a computer readable storage medium having a computer program stored thereon, which when executed by a processor performs the methods of the first and second aspects described above.
The embodiment of the invention has the following beneficial effects:
According to the virtual object control method, the virtual object control device and the electronic equipment, when the skeleton creation operation for the virtual object is responded, the basic skeleton is created for the virtual object, when the skeleton creation operation for the chest model of the virtual object is responded, the chest skeleton is created for the chest model, and then the skin operation of the chest model is responded, binding relation is established between the chest model and the chest skeleton and between the chest model and the basic skeleton respectively, skin information is obtained, and the movement of the chest model is controlled according to the chest skeleton, the basic skeleton and the skin information. Because the binding relation is established between the chest model and the chest skeleton and the basic skeleton, when the motion of the chest model is controlled, the chest skeleton and the basic skeleton can both contribute to the rendering of the chest, so that the animation expression of the chest model is richer and approaches to the effect of the real environment, and the visual experience of a user is improved.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
In order to make the above objects, features and advantages of the present invention more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are some embodiments of the invention and that other drawings may be obtained from these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for controlling a virtual object according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a basic skeleton of a virtual object according to an embodiment of the present invention;
FIG. 3 is a flowchart of another method for controlling a virtual object according to an embodiment of the present invention;
FIG. 4 is a schematic illustration of a chest bone according to an embodiment of the present invention;
FIG. 5 is a flowchart of another method for controlling a virtual object according to an embodiment of the present invention;
Fig. 6 is a schematic structural diagram of a control device for a virtual object according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of another control device for virtual objects according to an embodiment of the present invention;
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Skeletal animation (Skeleton Animation), also known as skeletal animation, is a three-dimensional model divided into two parts: a Skin (Skin) for drawing the model, and a skeleton (Skeleton) for controlling the motion. For the virtual models, each virtual model has a basic skeleton, including skeleton and joints, and the skeleton is equivalent to a coordinate space, and the skeleton hierarchy is a nested coordinate space. The joint simply describes the position of the bone, i.e. the position of the bone's own coordinate space origin in its parent space, and rotation about the joint refers to rotation of the bone coordinate space (including all subspaces) itself. The skin is formed by attaching (binding) the vertexes in the Mesh to bones, and each vertex can be controlled by a plurality of bones, so that the vertexes at the joints are changed in position due to the simultaneous pulling of the parent bones and the child bones, and cracks are eliminated.
At present, for bone animation, due to the fact that the setting of basic bones is less in design of bones of certain parts, the later generated bone animation is hard in appearance, for example, when the breasts of models are represented, 1 to 2 bones are often erected, skin information is only distributed to the bones of the breasts, so that the bones are less, the animation is hard, and when the animation is manually produced, the animation is unrealistic due to unreasonable distribution of the skin information.
Based on the above, the embodiment of the invention provides a control method and device for a virtual object and electronic equipment, which can alleviate the above technical problems.
For the convenience of understanding the present embodiment, a method for controlling a virtual object disclosed in the embodiment of the present invention will be described in detail.
In a possible implementation manner, the embodiment of the invention provides a control method of a virtual object, and specifically, a virtual model of the virtual object can be displayed through electronic equipment; a flowchart of a control method of a virtual object as shown in fig. 1, the method comprising the steps of:
Step S102, in response to a skeleton creation operation for the virtual object, creating a basic skeleton for the virtual object;
Step S104, responding to the skeleton creation operation of the chest model of the virtual object, and creating a chest skeleton for the chest model;
Specifically, the basic skeleton of the virtual object may often represent the appearance feature of the virtual object, but for some virtual objects, especially female virtual objects, the skeleton representation forms of the breasts of the female virtual objects are different due to the feature features of the characters, the original basic skeleton often has difficulty in representing the breasts of the female virtual objects, and the skeleton creation operation in the steps S102 and S104 can further create the skeleton of the breasts for the basic skeleton, so that the virtual object creates the skeleton of the breasts on the basis of the original basic skeleton, and further controls the breast representation forms of the female virtual objects through more skeletons.
Step S106, in response to the skinning operation for the chest model, binding relations are established between the chest model and the chest bone and between the chest model and the basic bone respectively, skin information is obtained, and movement of the chest model is controlled according to the chest bone, the basic bone and the skin information.
The chest bone created in step S104 is a bone located at the chest portion of the virtual object, and the center of the chest bone generally refers to the center of the chest portion. The generated chest bones have multiple layers in consideration of the human body structural characteristics of the chest so as to embody the chest characteristics of the female virtual model.
Therefore, according to the control method for the virtual object, when the skeleton creation operation for the virtual object is responded, the basic skeleton is created for the virtual object, when the skeleton creation operation for the chest model of the virtual object is responded, the chest skeleton is created for the chest model, and then the binding relation between the chest model and the chest skeleton and between the chest model and the basic skeleton is established respectively in response to the skin operation of the chest model, so that skin information is obtained, and the movement of the chest model is controlled according to the chest skeleton, the basic skeleton and the skin information. Because the binding relation is established between the chest model and the chest skeleton and the basic skeleton, when the motion of the chest model is controlled, the chest skeleton and the basic skeleton can both contribute to the rendering of the chest, so that the animation expression of the chest model is richer and approaches to the effect of the real environment, and the visual experience of a user is improved.
In practical use, the above-mentioned chest skeleton creation process may be implemented in an IDE (INTEGRATED DEVELOPMENT ENVIRONMENT ), and in particular, the IDE may provide a program development environment, including tools such as a code editor, a compiler, a debugger, and a graphical user interface, and at the same time, integrate functions such as a code writing function, an analysis function, a compiling function, and a debugging function, so that the above-mentioned process of creating a multi-layer chest skeleton may be implemented.
Specifically, when creating the chest skeleton, a basic skeleton is generally created in the IDE according to the body type of the virtual object, that is, the process of step S102 described above, and then the chest skeleton is further created on the basis of the basic skeleton. For ease of understanding, fig. 2 shows a schematic view of a basic skeleton of a virtual object, specifically, in fig. 2, a basic skeleton of a female virtual object is shown, and as can be seen from the structural boxes circled in the figure, the basic skeleton includes basic skeletons of a head, a chest, a waist, an abdomen, limbs, and the like. In creating a chest bone based on the base bone, it is necessary to first select the base bone in the IDE environment and then create the chest bone on the basis of the base bone. Accordingly, fig. 3 shows a flowchart of another control method of the virtual object on the basis of fig. 1, and a detailed description is made of the creation process of the chest skeleton. As shown in fig. 3, the method comprises the following steps:
Step S302, in response to a skeleton creation operation for a virtual object, creating a basic skeleton for the virtual object;
Step S304, responding to the skeleton creation operation of the chest model of the virtual object, setting the chest part in the basic skeleton into an editable state;
Step S306, in the editable state, creating a chest bone for the chest model;
Specifically, in step S302, a basic skeleton is usually created or imported in the IDE, then when step S304 is performed, the basic skeleton may be selected, and several parts included in the basic skeleton may be set to an editable state, for example, the basic skeleton shown in fig. 2 is displayed in the IDE, and then the chest model of the virtual object may be selected first, so that the chest part is set to the editable state, and then step S306 is performed to create the chest skeleton for the chest model.
Specifically, when creating the chest bone, a preset creation parameter of the chest bone needs to be acquired, where the creation parameter generally includes a human muscle parameter, a chest vertex wiring position of the virtual object, a distance between the chest bone and the basic bone, and the like, and then the chest bone of the virtual object is created based on the creation parameter.
Further, when creating the chest bones, a plurality of layers of chest bones are generally created, and therefore, the number of operations of the bone creation operation in step S306 is a plurality of times, each bone creation operation corresponding to at least one layer of chest bones. Further, because the center distance from each layer of chest bone to the chest location is different, the user can click on different locations of the chest location multiple times, creating a layer of chest bone at the clicked location.
For easy understanding, fig. 4 shows a schematic diagram of a chest bone, taking the right side of the figure as an example, comprising bone (1), bone (2), bone (3) and bone (4) in sequence, that is, in order from the skin surface to the chest interior of a human chest, bone (1), bone (2), bone (3) and bone (4) are multiple layers of chest bones created, for example, a user can click on a position corresponding to bone (1), then on the interface of the IDE, a figure of bone (1) can be generated, for an operation skilled user, clicking in order from the skin surface to the chest interior of the human chest can be directly performed according to the design requirements of the character of the virtual object, and then multiple layers of chest bones can be directly generated at the clicking position. Furthermore, for the multiple layers of chest bones included in the virtual object, each layer of chest bones is sequentially linked, i.e., each layer of chest bones corresponds to a link hierarchy, and the chest bones closest to the base bone of the virtual object are linked to the chest bones of the base bone.
In particular, for the schematic representation of the chest bone shown in fig. 4, the bone (1) is linked to the bone (2), the bone (2) is linked to the bone (3), the bone (3) is linked to the bone (4), and the bone (4) is further linked to the chest bone of the chest model, wherein the chest bone of the chest model is part of the basic bone, in such a way that the created chest bone can be linked to the basic bone in order to be able to relate the created chest bone to the basic bone when performing the skinning operation.
Further, after the multi-layer chest bones are created in the above manner, the weight of the vertex of each layer of chest bones can be determined based on the distance from the vertex of the multi-layer chest bones to the target base bones included in the base bones, and then skin information can be added. Specifically, in response to the skin operation for the chest model, binding relations are established between the chest model and the chest skeleton and between the chest model and the basic skeleton, and the steps of obtaining skin information are shown in the following steps S308 to S312.
Step S308, in response to the skin operation for the chest model, determining a target basic skeleton to be bound with a target vertex in the chest model, wherein the basic skeleton comprises the target basic skeleton;
step S310, determining weight information of the target vertex aiming at the target basic skeleton according to the distance between the target vertex and the target basic skeleton;
the weight information is used for representing the control degree of the target basic skeleton on the target vertex;
Step S312, a binding relationship is established between the target vertex and the target basic skeleton, so as to obtain skin information, wherein the skin information comprises the binding relationship and weight information.
Specifically, the target vertices are generally determined from vertex wiring of the chest model, for example, in accordance with the vertex wiring positions and wiring radians of vertices of the created chest bone. In addition, in the embodiment of the present invention, the target basic skeleton included in the basic skeleton is usually plural, and in the embodiment of the present invention, the target basic skeleton is usually a skeleton located at a distance from the chest skeleton on the basic skeleton, where the skeleton does not have a great weight when controlling the chest amplitude, but has a sense of pulling a little, so as to increase the reality of the animation.
Further, in the step S310, when determining the weight information of the target vertices for the target basic skeleton, if the number of target basic skeletons is plural, the weight information of the target vertices for the target basic skeleton of each layer of chest skeleton is determined for each target basic skeleton based on the distance between the target vertices and the target basic skeleton when determining the weight information.
In the embodiment of the present invention, the distance between the target vertex and the target basic skeleton and the weight in the weight information form a negative correlation. The target underlying skeleton may include, among other things, the scapular skeleton and the arm skeleton.
Specifically, the weight of the chest bone may be determined according to the distance from the chest bone to the shoulder bone, and the weight of a set of chest bones may be determined according to the distance from the chest bone to the arm bone when the weight information of the target vertex for the target basic bone is determined.
In actual use, considering that the creation parameters used in creating the chest bone include the vertex wiring of the chest model, in step S312, when a binding relationship is established between the target vertex and the target base bone, the binding relationship may be established according to the wiring radian of the vertex.
Specifically, when determining the weight information of the target vertex for the target basic skeleton, the weight information of the target vertex of each layer of the chest skeleton may be determined according to the wiring radian of the vertex in the direction from each layer of the chest skeleton to the target basic skeleton, and the distance between the target vertex and the target basic skeleton is in a negative correlation with the weight in the weight information. That is, the smaller the distance between the target vertex and the target underlying skeleton, the larger the corresponding weight in the weight information, and the larger the distance between the target vertex and the target underlying skeleton, the smaller the corresponding weight in the weight information.
For example, according to the human muscle structure, the vertex wiring position of the virtual object, and the distance between each layer of chest bones and the bones of the shoulder blade and the arm, when the weight is allocated, the weight can be allocated according to the vertex wiring radian, and in general, the closer to the vertex of the bone of the shoulder blade or the arm, the greater the weight; the more distant the bone is from the "scapula" or "arm" the smaller the vertex weight value is.
Specifically, when skin information is added, it is assumed that the weight of the target vertex that each bone can control is at most "1". When the skin information is added, the principle that the closer the model vertex is to the bone, the larger the weight value is usually adopted, but in the embodiment of the invention, the weight of the target vertex of the virtual object is distributed to target basic bones such as a shoulder blade and an arm in a manner different from the traditional skin, so that the chest bones close to the two target basic bones are also affected to a certain extent by the movement of the shoulder blade or the arm.
Specifically, in determining the weight information of each layer of chest bone, the weight values near the target vertices of the two target basic bones may be set to 0.01, 0.02, 0.03, 0.05, 0.1 in order, that is, the weight of the target vertices of the chest bone gradually increases in the direction from the center of the chest bone to the scapular bone, and similarly, the weight of the target vertices of the chest bone may be set according to the above values in the direction from the center of the chest bone to the arm bone, because the distance between the "scapula" and the "arm" from the chest is far from the chest relative to the position of the sternum bone itself, and the final purpose of distributing these data is to enable the "scapula" and the "arm" bones to control the amplitude of the chest without being great, but with a sense of a little pulling. The smaller the value, the smaller the range of motion amplitude of the target basic skeleton controlling the target vertex, i.e. the closer to the chest model vertexes of the shoulder blade and the arm skeleton, the greater the assigned weight should be, so as to embody that in the embodiment of the invention, the distance between the target vertex and the target basic skeleton and the weight in the weight information of the chest skeleton form a negative correlation.
Further, after the chest skeleton is created and the skin information is obtained, the virtual object may be rendered, specifically, the virtual object may be rendered according to a corresponding animation engine, so that the basic skeleton, the chest skeleton and the skin information of the virtual object may be imported into a preset animation engine for rendering. Therefore, on the basis of the above embodiment, the embodiment of the present invention further improves another control method of a virtual object, describing a rendering process of the virtual object, specifically, a flowchart of another control method of a virtual object shown in fig. 5, including the following steps:
step S502, receiving a rendering instruction for a virtual object, wherein the virtual object comprises a chest model;
Step S504, skin information corresponding to the chest model is obtained, wherein the skin information comprises binding relations between vertexes of the chest model and basic bones and chest bones respectively; the basic skeleton is a skeleton created for the virtual object, and the chest skeleton is a skeleton created for the chest model;
step S506, rendering the chest model of the virtual object according to the skin information.
Specifically, during rendering, in response to an input operation of a rendering parameter, rendering a chest model of a virtual object according to the rendering parameter and skin information corresponding to the input operation;
Wherein, the rendering parameters corresponding to the input operation comprise physical parameters for chest bones.
Specifically, the above-described physical parameters may be set in the animation engine in response to an input operation of the rendering parameters; rendering the chest model of the virtual object in the animation engine according to the skin information and the physical parameters; wherein the physical parameters of the chest bone include at least one of: damping, elasticity, hardness and inertness values.
Specifically, taking the Unity3D engine and Dynmaic Bone plugins as an example, and considering that the above-described procedure of creating the chest bone is implemented in the IDE environment, data can be derived from the IDE environment for use in the Unity3D engine, for which physical parameters of the chest bone are set. The meaning of each parameter of the plug-in is as follows:
dmping: damping, degree of delay of chest bone simulation.
ELASTICITY: elasticity, how much force is applied to restore each bone to its original orientation.
STIFFINESS: the stiffness, how much of the original orientation of the bone is preserved.
Inert: the inertia value, in the physical simulation, ignores the magnitude value of the position change of the character.
Generally, when rendering the chest model, the chest shake degree is controlled by using ELASTICITY (elasticity) values according to the chest size of the virtual model, then the chest shake frequency is limited by using Dmping (damping) values, the chest softness is controlled by using STIFFINESS (hardness) values, and the retention degree of the initial bone direction is essentially controlled; if the character changes its position and the motion amplitude is large, it is necessary to use an Inert value to limit the extent of the bone change.
In summary, the control method for the virtual object provided by the embodiment of the invention has the following advantages:
(1) Animation is not required to be produced by aiming at a single animation file independently, so that a large amount of production cost is saved;
(2) Through a real-time simulation mode, a very rich animation effect of female breasts can be realized;
(3) Reasonable weight distribution, namely, besides the chest bones, the shoulder blades and the arms slightly drive the chest skin, the amplitude is not very large, but the skin is felt, so that the animation is richer and more similar to reality.
Further, corresponding to the control method of the virtual object shown in fig. 1, the embodiment of the present invention further provides a control device of the virtual object, as shown in fig. 6, which is a schematic structural diagram of the control device of the virtual object, and the device includes:
A first creation module 60 for creating a base skeleton for a virtual object in response to a skeleton creation operation for the virtual object;
a second creation module 62 for creating a chest bone for the chest model of the virtual object in response to a bone creation operation for the chest model;
the control module 64 is configured to, in response to a skinning operation on the chest model, establish binding relationships between the chest model and the chest bone and the base bone, respectively, and obtain skinning information, so as to control movement of the chest model according to the chest bone, the base bone, and the skinning information.
Wherein the control module 64 is further configured to determine a target base skeleton to be bound to a target vertex in the chest model in response to a skinning operation on the chest model, the base skeleton comprising the target base skeleton; according to the distance between the target vertex and the target basic skeleton, determining weight information of the target vertex for the target basic skeleton, wherein the weight information is used for representing the control degree of the target basic skeleton on the target vertex; and establishing a binding relation between the target vertex and the target basic skeleton to obtain skin information, wherein the skin information comprises the binding relation and the weight information.
Wherein the distance and the weight in the weight information form a negative correlation, and the target basic skeleton comprises a scapula skeleton and an arm skeleton.
Further, the target vertices are determined from vertex wiring of the chest model.
Further, corresponding to the control method of the virtual object shown in fig. 5, the embodiment of the present invention further provides another control device for a virtual object, as shown in fig. 7, where the structure diagram of the other control device for a virtual object includes:
a receiving module 70 for receiving rendering instructions for a virtual object, wherein the virtual object comprises a chest model;
An obtaining module 72, configured to obtain skin information corresponding to the chest model, where the skin information includes binding relations between vertices of the chest model and a basic skeleton and a chest skeleton, respectively; the base skeleton is a skeleton created for the virtual object, and the chest skeleton is a skeleton created for the chest model;
and the rendering module 74 is used for rendering the chest model of the virtual object according to the skin information.
Wherein, the rendering module 74 is further configured to: responding to the input operation of the rendering parameters, and rendering the chest model of the virtual object according to the rendering parameters corresponding to the input operation and the skin information; wherein the rendering parameters corresponding to the input operation include physical parameters for the chest bone.
The physical parameters include at least one of: damping, elasticity, hardness, inertness.
The control device for the virtual object provided by the embodiment of the invention has the same technical characteristics as the control method for the virtual object provided by the embodiment, so that the same technical problems can be solved, and the same technical effects can be achieved.
The embodiment of the invention also provides electronic equipment, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor realizes the control method of the virtual object when executing the computer program.
Further, an embodiment of the present invention further provides a schematic structural diagram of an electronic device, as shown in fig. 8, where the electronic device includes a processor 81 and a memory 80, where the memory 80 stores computer executable instructions that can be executed by the processor 81, and the processor 81 executes the computer executable instructions to implement the method for controlling a virtual object.
In the embodiment shown in fig. 8, the electronic device further comprises a bus 82 and a communication interface 83, wherein the processor 81, the communication interface 83 and the memory 80 are connected by the bus 82.
The memory 80 may include a high-speed random access memory (RAM, random Access Memory), and may further include a non-volatile memory (non-volatile memory), such as at least one disk memory. The communication connection between the system network element and at least one other network element is implemented via at least one communication interface 83 (which may be wired or wireless), and may use the internet, a wide area network, a local network, a metropolitan area network, etc. Bus 82 may be an ISA (Industry Standard Architecture ) bus, a PCI (PERIPHERAL COMPONENT INTERCONNECT, peripheral component interconnect standard) bus, or EISA (Extended Industry Standard Architecture ) bus, among others. The bus 82 may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, only one bi-directional arrow is shown in FIG. 8, but not only one bus or type of bus.
The processor 81 may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in the processor 81 or by instructions in the form of software. The processor 81 may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), and the like; but may also be a digital signal Processor (DIGITAL SIGNAL Processor, DSP), application Specific Integrated Circuit (ASIC), field-Programmable gate array (FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in the memory, and the processor 81 reads the information in the memory, and completes the chest rendering method of the virtual model of the foregoing embodiment in combination with the hardware thereof.
The embodiment of the invention also provides a computer readable storage medium, wherein the computer readable storage medium is stored with a computer program, and the computer program executes the control method of the virtual object when being run by a processor.
The method, the device and the computer program product of the electronic device for controlling the virtual object provided by the embodiment of the invention comprise a computer readable storage medium storing program codes, and the instructions included in the program codes can be used for executing the method described in the foregoing method embodiment, and specific implementation can be referred to the method embodiment and will not be repeated here.
It will be clear to those skilled in the art that, for convenience and brevity of description, reference may be made to the corresponding process in the foregoing method embodiment for the specific working process of the apparatus described above, which is not described herein again.
In addition, in the description of embodiments of the present invention, unless explicitly stated and limited otherwise, the terms "mounted," "connected," and "connected" are to be construed broadly, and may be, for example, fixedly connected, detachably connected, or integrally connected; can be mechanically or electrically connected; can be directly connected or indirectly connected through an intermediate medium, and can be communication between two elements. The specific meaning of the above terms in the present invention will be understood by those skilled in the art in specific cases.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
In the description of the present invention, it should be noted that the directions or positional relationships indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc. are based on the directions or positional relationships shown in the drawings, are merely for convenience of describing the present invention and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance.
Finally, it should be noted that: the above examples are only specific embodiments of the present invention for illustrating the technical solution of the present invention, but not for limiting the scope of the present invention, and although the present invention has been described in detail with reference to the foregoing examples, it will be understood by those skilled in the art that the present invention is not limited thereto: any person skilled in the art may modify or easily conceive of the technical solution described in the foregoing embodiments, or perform equivalent substitution of some of the technical features, while remaining within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention, and are intended to be included in the scope of the present invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (9)

1. A method for controlling a virtual object, the method comprising:
creating a basic skeleton for a virtual object in response to a skeleton creation operation for the virtual object;
Creating a chest bone for the chest model in response to a bone creation operation of the chest model for the virtual object;
Responding to skin operation aiming at the chest model, and respectively establishing binding relations between the chest model and the chest skeleton and between the chest model and the basic skeleton to obtain skin information so as to control the motion of the chest model according to the chest skeleton, the basic skeleton and the skin information;
Wherein the chest bone is created based on creation parameters including human muscle parameters, chest apex wiring location of a virtual object, and distance of the chest bone from the base bone;
responding to the skin operation aiming at the chest model, establishing binding relations between the chest model and the chest skeleton and between the chest model and the basic skeleton respectively, and obtaining skin information, wherein the method comprises the following steps:
In response to a skinning operation on a chest model, determining a target base bone to be bound to a target vertex in the chest model, the base bone comprising the target base bone; wherein the target vertex is determined according to a vertex wiring position and a vertex wiring radian of the chest bone;
determining weight information of the target vertex for the target basic skeleton according to the vertex wiring radian of the chest skeleton and the distance between the target vertex and the target basic skeleton, wherein the weight information is used for representing the control degree of the target basic skeleton on the target vertex, and the distance and the weight in the weight information form a negative correlation;
And establishing a binding relation between the target vertex and the target basic skeleton according to the vertex wiring radian to obtain skin information, wherein the skin information comprises the binding relation and the weight information.
2. The control method of claim 1, wherein the target underlying skeleton comprises a scapular skeleton and an arm skeleton.
3. A method for controlling a virtual object, the method comprising:
receiving a rendering instruction for a virtual object, wherein the virtual object comprises a chest model;
The method comprises the steps of obtaining skin information corresponding to a chest model, wherein the skin information comprises binding relations between vertexes of the chest model and basic bones and chest bones respectively; the base skeleton is a skeleton created for the virtual object, and the chest skeleton is a skeleton created for the chest model;
Rendering a chest model of the virtual object according to the skin information;
Wherein the chest bone is created based on creation parameters including human muscle parameters, chest apex wiring location of a virtual object, and distance of the chest bone from the base bone;
The method further comprises the steps of:
In response to a skinning operation on a chest model, determining a target base bone to be bound to a target vertex in the chest model, the base bone comprising the target base bone; wherein the target vertex is determined according to a vertex wiring position and a vertex wiring radian of the chest bone;
determining weight information of the target vertex for the target basic skeleton according to the vertex wiring radian of the chest skeleton and the distance between the target vertex and the target basic skeleton, wherein the weight information is used for representing the control degree of the target basic skeleton on the target vertex, and the distance and the weight in the weight information form a negative correlation;
And establishing a binding relation between the target vertex and the target basic skeleton according to the vertex wiring radian to obtain skin information, wherein the skin information comprises the binding relation and the weight information.
4. A control method according to claim 3, wherein said rendering the chest model of the virtual object from the skin information comprises:
Responding to the input operation of the rendering parameters, and rendering the chest model of the virtual object according to the rendering parameters corresponding to the input operation and the skin information;
wherein the rendering parameters corresponding to the input operation include physical parameters for the chest bone.
5. The control method according to claim 4, characterized in that the physical parameter comprises at least one of: damping, elasticity, hardness, inertness.
6. A control apparatus for a virtual object, the apparatus comprising:
a first creation module for creating a basic skeleton for a virtual object in response to a skeleton creation operation for the virtual object;
A second creation module for creating a chest bone for the chest model in response to a bone creation operation of the chest model for the virtual object;
the control module is used for responding to skin operation aiming at the chest model, establishing binding relations between the chest model and the chest bone and between the chest model and the basic bone respectively, and obtaining skin information so as to control the motion of the chest model according to the chest bone, the basic bone and the skin information;
Wherein the chest bone is created based on creation parameters including human muscle parameters, chest apex wiring location of a virtual object, and distance of the chest bone from the base bone;
The control module is further configured to: in response to a skinning operation on a chest model, determining a target base bone to be bound to a target vertex in the chest model, the base bone comprising the target base bone; wherein the target vertex is determined according to a vertex wiring position and a vertex wiring radian of the chest bone; determining weight information of the target vertex for the target basic skeleton according to the vertex wiring radian of the chest skeleton and the distance between the target vertex and the target basic skeleton, wherein the weight information is used for representing the control degree of the target basic skeleton on the target vertex, and the distance and the weight in the weight information form a negative correlation;
And establishing a binding relation between the target vertex and the target basic skeleton according to the vertex wiring radian to obtain skin information, wherein the skin information comprises the binding relation and the weight information.
7. A control apparatus for a virtual object, the apparatus comprising:
the device comprises a receiving module, a rendering module and a rendering module, wherein the receiving module is used for receiving a rendering instruction aiming at a virtual object, and the virtual object comprises a chest model;
The acquisition module is used for acquiring skin information corresponding to the chest model, wherein the skin information comprises binding relations between vertexes of the chest model and basic bones and chest bones respectively; the base skeleton is a skeleton created for the virtual object, and the chest skeleton is a skeleton created for the chest model;
the rendering module is used for rendering the chest model of the virtual object according to the skin information;
Wherein the chest bone is created based on creation parameters including human muscle parameters, chest apex wiring location of a virtual object, and distance of the chest bone from the base bone;
The device is also for:
In response to a skinning operation on a chest model, determining a target base bone to be bound to a target vertex in the chest model, the base bone comprising the target base bone; wherein the target vertex is determined according to a vertex wiring position and a vertex wiring radian of the chest bone;
determining weight information of the target vertex for the target basic skeleton according to the vertex wiring radian of the chest skeleton and the distance between the target vertex and the target basic skeleton, wherein the weight information is used for representing the control degree of the target basic skeleton on the target vertex, and the distance and the weight in the weight information form a negative correlation;
And establishing a binding relation between the target vertex and the target basic skeleton according to the vertex wiring radian to obtain skin information, wherein the skin information comprises the binding relation and the weight information.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of any of the preceding claims 1-5 when executing the computer program.
9. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, performs the method of any of the preceding claims 1-5.
CN202011087294.8A 2020-10-12 2020-10-12 Virtual object control method and device and electronic equipment Active CN112184862B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011087294.8A CN112184862B (en) 2020-10-12 2020-10-12 Virtual object control method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011087294.8A CN112184862B (en) 2020-10-12 2020-10-12 Virtual object control method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN112184862A CN112184862A (en) 2021-01-05
CN112184862B true CN112184862B (en) 2024-05-14

Family

ID=73951049

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011087294.8A Active CN112184862B (en) 2020-10-12 2020-10-12 Virtual object control method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN112184862B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113096235B (en) * 2021-03-09 2024-03-19 北京达佳互联信息技术有限公司 Virtual object control method and device, electronic equipment and storage medium
CN113345059B (en) * 2021-05-31 2023-08-08 网易(杭州)网络有限公司 Animation generation method and device, storage medium and electronic equipment
CN114241100B (en) * 2022-02-25 2022-06-03 腾讯科技(深圳)有限公司 Skinning method, skinning device, skinning apparatus, skinning medium, and program product for virtual object
CN114612643B (en) * 2022-03-07 2024-04-12 北京字跳网络技术有限公司 Image adjustment method and device for virtual object, electronic equipment and storage medium

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013174671A1 (en) * 2012-05-22 2013-11-28 Telefonica, S.A. A method and a system for generating a realistic 3d reconstruction model for an object or being
CN105184845A (en) * 2015-09-09 2015-12-23 深圳华侨城文化旅游科技股份有限公司 Role model formation method and system
CN105225262A (en) * 2015-10-23 2016-01-06 深圳华侨城文化旅游科技股份有限公司 A kind of motion capture 3D data processing method and 3D model thereof
CN105551072A (en) * 2015-12-11 2016-05-04 网易(杭州)网络有限公司 Method and system for realizing local real-time movement of role model
CN105976418A (en) * 2016-06-28 2016-09-28 珠海金山网络游戏科技有限公司 Design system and method for human dynamic bone
CN107067451A (en) * 2017-04-07 2017-08-18 广州爱九游信息技术有限公司 The implementation method and device of dynamic bone in animation
CN108734758A (en) * 2017-04-25 2018-11-02 腾讯科技(深圳)有限公司 A kind of model of image configuration method, device and computer storage media
RU2672926C1 (en) * 2018-04-02 2018-11-21 Общество с ограниченной ответственностью "ОСТЕОМЕД-М" Method and plate for osteosynthesis of breast bone fractures
CN111145319A (en) * 2019-11-07 2020-05-12 北京中科深智科技有限公司 Method and system for real-time automatic bone binding and skinning
KR20200078858A (en) * 2018-12-24 2020-07-02 전자부품연구원 Method for Calculating Skinning Weight of 3D Character Based on Musculoskeletal Structure
CN111402372A (en) * 2020-03-24 2020-07-10 网易(杭州)网络有限公司 Method and device for simulating actions of virtual characters in game and electronic equipment
CN111627094A (en) * 2020-06-04 2020-09-04 珠海西山居移动游戏科技有限公司 Method and device for generating bone animation

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130235043A1 (en) * 2008-08-25 2013-09-12 Adobe Systems Incorporated Systems and Methods for Creating, Displaying, and Using Hierarchical Objects with Rigid Bodies
US10140745B2 (en) * 2015-01-09 2018-11-27 Vital Mechanics Research Inc. Methods and systems for computer-based animation of musculoskeletal systems
US10546433B2 (en) * 2017-08-03 2020-01-28 The University Of North Carolina At Chapel Hill Methods, systems, and computer readable media for modeling garments using single view images

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013174671A1 (en) * 2012-05-22 2013-11-28 Telefonica, S.A. A method and a system for generating a realistic 3d reconstruction model for an object or being
CN105184845A (en) * 2015-09-09 2015-12-23 深圳华侨城文化旅游科技股份有限公司 Role model formation method and system
CN105225262A (en) * 2015-10-23 2016-01-06 深圳华侨城文化旅游科技股份有限公司 A kind of motion capture 3D data processing method and 3D model thereof
CN105551072A (en) * 2015-12-11 2016-05-04 网易(杭州)网络有限公司 Method and system for realizing local real-time movement of role model
CN105976418A (en) * 2016-06-28 2016-09-28 珠海金山网络游戏科技有限公司 Design system and method for human dynamic bone
CN107067451A (en) * 2017-04-07 2017-08-18 广州爱九游信息技术有限公司 The implementation method and device of dynamic bone in animation
CN108734758A (en) * 2017-04-25 2018-11-02 腾讯科技(深圳)有限公司 A kind of model of image configuration method, device and computer storage media
RU2672926C1 (en) * 2018-04-02 2018-11-21 Общество с ограниченной ответственностью "ОСТЕОМЕД-М" Method and plate for osteosynthesis of breast bone fractures
KR20200078858A (en) * 2018-12-24 2020-07-02 전자부품연구원 Method for Calculating Skinning Weight of 3D Character Based on Musculoskeletal Structure
CN111145319A (en) * 2019-11-07 2020-05-12 北京中科深智科技有限公司 Method and system for real-time automatic bone binding and skinning
CN111402372A (en) * 2020-03-24 2020-07-10 网易(杭州)网络有限公司 Method and device for simulating actions of virtual characters in game and electronic equipment
CN111627094A (en) * 2020-06-04 2020-09-04 珠海西山居移动游戏科技有限公司 Method and device for generating bone animation

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
三维人体模型动态仿真技术的研究与实现;陈小满;《赤峰学院学报(自然科学版)》;第35卷(第4期);第55-58页 *
汤枫等.《人机交互技术及应用》.机械工业出版社,2020,第136-137页. *

Also Published As

Publication number Publication date
CN112184862A (en) 2021-01-05

Similar Documents

Publication Publication Date Title
CN112184862B (en) Virtual object control method and device and electronic equipment
US8830269B2 (en) Method and apparatus for deforming shape of three dimensional human body model
KR101098834B1 (en) Apparatus and method for generating motion based on dynamics
US10984578B2 (en) Method and system for directly manipulating the constrained model of a computer-generated character
CN110827383A (en) Attitude simulation method and device of three-dimensional model, storage medium and electronic equipment
CN111402372B (en) Method and device for simulating actions of virtual characters in game and electronic equipment
CN111292402B (en) Data processing method, device, equipment and computer readable storage medium
GB2546820A (en) Animating a virtual object in a virtual world
CN111369647B (en) Information processing method and device, computer storage medium and electronic equipment
CN111773688B (en) Flexible object rendering method and device, storage medium and electronic device
CN115115752A (en) Virtual garment deformation prediction method and device, storage medium and electronic equipment
GB2546815B (en) Animating a virtual object in a virtual world
JP3212255B2 (en) Image synthesizing apparatus and image synthesizing method
CN116206021A (en) Binding method, device, equipment and storage medium for clothing and bone
CN112843704B (en) Animation model processing method, device, equipment and storage medium
CN112169331B (en) Object control method and device
CN111145324B (en) Animation simulation method and device based on vegetation vertexes and electronic equipment
KR101626858B1 (en) Secondary motion making method by additional creation of bone
Yang et al. Automatic muscle generation for character skin deformation
CN113256770B (en) Skeleton-based animation generation method and device and electronic equipment
von Funck et al. Elastic secondary deformations by vector field integration
Got Developement of a new automatic skinning system
CN117333610A (en) Three-dimensional model processing method and device and electronic equipment
CN115999158A (en) Flame special effect generation method, device, equipment and computer readable storage medium
KR101134534B1 (en) 3D Simulation Method Using Material Points

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant