Virtual character control method and device, computer equipment and storage medium
By obtaining and fusion of real-time motion capture data and offline action data, controlling virtual characters, the problem of virtual characters being limited in virtual live broadcast scenarios is solved, and the display effect is improved.
Patent Information
- Application Number
- CN202311379705.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-23
- Publication Date
- 2025-04-25
AI Technical Summary
It is difficult for virtual characters to make specific actions in scenes such as virtual live broadcasts, and it is limited by the control level of the control object and the size of the real scene area, resulting in poor display effect.
By obtaining real-time motion capture data and matching offline action data, fuse it to generate fused action data, and then control the virtual characters in the virtual scene.
Enables virtual characters to make more actions without being restricted by real scenes, improving the display effect of virtual characters.
Smart Images

Figure CN119888416A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a method and apparatus for controlling a virtual character, a computer device, and a storage medium. Background Art
[0002] In scenes such as virtual live broadcasts, real-time motion capture data corresponding to a virtual character control object can be obtained through a motion capture device, so that the virtual character in the virtual scene can be controlled through the real-time motion capture data.
[0003] In related technologies, virtual character control objects are often used to control virtual characters in real scenes such as motion capture rooms. Limited by factors such as the control level of the virtual character control objects and the size of real scene areas such as motion capture rooms, virtual characters often find it difficult to make specific movements, leaving room for improvement in the display effect of virtual characters. Summary of the invention
[0004] The embodiments of the present disclosure at least provide a method, apparatus, computer device and storage medium for controlling a virtual character.
[0005] In a first aspect, an embodiment of the present disclosure provides a method for controlling a virtual character, comprising:
[0006] Obtain real-time motion capture data of the virtual character's controlled object;
[0007] In response to satisfying the offline motion data use condition, acquiring offline motion data matching the real-time motion capture data;
[0008] Fusing the real-time motion capture data with the offline motion data to generate fused motion data;
[0009] A target virtual character in a virtual scene is controlled based on the fused motion data.
[0010] In a possible implementation manner, the acquiring offline motion data matching the real-time motion capture data includes:
[0011] According to the coordinated action type matching the real-time motion capture data, determining offline action data matching the coordinated action type from an offline action database; or,
[0012] According to a target offline action type that is triggered to be used among a plurality of offline action types, offline action data matching the target offline action type is determined from an offline action database.
[0013] In a possible implementation, determining offline action data matching a target action type from an offline action database, where the target action type includes the matching action type or the target offline action type, includes:
[0014] When there are multiple sets of offline action data matching the target action type in the offline action database, offline action data matching the target virtual character is determined from the multiple sets of offline action data based on the character attribute information respectively adapted by the multiple sets of offline action data and the attribute information corresponding to the target virtual character.
[0015] In a possible implementation, fusing the real-time motion capture data with the offline motion data to generate fused motion data includes:
[0016] Determining different parts of the target virtual character controlled by the offline motion data and the real-time motion capture data according to the motion type corresponding to the offline motion data;
[0017] According to different parts controlled by the offline motion data and the real-time motion capture data, the real-time motion capture data is fused with the offline motion data to generate fused motion data.
[0018] In a possible implementation, according to different parts controlled by the offline motion data and the real-time motion capture data, the real-time motion capture data is fused with the offline motion data to generate fused motion data, including:
[0019] Determining the skeleton linkage relationship between the different parts according to the skeleton information of the different parts;
[0020] According to the skeleton linkage relationship, the real-time motion capture data and the offline motion data are adjusted and fused to generate the fused motion data.
[0021] In a possible implementation, fusing the real-time motion capture data with the offline motion data to generate fused motion data includes:
[0022] According to the fusion weights respectively corresponding to the real-time motion capture data and the offline motion data, the real-time motion capture data and the bone position data of the offline motion data at the same part are fused to generate the fused motion data.
[0023] In a possible implementation manner, the offline action data usage condition is satisfied including at least one of the following:
[0024] Receiving a trigger operation that triggers the use of offline action data;
[0025] The real-time motion capture data matches a preset motion type, where the preset motion type is a motion type that needs to be used in conjunction with offline motion data;
[0026] Detecting the occurrence of a target event in the virtual scene;
[0027] The target virtual character is located in a target scene space in the virtual scene; the target scene space is a scene space set up to use the offline action data.
[0028] In a possible implementation manner, the offline motion data is motion data whose corresponding motion amplitude and / or motion complexity meet preset requirements.
[0029] In a second aspect, the present disclosure also provides a control device for a virtual character, including:
[0030] A first acquisition module is used to acquire real-time motion capture data of an object controlled by a virtual character;
[0031] A second acquisition module, configured to acquire offline motion data matching the real-time motion capture data in response to satisfying the offline motion data use condition;
[0032] A fusion module, used for fusing the real-time motion capture data with the offline motion data to generate fused motion data;
[0033] A control module is used to control a target virtual character in a virtual scene based on the fused motion data.
[0034] In a possible implementation manner, the second acquisition module, when acquiring offline motion data matching the real-time motion capture data, is used to:
[0035] According to the coordinated action type matching the real-time motion capture data, determining offline action data matching the coordinated action type from an offline action database; or,
[0036] According to a target offline action type that is triggered to be used among a plurality of offline action types, offline action data matching the target offline action type is determined from an offline action database.
[0037] In a possible implementation manner, when the second acquisition module determines offline action data matching a target action type from the offline action database, the target action type includes the matching action type or the target offline action type, for:
[0038] When there are multiple sets of offline action data matching the target action type in the offline action database, offline action data matching the target virtual character is determined from the multiple sets of offline action data based on the character attribute information respectively adapted to the multiple sets of offline action data and the attribute information corresponding to the target virtual character.
[0039] In a possible implementation manner, the fusion module, when fusing the real-time motion capture data with the offline motion data to generate fused motion data, is used to:
[0040] Determining different parts of the target virtual character controlled by the offline motion data and the real-time motion capture data according to the motion type corresponding to the offline motion data;
[0041] According to different parts controlled by the offline motion data and the real-time motion capture data, the real-time motion capture data is fused with the offline motion data to generate fused motion data.
[0042] In a possible implementation manner, the fusion module, when fusing the real-time motion capture data with the offline motion data according to different parts controlled by the offline motion data and the real-time motion capture data to generate fused motion data, is used to:
[0043] Determining the skeleton linkage relationship between the different parts according to the skeleton information of the different parts;
[0044] According to the skeleton linkage relationship, the real-time motion capture data and the offline motion data are adjusted and fused to generate the fused motion data.
[0045] In a possible implementation manner, the fusion module, when fusing the real-time motion capture data with the offline motion data to generate fused motion data, is used to:
[0046] According to the fusion weights respectively corresponding to the real-time motion capture data and the offline motion data, the real-time motion capture data and the bone position data of the offline motion data at the same part are fused to generate the fused motion data.
[0047] In a possible implementation manner, the offline action data usage condition is satisfied including at least one of the following:
[0048] Receiving a trigger operation that triggers the use of offline action data;
[0049] The real-time motion capture data matches a preset motion type, where the preset motion type is a motion type that needs to be used in conjunction with offline motion data;
[0050] Detecting the occurrence of a target event in the virtual scene;
[0051] The target virtual character is located in a target scene space in the virtual scene; the target scene space is a scene space set up to use the offline action data.
[0052] In a possible implementation manner, the offline motion data is motion data whose corresponding motion amplitude and / or motion complexity meet preset requirements.
[0053] In a third aspect, an embodiment of the present disclosure further provides a computer device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the above-mentioned first aspect, or any possible implementation of the first aspect are performed.
[0054] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned first aspect or any possible implementation of the first aspect are executed.
[0055] The control method, device, computer equipment and storage medium of the virtual character provided by the embodiments of the present disclosure can obtain offline motion data matching the real-time motion capture data, and fuse the real-time motion capture data with the offline motion data, so as to control the target virtual character using the fused motion data, thereby enabling the virtual character to perform more actions without being restricted by factors such as the control level of the virtual character control object and the size of the real scene area such as the motion capture room, thereby enriching the display effect of the virtual character.
[0056] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.
[0058] Figure 1 A flowchart showing a method for controlling a virtual character provided by some embodiments of the present disclosure is shown;
[0059] Figure 2 A schematic diagram showing generation of fusion motion data in a method for controlling a virtual character provided in some embodiments of the present disclosure is shown;
[0060] Figure 3 A schematic diagram showing the architecture of a control device for a virtual character provided in some embodiments of the present disclosure;
[0061] Figure 4 A schematic diagram of the structure of a computer device provided in some embodiments of the present disclosure is shown. DETAILED DESCRIPTION
[0062] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0063] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0064] The term "and / or" herein only describes an association relationship, indicating that three relationships may exist. For example, A and / or B may represent the following three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C may represent including any one or more elements selected from the set consisting of A, B, and C.
[0065] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0066] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0067] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0068] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0069] Research has found that virtual character control objects are often controlled in real scenes such as motion capture rooms. Due to factors such as the control level of the virtual character control objects and the size of real scene areas such as motion capture rooms, virtual characters often find it difficult to make specific movements, which means that the display effect of virtual characters needs to be improved.
[0070] For example, taking an outdoor scene as an example, since the area size of the motion capture room is limited, it is difficult for the virtual character to move in a large outdoor scene, and its range of movement is greatly limited by the size of the real scene area such as the motion capture room.
[0071] Based on the above research, the present disclosure provides a control method, device, computer equipment and storage medium for a virtual character. When the conditions for using offline motion data are met, offline motion data matching real-time motion capture data can be obtained, and the real-time motion capture data can be fused with the offline motion data to control the target virtual character using the fused motion data. This allows the virtual character to make more actions without being restricted by factors such as the control level of the virtual character's controlled object and the size of real scene areas such as the motion capture room, thereby enriching the display effect of the virtual character.
[0072] To facilitate understanding of the present embodiment, a control method for a virtual character disclosed in the embodiment of the present disclosure is first introduced in detail. The execution subject of the control method for a virtual character provided in the embodiment of the present disclosure is generally a computer device with certain computing capabilities, and the computer device includes, for example: a terminal device or a server or other processing device, and the terminal device may be a user equipment (UE), a mobile device, a user terminal, a terminal, a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementations, the control method for the virtual character may be implemented by a processor calling a computer-readable instruction stored in a memory.
[0073] See also Figure 1 FIG. 1 is a flowchart of a method for controlling a virtual character provided by an embodiment of the present disclosure, wherein the method includes S101 to S104, wherein:
[0074] S101: Acquire real-time motion capture data of an object controlled by a virtual character.
[0075] S102: In response to satisfying an offline motion data use condition, acquiring offline motion data matching the real-time motion capture data.
[0076] S103: Fusing the real-time motion capture data with the offline motion data to generate fused motion data.
[0077] S104: Controlling a target virtual character in a virtual scene based on the fused motion data.
[0078] The following is a detailed description of the above steps.
[0079] Data acquisition process for S101 and S102:
[0080] Here, the virtual character control object can be a user who controls the virtual character in the virtual scene, and is used to output control information through a motion capture device worn by the user, and the control information is used to control the behavior of the corresponding target virtual character in the shooting area, thereby realizing the live broadcast of the virtual character in the virtual scene; the real-time motion capture data can be collected by the motion capture device; the offline motion data can be motion data whose corresponding motion amplitude and / or motion complexity meet preset requirements, such as motion data whose leg movement amplitude is greater than the preset motion amplitude (the corresponding action can be a big step), and motion data whose leg movement complexity is greater than the preset motion complexity (the corresponding action can be a complex street dance action of the leg).
[0081] Wherein, the offline action data usage condition may include at least one of the following conditions:
[0082] Condition 1: A trigger operation that triggers the use of offline action data is received.
[0083] Here, the triggering operation for using offline action data may include a button triggering operation, a handle triggering operation, a gesture triggering operation, and the like.
[0084] Specifically, when a trigger operation for triggering the use of offline motion data is received, it can be determined that the offline motion data use condition is met, and the offline motion data matching the real-time motion capture data is obtained.
[0085] Condition 2: the real-time motion capture data matches a preset motion type, and the preset motion type is a motion type that needs to be used in conjunction with offline motion data.
[0086] Here, the preset action types may include running, flying and other actions.
[0087] Specifically, when it is detected that the real-time motion capture data matches the preset motion type, it can be determined that the offline motion data use condition is met, and the offline motion data matching the real-time motion capture data is obtained.
[0088] For example, taking the preset action type of flying as an example, when the arm is detected to make a flying action according to the real-time motion capture data, it can be determined that the offline action data usage conditions are met, and the offline action data matching the flying action can be obtained.
[0089] Condition 3: Detecting the occurrence of a target event in the virtual scene.
[0090] Here, the target event may be an event that requires offline motion data, such as a flying segment that requires offline motion data corresponding to a flying motion, a dancing segment that requires offline motion data corresponding to a dancing motion, etc.
[0091] Specifically, when a target event is detected to occur in the virtual scene, it can be determined that the offline action data usage conditions are met, and offline action data matching the real-time action capture data can be obtained. Since the real-time action capture data at this time is the capture data under the target event, the offline action data at this time is also associated with the target event.
[0092] Condition 4: the target virtual character is located in a target scene space in the virtual scene; the target scene space is a scene space set up to use the offline action data.
[0093] Here, the target scene space may be a large stage, outdoor scene, etc. in which the offline action data can be used. Since the movable area in the target scene space such as a large stage and an outdoor scene is large, the offline action data can be used to control the virtual character, thereby making it more convenient to control the virtual character in the target scene space.
[0094] Specifically, when it is detected that the target virtual character is located in the target scene space in the virtual scene, it can be determined that the offline motion data use condition is met, and the offline motion data matching the real-time motion capture data is obtained.
[0095] In this way, by setting corresponding offline motion data usage conditions for different offline motion data usage scenarios, offline motion data matching the real-time motion capture data can be obtained when the offline motion data usage conditions are met, so that virtual characters in different scenarios can be controlled based on the offline motion data.
[0096] When acquiring offline motion data matching the real-time motion capture data, any one of the following methods may be used:
[0097] Method 1: Obtain offline motion data corresponding to the coordinated motion type that matches the real-time motion capture data.
[0098] Here, according to the coordinated action type that matches the real-time motion capture data, offline action data that matches the coordinated action type can be determined from an offline action database.
[0099] Exemplarily, the coordinated action type may be, for example, a "walking" action performed by the lower body of the virtual character in coordination with the "walking" action performed by the upper body of the virtual character. Accordingly, the offline action data matching the coordinated action type is determined from the offline action database, which may be the first offline action data of the virtual character's lower body performing the "walking" action.
[0100] Method 2: Obtain offline action data corresponding to the triggered target offline action type.
[0101] Here, according to the target offline action type that is triggered to be used among multiple offline action types, offline action data matching the target offline action type may be determined from the offline action database.
[0102] Exemplarily, taking the target offline action type as "walking" as an example, after the "walking" is triggered, offline action data matching the "walking" can be determined from the offline action database.
[0103] In one possible implementation, the target action type may include the cooperative action type or the target offline action type. When determining the offline action data matching the target action type from the offline action database, if there are multiple sets of offline action data matching the target action type in the offline action database, the offline action data matching the target virtual character may be determined from the multiple sets of offline action data based on the character attribute information respectively adapted to the multiple sets of offline action data and the attribute information corresponding to the target virtual character.
[0104] Here, multiple sets of offline action data can be pre-set for the same action type to adapt to virtual characters with different attributes that perform the action type; the attribute information of the virtual character may include the virtual character's appearance size information, the virtual character's age information, etc., and the skeletal parameters of virtual characters with different attributes are different (that is, the offline action data used are different).
[0105] For example, taking the target action type as "walking" and the age information of the virtual character as "teenager", if there are multiple sets of offline action data matching "walking" in the offline action database, the offline action data adapted to the age information "teenager" of the target virtual character can be used as the offline action data matching the target virtual character, so that the selected offline action data is more matched with the attributes of the virtual character, thereby making the display effect of the virtual character during walking more realistic.
[0106] Data fusion process for S103:
[0107] Here, since the motion capture data is used to drive the body parts of the virtual character, and the offline motion data is also used to drive the body parts of the virtual character, the motion capture data and the offline motion data can be fused; when the motion capture data and the offline motion data can be fused, the motion capture data and the offline motion data acting on the same body part can be fused, such as the motion capture data and the offline motion data acting on the legs of the virtual character, so that the virtual character controlled by the fused motion data obtained after the fusion can be affected by the real-time motion capture data and the offline motion data at the same time; in addition, when the motion capture data and the offline motion data can be fused, the motion capture data and the offline motion data acting on different body parts can also be fused, such as the motion capture data acting on the arms of the virtual character and the offline motion data of the legs of the virtual character, so as to control different body parts of the virtual character based on different types of motion data.
[0108] In a possible implementation manner, when the real-time motion capture data is fused with the offline motion data to generate fused motion data, the following steps A1 to A2 may be performed:
[0109] A1: Determine different parts of the target virtual character that are controlled by the offline motion data and the real-time motion capture data according to the motion type corresponding to the offline motion data.
[0110] Here, under different action types, the parts controlled by the offline action data and the real-time action capture data may be different. For example, under the action type "walking", the part that the offline action data can control is the lower body of the virtual character (the waist and below, which may include legs, feet, etc.), and the part that the real-time action capture data may include is the upper body of the virtual character (the part above the waist, such as face, arms, etc.); the mapping relationship between the action type and the virtual character body part corresponding to each action data may be pre-set.
[0111] Specifically, when determining the different parts of the target virtual character controlled by the offline action data and the real-time motion capture data according to the action type corresponding to the offline action data, the different parts of the target virtual character controlled by the offline action data and the real-time motion capture data can be determined according to the action type corresponding to the offline action data, and the mapping relationship between the pre-set action type and the virtual character body part corresponding to each action data.
[0112] A2: According to different parts controlled by the offline motion data and the real-time motion capture data, the real-time motion capture data is fused with the offline motion data to generate fused motion data.
[0113] Here, when the real-time motion capture data is fused with the offline motion data according to different parts controlled by the offline motion data and the real-time motion capture data to generate fused motion data, the offline motion data and the real-time motion capture data used to control different parts can be combined to obtain fused motion data that simultaneously includes the offline motion data and the real-time motion capture data.
[0114] In a possible implementation manner, when the real-time motion capture data is fused with the offline motion data according to different parts controlled by the offline motion data and the real-time motion capture data to generate fused motion data, the following steps A21 to A22 may be performed:
[0115] A21: Determine the skeletal linkage relationship between the different parts according to the skeletal information of the different parts.
[0116] Here, any body part of the virtual character corresponds to a virtual skeleton for controlling the movement of the part. The skeleton information corresponding to the part may include the skeleton position information of the target virtual skeleton for controlling the movement of the part, and the skeleton linkage relationship between the target virtual skeleton and other virtual skeletons; the skeleton linkage relationship is used to indicate the influence of the virtual skeleton corresponding to any part on other virtual skeletons with which it is associated after the movement. For example, the movement of the thigh bone of the virtual character can have a collateral influence on the waist bone of the virtual character, thereby making the display effect of the virtual character during walking more realistic.
[0117] Specifically, when determining the skeletal linkage relationship between the different parts according to the skeletal information of the different parts, the skeletal linkage relationship between the various parts participating in generating the fusion action data this time can be determined according to the skeletal information corresponding to each part respectively.
[0118] A22: According to the skeleton linkage relationship, the real-time motion capture data and the offline motion data are adjusted and fused to generate the fused motion data.
[0119] Here, when the real-time motion capture data and the offline motion data are adjusted according to the skeletal linkage relationship, the motion data adjustment value corresponding to the offline motion data can be determined according to the skeletal linkage relationship corresponding to the real-time motion capture data (that is, the influence of the real-time motion capture data on the offline motion data), and the offline motion data can be adjusted according to the motion data adjustment value corresponding to the offline motion data, and / or, the motion data adjustment value corresponding to the real-time motion capture data can be determined according to the skeletal linkage relationship corresponding to the offline motion data (that is, the influence of the offline motion data on the real-time motion capture data), and the real-time motion capture data can be adjusted according to the motion data adjustment value corresponding to the real-time motion capture data.
[0120] In this way, the real-time motion capture data and / or offline motion data are adjusted according to the skeletal linkage relationship, and the adjusted data are used for fusion, so that the control effect when the virtual character is controlled using the finally generated fused motion data is more consistent with the effect of real human body movement, thereby making the movement of the virtual character more realistic.
[0121] In another possible implementation, when the real-time motion capture data is fused with the offline motion data to generate fused motion data, the skeletal position data of the real-time motion capture data and the offline motion data at the same part can be fused according to the fusion weights corresponding to the real-time motion capture data and the offline motion data respectively to generate the fused motion data.
[0122] Here, the fusion weights corresponding to the real-time motion capture data and the offline motion data can be pre-set for the action type. For example, for the action type "walking", the fusion weights corresponding to the real-time motion capture data and the offline motion data can be 60% and 40% respectively; in addition, the fusion weight can also be set in real time by control objects such as the virtual character control object and the director control object, or it can be determined in real time according to parameters such as the scene in which the virtual character is located and the real-time status of the virtual character. The embodiment of the present disclosure does not limit how the fusion weight is set, which shall be based on the ability to be implemented.
[0123] In this way, by fusing the real-time motion capture data and the bone position data of the offline motion data at the same part according to the fusion weights corresponding to the real-time motion capture data and the offline motion data respectively, the virtual character controlled by the fused motion data obtained after the fusion can be affected by the real-time motion capture data and the offline motion data at the same time, assisting the virtual character control object to control the virtual character.
[0124] With respect to S104, here, when controlling the target virtual character in the virtual scene based on the fused action data, for any part of the target virtual character, the fused action data corresponding to the part is used to control the virtual skeleton corresponding to the part, so as to achieve control based on the part.
[0125] Next, the process of generating fused motion data in the control method of the virtual character provided by the embodiment of the present disclosure will be introduced in conjunction with the accompanying drawings. The schematic diagram of generating fused motion data can be as follows: Figure 2 As shown, Figure 2 In the process, offline motion data matching the real-time motion capture data can be selected from the offline motion database, and the real-time motion capture data can be post-processed, so that the adjusted motion capture data and the offline motion data can be fused to obtain fused motion data after fusion processing; wherein the post-processing can include processing methods such as data adjustment according to the skeletal linkage relationship between different parts of the virtual character.
[0126] Specifically, the specific description of the process of generating fusion action data can refer to the relevant content above, which will not be repeated here.
[0127] The control method of the virtual character provided by the embodiment of the present disclosure can obtain offline motion data matching the real-time motion capture data, and fuse the real-time motion capture data with the offline motion data, so as to control the target virtual character using the fused motion data, thereby enabling the virtual character to perform more actions without being restricted by factors such as the control level of the virtual character control object and the size of the real scene area such as the motion capture room, thereby enriching the display effect of the virtual character.
[0128] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0129] Based on the same inventive concept, the embodiment of the present disclosure also provides a control device for a virtual character corresponding to the control method for a virtual character. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the control method for a virtual character in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0130] Reference Figure 3 , which is a schematic diagram of the architecture of a virtual character control device provided by an embodiment of the present disclosure, the device comprises: a first acquisition module 301, a second acquisition module 302, a fusion module 303, and a control module 304; wherein,
[0131] The first acquisition module 301 is used to acquire real-time motion capture data of an object controlled by a virtual character;
[0132] A second acquisition module 302 is used to acquire offline motion data matching the real-time motion capture data in response to satisfying the offline motion data use condition;
[0133] A fusion module 303 is used to fuse the real-time motion capture data with the offline motion data to generate fused motion data;
[0134] The control module 304 is used to control the target virtual character in the virtual scene based on the fused motion data.
[0135] In a possible implementation manner, when acquiring offline motion data matching the real-time motion capture data, the second acquisition module 302 is used to:
[0136] According to the coordinated action type matching the real-time motion capture data, determining offline action data matching the coordinated action type from an offline action database; or,
[0137] According to a target offline action type that is triggered to be used among a plurality of offline action types, offline action data matching the target offline action type is determined from an offline action database.
[0138] In a possible implementation, the second acquisition module 302, when determining offline action data matching a target action type from an offline action database, wherein the target action type includes the matching action type or the target offline action type, is configured to:
[0139] When there are multiple sets of offline action data matching the target action type in the offline action database, offline action data matching the target virtual character is determined from the multiple sets of offline action data based on the character attribute information respectively adapted by the multiple sets of offline action data and the attribute information corresponding to the target virtual character.
[0140] In a possible implementation manner, the fusion module 303, when fusing the real-time motion capture data with the offline motion data to generate fused motion data, is used to:
[0141] Determining different parts of the target virtual character controlled by the offline motion data and the real-time motion capture data according to the motion type corresponding to the offline motion data;
[0142] According to different parts controlled by the offline motion data and the real-time motion capture data, the real-time motion capture data is fused with the offline motion data to generate fused motion data.
[0143] In a possible implementation manner, the fusion module 303, when fusing the real-time motion capture data with the offline motion data according to different parts controlled by the offline motion data and the real-time motion capture data to generate fused motion data, is used to:
[0144] Determining the skeleton linkage relationship between the different parts according to the skeleton information of the different parts;
[0145] According to the skeleton linkage relationship, the real-time motion capture data and the offline motion data are adjusted and fused to generate the fused motion data.
[0146] In a possible implementation manner, the fusion module 303, when fusing the real-time motion capture data with the offline motion data to generate fused motion data, is used to:
[0147] According to the fusion weights respectively corresponding to the real-time motion capture data and the offline motion data, the real-time motion capture data and the bone position data of the offline motion data at the same part are fused to generate the fused motion data.
[0148] In a possible implementation manner, the offline action data usage condition is satisfied including at least one of the following:
[0149] Receiving a trigger operation that triggers the use of offline action data;
[0150] The real-time motion capture data matches a preset motion type, where the preset motion type is a motion type that needs to be used in conjunction with offline motion data;
[0151] Detecting the occurrence of a target event in the virtual scene;
[0152] The target virtual character is located in a target scene space in the virtual scene; the target scene space is a scene space set up to use the offline action data.
[0153] In a possible implementation manner, the offline motion data is motion data whose corresponding motion amplitude and / or motion complexity meet preset requirements.
[0154] The control device for a virtual character provided by an embodiment of the present disclosure can, when the conditions for using offline motion data are met, obtain offline motion data that matches real-time motion capture data, and fuse the real-time motion capture data with the offline motion data, so as to control the target virtual character using the fused motion data. This allows the virtual character to perform more actions without being restricted by factors such as the control level of the object controlled by the virtual character, the size of the real scene area such as the motion capture room, etc., thereby enriching the display effect of the virtual character.
[0155] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference may be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.
[0156] Based on the same technical concept, the embodiment of the present disclosure also provides a computer device. Figure 4As shown, it is a schematic diagram of the structure of a computer device 400 provided in an embodiment of the present disclosure, including a processor 401, a memory 402, and a bus 403. Among them, the memory 402 is used to store execution instructions, including a memory 4021 and an external memory 4022; the memory 4021 here is also called an internal memory, which is used to temporarily store the operation data in the processor 401, and the data exchanged with the external memory 4022 such as a hard disk. The processor 401 exchanges data with the external memory 4022 through the memory 4021. When the computer device 400 is running, the processor 401 communicates with the memory 402 through the bus 403, so that the processor 401 executes the following instructions:
[0157] Obtain real-time motion capture data of the virtual character's controlled object;
[0158] In response to satisfying the offline motion data use condition, acquiring offline motion data matching the real-time motion capture data;
[0159] Fusing the real-time motion capture data with the offline motion data to generate fused motion data;
[0160] A target virtual character in a virtual scene is controlled based on the fused motion data.
[0161] In a possible implementation manner, in the instruction of the processor 401, the acquiring of offline motion data matching the real-time motion capture data includes:
[0162] According to the coordinated action type matching the real-time motion capture data, determining offline action data matching the coordinated action type from an offline action database; or,
[0163] According to a target offline action type that is triggered to be used among a plurality of offline action types, offline action data matching the target offline action type is determined from an offline action database.
[0164] In a possible implementation, the instructions of the processor 401 include determining offline action data matching a target action type from an offline action database, where the target action type includes the coordinated action type or the target offline action type, including:
[0165] When there are multiple sets of offline action data matching the target action type in the offline action database, offline action data matching the target virtual character is determined from the multiple sets of offline action data based on the character attribute information respectively adapted by the multiple sets of offline action data and the attribute information corresponding to the target virtual character.
[0166] In a possible implementation manner, the instructions of the processor 401, fusing the real-time motion capture data with the offline motion data to generate fused motion data, include:
[0167] Determining different parts of the target virtual character controlled by the offline motion data and the real-time motion capture data according to the motion type corresponding to the offline motion data;
[0168] According to different parts controlled by the offline motion data and the real-time motion capture data, the real-time motion capture data is fused with the offline motion data to generate fused motion data.
[0169] In a possible implementation manner, the instructions of the processor 401, according to different parts controlled by the offline motion data and the real-time motion capture data, fuse the real-time motion capture data with the offline motion data to generate fused motion data, include:
[0170] Determining the skeleton linkage relationship between the different parts according to the skeleton information of the different parts;
[0171] According to the skeleton linkage relationship, the real-time motion capture data and the offline motion data are adjusted and fused to generate the fused motion data.
[0172] In a possible implementation manner, the instructions of the processor 401, fusing the real-time motion capture data with the offline motion data to generate fused motion data, include:
[0173] According to the fusion weights respectively corresponding to the real-time motion capture data and the offline motion data, the real-time motion capture data and the bone position data of the offline motion data at the same part are fused to generate the fused motion data.
[0174] In a possible implementation manner, in the instruction of the processor 401, the offline action data usage condition is satisfied including at least one of the following:
[0175] Receiving a trigger operation that triggers the use of offline action data;
[0176] The real-time motion capture data matches a preset motion type, where the preset motion type is a motion type that needs to be used in conjunction with offline motion data;
[0177] Detecting the occurrence of a target event in the virtual scene;
[0178] The target virtual character is located in a target scene space in the virtual scene; the target scene space is a scene space set up to use the offline action data.
[0179] In a possible implementation manner, in the instruction of the processor 401, the offline motion data is motion data whose corresponding motion amplitude and / or motion complexity meet preset requirements.
[0180] The present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method for controlling a virtual character described in the above method embodiment are executed. The storage medium may be a volatile or non-volatile computer-readable storage medium.
[0181] The embodiments of the present disclosure also provide a computer program product, which carries a program code. The instructions included in the program code can be used to execute the steps of the virtual character control method described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.
[0182] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0183] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.
[0184] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0185] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0186] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0187] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A method for controlling a virtual character, characterized in that: include: Obtain real-time motion capture data of the virtual character's controlled object; In response to satisfying the offline motion data use condition, acquiring offline motion data matching the real-time motion capture data; Fusing the real-time motion capture data with the offline motion data to generate fused motion data; A target virtual character in a virtual scene is controlled based on the fused motion data.
2. The method according to claim 1, characterized in that The acquiring of offline motion data matching the real-time motion capture data comprises: According to the coordinated action type matching the real-time motion capture data, determining offline action data matching the coordinated action type from an offline action database; or, According to a target offline action type that is triggered to be used among a plurality of offline action types, offline action data matching the target offline action type is determined from an offline action database.
3. The method according to claim 2, characterized in that Determining offline action data matching a target action type from an offline action database, wherein the target action type includes the coordinated action type or the target offline action type, comprises: When there are multiple sets of offline action data matching the target action type in the offline action database, offline action data matching the target virtual character is determined from the multiple sets of offline action data based on the character attribute information respectively adapted by the multiple sets of offline action data and the attribute information corresponding to the target virtual character.
4. The method according to claim 1, characterized in that: The real-time motion capture data is fused with the offline motion data to generate fused motion data, including: Determining different parts of the target virtual character controlled by the offline motion data and the real-time motion capture data according to the motion type corresponding to the offline motion data; According to different parts controlled by the offline motion data and the real-time motion capture data, the real-time motion capture data is fused with the offline motion data to generate fused motion data.
5. The method according to claim 4, characterized in that According to different parts controlled by the offline motion data and the real-time motion capture data, the real-time motion capture data is fused with the offline motion data to generate fused motion data, including: Determining the skeleton linkage relationship between the different parts according to the skeleton information of the different parts; According to the skeleton linkage relationship, the real-time motion capture data and the offline motion data are adjusted and fused to generate the fused motion data.
6. The method according to claim 1, characterized in that The real-time motion capture data is fused with the offline motion data to generate fused motion data, including: According to the fusion weights respectively corresponding to the real-time motion capture data and the offline motion data, the real-time motion capture data and the bone position data of the offline motion data at the same part are fused to generate the fused motion data.
7. The method according to claim 1, characterized in that The offline action data usage condition includes at least one of the following: Receiving a trigger operation that triggers the use of offline action data; The real-time motion capture data matches a preset motion type, where the preset motion type is a motion type that needs to be used in conjunction with offline motion data; Detecting the occurrence of a target event in the virtual scene; The target virtual character is located in a target scene space in the virtual scene; The target scene space is a scene space set to be able to use the offline action data.
8. The method according to claim 1, characterized in that The offline motion data is motion data whose corresponding motion amplitude and / or motion complexity meet preset requirements.
9. A control device for a virtual character, characterized in that: include: A first acquisition module is used to acquire real-time motion capture data of an object controlled by a virtual character; A second acquisition module, configured to acquire offline motion data matching the real-time motion capture data in response to satisfying the offline motion data use condition; A fusion module, used for fusing the real-time motion capture data with the offline motion data to generate fused motion data; A control module is used to control a target virtual character in a virtual scene based on the fused motion data.
10. A computer device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the method for controlling a virtual character as described in any one of claims 1 to 8 are performed.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for controlling a virtual character as claimed in any one of claims 1 to 8 are executed.
Citation Information
Cited By
Motion management method of virtual motion object and electronic equipment
CN120451346A