Virtual role control method and device, electronic equipment, and storage medium

By acquiring pose data in XR games and performing inverse kinematics processing, combined with local and model space transformations, the basic torso and arm poses are decomposed, solving the problem of unnatural virtual character poses and improving the game experience and realism.

CN117101138BActive Publication Date: 2026-11-27BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311117863.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-31
Publication Date
2026-11-27
Estimated Expiration
2043-08-31

AI Technical Summary

Technical Problem

In XR games, when using inverse kinematics (IK) technology to determine the pose of virtual characters, especially in a third-person perspective, the poses of virtual characters become unnatural, affecting the player's gaming experience.

Method used

By acquiring the pose data of the virtual character, performing inverse kinematics processing, determining the first pose of the virtual character, and combining the current animation pose and pose change, calculating the target pose, and controlling the virtual character to display according to the target pose, including coordinate transformation between local space and model space, as well as decomposition processing of the basic torso and arm poses.

Benefits of technology

It improves the naturalness of virtual character poses, enhancing the immersive experience for gamers and the realism of virtual character movements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117101138B_ABST
    Figure CN117101138B_ABST
Patent Text Reader

Abstract

The present disclosure provides a virtual role control method and device, electronic equipment and a storage medium, the method comprising: displaying a virtual scene, the virtual scene comprising a virtual role; obtaining pose data corresponding to the virtual role, and performing inverse kinematics processing on a base model pose of the virtual role based on the pose data to determine a first pose of the virtual role; determining a pose change amount for the virtual role based on the first pose and the base model pose; obtaining a current animation pose of the virtual role, determining a target pose for the virtual role based on the current animation pose and the pose change amount, and controlling the virtual role to display in the target pose. The embodiments of the present disclosure can make the pose of the virtual role more natural, and are beneficial to improving the game experience of the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of extended reality (XR) technology, and more specifically, to a method, apparatus, electronic device, and storage medium for controlling a virtual character. Background Technology

[0002] Extended reality (XR) technology combines the real and virtual worlds through computers to create an interactive virtual environment. It's a collective term for various technologies such as Augmented Reality (AR), Virtual Reality (VR), and Mixed Reality (MR). By integrating XR technology with games, players can enjoy a richer, more immersive gaming experience, interacting with the virtual environment in a more intuitive and realistic way, creating a truly immersive gaming experience.

[0003] Current XR games typically employ inverse kinematics (IK) to determine the virtual character's pose, mapping the player's pose to the virtual character's pose. However, when applied to a third-person perspective, this method results in unnatural virtual character poses, negatively impacting the player's gaming experience. Summary of the Invention

[0004] This disclosure provides at least one method, device, electronic device, and storage medium for controlling virtual characters, which can make the posture of virtual characters more natural in XR games and improve the user's gaming experience.

[0005] This disclosure provides a method for controlling a virtual character, including:

[0006] Display a virtual scene, which includes virtual characters;

[0007] Acquire pose data corresponding to the virtual character, and perform inverse kinematics processing on the basic model pose of the virtual character based on the pose data to determine the first pose of the virtual character;

[0008] Based on the first pose and the pose of the base model, determine the amount of pose change for the virtual character;

[0009] The current animation pose of the virtual character is obtained, and based on the current animation pose and the amount of pose change, a target pose for the virtual character is determined, and the virtual character is controlled to display according to the target pose.

[0010] In this disclosed example, by acquiring pose data corresponding to the virtual character and performing inverse kinematics processing on the basic model pose of the virtual character based on the pose data, the initial pose of the virtual character is determined. Furthermore, based on the first pose and the basic model pose, a pose variation amount applicable to the virtual character is determined. Simultaneously, by acquiring the current animation pose of the virtual character and based on the current pose and the pose variation amount, the target pose of the virtual character can be determined and displayed. Thus, since the target pose is obtained by combining the current animation pose with the pose variation amount of the first pose determined according to IK, compared to a target pose obtained solely through IK, it helps improve the naturalness of the virtual character's pose and enhances the immersive experience for game players.

[0011] In one possible implementation, the basic model pose of the virtual character includes a basic torso pose, and the pose data corresponding to the virtual character is pose data in local space. The step of performing inverse kinematic processing on the basic model pose of the virtual character based on the pose data to determine the first pose of the virtual character includes:

[0012] Convert the pose data in the local spatial coordinate system into pose data in the model space;

[0013] Based on the pose data in the model space, the basic torso pose is subjected to inverse kinematic processing to obtain the first pose of the virtual character.

