CN112184862A - Control method and device of virtual object and electronic equipment - Google Patents

Control method and device of virtual object and electronic equipment Download PDF

Info

Publication number
CN112184862A
CN112184862A CN202011087294.8A CN202011087294A CN112184862A CN 112184862 A CN112184862 A CN 112184862A CN 202011087294 A CN202011087294 A CN 202011087294A CN 112184862 A CN112184862 A CN 112184862A
Authority
CN
China
Prior art keywords
chest
virtual object
model
skeleton
bone
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.)
Granted
Application number
CN202011087294.8A
Other languages
Chinese (zh)
Other versions
CN112184862B (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

Images

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 a control device for a virtual object and electronic equipment, and relates to the technical field of animation rendering, wherein the method comprises the following steps: creating a base skeleton for the virtual object in response to a skeleton creation operation for the virtual object; creating a thoracic skeleton for the thoracic model in response to a skeleton creation operation for the thoracic model of the virtual object; and in response to the covering operation aiming at the chest model, establishing binding relations between the chest model and the chest skeleton and the basic skeleton respectively to obtain covering information, and controlling the movement of the chest model according to the chest skeleton, the basic skeleton and the covering information. According to the control method and device for the virtual object and the electronic equipment, the binding relationship can be established between the chest model and the chest skeleton and between the chest model and the basic skeleton, so that the chest skeleton and the basic skeleton both contribute to rendering of the chest, the animation expression of the chest model is richer, and the effect of a real environment is approximated, so that the visual experience of a user is improved.

Description

Control method and device of virtual object 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
A bone animation is one of model animations in which a model has a skeletal structure of interconnected "bones" and an animation is generated for the model by changing the orientation and position of the bones. When designing a bone animation, a specified number of bones are usually erected at a required model part, skin information is distributed to the bones, an animation corresponding to the model part is produced, and then a preset animation engine is introduced to play the generated bone animation.
However, in the existing bone animation, bones of some model parts are few during production, so that the bone animation generated in the later period is hard to represent, moreover, the animation is mostly produced manually, the consumed time is long, and skin information distribution is often unreasonable, so that the animation is not true to represent, and the visual experience of a user is reduced.
Disclosure of Invention
In view of the above, the present invention provides a method, an apparatus and an electronic device for controlling a virtual object, so as to alleviate the above technical problem.
In a first aspect, an embodiment of the present invention provides a method for controlling a virtual object, where the method includes: in response to a bone creation operation for a virtual object, creating a base bone for the virtual object; creating a thoracic bone for the thoracic model in response to a bone creation operation for the thoracic model of the virtual object; in response to a skinning operation for the chest model, establishing binding relations between the chest model and the chest bones and the basic bones respectively to obtain skinning information so as to control the movement of the chest model according to the chest bones, the basic bones and the skinning information.
In a preferred embodiment, the above establishing binding relationships between the breast models and the breast bones and the basic bones respectively in response to the skinning operation on the breast models to obtain skinning information includes: in response to a skinning operation on a breast model, determining a target base bone to be bound with a target vertex in the breast model, the base bone comprising the target base bone; 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, wherein the weight information is used for expressing the control degree of the target vertex by the target basic skeleton; and establishing a binding relationship between the target vertex and the target basic skeleton to obtain skinning information, wherein the skinning information comprises the binding relationship and the weight information.
In a preferred embodiment, the distance is inversely related to the weight in the weight information.
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 rendering instructions for a virtual object, wherein the virtual object contains a chest model; skin information corresponding to the chest model is obtained, wherein the skin information comprises binding relations between a vertex of the chest model and a basic skeleton and between a vertex of the chest model and a chest skeleton; the base bone is a bone created for the virtual object, the thoracic bone is a bone created for the thoracic model; rendering a 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 an input operation of a rendering parameter, and rendering the chest model of the virtual object according to the rendering parameter corresponding to the input operation and the skin information; wherein the rendering parameters corresponding to the input operation comprise physical parameters for the thoracic bones.
In a preferred embodiment, the physical parameter includes at least one of: damping, elasticity, hardness, inertness value.
In a third aspect, an embodiment of the present invention provides an apparatus for controlling a virtual object, where the apparatus includes: a first creation module to create a base skeleton for a virtual object in response to a skeleton creation operation for the virtual object; a second creation module to create a thoracic bone for a thoracic model of the virtual object in response to a bone creation operation for the thoracic model; the control module is used for responding to covering operation aiming at the chest model, building binding relations between the chest model and the chest bones and the basic bones respectively, obtaining covering information, and controlling the movement of the chest model according to the chest bones, the basic bones and the covering information.
In a fourth aspect, an embodiment of the present invention provides an apparatus for controlling a virtual object, where the apparatus includes: a receiving module to receive rendering instructions for a virtual object, wherein the virtual object contains 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 a vertex of the chest model and a basic skeleton and between a vertex of the chest model and a chest skeleton; the base bone is a bone created for the virtual object, the thoracic bone is a bone created for the thoracic 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, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the method according to the first aspect and the second aspect is implemented.
In a sixth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to perform the method of the first aspect and the second aspect.
The embodiment of the invention has the following beneficial effects:
according to the control method and device for the virtual object and the electronic device, 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, the covering operation of the chest model is further responded, the chest model is respectively bound with the chest skeleton and the basic skeleton, covering information is obtained, and the motion of the chest model is controlled according to the chest skeleton, the basic skeleton and the covering information. Because the binding relation is established among the chest model, the chest bones and the basic bones, when the motion of the chest model is controlled, the chest bones and the basic bones can both contribute to the rendering of the chest, so that the animation expression of the chest model is richer, and the effect of the chest model is close to the effect of a real environment, so that 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 aforementioned and other objects, features and advantages of the present invention comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
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 control method for a virtual object according to an embodiment of the present invention;
FIG. 4 is a schematic view of a thoracic skeleton according to an embodiment of the present invention;
fig. 5 is a flowchart of another control method for a virtual object according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a control apparatus for a virtual object according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of another control apparatus for a virtual object 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
To make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Skeletal Animation (skeeleton Animation), also known as skeletal Animation, divides a three-dimensional model into two parts: skin (Skin) for rendering the model, and Skeleton (skeeleton) for controlling the actions. For the virtual models, each virtual model has a basic skeleton including bones and joints, the bones correspond to a coordinate space, and the bone hierarchy is a nested coordinate space. A joint simply describes the position of a bone, i.e. the position of the bone's own coordinate space origin in its parent space, and rotation around a joint refers to the rotation of the bone's coordinate space itself (including all subspaces). Covering refers to attaching (binding) the vertexes in the Mesh on the bones, and each vertex can be controlled by a plurality of bones, so that the vertex at the joint is changed in position due to the fact that the vertex is pulled by the parent-child bones at the same time, and cracks are eliminated.
At present, for bone animation, due to the fact that the basic skeleton is less in skeleton design of certain parts, the bone animation generated in the later stage is hard to represent, for example, when a chest of a model is represented, 1 to 2 bones are often erected, skin information is only distributed to the bones of the chest, the bones are few, the animation is hard to represent, and when the animation is made manually, the animation is not true due to unreasonable distribution of the skin information.
Accordingly, embodiments of the present invention provide a method and an apparatus for controlling a virtual object, and an electronic device, which can alleviate the above technical problem.
For the convenience of understanding the present embodiment, a detailed description will be first given of a control method for a virtual object disclosed in the present embodiment.
In a possible implementation manner, an embodiment of the present invention provides a method for controlling a virtual object, and in particular, a virtual model of the virtual object may be displayed through an electronic device; a flow chart of a method of controlling a virtual object as shown in fig. 1, the method comprising the steps of:
step S102, in response to the skeleton creating operation aiming at the virtual object, creating a basic skeleton for the virtual object;
step S104, in response to a skeleton creation operation for a chest model of a virtual object, creating a chest skeleton for the chest model;
specifically, the basic skeleton of the virtual object may often represent the appearance characteristics of the virtual object, but for some virtual objects, especially female virtual objects, due to the characteristic features of the person, the skeletal representation form of the chest of the virtual object is different, and the original basic skeleton is often difficult to represent the chest of the female virtual object, and in the above step S102 and step S104, through the skeleton creation operation, the chest skeleton may be further created for the basic skeleton, so that the virtual object may create the chest skeleton on the basis of the original basic skeleton, and further, the representation form of the chest of the female virtual object may be controlled through more skeletons.
And S106, in response to 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 to obtain skin information, and controlling the movement of the chest model according to the chest skeleton, the basic skeleton and the skin information.
Here, the thoracic bone created in the above step S104 is a bone located in a thoracic cavity portion of the virtual object, and the center of the thoracic bone generally refers to the center of the thoracic cavity portion. The generated breast bone has multiple layers in consideration of the human body structure characteristics of the breast so as to embody the breast characteristics of the female virtual model.
Therefore, the control method of the virtual object provided by the embodiment of the invention can create a basic skeleton for the virtual object in response to the skeleton creation operation on the virtual object, create a breast skeleton for the breast model in response to the skeleton creation operation on the breast model on the virtual object, further establish a binding relationship between the breast model and the breast skeleton and the basic skeleton in response to the skin operation on the breast model, and obtain skin information to control the motion of the breast model according to the breast skeleton, the basic skeleton and the skin information. Because the binding relation is established among the chest model, the chest bones and the basic bones, when the motion of the chest model is controlled, the chest bones and the basic bones can both contribute to the rendering of the chest, so that the animation expression of the chest model is richer, and the effect of the chest model is close to the effect of a real environment, so that the visual experience of a user is improved.
In practical use, the above process of creating a breast skeleton may be implemented in an IDE (Integrated Development Environment), and specifically, 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, integrates functions such as a code writing function, an analysis function, a compiling function, and a debugging function, so that the process of creating a multi-layer breast skeleton may be implemented.
Specifically, when creating the thoracic skeleton, a basic skeleton is generally created in the IDE according to the body type of the virtual object, i.e., the process of step S102 described above, and then the thoracic skeleton is further created on the basis of the basic skeleton. For ease of understanding, fig. 2 shows a schematic diagram of the basic skeleton of a virtual object, in particular, fig. 2 shows the basic skeleton of a female virtual object, which includes basic skeletons of the head, chest, waist, abdomen, and limbs, as can be seen by the circled structural blocks in the figure. When creating a thoracic skeleton based on this basic skeleton, it is necessary to first select the basic skeleton in the IDE environment and then create the thoracic skeleton based on the basic skeleton. Therefore, on the basis of fig. 1, fig. 3 shows a flowchart of another control method of a virtual object, and the creation process of the thoracic skeleton is described in detail. As shown in fig. 3 in particular, the method comprises the following steps:
step S302, in response to the skeleton creating operation aiming at the virtual object, creating a basic skeleton for the virtual object;
step S304, in response to a skeleton creation operation for a chest model of a virtual object, setting a chest part in a basic skeleton to an editable state;
step S306, in the editable state, a breast skeleton is created for the breast model;
specifically, in step S302, a basic skeleton is generally created or introduced in the IDE, and then step S304 is executed, the basic skeleton may be selected, and several portions included in the basic skeleton are set to be editable states, for example, the basic skeleton shown in fig. 2 is displayed in the IDE, the basic skeleton may be selected first, then the chest model of the virtual object may be selected continuously, so as to set the chest portion to be editable states, and then step S306 is executed, and the chest skeleton is created for the chest model.
Specifically, when creating a thoracic bone, creating parameters of the thoracic bone, which are set in advance, are acquired, wherein the creating parameters generally include a human muscle parameter, a chest vertex wiring position of the virtual object, a distance of the thoracic bone from a basic bone, and the like, and then the thoracic bone of the virtual object is created based on the creating parameters.
Further, when creating a thoracic bone, a plurality of layers of thoracic bones are generally created, and therefore, the number of operations of the bone creation operation in step S306 is a plurality of times, each of which corresponds to at least one layer of thoracic bone. Further, because each layer of the thoracic bones has a different distance to the center of the thoracic region, the user can click on different positions of the thoracic region multiple times to generate a layer of thoracic bones at the clicked position.
For easy understanding, fig. 4 shows a schematic diagram of a thoracic bone, taking the right side of the diagram as an example, sequentially including a bone (1), a bone (2), a bone (3) and a bone (4), that is, the bone (1), the bone (2), the bone (3) and the bone (4) are multilayer thoracic bones created in order from the skin surface to the interior of the thoracic cavity, for example, a user may click on a position corresponding to the bone (1), and then on the interface of the IDE, a graph of the bone (1) may be generated, and for a user skilled in operation, a user may directly click in order from the skin surface to the interior of the thoracic cavity according to the character design requirements of a virtual object, and thus, the multilayer thoracic bones may be directly generated at the click position. In addition, for the plurality of layers of thoracic bones included by the virtual object, the thoracic bones of each layer are sequentially linked, that is, each layer of thoracic bones corresponds to a link level, and the thoracic bone closest to the basic bone of the virtual object is linked to the thoracic bone of the basic bone.
Specifically, for the schematic diagram of the thoracic bones 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 thoracic bone of the thoracic model, wherein the thoracic bone of the thoracic model belongs to a part of the basic bone.
Further, after the plurality of layers of breast bones are created in the above manner, the weight of the vertex of each layer of breast bones may be determined based on the distance from the vertex of the plurality of layers of breast bones to the target basic bone included in the basic bones, and then the skinning information may be added. Specifically, in response to the skin covering operation for the chest model, the binding relationships between the chest model and the chest skeleton and the basic skeleton are respectively established, and the steps of obtaining skin information are shown in steps S308 to S312 below.
Step S308, responding to covering operation aiming at the chest model, and 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;
wherein, the weight information is used for representing the control degree of the target basic skeleton to the target vertex;
step S312, a binding relationship is established between the target vertex and the target basic skeleton, and skinning information is obtained and comprises the binding relationship and weight information.
Specifically, the target vertices are generally determined by vertex routing of the thoracic model, for example, by the created vertex routing positions and the routing arcs of the vertices of the thoracic bones. In the embodiment of the present invention, the basic skeleton includes a plurality of target basic skeletons, and in the embodiment of the present invention, the target basic skeleton is a skeleton which is located at a certain distance from the breast skeleton, and the skeleton does not have a great weight but has a slight pulling feeling when controlling the amplitude of the breast, so as to increase the reality of the animation.
Further, in the step S310, when determining the weight information of the target vertex for the target basic skeleton, if the number of the target basic skeletons is plural, when determining the weight information, for each target basic skeleton, the weight information of the target vertex for each layer of the thoracic skeleton for the target basic skeleton is determined based on the distance between the target vertex and the target basic skeleton.
In the embodiment of the present invention, the distance between the target vertex and the target base skeleton and the weight in the weight information form a negative correlation. The target underlying bones may include, among others, scapular bones and arm bones.
Specifically, only the scapular bone may be included, or the arm bone may also be included, when the scapular bone and the arm bone are included at the same time, when the weight information of the target vertex for the target basic bone is determined, the weight of the thoracic bone needs to be determined according to the distance from the multiple layers of thoracic bones to the scapular bone, and the weight of a group of thoracic bones needs to be determined according to the distance from the multiple layers of thoracic bones to the arm bone.
In practical use, considering that the creation parameters used in creating the thoracic skeleton include vertex wiring of the thoracic model, when the binding relationship is established between the target vertex and the target basic skeleton in step S312, the binding relationship may be established according to the wiring radian of the vertex.
Specifically, in determining the weight information of the target vertex for the target basic skeleton, the weight information of the target vertex for each layer of the thoracic skeleton may be determined in accordance with the wiring radian of the vertex in the direction from each layer of the thoracic skeleton to the target basic skeleton, and the distance between the target vertex and the target basic skeleton has a negative correlation with the weight in the weight information. That is, the smaller the distance between the target vertex and the target skeleton, the larger the corresponding weight in the weight information, and the larger the distance between the target vertex and the target skeleton, the smaller the corresponding weight in the weight information.
For example, in assigning weights according to the human muscle structure, the vertex routing position of the virtual object, and the distance between each layer of thoracic bone and the bones of the "scapula" and the "arm", the weights may be assigned according to the vertex routing radians, and generally, the closer to the vertex of the bones of the "scapula" or the "arm", the higher the weight; the farther away from the scapula or arm skeleton the vertex weight value is, the smaller.
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". In the embodiment of the present invention, unlike the conventional skin method, the weight of the target vertex of the virtual object is assigned to target basic bones such as "shoulder blades" and "arms" so that the thoracic bones close to the two target basic bones are also influenced by the motion of the "shoulder blades" or the "arms" to some extent.
Specifically, when determining the weight information of each layer of chest bone, the weight values of the target top points close to the two target basic bones can be set to be 0.01, 0.02, 0.03, 0.05 and 0.1 in sequence, namely, the weight of the target top point of the chest bone is gradually increased from the center of the chest bone to the scapula bone, and similarly, the weight of the target top point of the chest bone can also be set according to the above values from the center of the chest bone to the arm bone, and the reason for allocating the values is that the distance between the scapula bone and the arm bone is far from the chest relative to the position of the sternum bone itself, and the final purpose for allocating the data is to realize that the scapula bone and the arm bone can control the amplitude of the chest not to be large but to have a sense of pulling a little. 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 thoracic model vertices of the scapula and arm skeletons, the greater the assigned weight should be, so as to embody the embodiment of the present invention, the distance between the target vertex and the target basic skeleton is in negative correlation with the weight in the weight information of the thoracic skeleton.
Further, after the chest bone is created and the skin information is obtained, the virtual object may be rendered, and specifically, the rendering process of the virtual object may be implemented by depending on a corresponding animation engine, so that the basic bone, the chest bone, and the skin information of the virtual object may be imported to a preset animation engine for rendering. Therefore, on the basis of the above embodiment, the embodiment of the present invention further provides another method for controlling a virtual object, which describes a rendering process of the virtual object, and specifically, a flowchart of another method for controlling a virtual object as shown in fig. 5 includes the following steps:
step S502, receiving a rendering instruction aiming at 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 the top point of the chest model and a basic skeleton and between the top point of the chest model and the chest skeleton; the basic skeleton is a skeleton created for the virtual object, and the chest skeleton is a skeleton created for the chest model;
and step S506, rendering the chest model of the virtual object according to the skin information.
Specifically, in rendering, in response to an input operation of a rendering parameter, the chest model of the virtual object may be rendered 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 aiming at the thoracic bones.
Specifically, the 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 an animation engine according to the skin information and the physical parameters; wherein the physical parameter of the thoracic bone comprises at least one of: damping, elasticity, hardness and inertness values.
Specifically, taking the Unity3D engine and the dynamaic Bone plugin as an example, and considering that the above process of creating the thoracic skeleton is implemented in the IDE environment, data can be exported from the IDE environment to be used in the Unity3D engine, and the physical parameters of the thoracic skeleton are set for the data. The meaning of each parameter of the plug-in is as follows:
dmping: damping, degree of delay in thoracic skeletal simulation.
Elasticity: elasticity, how much force is applied to restore each bone to its original orientation.
Stiffiness: stiffness, how much the original orientation of the bone is preserved.
Inert: the inertia value, in the physical simulation, ignores the magnitude of the change in position of the character.
Generally, when rendering a chest model, an Elasticity value is used to control the shaking degree of the chest according to the size of the chest of a virtual model, then a Dmping value is used to limit the shaking frequency of the chest, a Stiffiness value is used to control the hardness degree of the chest, and the retention degree of the initial bone direction is controlled substantially; if the position of the character changes and the movement amplitude is large, the inertia value is needed to limit the change degree of the skeleton.
To sum up, the control method for the virtual object provided by the embodiment of the present invention has the following advantages:
(1) animation is not required to be independently made for a single animation file, so that a large amount of manufacturing cost is saved;
(2) by means of real-time simulation, the very rich animation effect of the female breast can be realized;
(3) reasonable weight distribution, namely besides the breast bone, the scapula and the arm slightly drive the breast skin, the amplitude is not large, but the shoulder scapula and the arm have the feeling of 'skin tearing', so that the cartoon is richer in expression and closer to reality.
Further, corresponding to the control method of the virtual object shown in fig. 1, an embodiment of the present invention further provides a control apparatus of the virtual object, and as shown in fig. 6, the apparatus 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 thoracic bone for the thoracic model of the virtual object in response to a bone creation operation for the thoracic model;
a control module 64, configured to, in response to a skinning operation on the chest model, establish a binding relationship between the chest model and the chest bones and the basic bones, respectively, to obtain skinning information, so as to control a motion of the chest model according to the chest bones, the basic bones, and the skinning information.
Wherein the control module 64 is further configured to determine a target base skeleton to be bound with a target vertex in the breast model in response to a skinning operation on the breast model, the base skeleton including the target base skeleton; 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, wherein the weight information is used for expressing the control degree of the target vertex by the target basic skeleton; and establishing a binding relationship between the target vertex and the target basic skeleton to obtain skinning information, wherein the skinning information comprises the binding relationship and the weight information.
Wherein, the distance and the weight in the weight information form a negative correlation relationship, and the target basic skeleton comprises a scapula skeleton and an arm skeleton.
Further, the target vertices are determined from the vertex wiring of the chest model.
Further, corresponding to the control method of the virtual object shown in fig. 5, an embodiment of the present invention further provides another control apparatus of the virtual object, as shown in fig. 7, which is a schematic structural diagram of the another control apparatus of the virtual object, and the apparatus includes:
a receiving module 70 for receiving rendering instructions for a virtual object, wherein the virtual object contains a chest model;
an obtaining module 72, configured to obtain skin information corresponding to the chest model, where the skin information includes binding relationships between vertices of the chest model and a basic skeleton and a chest skeleton, respectively; the base bone is a bone created for the virtual object, the thoracic bone is a bone created for the thoracic model;
a rendering module 74 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 an input operation of a rendering parameter, and rendering the chest model of the virtual object according to the rendering parameter corresponding to the input operation and the skin information; wherein the rendering parameters corresponding to the input operation comprise physical parameters for the thoracic bones.
The physical parameters include at least one of: damping, elasticity, hardness, inertness value.
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 which is stored on the memory and can run 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, which is the schematic structural diagram of the electronic device, where the electronic device includes a processor 81 and a memory 80, 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 control method for the 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) and may also include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The communication connection between the network element of the system and at least one other network element is realized through at least one communication interface 83 (which may be wired or wireless), and the internet, a wide area network, a local network, a metropolitan area network, etc. may be used. The bus 82 may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus 82 may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one double-headed arrow is shown in FIG. 8, but that does not indicate only one bus or one type of bus.
The processor 81 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 81. The Processor 81 may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component. 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 directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in a memory, and the processor 81 reads information in the memory and completes the chest rendering method of the virtual model of the foregoing embodiment in combination with hardware thereof.
The embodiment of the invention also provides a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and when the computer program is executed by a processor, the control method of the virtual object is executed.
The method and apparatus for controlling a virtual object and the computer program product of the electronic device provided in the embodiments of the present invention include a computer-readable storage medium storing a program code, where instructions included in the program code may be used to execute the method described in the foregoing method embodiments, and specific implementation may refer to the method embodiments, and will not be described herein again.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working process of the apparatus described above may refer to the corresponding process in the foregoing method embodiment, and is not described herein again.
In addition, in the description of the embodiments of the present invention, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meaning of the above terms in the present invention can be understood in specific cases for those skilled in the art.
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 such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings, and are only for convenience of description and simplicity of description, but do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular 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: although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that the following embodiments are merely illustrative of the present invention, and not restrictive, and the scope of the present invention is not limited thereto: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (12)

