CN112169331B - Object control method and device - Google Patents

Object control method and device Download PDF

Info

Publication number
CN112169331B
CN112169331B CN202011157710.7A CN202011157710A CN112169331B CN 112169331 B CN112169331 B CN 112169331B CN 202011157710 A CN202011157710 A CN 202011157710A CN 112169331 B CN112169331 B CN 112169331B
Authority
CN
China
Prior art keywords
bone
type
motion parameter
virtual object
skeleton
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
CN202011157710.7A
Other languages
Chinese (zh)
Other versions
CN112169331A (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 CN202011157710.7A priority Critical patent/CN112169331B/en
Publication of CN112169331A publication Critical patent/CN112169331A/en
Application granted granted Critical
Publication of CN112169331B publication Critical patent/CN112169331B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The embodiment of the invention provides an object control method and device, wherein the method comprises the following steps: receiving a control instruction for a virtual object, wherein the virtual object comprises a first type of bone and a second type of bone, the first type of bone is added to a part of muscle parts of the virtual object, and the second type of bone is a basic bone of the virtual object. According to the control instruction, a first motion parameter corresponding to the first type of bone and a second motion parameter corresponding to the second type of bone are obtained, wherein the first motion parameter is used for indicating the first type of bone to move with the first key point as the center, and the second motion parameter is used for indicating the second type of bone to move with the second key point as the center. And controlling the virtual object to move according to the first motion parameter and the second motion parameter. And constraining the motions of the first type of bones and the second type of bones through the motion parameters, and further constraining the motions of the virtual object so as to improve the expression authenticity of the virtual object.

Description

Object control method and device
Technical Field
The embodiment of the invention relates to the field of computers, in particular to an object control method and device.
Background
With the continuous development of game-related technologies, the requirements for modeling and animation of virtual objects in games are also increasing.
At present, the virtual object generates an animation during the motion process, and the virtual object may deform in shape during the motion process of the virtual object, for example, the shoulder of the virtual object may distort during the motion process of lifting the arm of the virtual object, thereby causing the animation of the virtual object to be unnatural.
Therefore, during the motion process of the virtual object, certain parts of the virtual object can be distorted and deformed, so that the representation of the virtual object lacks reality.
Disclosure of Invention
The embodiment of the invention provides an object control method and device, which are used for solving the problem that the performance of a virtual object lacks of reality.
In a first aspect, an embodiment of the present invention provides an object control method, including:
receiving a control instruction for a virtual object, wherein the virtual object comprises a first type of bone and a second type of bone, the first type of bone is added to a part of muscle parts of the virtual object, and the second type of bone is basic bone of the virtual object;
According to the control instruction, a first motion parameter corresponding to the first type of bone and a second motion parameter corresponding to the second type of bone are obtained, wherein the first motion parameter is used for indicating the first type of bone to move with a first key point as a center, and the second motion parameter is used for indicating the second type of bone to move with a second key point as a center;
and controlling the virtual object to move according to the first motion parameter and the second motion parameter.
In one possible design, controlling the virtual object motion according to the first motion parameter and the second motion parameter includes:
determining a first movement part in the virtual object according to the control instruction, wherein a first main skeleton and a first sub skeleton of a first type corresponding to the first movement part are both linked with the first key point, and a skeleton of a second type corresponding to the first movement part is linked with the second key point;
acquiring a first main motion parameter corresponding to the first main skeleton and a first sub motion parameter corresponding to the first sub skeleton from the first motion parameters;
Controlling the first main skeleton to move with the first key point as a center according to the first main motion parameter, controlling the first sub-skeleton to move with the first key point as a center according to the first sub-motion parameter, and controlling the second type skeleton to move with the second key point as a center according to the second motion parameter.
In one possible design, the first primary motion parameter indicates that the first primary bone is linked with the first keypoint in a first manner;
the first sub-motion parameter indicates that the first sub-skeleton is linked with the first keypoint in a second manner;
the second motion parameter indicates that the second type of bone is linked with the second keypoint in a third way.
In one possible design, the first way is a search constraint, the second way is a position constraint, and the third way is a position constraint and a direction constraint.
In one possible design, the method further comprises:
and performing skin operation on the virtual object, wherein the weight of the quaternion is increased to a preset weight in the skin operation process so as to control the muscle movement of the first movement part.
In one possible design, the first motion parameter further includes a rotation angle of the first main skeleton and the first sub-skeleton in a three-dimensional coordinate system.
In one possible design, the method further comprises:
and adding the corresponding first main skeleton and the corresponding first sub-skeleton to the first movement part of the virtual object according to the first main movement parameter and the first sub-movement parameter.
In one possible design, the first type of bone is a bone and the second type of bone is a character expression CS bone.
In a second aspect, an embodiment of the present invention provides an object control apparatus, including:
the device comprises a receiving module, a control module and a control module, wherein the receiving module is used for receiving a control instruction aiming at a virtual object, the virtual object comprises a first type of bone and a second type of bone, the first type of bone is added to a part of muscle parts of the virtual object, and the second type of bone is basic bone of the virtual object;
the acquisition module is used for acquiring a first motion parameter corresponding to the first type of bone and a second motion parameter corresponding to the second type of bone according to the control instruction, wherein the first motion parameter is used for indicating the first type of bone to move with a first key point as a center, and the second motion parameter is used for indicating the second type of bone to move with a second key point as a center;
And the control module is used for controlling the virtual object to move according to the first motion parameter and the second motion parameter.
In one possible design, the control module is specifically configured to:
determining a first movement part in the virtual object according to the control instruction, wherein a first main skeleton and a first sub skeleton of a first type corresponding to the first movement part are both linked with the first key point, and a skeleton of a second type corresponding to the first movement part is linked with the second key point;
acquiring a first main motion parameter corresponding to the first main skeleton and a first sub motion parameter corresponding to the first sub skeleton from the first motion parameters;
controlling the first main skeleton to move with the first key point as a center according to the first main motion parameter, controlling the first sub-skeleton to move with the first key point as a center according to the first sub-motion parameter, and controlling the second type skeleton to move with the second key point as a center according to the second motion parameter.
In one possible design, the first primary motion parameter indicates that the first primary bone is linked with the first keypoint in a first manner;
The first sub-motion parameter indicates that the first sub-skeleton is linked with the first keypoint in a second manner;
the second motion parameter indicates that the second type of bone is linked with the second keypoint in a third way.
In one possible design, the first way is a search constraint, the second way is a position constraint, and the third way is a position constraint and a direction constraint.
In one possible design, the control module is further configured to:
and performing skin operation on the virtual object, wherein the weight of the quaternion is increased to a preset weight in the skin operation process so as to control the muscle movement of the first movement part.
In one possible design, the first motion parameter further includes a rotation angle of the first main skeleton and the first sub-skeleton in a three-dimensional coordinate system.
In one possible design, the control module is further configured to:
and adding the corresponding first main skeleton and the corresponding first sub-skeleton to the first movement part of the virtual object according to the first main movement parameter and the first sub-movement parameter.
In one possible design, the first type of bone is a bone and the second type of bone is a character expression CS bone.
In a third aspect, an embodiment of the present invention provides an object control apparatus, including:
a memory for storing a program;
a processor for executing the program stored by the memory, the processor being adapted to perform the method of the first aspect and any of the various possible designs of the first aspect as described above when the program is executed.
In a fourth aspect, embodiments of the present invention provide a computer readable storage medium comprising instructions which, when run on a computer, cause the computer to perform the method of the first aspect above and any of the various possible designs of the first aspect.
The embodiment of the invention provides an object control method and device, wherein the method comprises the following steps: receiving a control instruction for a virtual object, wherein the virtual object comprises a first type of bone and a second type of bone, the first type of bone is added to a part of muscle parts of the virtual object, and the second type of bone is a basic bone of the virtual object. According to the control instruction, a first motion parameter corresponding to the first type of bone and a second motion parameter corresponding to the second type of bone are obtained, wherein the first motion parameter is used for indicating the first type of bone to move with the first key point as the center, and the second motion parameter is used for indicating the second type of bone to move with the second key point as the center. And controlling the virtual object to move according to the first motion parameter and the second motion parameter. By setting the first type of skeleton in the virtual object, the first type of skeleton corresponds to the first motion parameter, and the second type of skeleton is provided with the second type of parameter, wherein the first motion parameter and the second motion parameter can restrict the motions of the first type of skeleton and the second type of skeleton, and further restrict the motions of the virtual object, so that the problem that part of the virtual object is distorted in the motion process of the virtual object is avoided, and the expression reality of the virtual object is effectively improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the prior art, the following description will briefly explain the drawings used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a diagram illustrating deformation of a virtual object according to an embodiment of the present invention;
FIG. 2 is an interface schematic diagram of setting parameters according to an embodiment of the present invention;
FIG. 3 is a flowchart of an object control method according to an embodiment of the present invention;
FIG. 4 is a schematic view of a CS skeleton provided by an embodiment of the present invention;
FIG. 5 is a flowchart of an object control method according to an embodiment of the present invention;
FIG. 6 is a schematic illustration of creating a first type of bone and a first key point provided by an embodiment of the present invention;
FIG. 7 is a schematic view of an alignment tool according to an embodiment of the present invention;
fig. 8 is a schematic diagram of an arm structure according to an embodiment of the present invention;
FIG. 9 is a schematic illustration of adding a first type of bone provided by an embodiment of the present invention;
FIG. 10 is a schematic diagram illustrating setting of search constraint attributes according to an embodiment of the present invention;
FIG. 11 is a schematic diagram illustrating setting of a position limitation attribute according to an embodiment of the present invention;
fig. 12 is a schematic diagram of setting a second key point according to an embodiment of the present invention;
FIG. 13 is a schematic diagram of a virtual object with deformation elimination according to an embodiment of the present invention;
fig. 14 is a schematic diagram illustrating twisting of buttocks of a virtual object according to an embodiment of the present invention;
FIG. 15 is a diagram illustrating the de-twisting of the buttocks of a virtual object according to an embodiment of the present invention;
fig. 16 is a schematic structural diagram of an object control device according to an embodiment of the present invention;
fig. 17 is a schematic hardware structure of an object control 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 embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. 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.
For ease of understanding, first, the related concepts to which the present invention relates will be described:
3dsMax: the 3D Studio Max, often abbreviated as 3D Max or 3ds Max, is a three-dimensional animation rendering and producing software based on a personal computer (Personal Computer, PC) system.
bones: bones created based on 3 dsMax's own bone tools, bones are capable of providing forward dynamics and bone scaling limitation features.
CS bone: wherein a Character Studio (CS) is an animated character tool kit and a CS skeleton is a skeleton created based on the CS.
The following describes the technical background related to the present invention in detail:
today, there is also an increasing demand for modeling and animation of virtual objects in games, where the virtual objects may produce an animation during movement, e.g. the virtual objects may perform actions such as lifting arms, lifting thighs, etc., and the virtual objects may produce an animation through a series of actions.
During the movement of the virtual object, the virtual object may deform in shape, for example, during the movement of the virtual object to raise the arm, muscles of the shoulder of the virtual object may distort, resulting in unnatural animation of the virtual object.
For another example, the deformation of the shape of the virtual object during the leg lifting action of the virtual object may be understood with reference to fig. 1, and fig. 1 is a schematic diagram of the deformation of the shape of the virtual object according to an embodiment of the present invention.
Referring to fig. 1, the present virtual object performs a leg lifting motion, in which thigh muscles of the virtual object are significantly deformed, and reference may be made to a portion indicated by 101 in fig. 1, thereby causing the virtual object to assume an unnatural state.
Therefore, during the movement of the virtual object, distortion of certain parts can lead to lack of reality of the virtual object.
In the prior art, when the distortion of the virtual object is processed, in one possible implementation manner, the effect of the distortion can be relieved to a certain extent by setting related parameters in 3 dsMax.
For example, the prior art may set parameters associated with bones of a distorted muscle to alleviate distortion of the model to some extent.
The following description is made with reference to fig. 2, and fig. 2 is a schematic interface diagram of setting parameters according to an embodiment of the present invention.
The setting panel of the parameters is schematically shown in fig. 2, and the adjustment of the parameters is achieved by performing related operations on the setting panel, see fig. 2:
For example, when the shoulder of the model is deformed during the current model movement, the bone of the muscle of the shoulder may be set to be closed by the Freeze Length, which is a part illustrated by 201 in fig. 2.
Wherein the bone will retain its Length after the Freeze Length is turned on. After Freeze Length is closed, the bone Length will be based on translation of its sub-bones.
And a stretch option may be set to select Squash, see fig. 2, which may select Squash, none (not stretch), or Scale (Scale).
Referring to 201, in the prior art, a squaring is selected through a stretch option, so that a virtual object can be controlled to simulate a muscle to simulate a flattening action in a motion process, and the reality of the performance is improved.
And Twist setting appropriate values for Twist of the Twist pos, and saving the set values of Twist, wherein Twist may indicate a Twist angle of the bone, for example, referring to fig. 2, twist may be set to 36, so that the bone inside the muscle where Twist occurs may be twisted in the opposite direction to alleviate deformation exhibited by the virtual object to some extent.
Through the implementation mode of the setting parameters, model distortion and pulling shown by the virtual object in motion can be relieved to a certain extent.
However, when the motion amplitude of the virtual object is relatively large, the virtual object still shows a distorted and pulled state, so that the problem that some parts of the virtual object are distorted and deformed in the motion process of the virtual object cannot be effectively solved by the implementation scheme in the prior art, and the problem that the virtual object lacks reality is caused.
The following describes the object control method according to the present invention with reference to specific embodiments, first, description is made with reference to fig. 3, fig. 3 is a flowchart of the object control method according to one embodiment of the present invention, and fig. 4 is a schematic diagram of a CS skeleton according to an embodiment of the present invention.
As shown in fig. 3, the method includes:
s301, receiving a control instruction corresponding to a virtual object, wherein the virtual object comprises bones of a first type and bones of a second type, the bones of the first type are bones added to part of muscle parts of the virtual object, and the bones of the second type are basic bones of the virtual object.
In this embodiment, the virtual object may be, for example, a virtual person, a virtual animal, or a virtual character including limbs, which is designed, and the specific implementation of the virtual object is not limited as long as the virtual object is provided with muscle tissue and can perform exercise.
The virtual objects in this embodiment include a first type of bone and a second type of bone, wherein the second type of bone is the underlying bone of the virtual object, and in one possible implementation, the second type of bone may be a CS bone, for example, one possible implementation of a CS bone is illustrated in fig. 4, wherein the CS bone may comprise a complete ergonomic bone.
And the first type of bone in this embodiment is added to a part of the muscle portion of the virtual object, where the added bone may be bones bone, and in one possible implementation, the part of the added bone may be a portion where the distortion of the virtual object needs to be adjusted, for example, the shoulder of the virtual object may be deformed, the first type of bone may be added to the muscle portion of the shoulder of the virtual object, or the thigh of the virtual object may be deformed, and the first type of bone may be added to the muscle portion of the thigh of the virtual object.
In this embodiment, the bones of the first type and the bones of the second type are respectively provided with respective motion parameters for avoiding twisting and deformation of a part of the parts during the motion of the virtual object.
It can be understood that the second type of skeleton is a model of the corresponding model of the virtual object, if the virtual object only includes the second type of skeleton, the refinement of the gesture of the outer contour of the virtual object cannot be achieved no matter how the skin information is refined, so in this embodiment, the first type of skeleton is further added in the virtual object to create a constraint mechanism, so that the distortion of a part of the virtual object in the motion process is eliminated.
And in this embodiment, a control instruction for the virtual object may be received, where the control instruction is used to control the movement of the virtual object, the control instruction may control, for example, the virtual object to raise an arm, or the control instruction may control the virtual object to raise a leg, etc., and in this embodiment, the control instruction may control the virtual object to perform any movement, which may be selected according to an actual requirement, which is not limited in this embodiment.
In one possible implementation, the control instruction may be triggered according to a related operation performed on the control interface of the virtual object, so that the control instruction is received, for example, a lifting instruction may be initiated on the control interface of the virtual object for the arm of the virtual object.
Alternatively, the control instruction of the virtual object may be received by a control instruction issued by the control code of the virtual object.
S302, acquiring a first motion parameter corresponding to a first type of bone and a second motion parameter corresponding to a second type of bone according to a control instruction, wherein the first motion parameter is used for indicating the first type of bone to move with a first key point as a center, and the second motion parameter is used for indicating the second type of bone to move with a second key point as a center.
In this embodiment, in order to avoid that a part of the virtual object is distorted or deformed during the movement process, the first type of bone corresponds to a first movement parameter, and in one possible implementation manner, the first movement parameter may indicate that the first type of bone moves around the first key point and around the first key point during the movement process of the virtual object, so as to avoid that the first bone is distorted or deformed.
And the second type of bone in the present embodiment corresponds to a second motion parameter, and in one possible implementation, the second motion parameter may indicate that during the motion of the virtual object, the second type of bone moves around the second key point, and uses the second key point as a center, so as to avoid the second bone from being distorted or deformed.
In one possible implementation, the first keypoint and the second keypoint in the present embodiment may be, for example, created point points, wherein the first motion parameter may be, for example, a constraint parameter set for the first keypoint and the first type of bone, and the second motion parameter may be, for example, a constraint parameter set for the second keypoint and the second type of bone, wherein the constraint parameter may comprise, for example, at least one of the following: the specific implementation manner of the first motion parameter and the second motion parameter is not particularly limited in this embodiment as long as it can instruct the first type of bone and the second type of bone to perform the motion around the corresponding key points.
S303, controlling the virtual object to move according to the first motion parameter and the second motion parameter.
The first motion parameter and the second motion parameter in this embodiment may indicate the motion of the first type of bone and the second type of bone in the motion process of the virtual object, based on the description above, for example, the first motion parameter may indicate that the first type of bone moves with the first key point as the center point, the second motion parameter may indicate that the second type of bone moves with the second key point as the center point, so as to control the virtual object to implement the motion indicated by the control instruction, and in the motion process of the virtual object, the relative positions of the motion of the bones may be fixed due to the constraint of the first motion parameter and the second motion parameter, so that the bones move with the key point as the center rather than moving at will in the motion process, and further, the problem that part of the virtual object is distorted and deformed may be avoided.
The object control method provided by the embodiment of the invention comprises the following steps: receiving a control instruction for a virtual object, wherein the virtual object comprises a first type of bone and a second type of bone, the first type of bone is added to a part of muscle parts of the virtual object, and the second type of bone is a basic bone of the virtual object. According to the control instruction, a first motion parameter corresponding to the first type of bone and a second motion parameter corresponding to the second type of bone are obtained, wherein the first motion parameter is used for indicating the first type of bone to move with the first key point as the center, and the second motion parameter is used for indicating the second type of bone to move with the second key point as the center. And controlling the virtual object to move according to the first motion parameter and the second motion parameter. By setting the first type of skeleton in the virtual object, the first type of skeleton corresponds to the first motion parameter, and the second type of skeleton is provided with the second type of parameter, wherein the first motion parameter and the second motion parameter can restrict the motions of the first type of skeleton and the second type of skeleton, and further restrict the motions of the virtual object, so that the problem that part of the virtual object is distorted in the motion process of the virtual object is avoided, and the reality of the virtual object is effectively improved.
In the following, the object control method according to the present invention will be described in further detail with reference to a specific embodiment, fig. 5 is a flowchart of the object control method according to the embodiment of the present invention, fig. 6 is a schematic diagram of creating a first type of skeleton and a first key point according to the embodiment of the present invention, fig. 7 is a schematic diagram of setting an alignment tool according to the embodiment of the present invention, fig. 8 is a schematic diagram of an arm structure according to the embodiment of the present invention, fig. 9 is a schematic diagram of adding a first type of skeleton according to the embodiment of the present invention, fig. 10 is a schematic diagram of setting a search constraint attribute according to the embodiment of the present invention, fig. 11 is a schematic diagram of setting a position constraint attribute according to the embodiment of the present invention, fig. 12 is a schematic diagram of setting a second key point according to the embodiment of the present invention, and fig. 13 is a virtual object for eliminating deformation according to the embodiment of the present invention.
As shown in fig. 5, the method includes:
s501, receiving a control instruction corresponding to a virtual object, wherein the virtual object comprises bones of a first type and bones of a second type, the bones of the first type are bones added to part of muscle parts of the virtual object, and the bones of the second type are basic bones of the virtual object.
S502, acquiring a first motion parameter corresponding to a first type of bone and a second motion parameter corresponding to a second type of bone according to a control instruction, wherein the first motion parameter is used for indicating the first type of bone to move with a first key point as a center, and the second motion parameter is used for indicating the second type of bone to move with a second key point as a center.
The implementation manners of S501 and S501 are the same as those of S301 and S302, and are not described here again.
S503, determining a first movement part in the virtual object according to the control instruction, wherein a first main skeleton and a first sub skeleton of a first type corresponding to the first movement part are both linked with a first key point, and a skeleton and a second key point of a second type corresponding to the first movement part are linked.
The control instruction in this embodiment is configured to instruct the first movement portion of the virtual object to perform movement, for example, the control instruction may instruct the arm of the virtual object to lift, and the first movement portion may be the arm; or the control instruction can also instruct the leg of the virtual object to be lifted, and the first movement part can be the leg; still alternatively, the control instructions may instruct the virtual object to run, and the first movement portion may include a plurality of movement portions, such as arms, legs, feet, etc.
The present embodiment performs the same processing operation on each portion, regardless of whether the first movement portion is one or a plurality of movement portions.
In this embodiment, the first movement site may include a first main bone and a first sub-bone of a corresponding first type, and it is understood that to make the first movement site include the first main bone and the first sub-bone in this embodiment, it is necessary to first create the first main bone and the first sub-bone and dispose the first main bone and the first sub-bone at the first movement site.
The corresponding first main skeleton and the first sub-skeleton may be added to the first motion part of the virtual object according to the first main motion parameter and the first sub-motion parameter, and the creation process and the addition process of the first main skeleton and the first sub-skeleton are described below with reference to fig. 6-8, respectively.
Referring to fig. 6, it is assumed that a bone is currently created, wherein the bone includes a first main bone 601 and a first sub-bone 602, wherein the first main bone 601 is used as a main bone of a first movement portion, the first sub-bone 602 is used to implement a link of the first main bone 601 and the rest portion, and a first point of origin (point) is also created in the present embodiment, the first point of origin is used to indicate a central position of movement of the first main bone and the first sub-bone.
In one possible implementation, the first keypoint may be aligned to the bone by an alignment tool (alignment Selection) to achieve registration with the root of the bone, see fig. 7, and the X, Y, and Z positions may be selected by the alignment tool to achieve alignment of the first keypoint with the bone.
The positions are aligned, so that bone bones and point points are located in the same coordinate system, and subsequent linkage disorder is avoided.
The first main skeleton in this embodiment is linked with the first key point, and the first sub-skeleton in this embodiment is also linked with the first key point, so that movements can be performed centering on the first key point, respectively.
After the creation of the first main skeleton and the first sub-skeleton is realized, the first main skeleton and the first sub-skeleton are separated from the first movement part in the current situation and are two independent parts, so that the created first main skeleton and first sub-skeleton are also required to be arranged to the first movement part to realize the control of the movement process of the first movement part.
Taking the first movement part as one part of the arm as an example, the structure of the arm will be described with reference to fig. 8.
Referring to fig. 8, the structure on the arm includes ulna, wrist radial muscle, bicep muscle and triceps muscle, and assuming that the pulling deformation of the triceps muscle on the arm is to be eliminated, the first movement site in the present embodiment may include triceps muscle, and bones may be disposed on the triceps muscle, so that the triceps muscle of the virtual object may include a first main bone and a first sub bone.
Referring to fig. 9, fig. 9 includes a first main bone 901 and a first sub-bone 902, wherein the first main bone 901 and the first sub-bone 902 may be disposed at a location of a triceps muscle of a virtual object to enable adjustment of movement of the triceps muscle, and in one possible implementation, the first main bone 901 and the first sub-bone 902 may be linked with a portion of a CS bone corresponding to the triceps muscle to enable the first main bone and the first sub-bone to be disposed on the triceps muscle.
For example, the first main skeleton 901 may be linked to a CS skeleton of a large arm, and the point to which the first main skeleton 901 is linked may be linked to a CS skeleton of a small arm, thereby enabling the arrangement of the first main skeleton and the first sub-skeleton such that the triceps part may include the first main skeleton and the first sub-skeleton.
The above description is of the placement of the bones skeleton of the triceps muscle in the same manner as the placement of the bones skeleton of the rest of the arm, e.g. biceps, wrist-radial, ulna, etc.
The first main skeleton in this embodiment is linked to the first keypoint, and the first sub-skeleton is also linked to the first keypoint.
The above description of the arrangement of the first main skeleton and the first sub-skeleton in connection with fig. 6-9, and the first movement site in this embodiment further comprises a second type of skeleton, which may be a CS skeleton, may in one possible implementation also be provided with a second key point for the CS skeleton, which in this embodiment is linked to the second association point.
Also taking the above arm as an example, for example, a root point may be set between the CS skeleton of the big arm and the CS skeleton of the small arm, where the root point is the second key point, and the CS skeletons of the big arm and the small arm are both linked with the root point.
S504, acquiring a first main motion parameter corresponding to the first main skeleton and a first sub-motion parameter corresponding to the first sub-skeleton from the first motion parameters.
The first motion parameters in this embodiment include a first main motion parameter corresponding to a first main skeleton, and further include a first sub-motion parameter corresponding to a first sub-skeleton.
The setting process of the first main motion parameter and the first sub-motion parameter is described below with reference to fig. 10 and 11.
In this embodiment, the first primary motion parameter indicates that the first primary bone is linked with the first keypoint in a first manner, wherein the first manner is to find the constraint.
Then in one possible implementation, the first main skeleton may be selected, see fig. 10, by setting a search constraint (lookat constraint) attribute through assign controller (allocation controller), by selecting the target location of the link as the first keypoint 001 through the search constraint attribute, the first main skeleton may be linked to the first keypoint, and by setting the search constraint, the first main skeleton may be caused to move about the first keypoint.
In this embodiment, the first sub-motion parameter indicates that the first sub-skeleton is linked with the first key point in a second manner, where the second manner is a position limiting manner.
In one possible implementation, the first sub-skeleton may be selected, see fig. 11, and a position limitation (position constraint) attribute is set by assign controller (allocation controller), and the first sub-skeleton may be linked to the first key point by selecting the target position of the link as the first key point001 by the position limitation attribute, and by setting the position limitation, the first sub-skeleton may be moved around the first key point.
In this embodiment, different constraint attributes are set for the first main skeleton and the first sub-skeleton, so that independent movement of the first main skeleton and the first sub-skeleton can be achieved, the first main skeleton and the first sub-skeleton are not interfered with each other, and both the first main skeleton and the first sub-skeleton move with the first key point as the center, so that movement control of the first type of skeleton can be effectively achieved.
In this embodiment, a second key point may be set for the second type of bone, and the second type of bone and the second key point may be linked.
Referring to fig. 12, a second key point (point) may be set between the large arm and the small arm, i.e., 1201 set in fig. 12, and a position restriction (position constraint) attribute may be set to the CS skeleton of the small arm through assign controller (distribution controller), and a direction restriction (orientation constraint) attribute may be set to the CS skeleton of the large arm and the small arm, wherein the position restriction attribute and the direction restriction attribute are second motion parameters.
By adding the second key point for the CS skeleton and setting the position limiting attribute and the direction constraint attribute, the occurrence of deviation of the added skeleton of the first type in the motion process of the virtual object can be avoided, and the stability of processing is improved.
S505, controlling the first main skeleton to move with the first key point as the center according to the first main motion parameter, controlling the first sub-skeleton to move with the first key point as the center according to the first sub-motion parameter, and controlling the second type skeleton to move with the second key point as the center according to the second motion parameter.
In this embodiment, the first main motion parameter may indicate that the first main bone moves about the first key point, and the first sub-motion parameter may indicate that the first sub-bone moves about the first key point, so that the movement of the first type of bone may be restricted.
In this embodiment, the first type of bone may be linked with the second type of bone corresponding to the first movement portion, so that the movement indicated by the movement parameter of the first type of bone may be added to the second type of bone to implement the constraint on the movement of the second type of bone.
Meanwhile, in the embodiment, a second motion parameter is further set for the second type of bones, and the second motion parameter is used for indicating the second type of bones to move by taking the second key point as the center point, so that stability of processing for eliminating distortion of part of the virtual object can be effectively ensured, and the virtual object is ensured not to be distorted in the motion process.
Referring to fig. 13, in contrast to fig. 1, the virtual object in fig. 13 does not twist the muscles of the root of the thigh, but assumes a natural state when performing the leg lifting motion.
According to the object control method provided by the embodiment of the invention, the position restriction and the search constraint attribute setting are carried out on the first type of bones through the distribution controller, and the first type of bones are arranged at the first movement part, so that the movement of the first movement part can be constrained, the elimination of the distortion of the first movement part is realized, and meanwhile, the stability of eliminating the distortion of the virtual object is ensured by arranging the direction constraint attribute on the second type of bones, so that the animation of the virtual object has stronger expressive force.
On the basis of the embodiment, the failed model points can be repaired through skin operation.
On the basis of the above embodiment, if the first movement portion is a first preset portion, the muscle movement of the first preset portion may be controlled by the quaternion, where the weight of the quaternion may affect the smoothness of the portion, where the first preset portion may be a strong roundness portion, for example, may be a hip portion, etc., then in a possible implementation manner, the weight of the quaternion may be increased during the skin process to promote the smoothness of the strong roundness portion, so as to avoid flattening in the case that the strong roundness portion such as the hip portion and the front portion are distorted too much.
For example, referring to fig. 14 and 15, fig. 14 is a schematic diagram of twisting the buttocks of the virtual object according to the embodiment of the present invention, and fig. 15 is a schematic diagram of untwisting the buttocks of the virtual object according to the embodiment of the present invention.
Referring to fig. 14, during the movement of the virtual object, buttocks are flattened to some extent, and an unnatural state is exhibited.
After the treatment by the method provided by the invention, referring to fig. 15, the hip is in a state of being flattened and deformed, and the state of being more delicate and natural.
Based on the above embodiment, in the method provided by the embodiment of the present invention, if the first movement portion is a second preset portion; the second motion parameters further include rotational angles of the first bone and the second bone in a three-dimensional coordinate system.
Wherein the second predetermined location may be, for example, a calf portion, the rotation angles of the first bone and the second bone may be indicated by way of a floating point expression.
Wherein the floating point expression may be, for example:
[ 6.03798-4.72976,32.7688 ], wherein the first value indicates the rotation angle of the X-axis, the second value indicates the rotation angle of the Y-axis, and the third value indicates the rotation angle of the Z-axis.
By indicating the rotation angle, the second preset part rotates in the corresponding direction according to the rotation angle, so that the second preset part can be prevented from exhibiting states such as distortion.
Fig. 16 is a schematic structural diagram of an object control device according to an embodiment of the present invention. As shown in fig. 16, the apparatus 160 includes: a receiving module 1601, an acquiring module 1602, and a control module 1603.
A receiving module 1601, configured to receive a control instruction for a virtual object, where the virtual object includes a first type of bone and a second type of bone, where the first type of bone is a bone added to a part of a muscle portion of the virtual object, and the second type of bone is a basic bone of the virtual object;
an obtaining module 1602, configured to obtain, according to the control instruction, a first motion parameter corresponding to the first type of bone and a second motion parameter corresponding to the second type of bone, where the first motion parameter is used to instruct the first type of bone to move around a first key point, and the second motion parameter is used to instruct the second type of bone to move around a second key point;
The control module 1603 is configured to control the virtual object to move according to the first motion parameter and the second motion parameter.
In one possible design, the control module 1603 is specifically configured to:
determining a first movement part in the virtual object according to the control instruction, wherein a first main skeleton and a first sub skeleton of a first type corresponding to the first movement part are both linked with the first key point, and a skeleton of a second type corresponding to the first movement part is linked with the second key point;
acquiring a first main motion parameter corresponding to the first main skeleton and a first sub motion parameter corresponding to the first sub skeleton from the first motion parameters;
controlling the first main skeleton to move with the first key point as a center according to the first main motion parameter, controlling the first sub-skeleton to move with the first key point as a center according to the first sub-motion parameter, and controlling the second type skeleton to move with the second key point as a center according to the second motion parameter.
In one possible design, the first primary motion parameter indicates that the first primary bone is linked with the first keypoint in a first manner;
The first sub-motion parameter indicates that the first sub-skeleton is linked with the first keypoint in a second manner;
the second motion parameter indicates that the second type of bone is linked with the second keypoint in a third way.
In one possible design, the first way is a search constraint, the second way is a position constraint, and the third way is a position constraint and a direction constraint.
In one possible design, the control module 1603 is also to:
and performing skin operation on the virtual object, wherein the weight of the quaternion is increased to a preset weight in the skin operation process so as to control the muscle movement of the first movement part.
In one possible design, the first motion parameter further includes a rotation angle of the first main skeleton and the first sub-skeleton in a three-dimensional coordinate system.
In one possible design, the control module 1603 is also to:
and adding the corresponding first main skeleton and the corresponding first sub-skeleton to the first movement part of the virtual object according to the first main movement parameter and the first sub-movement parameter.
In one possible design, the first type of bone is a bone and the second type of bone is a character expression CS bone.
The device provided in this embodiment may be used to implement the technical solution of the foregoing method embodiment, and its implementation principle and technical effects are similar, and this embodiment will not be described herein again.
Fig. 17 is a schematic hardware structure of an object control device according to an embodiment of the present invention, as shown in fig. 17, an object control device 170 according to the present embodiment includes: a processor 1701 and a memory 1702; wherein the method comprises the steps of
A memory 1702 for storing computer-executable instructions;
a processor 1701 for executing computer-executable instructions stored in a memory to perform the steps performed by the object control method in the above embodiments. Reference may be made in particular to the relevant description of the embodiments of the method described above.
Alternatively, the memory 1702 may be separate or integrated with the processor 1701.
When the memory 1702 is provided separately, the object control device further comprises a bus 1703 for connecting the memory 1702 and the processor 1701.
The embodiment of the invention also provides a computer readable storage medium, wherein computer execution instructions are stored in the computer readable storage medium, and when a processor executes the computer execution instructions, the object control method executed by the object control device is realized.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be additional divisions when actually implemented, for example, multiple modules may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical, mechanical, or other forms.
The integrated modules, which are implemented in the form of software functional modules, may be stored in a computer readable storage medium. The software functional module is stored in a storage medium, and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (english: processor) to perform some of the steps of the methods according to the embodiments of the invention.
It should be understood that the above processor may be a central processing unit (english: central Processing Unit, abbreviated as CPU), or may be other general purpose processors, digital signal processors (english: digital Signal Processor, abbreviated as DSP), application specific integrated circuits (english: application Specific Integrated Circuit, abbreviated as ASIC), or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of a method disclosed in connection with the present invention may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in a processor for execution.
The memory may comprise a high-speed RAM memory, and may further comprise a non-volatile memory NVM, such as at least one magnetic disk memory, and may also be a U-disk, a removable hard disk, a read-only memory, a magnetic disk or optical disk, etc.
The bus may be an industry standard architecture (Industry Standard Architecture, ISA) bus, an external device interconnect (Peripheral Component, PCI) bus, or an extended industry standard architecture (Extended Industry Standard Architecture, EISA) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, the buses in the drawings of the present invention are not limited to only one bus or to one type of bus.
The storage medium may be implemented by any type or combination of volatile or nonvolatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disk. A storage media may be any available media that can be accessed by a general purpose or special purpose computer.
Those of ordinary skill in the art will appreciate that: all or part of the steps for implementing the method embodiments described above may be performed by hardware associated with program instructions. The foregoing program may be stored in a computer readable storage medium. The program, when executed, performs steps including the method embodiments described above; and the aforementioned storage medium includes: various media that can store program code, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and not for limiting the same; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some or all of the technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit of the invention.

Claims (10)

1. An object control method, characterized by comprising:
receiving a control instruction for a virtual object, wherein the virtual object comprises a first type of bone and a second type of bone, the first type of bone is added to a part of muscle parts of the virtual object, and the second type of bone is basic bone of the virtual object;
according to the control instruction, a first motion parameter corresponding to the first type of bone and a second motion parameter corresponding to the second type of bone are obtained, wherein the first motion parameter is used for indicating the first type of bone to move with a first key point as a center, and the second motion parameter is used for indicating the second type of bone to move with a second key point as a center;
Controlling the virtual object to move according to the first motion parameter and the second motion parameter;
controlling the virtual object to move according to the first motion parameter and the second motion parameter, including:
determining a first movement part in the virtual object according to the control instruction, wherein a first main skeleton and a first sub skeleton of a first type corresponding to the first movement part are both linked with the first key point, and a skeleton of a second type corresponding to the first movement part is linked with the second key point;
acquiring a first main motion parameter corresponding to the first main skeleton and a first sub motion parameter corresponding to the first sub skeleton from the first motion parameters;
controlling the first main skeleton to move with the first key point as a center according to the first main motion parameter, controlling the first sub-skeleton to move with the first key point as a center according to the first sub-motion parameter, and controlling the second type skeleton to move with the second key point as a center according to the second motion parameter.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
the first primary motion parameter indicates that the first primary bone is linked with the first keypoint in a first manner;
The first sub-motion parameter indicates that the first sub-skeleton is linked with the first keypoint in a second manner;
the second motion parameter indicates that the second type of bone is linked with the second keypoint in a third way.
3. The method of claim 2, wherein the first way is a lookup constraint, the second way is a position constraint, and the third way is a position constraint and a direction constraint.
4. A method according to any one of claims 1-3, wherein the method further comprises:
and performing skin operation on the virtual object, wherein the weight of the quaternion is increased to a preset weight in the skin operation process so as to control the muscle movement of the first movement part.
5. A method according to any one of claims 1-3, wherein the first motion parameter further comprises a rotation angle of the first main skeleton and the first sub-skeleton in a three-dimensional coordinate system.
6. A method according to any one of claims 1-3, wherein the method further comprises:
and adding the corresponding first main skeleton and the corresponding first sub-skeleton to the first movement part of the virtual object according to the first main movement parameter and the first sub-movement parameter.
7. A method according to any one of claim 1 to 3, wherein,
the first type of bone is a bone and the second type of bone is a character expression CS bone.
8. An object control apparatus, comprising:
the device comprises a receiving module, a control module and a control module, wherein the receiving module is used for receiving a control instruction aiming at a virtual object, the virtual object comprises a first type of bone and a second type of bone, the first type of bone is added to a part of muscle parts of the virtual object, and the second type of bone is basic bone of the virtual object;
the acquisition module is used for acquiring a first motion parameter corresponding to the first type of bone and a second motion parameter corresponding to the second type of bone according to the control instruction, wherein the first motion parameter is used for indicating the first type of bone to move with a first key point as a center, and the second motion parameter is used for indicating the second type of bone to move with a second key point as a center;
the control module is used for controlling the virtual object to move according to the first motion parameter and the second motion parameter;
the control module is specifically configured to determine a first movement portion in the virtual object according to the control instruction, where a first main skeleton and a first sub-skeleton of a first type corresponding to the first movement portion are both linked with the first key point, and a skeleton of a second type corresponding to the first movement portion is linked with the second key point;
Acquiring a first main motion parameter corresponding to the first main skeleton and a first sub motion parameter corresponding to the first sub skeleton from the first motion parameters;
controlling the first main skeleton to move with the first key point as a center according to the first main motion parameter, controlling the first sub-skeleton to move with the first key point as a center according to the first sub-motion parameter, and controlling the second type skeleton to move with the second key point as a center according to the second motion parameter.
9. An object control apparatus, characterized by comprising:
a memory for storing a program;
a processor for executing the program stored by the memory, the processor being for performing the method of any one of claims 1 to 7 when the program is executed.
10. A computer readable storage medium comprising instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1 to 7.
CN202011157710.7A 2020-10-26 2020-10-26 Object control method and device Active CN112169331B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011157710.7A CN112169331B (en) 2020-10-26 2020-10-26 Object control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011157710.7A CN112169331B (en) 2020-10-26 2020-10-26 Object control method and device

Publications (2)

Publication Number Publication Date
CN112169331A CN112169331A (en) 2021-01-05
CN112169331B true CN112169331B (en) 2024-03-19

Family

ID=73922707

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011157710.7A Active CN112169331B (en) 2020-10-26 2020-10-26 Object control method and device

Country Status (1)

Country Link
CN (1) CN112169331B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101458825A (en) * 2009-01-04 2009-06-17 腾讯科技(深圳)有限公司 Collision detection method implementing 3D animation model in display card, display card and system therefor
WO2011051891A1 (en) * 2009-10-30 2011-05-05 Laetolis Method for simulating a musculoskeletal system
CN109509241A (en) * 2018-08-16 2019-03-22 北京航空航天大学青岛研究院 Based on the bone reorientation method of quaternary number in role animation
CN111402371A (en) * 2020-03-20 2020-07-10 网易(杭州)网络有限公司 Animation object processing method, device, equipment and storage medium
CN111598987A (en) * 2020-05-18 2020-08-28 网易(杭州)网络有限公司 Bone processing method, device, equipment and storage medium of virtual object

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10489986B2 (en) * 2018-01-25 2019-11-26 Ctrl-Labs Corporation User-controlled tuning of handstate representation model parameters

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101458825A (en) * 2009-01-04 2009-06-17 腾讯科技(深圳)有限公司 Collision detection method implementing 3D animation model in display card, display card and system therefor
WO2011051891A1 (en) * 2009-10-30 2011-05-05 Laetolis Method for simulating a musculoskeletal system
CN109509241A (en) * 2018-08-16 2019-03-22 北京航空航天大学青岛研究院 Based on the bone reorientation method of quaternary number in role animation
CN111402371A (en) * 2020-03-20 2020-07-10 网易(杭州)网络有限公司 Animation object processing method, device, equipment and storage medium
CN111598987A (en) * 2020-05-18 2020-08-28 网易(杭州)网络有限公司 Bone processing method, device, equipment and storage medium of virtual object

Also Published As

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

Similar Documents

Publication Publication Date Title
US11270489B2 (en) Expression animation generation method and apparatus, storage medium, and electronic apparatus
EP3882861A2 (en) Method and apparatus for synthesizing figure of virtual object, electronic device, and storage medium
JP5118220B2 (en) Motion modeling apparatus and method, and program
US11217003B2 (en) Enhanced pose generation based on conditional modeling of inverse kinematics
CN108027979B (en) Robust attribute transfer for character animation
JP3568861B2 (en) Three-dimensional object transformation method and video game apparatus in video game, and computer-readable recording medium on which video game program is recorded
US8228336B1 (en) Integrating a motion synthesis system into a video game system
CN109840019B (en) Virtual character control method, device and storage medium
CN108830784A (en) A kind of image processing method, device and computer storage medium
CN108830783A (en) A kind of image processing method, device and computer storage medium
CN111369647B (en) Information processing method and device, computer storage medium and electronic equipment
CN111292402A (en) Data processing method, device, equipment and computer readable storage medium
Iwamoto et al. Multi‐layer Lattice Model for Real‐Time Dynamic Character Deformation
CN112169331B (en) Object control method and device
CN111080755A (en) Motion calculation method and device, storage medium and electronic equipment
US20230360348A1 (en) Method and apparatus for generating main control object projection, device, and medium
JP2009070340A (en) Skeleton operation control system, program, and information storage medium
CN112102453B (en) Animation model skeleton processing method and device, electronic equipment and storage medium
CN115908651A (en) Synchronous updating method for three-dimensional human body model and skeleton and electronic equipment
JP2018128851A (en) Program, object layout system and object layout method
CN112184862B (en) Virtual object control method and device and electronic equipment
JP7353418B1 (en) Program, method, image generation device, and game system for generating images
Yang et al. Automatic muscle generation for character skin deformation
CN117292021A (en) Animation data processing method and device, electronic equipment and readable storage medium
Wu An adaptive character skinning algorithm based on the property of real skin

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