[0014] In this embodiment of the disclosure, by converting pose data in the local spatial coordinate system to pose data in the model space, the coordinate transformation of the virtual character's pose can be realized, so that the basic model pose of the virtual character can be processed by inverse kinematics in the model space to determine the first pose corresponding to the torso pose of the virtual character.

[0015] In one possible implementation, determining the amount of pose change for the virtual character based on the first pose and the base model pose includes:

[0016] Based on the posture data of the first posture and the posture data of the basic torso posture, the change in posture data for the basic torso posture of the virtual character is determined, and the change in posture data is used as the change in posture data.

[0017] In this embodiment of the disclosure, since the position data of the first posture and the basic torso posture have not changed, it is only necessary to perform calculations based on the posture data of the first posture and the posture data of the basic torso posture. Since only posture data is used for calculation, the amount of calculation is reduced while ensuring that the calculation purpose is achieved, which helps to improve the calculation efficiency.

[0018] In one possible implementation, obtaining the pose data corresponding to the virtual character includes:

[0019] Obtain head pose data and hand pose data corresponding to the virtual character.

[0020] In this embodiment of the disclosure, since the pose data corresponding to the virtual character is composed of multiple parts, the head pose data and hand pose data are important factors that help determine the upper body posture of the virtual character.

[0021] In one optional implementation, the base model pose includes a base torso pose and a base arm pose; based on the current animation pose and the pose change amount, determining the target pose for the virtual character includes:

[0022] Based on the current animation pose and the pose change amount corresponding to the basic torso pose, the target torso pose for the virtual character is determined.

[0023] Based on the pose data, the basic arm pose is subjected to inverse kinematic processing to obtain the target arm pose for the arm part of the virtual character.

[0024] The target posture is determined based on the target torso posture and the target arm posture.

[0025] In this embodiment of the disclosure, by decomposing the basic model pose into a basic torso pose and a basic arm pose, it is possible to control the pose of each part of the virtual character and determine the final target pose. This allows for independent processing of pose changes in different parts, ensuring that the target torso pose is natural while coordinating with the arm pose, thus improving the realism and naturalness of the virtual character's pose.

[0026] In one optional implementation, the pose data includes hand pose data, and the step of performing inverse kinematic processing on the basic arm pose based on the pose data to obtain a target arm pose for the virtual character's arm part includes:

[0027] Determine the head coordinate offset of the target torso pose relative to the current animation pose;

[0028] Based on the hand pose data and the head coordinate offset, the basic arm pose is subjected to inverse kinematics processing to obtain the target arm pose.

[0029] In this embodiment of the disclosure, by determining the head coordinate offset of the target torso posture relative to the current animation posture, the subsequent hand posture and torso posture are matched, which helps to improve the overall posture naturalness. In this way, the natural dynamics of the character's head in different actions can be better simulated, making the virtual character's movements and postures more realistic and natural.

[0030] In one possible implementation, controlling the virtual character to display according to the target pose includes:

[0031] The target pose is converted to a local spatial coordinate system, and the virtual character located in the local spatial coordinate system is displayed based on the target pose in the local spatial coordinate system.

[0032] In this embodiment of the disclosure, by converting the target pose to a local spatial coordinate system, it can be matched with the current pose of the virtual character. This conversion process can ensure that the virtual character remains consistent when displaying the target pose and is more in line with the requirements of the application scenario.

[0033] This disclosure provides a virtual character control generation device, including:

[0034] Scene display module: used to display virtual scenes, which include virtual characters;

[0035] Pose determination module: used to acquire pose data corresponding to the virtual character, and perform inverse kinematics processing on the basic model pose of the virtual character based on the pose data to determine the first pose of the virtual character;

[0036] Pose processing module: used to determine the amount of pose change for the virtual character based on the first pose and the pose of the base model;

[0037] Character control module: used to obtain the current animation pose of the virtual character, determine the target pose for the virtual character based on the current animation pose and the pose change amount, and control the virtual character to display according to the target pose.

[0038] In one possible implementation, the base model pose includes a base torso pose, and the pose data is pose data in local space; the pose determination module is specifically used for:

[0039] Convert the pose data in the local spatial coordinate system into pose data in the model space;

[0040] The basic torso pose is subjected to inverse kinematic processing based on the pose data in the model space to obtain the first pose.

[0041] In one possible implementation, the base model pose includes a base torso pose, and the pose processing module is specifically used for:

[0042] Based on the posture data of the first posture and the posture data of the basic torso posture, the change in posture data for the basic torso posture of the virtual character is determined, and the change in posture data is used as the change in posture data.

[0043] In one possible implementation, the posture determination module is specifically used for:

[0044] Obtain head pose data and hand pose data corresponding to the virtual character.