1. A method for controlling a virtual object, the method comprising:
in response to a bone creation operation for a virtual object, creating a base bone for the virtual object;
creating a thoracic bone for the thoracic model in response to a bone creation operation for the thoracic model of the virtual object;
in response to a skinning operation for the chest model, establishing binding relations between the chest model and the chest bones and the basic bones respectively to obtain skinning information so as to control the movement of the chest model according to the chest bones, the basic bones and the skinning information.
2. The control method according to claim 1, wherein the establishing binding relationships between the chest models and the chest bones and the basic bones respectively in response to the skinning operation on the chest models to obtain skinning information comprises:
in response to a skinning operation on a breast model, determining a target base bone to be bound with a target vertex in the breast model, the base bone comprising the target base bone;
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, wherein the weight information is used for expressing the control degree of the target vertex by the target basic skeleton;
and establishing a binding relationship between the target vertex and the target basic skeleton to obtain skinning information, wherein the skinning information comprises the binding relationship and the weight information.
3. The control method according to claim 2, wherein the distance is in a negative correlation with the weight in the weight information.
4. The control method according to claim 2, wherein the target basal skeleton includes a scapular skeleton and an arm skeleton.
5. The control method according to claim 2, characterized in that the method further comprises:
and determining the target vertex according to the vertex wiring of the chest model.
6. A method for controlling a virtual object, the method comprising:
receiving rendering instructions for a virtual object, wherein the virtual object contains a chest model;
skin information corresponding to the chest model is obtained, wherein the skin information comprises binding relations between a vertex of the chest model and a basic skeleton and between a vertex of the chest model and a chest skeleton; the base bone is a bone created for the virtual object, the thoracic bone is a bone created for the thoracic model;
rendering a chest model of the virtual object according to the skin information.
7. The control method of claim 6, wherein the rendering the chest model of the virtual object according to the skin information comprises:
responding to an input operation of a rendering parameter, and rendering the chest model of the virtual object according to the rendering parameter corresponding to the input operation and the skin information;
wherein the rendering parameters corresponding to the input operation comprise physical parameters for the thoracic bones.
8. The control method of claim 7, wherein the physical parameter comprises at least one of: damping, elasticity, hardness, inertness value.
9. An apparatus for controlling a virtual object, the apparatus comprising:
a first creation module to create a base skeleton for a virtual object in response to a skeleton creation operation for the virtual object;
a second creation module to create a thoracic bone for a thoracic model of the virtual object in response to a bone creation operation for the thoracic model;
the control module is used for responding to covering operation aiming at the chest model, building binding relations between the chest model and the chest bones and the basic bones respectively, obtaining covering information, and controlling the movement of the chest model according to the chest bones, the basic bones and the covering information.
10. An apparatus for controlling a virtual object, the apparatus comprising:
a receiving module to receive rendering instructions for a virtual object, wherein the virtual object contains 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 a vertex of the chest model and a basic skeleton and between a vertex of the chest model and a chest skeleton; the base bone is a bone created for the virtual object, the thoracic bone is a bone created for the thoracic model;
and the rendering module is used for rendering the chest model of the virtual object according to the skin information.
11. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1-8 when executing the computer program.
12. A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, which computer program, when being executed by a processor, is adapted to carry out the method of any of the preceding claims 1-8.
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 true CN112184862A (en) 2021-01-05
CN112184862B 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)

