CN112169331A - Object control method and device - Google Patents

Object control method and device Download PDF

Info

Publication number
CN112169331A
CN112169331A CN202011157710.7A CN202011157710A CN112169331A CN 112169331 A CN112169331 A CN 112169331A CN 202011157710 A CN202011157710 A CN 202011157710A CN 112169331 A CN112169331 A CN 112169331A
Authority
CN
China
Prior art keywords
bone
type
motion parameter
virtual object
motion
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
CN202011157710.7A
Other languages
Chinese (zh)
Other versions
CN112169331B (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

Images

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 a bone added at a part of muscle parts of the virtual object, and the second type of bone is a basic bone of the virtual object. And 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 by taking the first key point as the center, and the second motion parameter is used for indicating the second type of bone to move by taking 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. The motion of the first type of skeleton and the motion of the second type of skeleton are constrained through the motion parameters, and then the motion of the virtual object is constrained, so that the reality of the virtual object is improved.

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 higher and higher.
At present, the virtual object may generate an animation during the movement, and during the movement of the virtual object, the virtual object may deform in shape, for example, during the movement of the virtual object to lift the arm, the shoulder of the virtual object may distort, thereby causing the animation of the virtual object to be unnatural.
Therefore, during the current movement of the virtual object, some parts of the virtual object may be distorted and deformed, thereby causing the virtual object to lack reality in its performance.
Disclosure of Invention
The embodiment of the invention provides an object control method and device, which aim to overcome the problem that the representation of a virtual object lacks authenticity.
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 a bone added at 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, acquiring a first motion parameter corresponding to the first type of bone and a second motion parameter corresponding to the second type of bone, wherein the first motion parameter is used for indicating the first type of bone to move by taking a first key point as a center, and the second motion parameter is used for indicating the second type of bone to move by taking 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 motion part in the virtual object according to the control instruction, wherein a first main bone and a first sub bone of a first type corresponding to the first motion part are both linked with the first key point, and a second bone of a second type corresponding to the first motion 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 parameter;
controlling the first main skeleton to move by taking the first key point as a center according to the first main motion parameter, controlling the first sub-skeleton to move by taking the first key point as a center according to the first sub-motion parameter, and controlling the second type of skeleton to move by taking 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 skeleton 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 manner.
In one possible design, the first manner is a search constraint, the second manner is a location limit, and the third manner is a location limit and a direction constraint.
In one possible design, the method further includes:
and carrying out skinning operation on the virtual object, wherein the weight of the quaternion is increased to a preset weight in the skinning 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 bone and the first sub-bone in a three-dimensional coordinate system.
In one possible design, the method further includes:
adding the corresponding first main bone and the first sub bone at the first motion part of the virtual object according to the first main motion parameter and the first sub motion parameter.
In one possible design, the first type of bone is a bony bone and the second type of bone is a CS bone in a goniochromatic expression.
In a second aspect, an embodiment of the present invention provides an object control apparatus, including:
a receiving module, 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, the first type of bone is a bone added at a part of muscle parts of the virtual object, and the second type of bone is a basic bone of the virtual object;
an obtaining module, 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 indicate that the first type of bone moves with a first key point as a center, and the second motion parameter is used to indicate that the second type of bone moves 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 motion part in the virtual object according to the control instruction, wherein a first main bone and a first sub bone of a first type corresponding to the first motion part are both linked with the first key point, and a second bone of a second type corresponding to the first motion 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 parameter;
controlling the first main skeleton to move by taking the first key point as a center according to the first main motion parameter, controlling the first sub-skeleton to move by taking the first key point as a center according to the first sub-motion parameter, and controlling the second type of skeleton to move by taking 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 skeleton 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 manner.
In one possible design, the first manner is a search constraint, the second manner is a location limit, and the third manner is a location limit and a direction constraint.
In one possible design, the control module is further configured to:
and carrying out skinning operation on the virtual object, wherein the weight of the quaternion is increased to a preset weight in the skinning 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 bone and the first sub-bone in a three-dimensional coordinate system.
In one possible design, the control module is further configured to:
adding the corresponding first main bone and the first sub bone at the first motion part of the virtual object according to the first main motion parameter and the first sub motion parameter.
In one possible design, the first type of bone is a bony bone and the second type of bone is a CS bone in a goniochromatic expression.
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 as described above in the first aspect and any one of the various possible designs of the first aspect when the program is executed.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, including instructions, which, when executed on a computer, cause the computer to perform the method as described above in the first aspect and any one of 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 a bone added at a part of muscle parts of the virtual object, and the second type of bone is a basic bone of the virtual object. And 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 by taking the first key point as the center, and the second motion parameter is used for indicating the second type of bone to move by taking 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. The bone of the first type is set in the virtual object, the bone of the first type corresponds to the first motion parameter, and the bone of the second type is set with the second type parameter, wherein the first motion parameter and the second motion parameter can restrict the motion of the bone of the first type and the bone of the second type, and further restrict the motion of the virtual object, so that the problem that part of the virtual object is distorted and deformed in the motion process of the virtual object is avoided, and the 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 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 those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a schematic diagram illustrating a shape deformation of a virtual object according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an interface for 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 diagram of a CS skeleton according to 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 diagram of creating a first type of bone and a first keypoint, provided by an embodiment of the invention;
FIG. 7 is a schematic view of an alignment tool provided in accordance with an embodiment of the present invention;
FIG. 8 is a schematic view of an arm structure according to an embodiment of the present invention;
FIG. 9 is a schematic illustration of the addition of a first type of bone provided by an embodiment of the present invention;
fig. 10 is a schematic diagram of setting a search constraint attribute according to an embodiment of the present invention;
FIG. 11 is a diagram illustrating a location restriction attribute setup according to an embodiment of the present invention;
fig. 12 is a schematic diagram of a second key point according to an embodiment of the present invention;
FIG. 13 is a schematic diagram of a virtual object with distortion removed according to an embodiment of the present invention;
FIG. 14 is a schematic diagram illustrating a distortion of the buttocks of a virtual object provided by an embodiment of the invention;
FIG. 15 is a schematic diagram illustrating distortion removal of the buttocks of a virtual object according to an embodiment of the invention;
fig. 16 is a schematic structural diagram of an object control apparatus according to an embodiment of the present invention;
fig. 17 is a schematic diagram of a hardware structure of an object control device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious 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.
For ease of understanding, the relevant concepts to which the invention relates will first be described:
3 dsMax: 3D Studio Max, often referred to as 3D Max or 3ds MAX for short, is a piece of three-dimensional animation rendering and production software based on a Personal Computer (PC) system.
bones of bones: bones created based on 3dsMax self-contained bone tools, bones can provide positive kinematics and bone scaling limitation features.
CS skeleton: wherein the Character Studio (CS) is an animated character tool kit and the CS skeleton is a skeleton created based on the CS.
The technical background related to the invention is described in detail as follows:
nowadays, there is an increasing demand for modeling and animation of virtual objects in games, wherein the virtual objects are animated during the movement, for example, the virtual objects can perform actions of raising arms and thighs, and the virtual objects can be animated through a series of actions.
During the movement of the virtual object, the virtual object may be deformed in shape, for example, during the movement of the virtual object to lift the arm, the muscle on the shoulder of the virtual object may be distorted, thereby causing the animation of the virtual object to be unnatural.
For another example, the deformation of the body of the virtual object during the leg-raising action can be understood with reference to fig. 1, and fig. 1 is a schematic diagram illustrating the deformation of the body of the virtual object according to the embodiment of the present invention.
Referring to fig. 1, the current virtual object is performing a leg-raising action, in which the thigh muscle of the virtual object is significantly deformed, as can be seen in fig. 1, which is circled by 101, thereby resulting in an unnatural appearance of the virtual object.
Therefore, during the movement of the virtual object, some parts are distorted and deformed, so that the virtual object is lack of reality.
When the prior art processes the distortion of the virtual object, in a possible implementation manner, the effect of distortion can be alleviated to a certain extent by setting related parameters in 3 dsMax.
For example, the prior art may perform parameter-related setting on the bones of a distorted muscle to alleviate distortion of a model to some extent.
The following describes setting of parameters with reference to fig. 2, and fig. 2 is a schematic diagram of an interface for setting parameters according to an embodiment of the present invention.
Fig. 2 schematically shows a parameter setting panel, on which relevant operations are performed to adjust parameters, and fig. 2:
for example, when the shoulder of the model is deformed during the current model movement, Freeze Length may be set to close on the bones of the muscles of the shoulder, which is indicated as 201 in fig. 2.
Wherein after the Freeze Length is turned on, the bone will retain its Length. After Freeze Length is closed, the bone Length will be based on the translation of its children's bone.
And the stretch option can be set to select Squash (Squash), which, referring to fig. 2, can select None (not stretched), or Scale (Scale).
Referring to 201, in the prior art, Squash is selected through a stretch option, so that a virtual object can be controlled to simulate the flattening action of muscles during movement, and the reality of the performance is improved.
And also Twist (twisting) setting appropriate values of Twist spots (twisting postures) that can indicate the twisting angle of the bone, and saving the set values of Twist, for example, see fig. 2, Twist can be set to 36, so that the bone inside the muscle where twisting has occurred can be twisted in the opposite direction to alleviate the deformation exhibited by the virtual object to some extent.
Through the realization mode of setting the parameters, the model distortion and pulling of the virtual object during movement 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 twisted and pulled state, so the implementation scheme in the prior art cannot effectively solve the problem that some parts of the virtual object are twisted and deformed in the motion process of the virtual object, and the virtual object lacks of reality.
The object control method provided by the present invention is described below with reference to specific embodiments, and first described with reference to fig. 3, fig. 3 is a flowchart of the object control method provided by an embodiment of the present invention, and fig. 4 is a schematic diagram of a CS skeleton provided by 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 a first type of bone and a second type of bone, the first type of bone is a bone 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.
In the present embodiment, the virtual object may be, for example, a virtual human, a virtual animal, or a designed virtual character including four limbs, and the like, and the present embodiment does not limit a specific implementation manner of the virtual object as long as the virtual object is provided with muscle tissues and can perform exercise.
The virtual object in this embodiment comprises a first type of bone and a second type of bone, wherein the second type of bone is a basic 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 the 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 a bone added to a part of muscle of the virtual object, where the added bone may be a bones, and in a possible implementation, the part of the added bone may be a part where a distortion of the virtual object needs to be adjusted, for example, a shoulder of the virtual object may be deformed, and a first type of bone may be added to a muscle of a shoulder of the virtual object, or a thigh of the virtual object may be deformed, and a first type of bone may be added to a muscle of a 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 distortion and deformation of part of the parts during the motion of the virtual object.
It can be understood that the second type of bone is a self-contained model of the model corresponding to the virtual object, and if the virtual object only includes the second type of bone, no matter how to refine the skin information, refinement of the posture of the outer contour of the virtual object cannot be achieved, so in this embodiment, the first type of bone is further added to the virtual object to create a constraint mechanism, so as to eliminate distortion and deformation of a part of the virtual object during the motion process.
In this embodiment, a control instruction for the virtual object may be received, where the control instruction is used to control the virtual object to move, and the control instruction may control the virtual object to lift an arm, or the control instruction may control a leg of the virtual object to lift, and the like.
In a possible implementation manner, 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 for an arm of the virtual object on the control interface 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, 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 by taking the first key point as the center, and the second motion parameter is used for indicating the second type of bone to move by taking the second key point as the center.
In one possible implementation manner, the first motion parameter may indicate that, during the motion of the virtual object, the first type of bone moves around the first key point and around the first key point as a center, so as to avoid distortion or deformation of the first bone.
And the second type of bone in this embodiment corresponds to a second motion parameter, in a possible implementation manner, the second motion parameter may indicate that the second type of bone moves around the second key point and is centered on the second key point during the movement of the virtual object, so as to avoid the second bone from being distorted or deformed.
In a possible implementation manner, the first keypoint and the second keypoint in this embodiment may be, for example, created point points, where the first motion parameter may be, for example, a constraint parameter set for the first keypoint and a first type of bone, and the second motion parameter may be, for example, a constraint parameter set for the second keypoint and a second type of bone, where the constraint parameter may include, for example, at least one of: position limitation, search constraint, direction constraint, and the like, and 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 indicate that the first type of bone and the second type of bone move around the corresponding key points.
And S303, controlling the virtual object to move according to the first motion parameter and the second motion parameter.
Based on the above description, for example, the first motion parameter may indicate that the first type of bone moves with a first key point as a center point, and the second motion parameter may indicate that the second type of bone moves with a second key point as a center point, so that the virtual object may be controlled to implement the motion indicated by the control instruction.
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 a bone added at a part of muscle parts of the virtual object, and the second type of bone is a basic bone of the virtual object. And 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 by taking the first key point as the center, and the second motion parameter is used for indicating the second type of bone to move by taking 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. The bone of the first type is set in the virtual object, the bone of the first type corresponds to the first motion parameter, and the bone of the second type is set with the second type parameter, wherein the first motion parameter and the second motion parameter can restrict the motion of the bone of the first type and the bone of the second type, and further restrict the motion of the virtual object, so that the problem that part of the virtual object is distorted and deformed in the motion process of the virtual object is avoided, and the reality of the virtual object is effectively improved.
The object control method provided by the present invention will be described in further detail with reference to a specific embodiment, fig. 5 is a flowchart of an object control method according to an embodiment of the present invention, fig. 6 is a schematic diagram of creating a first type of skeleton and a first keypoint according to 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 view of an arm structure according to an embodiment of the present invention, fig. 9 is a schematic diagram of adding a first type of skeleton according to an embodiment of the present invention, fig. 10 is a schematic diagram of setting a search constraint attribute according to an embodiment of the present invention, fig. 11 is a schematic diagram of setting a location restriction 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, and fig. 13 is a schematic diagram of a virtual object for eliminating distortion according to an embodiment of the present invention.
As shown in fig. 5, the method includes:
s501, receiving a control command corresponding to 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 a bone 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.
S502, 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 by taking the first key point as the center, and the second motion parameter is used for indicating the second type of bone to move by taking the second key point as the center.
The implementation manners of S501 and S501 are the same as the implementation manners of S301 and S302, and are not described again here.
S503, determining a first motion 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 motion part are both linked with a first key point, and a second skeleton of a second type corresponding to the first motion part is linked with a second key point.
The control instruction in this embodiment is used to instruct the first moving part of the virtual object to move, for example, the control instruction may instruct the arm of the virtual object to lift, and then the first moving part may be the arm; or the control instruction may further indicate that the leg of the virtual object is raised, the first motion part may be the leg; still alternatively, the control instructions may also instruct the virtual object to run, and the first motion portion may be plural, and may include, for example, an arm, a leg, a foot, and the like.
In this embodiment, the same processing operation is performed on each of the first moving portions regardless of whether the first moving portion is one or more.
In this embodiment, the first motion site may include a first main bone and a first sub bone of a first type, respectively, and it is understood that to make the first motion site in this embodiment include the first main bone and the first sub bone, it is necessary to first create the first main bone and the first sub bone and to dispose the first main bone and the first sub bone at the first motion site.
Then, for example, a corresponding first main bone and a corresponding first sub-bone may be added to the first motion region 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 bone and the first sub-bone are described below with reference to fig. 6 to 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 motion portion, the first sub-bone 602 is used to realize a link between the first main bone 601 and the rest portions, and a first key point (point) is also created in the present embodiment, and the first key point is used to indicate a central position of motion 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 position, Y position, and Z position may be selected by the alignment tool to achieve alignment of the first keypoint with the bone.
The positions are aligned, so that the bone and the point can be located in the same coordinate system, and the disorder of subsequent links is avoided.
The first main skeleton and the first key point in this embodiment are linked together, and the first sub-skeleton and the first key point in this embodiment are also linked together, so that the movement can be performed centering on the first key point, respectively.
After the creation of the first main skeleton and the first sub-skeleton is achieved, in the present case, the first main skeleton and the first sub-skeleton are separated from the first motion site and are two independent parts, so that the created first main skeleton and the first sub-skeleton need to be set to the first motion site to achieve the control of the motion process of the first motion site.
Taking the first motion part as one of the arms as an example, the structure of the arm will be described first with reference to fig. 8.
Referring to fig. 8, the structures on the arm include an ulna, a wrist radius muscle, a bicep and a tricep, and assuming that a pulling deformation of the tricep on the arm is to be eliminated, the first motion site in the present embodiment may include the tricep, and bones may be provided on the tricep, so that the tricep 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 skeleton 901 and a first sub-skeleton 902, wherein the first main skeleton 901 and the first sub-skeleton 902 can be disposed at a position of a triceps muscle of a virtual object to realize adjustment of movement of the triceps muscle, and in one possible implementation, the first main skeleton 901 and the first sub-skeleton 902 can be linked with a portion of a CS skeleton corresponding to the triceps muscle to realize disposition of the first main skeleton and the first sub-skeleton on the triceps muscle.
For example, a first main skeleton 901 may be linked to the CS skeleton of the upper arm, and a point to which the first main skeleton 901 is linked may be linked to the CS skeleton of the lower arm, thereby implementing a setting of the first main skeleton and the first sub-skeleton, so that the triceps region may include the first main skeleton and the first sub-skeleton.
The above description describes the placement of the bones of the triceps, which is the same for the rest of the arm, e.g., biceps, carpometacarpus, ulna, etc.
The first main skeleton in this embodiment is linked with the first keypoint, and the first sub-skeleton is also linked with the first keypoint.
The above description in conjunction with fig. 6 to 9 is about the arrangement of the first main bone and the first sub-bone, and the first motion region in this embodiment further includes a second type of bone, which may be a CS bone, and in a possible implementation, a second key point may be further provided for the CS bone, and the second type of bone in this embodiment is linked with the second association point.
Also taking the above-mentioned arm as an example, a root point may be bridged between the CS skeleton of the upper arm and the CS skeleton of the lower arm, where the root point is the second key point, and the CS skeletons of the upper arm and the lower arm are both linked with the root point.
S504, acquiring a first main motion parameter corresponding to a first main skeleton and a first sub-motion parameter corresponding to a 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 bone, and further include a first sub-motion parameter corresponding to a first sub-bone.
The setting process of the first main motion parameter and the first sub motion parameter will be described below with reference to fig. 10 and 11.
In this embodiment, the first primary motion parameter indicates that the first primary skeleton is linked with the first keypoint in a first manner, wherein the first manner is to find a constraint.
In a possible implementation manner, the first main skeleton may be selected, referring to fig. 10, a find constraint (lookup constraint) attribute is set by an assign controller, and a target position of the link is selected to be the first key point001 by the find constraint attribute, so that the first main skeleton may be linked to the first key point, and the first main skeleton may be moved around the first key point by setting the find constraint.
And in this embodiment, the first sub-motion parameter indicates that the first sub-skeleton is linked with the first keypoint in a second manner, wherein the second manner is a position limitation manner.
In a possible implementation manner, the first sub-skeleton may be selected, referring to fig. 11, a position constraint (position constraint) attribute is set by an assign controller, and a target position of the link is selected to be the first key point001 by the position constraint attribute, so that the first sub-skeleton may be linked to the first key point, and the first sub-skeleton may be moved by centering on the first key point by setting the position constraint.
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 realized, the first main skeleton and the first sub-skeleton do not interfere with each other, and both of the first main skeleton and the first sub-skeleton move around the first key point, so that movement control of the first type of skeleton can be effectively realized.
And, 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 are linked.
Referring to fig. 12, a second critical point (point) may be spanned between the upper arm and the lower arm, which is 1201 set in fig. 12, and a position constraint (position constraint) attribute may be set to the CS skeleton of the lower arm by an assign controller, and an orientation constraint (orientation constraint) attribute may be set to the CS skeleton of the upper arm and the lower arm, which are second motion parameters.
By adding the second key point aiming at the CS skeleton and setting the position limiting attribute and the direction constraint attribute, the situation that the added skeleton of the first type has deviation in the motion process of the virtual object can be avoided, and the processing stability is improved.
And S505, controlling the first main skeleton to move by taking the first key point as a center according to the first main motion parameter, controlling the first sub-skeleton to move by taking the first key point as a center according to the first sub-motion parameter, and controlling the second type of skeleton to move by taking the second key point as a center according to the second motion parameter.
In this embodiment, the first primary motion parameter may indicate that the first primary bone moves centered on the first keypoint, and the first secondary motion parameter may indicate that the first secondary bone moves centered on the first keypoint, so that the motion of the first type of bone may be limited.
In this embodiment, the bone of the first type may be linked with the bone of the second type corresponding to the first motion site, so that the motion indicated by the motion parameter of the bone of the first type may be attached to the bone of the second type to achieve the constraint on the motion of the bone of the second type.
Meanwhile, in the embodiment, a second motion parameter is further set for the second type of bone, and the second motion parameter is used for indicating the second type of bone to move by taking the second key point as a central point, so that the stability of processing for eliminating part of distortion of the virtual object can be effectively ensured, and the virtual object is ensured not to be distorted and deformed in the moving process.
Referring to fig. 13, in comparison with fig. 1, when the virtual object in fig. 13 performs a leg-raising action, the muscle at the root of the thigh is not distorted, but assumes a natural state.
According to the object control method provided by the embodiment of the invention, the distribution controller is used for setting the attributes of position limitation and constraint search on the first type of skeleton, and the first type of skeleton is arranged at the first motion part, so that the motion of the first motion part can be constrained, the distortion of the first motion part is eliminated, and meanwhile, the direction constraint attribute is arranged on the second type of skeleton, so that the stability of eliminating the distortion of the virtual object is ensured, and the animation of the virtual object has stronger expressive force.
On the basis of the above embodiment, the failed model point can be repaired through skin operation.
On the basis of the above embodiment, if the first motion portion is a first preset portion, the muscle motion of the first preset portion may be controlled by a quaternion, wherein the weight of the quaternion may affect the smoothness of the portion, wherein the first preset portion may be a strong roundness portion, for example, a hip portion, and the like, and in a possible implementation manner, the weight of the quaternion may be increased in the skin covering process to improve the smoothness of the strong roundness portion, so as to avoid the squashing in the case that the strong roundness portion such as the hip portion and the front portion are excessively twisted.
For example, referring to fig. 14 and 15, fig. 14 is a schematic diagram illustrating distortion of the hip of the virtual object according to the embodiment of the present invention, and fig. 15 is a schematic diagram illustrating distortion removal of the hip of the virtual object according to the embodiment of the present invention.
Referring to fig. 14, during the movement of the virtual object, the buttocks are squashed to some extent, representing an unnatural state.
After the treatment by the method provided by the invention, referring to fig. 15, the squashed and deformed state of the hip is eliminated, and the expressed state is more exquisite and natural.
On the basis of the above embodiment, in the method provided in the embodiment of the present invention, if the first moving portion is the second predetermined portion; the second motion parameter further comprises a rotation angle of the first bone and the second bone in the three-dimensional coordinate system.
The second predetermined region may be, for example, a lower leg region, and the rotation angle of the first skeleton and the second skeleton may be indicated by a floating-point expression.
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.
Through indicating the rotation angle, the second preset part rotates in the corresponding direction according to the rotation angle, and therefore the second preset part can be prevented from showing states such as distortion and the like.
Fig. 16 is a schematic structural diagram of an object control apparatus according to an embodiment of the present invention. As shown in fig. 16, the apparatus 160 includes: a receiving module 1601, an obtaining 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, the first type of bone is a bone added at a part of muscle parts 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 indicate that the first type of bone moves with a first key point as a center, and the second motion parameter is used to indicate that the second type of bone moves with a second key point as a center;
a control module 1603, 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 motion part in the virtual object according to the control instruction, wherein a first main bone and a first sub bone of a first type corresponding to the first motion part are both linked with the first key point, and a second bone of a second type corresponding to the first motion 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 parameter;
controlling the first main skeleton to move by taking the first key point as a center according to the first main motion parameter, controlling the first sub-skeleton to move by taking the first key point as a center according to the first sub-motion parameter, and controlling the second type of skeleton to move by taking 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 skeleton 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 manner.
In one possible design, the first manner is a search constraint, the second manner is a location limit, and the third manner is a location limit and a direction constraint.
In one possible design, the control module 1603 is further configured to:
and carrying out skinning operation on the virtual object, wherein the weight of the quaternion is increased to a preset weight in the skinning 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 bone and the first sub-bone in a three-dimensional coordinate system.
In one possible design, the control module 1603 is further configured to:
adding the corresponding first main bone and the first sub bone at the first motion part of the virtual object according to the first main motion parameter and the first sub motion parameter.
In one possible design, the first type of bone is a bony bone and the second type of bone is a CS bone in a goniochromatic expression.
The apparatus provided in this embodiment may be used to implement the technical solutions of the above method embodiments, and the implementation principles and technical effects are similar, which are not described herein again.
Fig. 17 is a schematic diagram of a hardware structure of an object control device according to an embodiment of the present invention, and as shown in fig. 17, an object control device 170 according to the embodiment includes: a processor 1701 and a memory 1702; wherein
A memory 1702 for storing computer-executable instructions;
the processor 1701 is configured to execute the computer executable instructions stored in the memory to implement the steps performed by the object control method in the above-described embodiments. Reference may be made in particular to the description relating to the method embodiments 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 apparatus further includes a bus 1703 for connecting the memory 1702 and the processor 1701.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer execution instruction is stored in the computer-readable storage medium, and when a processor executes the computer execution instruction, the object control method executed by the above object control device is implemented.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described device embodiments are merely illustrative, and for example, the division of the modules is only one logical division, and other divisions may be realized in practice, for example, a plurality of modules may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or modules, and may be in an electrical, mechanical or other form.
The integrated module implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention.
It should be understood that the Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), etc. 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, or in a combination of the hardware and software modules within the processor.
The memory may comprise a high-speed RAM memory, and may further comprise a non-volatile storage NVM, such as at least one disk memory, and may also be a usb disk, a removable hard disk, a read-only memory, a magnetic or optical disk, etc.
The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended ISA (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, the buses in the figures of the present invention are not limited to only one bus or one type of bus.
The storage medium may be implemented by any type or combination of volatile or non-volatile 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 disks. 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 understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The program may be stored in a computer-readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (11)

1. An object control method, 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 a bone added at 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, acquiring a first motion parameter corresponding to the first type of bone and a second motion parameter corresponding to the second type of bone, wherein the first motion parameter is used for indicating the first type of bone to move by taking a first key point as a center, and the second motion parameter is used for indicating the second type of bone to move by taking 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.
2. The method of claim 1, wherein controlling the virtual object motion according to the first motion parameter and the second motion parameter comprises:
determining a first motion part in the virtual object according to the control instruction, wherein a first main bone and a first sub bone of a first type corresponding to the first motion part are both linked with the first key point, and a second bone of a second type corresponding to the first motion 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 parameter;
controlling the first main skeleton to move by taking the first key point as a center according to the first main motion parameter, controlling the first sub-skeleton to move by taking the first key point as a center according to the first sub-motion parameter, and controlling the second type of skeleton to move by taking the second key point as a center according to the second motion parameter.
3. The method of claim 2,
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 manner.
4. The method of claim 3, wherein the first manner is a search constraint, the second manner is a location limit, and the third manner is a location limit and a direction constraint.
5. The method according to any one of claims 2-4, further comprising:
and carrying out skinning operation on the virtual object, wherein the weight of the quaternion is increased to a preset weight in the skinning operation process so as to control the muscle movement of the first movement part.
6. The method of any one of claims 2-4, wherein the first motion parameter further comprises a rotation angle of the first main bone and the first sub-bone in a three-dimensional coordinate system.
7. The method according to any one of claims 1-6, further comprising:
adding the corresponding first main bone and the first sub bone at the first motion part of the virtual object according to the first main motion parameter and the first sub motion parameter.
8. The method according to any one of claims 1 to 7,
the first type of bone is a bony bone and the second type of bone is a CS bone in a goniochromatic expression.
9. An object control apparatus, characterized by comprising:
a receiving module, 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, the first type of bone is a bone added at a part of muscle parts of the virtual object, and the second type of bone is a basic bone of the virtual object;
an obtaining module, 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 indicate that the first type of bone moves with a first key point as a center, and the second motion parameter is used to indicate that the second type of bone moves 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.
10. 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 configured to perform the method of any of claims 1 to 8 when the program is executed.
11. A computer-readable storage medium comprising instructions which, when executed on a computer, cause the computer to perform the method of any one of claims 1 to 8.
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 true CN112169331A (en) 2021-01-05
CN112169331B 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)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115120976A (en) * 2022-07-20 2022-09-30 北京字跳网络技术有限公司 Virtual object control method and device, electronic equipment and storage medium