[0045] In one possible implementation, the basic model pose includes a basic torso pose and a basic arm pose; the character control module is specifically used for:

[0046] Based on the current animation pose and the pose change amount corresponding to the basic torso pose, the target torso pose for the virtual character is determined.

[0047] Based on the pose data, the basic arm pose is subjected to inverse kinematic processing to obtain the target arm pose for the arm part of the virtual character.

[0048] The target posture is determined based on the target torso posture and the target arm posture.

[0049] In one possible implementation, the pose data includes hand pose data, and the character control module is specifically used for:

[0050] Determine the head coordinate offset of the target torso pose relative to the current animation pose;

[0051] Based on the hand pose data and the head coordinate offset, the basic arm pose is subjected to inverse kinematics processing to obtain the target arm pose.

[0052] In one possible implementation, the role control module is specifically used for:

[0053] The target pose is converted to a local spatial coordinate system, and the virtual character located in the local spatial coordinate system is displayed based on the target pose in the local spatial coordinate system.

[0054] This disclosure also provides an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the steps of the method for generating a virtual character control model as described in any of the above possible embodiments are performed.

[0055] This disclosure also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the method for generating a control model of a virtual character as described in any of the above possible embodiments.

[0056] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0057] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings referenced in the embodiments will be briefly described below. These drawings are incorporated in and constitute a part of this specification. They illustrate embodiments conforming to this disclosure and, together with the specification, serve to explain the technical solutions of this disclosure. It should be understood that the following drawings only show some embodiments of this disclosure and should not be considered as limiting the scope. Those skilled in the art can obtain other related drawings based on these drawings without creative effort.

[0058] Figure 1 A flowchart is shown illustrating a method for controlling a virtual character provided in some embodiments of this disclosure;

[0059] Figure 2 A schematic diagram of the interface of a virtual scene provided in some embodiments of this disclosure is shown;

[0060] Figure 3 A schematic diagram illustrating the basic poses of a virtual character provided in some embodiments of this disclosure is shown;

[0061] Figure 4 A schematic diagram illustrating the target pose of a virtual character provided in some embodiments of this disclosure is shown;

[0062] Figure 5 A schematic diagram illustrating the transformation process of virtual character poses in some embodiments of this disclosure is shown;

[0063] Figure 6 A schematic diagram of the structure of a control device for a virtual character provided in some embodiments of this disclosure is shown;

[0064] Figure 7 A schematic diagram of an electronic device provided in some embodiments of the present disclosure is shown. Detailed Implementation

[0065] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. The components of the embodiments of this disclosure described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.

[0066] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0067] In this document, the term "and / or" merely describes a relationship, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.

[0068] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0069] Furthermore, the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and related provisions.

[0070] Research has found that current XR games typically use IK technology to determine the poses of virtual characters. However, when using IK technology to process the upper body poses of virtual characters, if applied to characters in a third-person perspective, the poses of the virtual characters seen by the player may appear unnatural. For example, a character in a squatting position may have an upright upper body instead of a more natural forward-leaning posture, which in turn affects the player's immersive experience and reduces the player's engagement and satisfaction with the game.

[0071] IK (In-Kinematics) is an animation technique used to achieve realistic character animation based on target positions or poses. It is based on principles of physics and mathematical calculations. In character animation, IK principles can deduce the corresponding joint rotation angles from the desired positions of the character's extremities (such as hands or feet), thus achieving natural and realistic character animation. This allows the character to dynamically adjust according to the required pose or target position, providing a more lifelike character performance.

[0072] Based on the above research, this disclosure provides a method for controlling a virtual character. First, a virtual scene is displayed, including the virtual character. Then, pose data corresponding to the virtual character is acquired, and inverse kinematics processing is performed on the basic model pose of the virtual character based on the pose data to determine a first pose. Next, based on the first pose and the basic model pose, a pose change amount for the virtual character is determined. Finally, based on the current animation pose and the pose change amount, a target pose for the virtual character is determined, and the virtual character is controlled to display according to the target pose. Thus, since the target pose is obtained by combining the current animation pose with the pose change amount of the first pose determined by IK, compared to obtaining the target pose solely through IK, it helps improve the naturalness of the virtual character's pose and enhances the immersive experience for game players.

[0073] To facilitate understanding of this embodiment, the executing entity of the virtual character control method provided in this disclosure will first be described in detail. The executing entity of the virtual character control method provided in this disclosure is an electronic device. This electronic device can be a terminal device or a server. The terminal device can also be a mobile device, a user terminal, a terminal, a handheld device, a computing device, an in-vehicle device, a wearable device, etc. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud storage, big data, and artificial intelligence platforms.