Cited By (4)

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

Citations (15)

* 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
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
US20160203630A1 (en) * 2015-01-09 2016-07-14 Vital Mechanics Research Inc. Methods and systems for computer-based animation of musculoskeletal systems
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
US20190043269A1 (en) * 2017-08-03 2019-02-07 The University Of North Carolina At Chapel Hill Methods, systems, and computer readable media for modeling garments using single view images
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

Patent Citations (15)

* 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
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
US20160203630A1 (en) * 2015-01-09 2016-07-14 Vital Mechanics Research Inc. Methods and systems for computer-based animation of musculoskeletal systems
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
US20190043269A1 (en) * 2017-08-03 2019-02-07 The University Of North Carolina At Chapel Hill Methods, systems, and computer readable media for modeling garments using single view images
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 (3)

* Cited by examiner, † Cited by third party
Title
千喜: "Unity动态骨骼Dynamic Bone", pages 1 - 5, Retrieved from the Internet <URL:https://blog.csdn.net/dengshunhao/article/details/105165215> *
汤枫等: "《人机交互技术及应用》", 机械工业出版社, pages: 136 - 137 *
陈小满: "三维人体模型动态仿真技术的研究与实现", 《赤峰学院学报(自然科学版)》, vol. 35, no. 4, pages 55 - 58 *