Citations (6)

* 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
US20190228590A1 (en) * 2018-01-25 2019-07-25 Ctrl-Labs Corporation User-controlled tuning of handstate representation model parameters
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

Patent Citations (6)

* 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
US20190228590A1 (en) * 2018-01-25 2019-07-25 Ctrl-Labs Corporation User-controlled tuning of handstate representation model parameters
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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115120976A (en) * 2022-07-20 2022-09-30 北京字跳网络技术有限公司 Virtual object control method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN112169331B (en) 2024-03-19

Similar Documents

Publication Publication Date Title
US11270489B2 (en) Expression animation generation method and apparatus, storage medium, and electronic apparatus
JP5118220B2 (en) Motion modeling apparatus and method, and program
CN112184862B (en) Virtual object control method and device and electronic equipment
CN106780766A (en) Matching implementation method and relevant apparatus
CN111402371B (en) Method, device, equipment and storage medium for processing animation object
CN112169331A (en) Object control method and device
CN111292402B (en) Data processing method, device, equipment and computer readable storage medium
CN114037802A (en) Three-dimensional face model reconstruction method and device, storage medium and computer equipment
CN109285209A (en) Processing method, device, processor and the terminal of the mask of game role
US9056247B2 (en) System and method for efficient character animation
CN106726026A (en) A kind of new artificial limb
CN114742925A (en) Covering method and device for virtual object, electronic equipment and storage medium
CN111369647A (en) Information processing method and device, computer storage medium and electronic equipment
JP3212255B2 (en) Image synthesizing apparatus and image synthesizing method
CN115423907A (en) Role model body binding method, device, equipment and storage medium
CN114359469B (en) Method, device, equipment and medium for generating master control object projection
CN112090076B (en) Game character action control method, device, equipment and medium
CN108654081A (en) A kind of VR gloves apparatus based on gear braking
JP4579964B2 (en) Image generating apparatus, image generating method, and program
CN108198234B (en) Virtual character generating system and method capable of realizing real-time interaction
JP5843679B2 (en) Image reproduction program and game system
Yang et al. Automatic muscle generation for character skin deformation
JP4287479B2 (en) Image generating apparatus, image generating method, and program
CN112102453A (en) Animation model skeleton processing method and device, electronic equipment and storage medium
CN117333610A (en) Three-dimensional model processing method and device and electronic equipment

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