[0074] In other embodiments, the control method for the virtual character can also be implemented by the processor calling computer-readable instructions stored in memory.

[0075] In other embodiments, the electronic device may also include AR (Augmented Reality) devices, MR (Mixed Reality) devices, etc. For example, an AR device may be a mobile phone or tablet with AR functionality, or it may be AR glasses, and there is no limitation thereto.

[0076] The method for controlling virtual characters provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings. See also Figure 1 The diagram shows a flowchart of a virtual character control method provided in this embodiment of the present disclosure. The method includes steps S101 to S104, wherein:

[0077] S101, Display a virtual scene, which includes virtual characters.

[0078] See Figure 2 As shown, Figure 2 This is a schematic diagram of a virtual scene interface provided in an embodiment of the present disclosure, wherein the virtual scene includes a virtual character 201. The virtual character in the scene is the character corresponding to the player. In some embodiments, the virtual scene may also include virtual characters 202 corresponding to other players and non-player characters. Player Character 203 (Non-Player Character, NPC).

[0079] A virtual scene is a scenario used by players to control virtual characters to complete game logic. This virtual scene can be a simulation of the real world, a semi-simulated / semi-fictional virtual environment, or a purely fictional virtual environment. Specifically, a virtual scene can include various elements such as landscapes, buildings, objects, and characters, which exist in the virtual environment in three-dimensional or two-dimensional form.

[0080] In this embodiment, the virtual scene is an XR scene, including but not limited to AR scenes, VR scenes, and MR scenes. Taking VR as an example, the virtual scene can present a simulated virtual world, different from the real world or a fictional world, to the user through the display and interaction of VR devices. Users can interact and explore the virtual environment in real time through head-mounted displays, controllers, touch devices, etc., and obtain perceptions and experiences different from the real world.

[0081] Virtual characters are virtual entities presented in a virtual environment, representing characters, virtual figures, or other virtual objects in games. These virtual characters have unique appearances and designs, can perform various actions and gestures, and interact and communicate with players. Different virtual characters can have different appearances, or different ages, genders, professions, personalities, and other attributes. They communicate with players through voice and dialogue and can provide feedback based on player actions. Some virtual characters also possess artificial intelligence, enabling them to simulate human behavior patterns and make intelligent decisions.

[0082] In this embodiment of the disclosure, the virtual character refers to the character played by the player. In other embodiments, the virtual character may also be the virtual character corresponding to another player. When the virtual character is the virtual character corresponding to another player, the execution subject of the method may be the server.

[0083] S102, acquire pose data corresponding to the virtual character, and perform inverse kinematics processing on the basic model pose of the virtual character based on the pose data to determine the first pose of the virtual character.

[0084] Pose data is crucial information for virtual characters within a virtual environment, encompassing their position, orientation, and scaling. Position information describes the character's coordinates in 3D space, orientation information indicates the character's facing or rotational direction, and scaling information represents the character's size proportions. This data can be represented and recorded using Euler angles, quaternions, or rotation matrices. Beyond basic position, orientation, and scaling information, pose data can also include additional information such as motion states and joint angles.

[0085] Understandably, inverse kinematics processing captures a player's body motion data using sensors and tracking devices, then applies this data to a virtual character, enabling the virtual character to synchronize with the player's real movements. Its working principle involves calculating and analyzing the player's body posture, position, and actions to determine the corresponding actions the virtual character should take. Specifically, sensor technologies such as head trackers, hand controllers, and motion trackers can be used. Sensors can track and capture the player's head, arms, body, and other movements, then transmit this data to the game system for real-time processing. Therefore, in this embodiment, various sensors can be installed on the head-mounted display and controllers to acquire the virtual character's pose data.

[0086] A head-mounted display (HUD) typically contains one or more high-resolution displays that project images in front of the player's eyes. An optical system focuses and adjusts the image to ensure the player sees a clear and realistic virtual world; and built-in sensors, such as gyroscopes, accelerometers, and magnetometers, track the player's head movements. By sensing head rotation and tilt, the HUD accurately determines the player's perspective in the virtual environment and adjusts the displayed content accordingly.

[0087] Controllers typically communicate wirelessly with the headset or console and often employ motion tracking technology, such as built-in gyroscopes, accelerometers, and magnetometers. These sensors detect the controller's movement and posture, transmitting this information to the system to accurately represent the player's hand movements in the virtual environment. Furthermore, controllers are equipped with control elements such as buttons, triggers, joysticks, and touchpads, allowing for interaction and control during gameplay. These buttons can represent different functions, such as moving, jumping, shooting, or picking up items.