Cited By (7)

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

Also Published As

Publication number Publication date
CN112184862B (en) 2024-05-14

Similar Documents

Publication Publication Date Title
CN112184862B (en) Virtual object control method and device and electronic equipment
CN110827383B (en) Attitude simulation method and device of three-dimensional model, storage medium and electronic equipment
CN111260764B (en) Method, device and storage medium for making animation
US20160371871A1 (en) Defining an animation of a virtual object within a virtual world
CN111714880B (en) Picture display method and device, storage medium and electronic device
CN114241100B (en) Skinning method, skinning device, skinning apparatus, skinning medium, and program product for virtual object
CN115641375B (en) Method, device, equipment and storage medium for processing hair of virtual object
CN111402372B (en) Method and device for simulating actions of virtual characters in game and electronic equipment
US20170221251A1 (en) Animating a virtual object in a virtual world
US9984488B2 (en) Animating a virtual object in a virtual world
GB2546817A (en) Animating a virtual object in a virtual world
CN111773688B (en) Flexible object rendering method and device, storage medium and electronic device
CN111292402B (en) Data processing method, device, equipment and computer readable storage medium
JP4719155B2 (en) Rig baking
CN115115752A (en) Virtual garment deformation prediction method and device, storage medium and electronic equipment
US10410393B2 (en) Animating a virtual object in a virtual world
WO2016188551A1 (en) Animating a virtual object in a virtual world
CN112843704B (en) Animation model processing method, device, equipment and storage medium
CN116385605A (en) Method and device for generating flight animation of target object and electronic equipment
CN116402989B (en) Data processing method, device, equipment and medium
Cordova et al. Comparison of the Development of the VR-UC Application for Platforms Mobile and Desktop Relative to Its Optimization
CN118179030A (en) Control method and device for object hanging and electronic equipment
CN118379406A (en) Skeleton binding method for human body three-dimensional model
CN116934922A (en) Physical animation generation method and device based on Unreal engine
CN115999158A (en) Flame special effect generation method, device, equipment and computer readable storage medium

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