[0088] In some embodiments, when acquiring pose data corresponding to the virtual character, head pose data and hand pose data corresponding to the virtual character can be acquired, thereby facilitating the determination of the upper body posture of the virtual character.

[0089] See Figure 3 The diagram shown illustrates a basic model pose 30 corresponding to a virtual character 201 provided in this embodiment of the present disclosure. This basic model pose refers to the default or initial pose of the virtual character when it is not performing a specific action or interaction. It represents the virtual character's basic or relaxed state, typically a neutral and balanced pose. The basic model pose is crucial for subsequent actions and pose control because it provides a reference point and baseline for calculating and adjusting the character's transitions between different actions.

[0090] For example, this base model pose is typically a neutral stance, either standing or sitting. Users can change the character's pose by adjusting the rotation and displacement of individual joints. The desired pose can then be saved as a custom pose or action. These custom poses can be used to simulate various character movements, such as walking, running, jumping, stretching, etc.

[0091] In some possible embodiments, the base model pose includes a base torso pose, and the pose data is pose data in local space. Therefore, when performing inverse kinematic processing on the base model pose of the virtual character based on the pose data to determine the first pose of the virtual character, the following (1) to (2) may be included:

[0092] (1) Convert the pose data in the local spatial coordinate system into pose data in the model space;

[0093] (2) The basic trunk posture is subjected to inverse kinematic processing based on the pose data in the model space to obtain the first posture.

[0094] The local space, also known as object space, is used in 3D computer graphics and computer vision to describe the position, orientation, and size of a specific object or local region. In local space, the definition of the coordinate axes and the location of the origin are usually associated with the characteristics of the object or local region. For example, for a 3D model, the origin of its local space coordinate system is usually located at the geometric center or reference point of the model, and its coordinate axes may be related to a specific orientation or alignment of the object.

[0095] By using local space, it's easy to edit, transform, and manipulate specific objects. For example, you can scale, rotate, and translate a model within local space without directly affecting other objects or the entire scene. This use of local space facilitates targeted operations on specific objects or local areas. In other words, local space involves understanding a local coordinate system relative to a specific object or region to describe, edit, and transform the position, orientation, and size of that object.

[0096] In the fields of computer graphics and computer vision, model space refers to a coordinate system within a 3D scene, used to describe and locate the position, orientation, and dimensions of a 3D model. Model space is a local coordinate system relative to the model itself, with its origin typically located at the geometric center of the model or another reference point.

[0097] In model space, the geometric information of a model, such as its vertices and faces, is defined relative to the model's local coordinates. This means that transformations such as position, rotation, and scaling of the model are performed relative to the coordinate system of model space.

[0098] Model space data typically exists to facilitate model editing, transformation, and rendering. When editing a model, individual parts can be moved, rotated, or scaled directly within model space without considering the global coordinate system. Furthermore, during rendering, the geometric data in model space can be transformed to the global coordinate system or projected onto screen space to ultimately present the model on the screen.

[0099] It's important to note that model space is relative to the model itself; different models have different model spaces. When performing collaboration and relative positioning between different models in a scene, a global coordinate system or a local coordinate system is typically used to describe their relative relationships.

[0100] The basic trunk posture refers to the posture or stance of the human or animal trunk in a normal, balanced, and natural state. The trunk mainly includes the head, neck, chest, waist, and pelvis.

[0101] In this embodiment, by converting pose data in the local spatial coordinate system to pose data in the model space, the coordinate transformation of the virtual character's pose can be realized, so that the basic model pose of the virtual character can be processed by inverse kinematics in the model space to determine the first pose of the virtual character.

[0102] S103, based on the first pose and the pose of the base model, determine the amount of pose change for the virtual character.

[0103] First, the first pose is the pose obtained by inverse kinematic processing of the basic model pose of the virtual character based on the pose data. The basic model pose has been described in detail in S102 and will not be repeated here.

[0104] Then, by comparing the differences between the first pose and the base model pose, the amount of pose changes the virtual character needs to make can be determined. These changes can involve aspects such as position, orientation, and scale, describing the specific changes the virtual character makes between different poses.

[0105] Common methods for calculating pose changes include Euler angle calculation, joint angle difference calculation, displacement and rotation calculation, and analysis based on motion capture data. Euler angle calculation can obtain pose changes through differences in rotation matrices or quaternions. Joint angle difference calculation involves measuring joint angles, constraints, and interpolation methods. Displacement and rotation calculations typically involve matrix operations or quaternion operations. Motion capture data analysis can calculate pose changes by analyzing data differences between keyframes or consecutive frames. When selecting a calculation method, a balance between performance and accuracy must be considered, and an appropriate implementation should be chosen based on specific application requirements.

[0106] In some possible implementations, the base model pose includes a base torso pose, and determining the pose variation for the virtual character based on the first pose and the base model pose may specifically include:

[0107] Based on the posture data of the first posture and the posture data of the basic torso posture, the change in posture data for the basic torso posture of the virtual character is determined, and the change in posture data is used as the change in posture data.

[0108] In this embodiment of the disclosure, since the position data of the first posture and the basic torso posture have not changed, it is only necessary to perform calculations based on the posture data of the first posture and the posture data of the basic torso posture. Since only posture data is used for calculation, the amount of calculation is reduced while ensuring that the calculation purpose is achieved, which helps to improve the calculation efficiency.

[0109] S104: Obtain the current animation pose of the virtual character, determine the target pose for the virtual character based on the current animation pose and the pose change amount, and control the virtual character to display according to the target pose.

[0110] The current animation pose is a pose obtained based on the player's operation (such as joystick input). After obtaining the pose change amount, the target pose for the virtual character can be determined based on the current animation pose and the pose change amount, and the virtual character can be controlled to display according to the target pose.

[0111] Furthermore, before displaying the target pose, it needs to be transformed into a local spatial coordinate system. Specifically, using mathematical tools such as transformation matrices or quaternions, the position and orientation information of the target pose can be converted into a local coordinate system relative to the virtual character itself. This ensures that the virtual character is displayed and moves according to the expected position and orientation. Figure 4 The diagram shown is a schematic of the target pose of a virtual character provided in an embodiment of this disclosure. By using the converted target pose to control the animation and rendering of the virtual character, it can be ensured that the character performs actions and expressions in the expected manner during the simulation, thereby improving the realism and interactivity of the virtual environment.

[0112] Therefore, in some embodiments, controlling the virtual character to display according to the target pose may include:

[0113] The target pose is converted to a local spatial coordinate system, and the virtual character located in the local spatial coordinate system is displayed based on the target pose in the local spatial coordinate system.

[0114] In this embodiment, by transforming the target pose to a local spatial coordinate system, it can be matched with the current pose of the virtual character. This transformation process ensures that the virtual character maintains consistency when displaying the target pose and is more in line with the requirements of the application scenario. Utilizing the accurate definition of the target pose in the local spatial coordinate system, precise control and display of the virtual character can be achieved in the virtual environment. This provides a more realistic virtual environment and interactive experience, making the virtual character's movements more realistic and lifelike, and enhancing the user's immersion and experience quality.

[0115] It is understandable that, considering the basic model pose of a virtual character, including torso and arm poses, the target pose of the virtual character can be determined by analyzing the current animation pose and pose changes. This target pose can be further decomposed into a target torso pose and a target arm pose. For the torso pose, the target torso pose can be determined based on the current animation pose and the pose changes corresponding to the basic torso pose. For the arm pose, inverse kinematics can be used to process the hand pose data and, combined with the head coordinate offset, the state of the arm joints can be inferred to obtain the target arm pose.

[0116] Therefore, in some embodiments, the basic model pose includes a basic torso pose and a basic arm pose. When determining the target pose of the virtual character based on the current animation pose and the pose change, the following (I) to (III) may be included:

[0117] (I) Based on the current animation pose and the pose change amount corresponding to the basic torso pose, determine the target torso pose for the virtual character.

[0118] (II) Perform inverse kinematics processing on the basic arm pose based on the pose data to obtain the target arm pose for the arm part of the virtual character;

[0119] (III) Determine the target posture based on the target torso posture and the target arm posture.

[0120] The basic arm posture is the fundamental arm position in a common static state. The upper arm is nearly perpendicular to the body, the elbow is slightly bent, the forearm is parallel to the ground, the wrist is in a neutral position, and the palm is slightly bent inward or flat. This posture provides a relatively neutral and relaxed arm position; however, the specific arm posture will vary depending on the task, movement requirements, and personal habits.

[0121] In this embodiment of the disclosure, by decomposing the basic model pose into a basic torso pose and a basic arm pose, it is possible to control the pose of each part of the virtual character and determine the final target pose. This allows for independent processing of pose changes in different parts, ensuring that the target torso pose is natural while coordinating with the arm pose, thus improving the realism and naturalness of the virtual character's pose.

[0122] In some possible embodiments, the pose data includes hand pose data. When performing inverse kinematic processing on the basic arm pose based on the pose data to obtain a target arm pose for the arm part of the virtual character, the following (a) to (b) may be included:

[0123] (a) Determine the head coordinate offset of the target torso pose relative to the current animation pose;

[0124] (b) Based on the hand pose data and the head coordinate offset, the basic arm pose is subjected to inverse kinematics processing to obtain the target arm pose.

[0125] Head coordinate offset is calculated by studying changes in head position. This requires using sensors or cameras to acquire head position data in the current animation pose and the target torso pose. By comparing the head position information in these two poses, the head coordinate offset between the two poses can be calculated. This offset can be a combination of translation (movement of the head position in space) or rotation (change in the direction or angle of the head). Head coordinate offset plays a crucial role in calculating the target arm pose of a virtual character.

[0126] In this embodiment, by comprehensively considering head coordinate offset and hand pose data, the state of the virtual character's arm joints and the target arm pose can be determined more accurately. This helps improve the overall naturalness of the pose, thus making the virtual character's movements more realistic and natural.

[0127] The following is combined Figure 5 The posture transformation process in the embodiments of this disclosure will be described.

[0128] See Figure 5 As shown, the basic model pose of the virtual character is first obtained, and the basic torso pose in the basic model pose is processed by IK to obtain the first pose. Then, the pose change amount of the virtual character is determined based on the basic model pose and the first pose. Next, the current animation pose of the virtual character is obtained, and the target pose is finally determined based on the pose change amount and the current animation pose. The target pose includes the target torso pose and the target arm pose, where the target arm pose is obtained by processing the hand pose data using IK. In this way, through the calculation of pose change amount and pose superposition, the virtual character can achieve relatively natural and smooth movement performance. This method improves the naturalness of the virtual character's animation pose.

[0129] Reference Figure 6 The diagram shown is a schematic of a virtual character control device 600 provided in an embodiment of this disclosure. The device includes:

[0130] Scene display module 601: used to display a virtual scene, which includes virtual characters;

[0131] Pose determination module 602: used to acquire pose data corresponding to the virtual character, and perform inverse kinematics processing on the basic model pose of the virtual character based on the pose data to determine the first pose of the virtual character;

[0132] Pose processing module 603: used to determine the amount of pose change for the virtual character based on the first pose and the pose of the base model;

[0133] Character control module 604: used to obtain the current animation pose of the virtual character, determine the target pose for the virtual character based on the current animation pose and the pose change amount, and control the virtual character to display according to the target pose.

[0134] In one possible implementation, the base model pose includes a base torso pose, and the pose data is pose data in local space; the pose determination module 602 is specifically used for:

[0135] Convert the pose data in the local spatial coordinate system into pose data in the model space;

[0136] The basic torso pose is subjected to inverse kinematic processing based on the pose data in the model space to obtain the first pose.

[0137] In one possible implementation, the base model pose includes a base torso pose, and the pose processing module 603 is specifically used for:

[0138] Based on the posture data of the first posture and the posture data of the basic torso posture, the change in posture data for the basic torso posture of the virtual character is determined, and the change in posture data is used as the change in posture data.

[0139] In one possible implementation, the posture determination module 602 is specifically used for:

[0140] Obtain head pose data and hand pose data corresponding to the virtual character.

[0141] In one possible implementation, the basic model pose includes a basic torso pose and a basic arm pose; the character control module 604 is specifically used for:

[0142] Based on the current animation pose and the pose change amount corresponding to the basic torso pose, the target torso pose for the virtual character is determined.

[0143] Based on the pose data, the basic arm pose is subjected to inverse kinematic processing to obtain the target arm pose for the arm part of the virtual character.

[0144] The target posture is determined based on the target torso posture and the target arm posture.

[0145] In one possible implementation, the pose data includes hand pose data, and the character control module 604 is specifically used for:

[0146] Determine the head coordinate offset of the target torso pose relative to the current animation pose;

[0147] Based on the hand pose data and the head coordinate offset, the basic arm pose is subjected to inverse kinematics processing to obtain the target arm pose.

[0148] In one possible implementation, the role control module 604 is specifically used for:

[0149] The target pose is converted to a local spatial coordinate system, and the virtual character located in the local spatial coordinate system is displayed based on the target pose in the local spatial coordinate system.

[0150] Based on the same technical concept, this disclosure also provides an electronic device. (See also...) Figure 7 The diagram shown is a structural schematic of an electronic device 700 provided in an embodiment of this disclosure, including a processor 701, a memory 702, and a bus 703. The memory 702 is used to store execution instructions and includes a main memory 7021 and an external memory 7022. The main memory 7021, also called internal memory, is used to temporarily store computational data in the processor 701, as well as data exchanged with external memory 7022 such as a hard disk. The processor 701 exchanges data with the external memory 7022 through the main memory 7021.

[0151] In this embodiment, the memory 702 is specifically used to store application code that executes the solution of this application, and its execution is controlled by the processor 701. That is, when the electronic device 700 is running, the processor 701 communicates with the memory 702 through the bus 703, so that the processor 701 executes the application code stored in the memory 702, and then executes the method described in any of the foregoing embodiments.

[0152] The memory 702 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.

[0153] Processor 701 may be an integrated circuit chip with signal processing capabilities. The aforementioned processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this invention. The general-purpose processor can be a microprocessor or any conventional processor.

[0154] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 700. In other embodiments of this application, the electronic device 700 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0155] This disclosure also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the virtual character control method described in the above method embodiments. The storage medium can be a volatile or non-volatile computer-readable storage medium.

[0156] This disclosure also provides a computer program product carrying program code. The program code includes requests that can be used to execute the steps of the virtual character control method described in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.

[0157] The aforementioned computer program product can be implemented through hardware, software, or a combination thereof. In one optional embodiment, the computer program product is specifically embodied in a computer storage medium; in another optional embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.

[0158] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this disclosure, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.

[0159] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple model units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0160] In addition, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0161] If the aforementioned functions are implemented as software functional units and sold or referenced as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several requests to cause a computer device (which may be a personal computer, server, or model device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0162] Finally, it should be noted that the above-described embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.

Claims

1. A method for controlling a virtual character, characterized in that, include: Display a virtual scene, which includes virtual characters; Acquire pose data corresponding to the virtual character, and perform inverse kinematics processing on the basic model pose of the virtual character based on the pose data to determine the first pose of the virtual character; Based on the first pose and the pose of the base model, determine the amount of pose change for the virtual character; The current animation pose of the virtual character is obtained, and based on the current animation pose and the amount of pose change, a target pose for the virtual character is determined, and the virtual character is controlled to display according to the target pose.

2. The method for controlling a virtual character according to claim 1, characterized in that, The basic model pose includes the basic torso pose, and the pose data is pose data in local space. The step of performing inverse kinematic processing on the basic model pose of the virtual character based on the pose data to determine the first pose of the virtual character includes: Convert the pose data in the local spatial coordinate system into pose data in the model space; The basic torso pose is subjected to inverse kinematic processing based on the pose data in the model space to obtain the first pose.

3. The method for controlling a virtual character according to claim 1, characterized in that, The base model pose includes a base torso pose. Determining the pose variation for the virtual character based on the first pose and the base model pose includes: Based on the posture data of the first posture and the posture data of the basic torso posture, the change in posture data for the basic torso posture of the virtual character is determined, and the change in posture data is used as the posture change.

4. The method for controlling a virtual character according to claim 1, characterized in that, The step of obtaining the pose data corresponding to the virtual character includes: Obtain head pose data and hand pose data corresponding to the virtual character.

5. The method for controlling a virtual character according to any one of claims 1-4, characterized in that, The basic model poses include basic torso poses and basic arm poses; Determining the target pose for the virtual character based on the current animation pose and the pose change amount includes: Based on the current animation pose and the pose change amount corresponding to the basic torso pose, the target torso pose for the virtual character is determined. Based on the pose data, the basic arm pose is subjected to inverse kinematic processing to obtain the target arm pose for the arm part of the virtual character. The target posture is determined based on the target torso posture and the target arm posture.

6. The method for controlling a virtual character according to claim 5, characterized in that, The pose data includes hand pose data. The step of performing inverse kinematic processing on the basic arm pose based on the pose data to obtain the target arm pose for the virtual character includes: Determine the head coordinate offset of the target torso pose relative to the current animation pose; Based on the hand pose data and the head coordinate offset, the basic arm pose is subjected to inverse kinematics processing to obtain the target arm pose.

7. The method for controlling a virtual character according to claim 1, characterized in that, Controlling the virtual character to display according to the target pose includes: The target pose is converted to a local spatial coordinate system, and the virtual character located in the local spatial coordinate system is displayed based on the target pose in the local spatial coordinate system.

8. A control device for a virtual character, characterized in that, include: Scene display module: used to display virtual scenes, which include virtual characters; Pose determination module: used to acquire pose data corresponding to the virtual character, and perform inverse kinematics processing on the basic model pose of the virtual character based on the pose data to determine the first pose of the virtual character; Pose processing module: used to determine the amount of pose change for the virtual character based on the first pose and the pose of the base model; Character control module: used to obtain the current animation pose of the virtual character, determine the target pose for the virtual character based on the current animation pose and the pose change amount, and control the virtual character to display according to the target pose.

9. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, they perform the steps of the virtual character control method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the virtual character control method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Bone posture computing method, figure virtualization model driving method and storage medium

    CN108876815A

  • Virtual object display device

    JP2012128779A