Virtual character switching method, device, terminal device, and computer program
By replacing attribute data without changing the controller, the method achieves seamless transitions between virtual character styles, addressing the issue of uneven transitions in existing character switching methods.
Patent Information
- Application Number
- JP2025525589
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-06
- Filing Date
- 2024-01-12
- Publication Date
- 2025-11-12
AI Technical Summary
Existing methods for switching virtual characters in games involve reinitializing and reloading the entire data of the new character, leading to uneven transitions and an unsmooth switching process.
The method involves replacing the attribute data of a virtual character without changing the controller, allowing seamless transitions by using the same controller before and after the switch, through processes that include acquiring and replacing skeletal, model, and animation data.
This approach enables seamless switching between different styles of virtual characters by maintaining control consistency, eliminating the need for creating a new controller and reloading data, thus improving the switching experience.
Smart Images

Figure 2025536997000001_ABST
Abstract
Description
[Technical Field]
[0001] This application claims priority from a Chinese patent application bearing application number 2023102521981, filed on March 6, 2023, and entitled "Method, device, terminal device and storage medium for switching virtual characters," the entire contents of which are incorporated herein by reference.
[0002] FIELD OF THE INVENTION The present invention relates to the field of computer technology, and more particularly to a method, device, terminal device and storage medium for switching virtual characters. [Background technology]
[0003] During the execution of a game, a player often needs to switch between controlled virtual characters, switching from a currently controlled virtual character to another virtual character.
[0004] In the related art, switching between virtual characters corresponds to reinitializing and loading a new virtual character, i.e., it is necessary to load the data of the new virtual character, create a new controller, and control the newly created virtual character with this new controller.
[0005] However, the above switching process causes the virtual characters to not switch smoothly. Summary of the Invention
[0006] The embodiments of the present invention provide a method, device, terminal device and storage medium for switching virtual characters. The technical solutions of the embodiments of the present invention are as follows.
[0007] In one aspect of an embodiment of the present invention, there is provided a method for switching a virtual character, executed by a terminal device, the method including: a step of displaying a virtual character in a first style established based on first attribute data, wherein an action of the virtual character in the first style is controlled by a first controller, and the first attribute data is used to define the first style of the virtual character; a step of acquiring second attribute data in response to a switching operation during the process of displaying the virtual character in the first style, wherein the second attribute data is used to define a second style of the virtual character, and the second style is different from the first style; a step of replacing the first attribute data with the second attribute data; and a step of switching the virtual character in the first style to a virtual character in the second style established based on the second attribute data, wherein the action of the virtual character in the second style is controlled by the first controller.
[0008] In one aspect of an embodiment of the present invention, there is provided a virtual character switching device including: a display module that displays a virtual character in a first style established based on first attribute data, wherein movement of the virtual character in the first style is controlled by a first controller, and the first attribute data is used to define the first style of the virtual character; an acquisition module that acquires second attribute data in response to a switching operation during the process of displaying the virtual character in the first style, wherein the second attribute data is used to define a second style of the virtual character, and the second style is different from the first style; a replacement module that replaces the first attribute data with the second attribute data; and a switching module that switches the virtual character in the first style to a virtual character in the second style established based on the second attribute data, and wherein movement of the virtual character in the second style is controlled by the first controller.
[0009] In one aspect of an embodiment of the present invention, there is provided a terminal device including a processor and a memory in which a computer program is stored, the computer program being loaded and executed by the processor to realize the above-described method for switching virtual characters.
[0010] One aspect of an embodiment of the present invention provides a computer-readable storage medium having a computer program stored therein, the computer program being loaded and executed by a processor to implement the above-described method for switching virtual characters.
[0011] In one aspect of an embodiment of the present invention, there is provided a computer program product including a computer program, the computer program being loaded and executed by a processor to realize the above-described method for switching virtual characters.
[0012] The technology according to the embodiment of the present invention can provide the following advantageous effects.
[0013] By replacing the attribute data of the virtual character without changing the virtual character's controller, a virtual character in a first style can be switched to a virtual character in a second style. Related art requires creating a new controller, reloading the entire data of the virtual character in the second style, and replacing the entire data of the virtual character in the first style, resulting in an uneven transition during the switching process. In contrast, in an embodiment of the present invention, the virtual character is still controlled by the same controller before and after the switch. Since the control system remains unchanged except for the change in the style of the virtual character, the step of replacing the entire control system can be omitted. Therefore, the switching of the style of the virtual character can be achieved while avoiding the uneven transition of the character, achieving a seamless transition between different styles of the virtual character and improving the switching effect. [Brief explanation of the drawings]
[0014] [Figure 1] 1 is a schematic diagram of an implementation environment of a scheme according to one embodiment of the present invention; [Figure 2] 1 is a flowchart of a method for switching virtual characters according to one embodiment of the present invention. [Figure 3] FIG. 2 is a schematic diagram of a user interface for a user to switch virtual characters according to one embodiment of the present invention. [Figure 4]FIG. 10 is a diagram illustrating the effect of replacing skeleton data and model data according to one embodiment of the present invention. [Figure 5] FIG. 10 is a schematic diagram of a virtual character after switching in accordance with one embodiment of the present invention. [Figure 6] 10 is a flowchart of obtaining second attribute data according to one embodiment of the present invention. [Figure 7] FIG. 10 is a schematic diagram of the acquisition of second dedicated skeletal data according to one embodiment of the present invention. [Figure 8] FIG. 1 is a schematic diagram of a client's model data replacement according to one embodiment of the present invention. [Figure 9] FIG. 2 is a schematic diagram of replacing client attribute data according to one embodiment of the present invention. [Figure 10] 1 is a block diagram of a virtual character switching device according to one embodiment of the present invention; [Figure 11] FIG. 2 is a block diagram of a configuration of a terminal device according to one embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0015] In order to make the objectives, technical means and advantages of the present invention clearer, the following embodiments of the present invention will be described in more detail with reference to the drawings.
[0016] 1 is a schematic diagram of an implementation environment of a scheme according to one embodiment of the present invention, which can implement a virtual character switching system, and may include a terminal device 10 and a server 20.
[0017] The number of terminal devices 10 may be one or more. The terminal device 10 may be an electronic device such as a mobile phone, a tablet computer, a game console, an e-book reader, a multimedia playback device, a wearable device, a PC (Personal Computer), or an in-vehicle terminal. A client of a target application program (e.g., a game application program or an XR (Extended Reality) application program) may be installed in the terminal device 10. In some embodiments, the target application program may be an application program that needs to be downloaded and installed, or may be a click-to-play application program, but embodiments of the present invention are not limited thereto.
[0018] In some embodiments of the present invention, the target application program may be a game application program, such as a shooting application program, a racing application program, or a multiplayer online tactical competitive game, but the present invention is not limited thereto. In some embodiments, the game application program may provide a virtual environment in which a virtual character controlled or manipulated by a user can perform actions such as walking, jumping, crawling, and fighting. The virtual environment is an environment displayed (or provided) when the application program is running on a terminal device. The form or shape of the provided virtual character and the corresponding functions may vary depending on the application program and may be designed according to actual needs, but the present invention is not limited thereto. In some embodiments, a client of the application program runs in the terminal device 10. In some embodiments, the application program is an application program developed based on a three-dimensional virtual environment engine, such as UE4 (Unreal Engine 4) or Unity Engine. The virtual environment engine can create a three-dimensional virtual environment, virtual characters, virtual items, etc., to provide a more immersive gaming experience for the user.
[0019] Here, the virtual environment refers to a scene created for a virtual character to perform an action (e.g., a game competition), such as a virtual building, a virtual island, or a virtual map. It may be a simulation world of the real world, a semi-simulation and semi-fictional three-dimensional world, or a purely fictional three-dimensional world. The virtual environment may be any of a two-dimensional virtual environment, a two-and-a-half-dimensional virtual environment, and a three-dimensional virtual environment.
[0020] A virtual character refers to a movable object in a virtual environment controlled by a client's controller, and may be at least one of a virtual person, a virtual animal, and an animated cartoon character. In some embodiments, when the virtual environment is a three-dimensional virtual environment, the virtual characters may be three-dimensional virtual models, each having its own shape and volume in the three-dimensional virtual environment and occupying a portion of space in the three-dimensional virtual environment. In some embodiments, the virtual characters are three-dimensional characters constructed based on three-dimensional human skeleton technology, and the virtual characters achieve different appearances by wearing different skins. In some embodiments, the virtual characters may be implemented using 2.5-dimensional or two-dimensional models, although embodiments of the present invention are not limited thereto. For example, if the target application program is a game application program, the virtual characters are game characters controlled by a user account in the game application program. The virtual characters may be in the form of a person, an animal, an animated cartoon, or other forms, although embodiments of the present invention are not limited thereto.
[0021] The server 20 provides background services for clients of a target application program installed and running on the terminal device 10. For example, the server 20 may be a background server for the above-mentioned game application program. The server 20 may be a single server, a server cluster consisting of multiple servers, or a cloud computing service center. In some embodiments, the server 20 simultaneously provides background services for target application programs in multiple terminal devices 10. The terminal device 10 and the server 20 can communicate with each other via a network.
[0022] In an embodiment of the present invention, a client's controller can control a virtual character to perform various actions or movements in a virtual environment. When it is necessary to switch the display style of a virtual character controlled by a user, for example, to switch the virtual character's clothing, appearance, or identity, the virtual character can be switched from a virtual character displayed in a first style to a virtual character displayed in a second style by triggering a switch button. Furthermore, by controlling the virtual character before and after the switch with the same controller while switching the display style of the virtual character, the problem of an unsmooth transition during the virtual character switching process does not occur.
[0023] FIG. 2 is a flowchart of a method for switching virtual characters according to one embodiment of the present invention. The execution entity of each step of the method may be a terminal device 10 in the implementation environment of the scheme shown in FIG. 1, for example, the execution entity of each step may be a client of a target application program. In the following embodiment of the method, for the sake of convenience, the execution entity of each step will be simply described as a "client." The method may include at least one of the following steps 210 to 240.
[0024] Step 210: Display a virtual character in a first style constructed based on first attribute data, wherein the movement of the virtual character in the first style is controlled by a first controller, and the first attribute data is used to define the first style of the virtual character.
[0025] The first attribute data refers to each piece of feature data of a virtual character required to display the virtual character in a first style, and may be used to represent each character feature of the virtual character in the first style, including the virtual character's skeletal features, model features, animation features, etc. The first attribute data includes first skeletal data, first model data, and first animation data.
[0026] The first style refers to any style in which a virtual character is displayed in a virtual environment. Different types of virtual characters may be displayed in multiple different styles, and the same type of virtual character may also be displayed in multiple different styles. Different styles of virtual characters may be referred to as different styles of the virtual character, i.e., a first style may be referred to as a first style. The same type of virtual character may be displayed in multiple different styles depending on the virtual character's status, gender, etc. For example, a human-form virtual character is one type of virtual character, and an animal-form virtual character is another type of virtual character. Human-form virtual characters may include various categories such as male, female, warrior, doctor, and student. Animal-form virtual characters may include various categories such as tiger, lion, and antelope. A warrior-type virtual character may be displayed in various styles such as archer, swordsman, and swordsman. For an archer, different styles may be displayed by setting different clothing, hairstyles, facial expressions, etc., where various styles for the warrior category are obtained based on the human-shaped virtual character.
[0027] The first controller is a controller for a virtual character in a first style. By controlling the first controller on the client, the client can control the movement of the virtual character in the first style, for example, to control the virtual character to perform movements such as jumping, walking, turning, and fighting. In some embodiments, the first controller is used to control each skeleton of the virtual character, and controlling the skeletons achieves the purpose of controlling the movement of the virtual character. In some embodiments, the first controller is used to control each muscle of the virtual character, and controlling the muscles achieves the purpose of controlling the movement of the virtual character. Embodiments of the present invention are not limited to a specific form of the first controller. For example, in embodiments of the present invention, regardless of how the style of the virtual character changes, the same controller is always maintained, i.e., control of the movement of the virtual character in different styles is realized without changing the controller.
[0028] In some embodiments, the first attribute data includes first skeletal data, the first skeletal data is obtained by adjusting basic skeletal data based on first dedicated skeletal data, the first dedicated skeletal data is dedicated skeletal data corresponding to a first style, and the skeletal data is used to construct a body skeleton of the virtual character.
[0029] Skeleton data is used to construct the body skeleton of a virtual character, and basic skeletal data refers to basic data necessary to construct the body skeleton of a virtual character. The basic skeletal data of virtual characters of the same type but different styles is the same, while the basic skeletal data of virtual characters of different types but different styles is different. For example, the basic skeletal data of human-form virtual characters is all the same and is basic skeletal data generated based on 3D human body skeletal technology, while the basic skeletal data of human-form virtual characters is different from the basic skeletal data of animal-form virtual characters.
[0030] The first dedicated skeletal data is dedicated skeletal data when displaying a virtual character in a first style. In some embodiments, the first dedicated skeletal data may be skeletal data corresponding to the first style, used to indicate a body shape or skeleton dedicated to the virtual character of the first style. For example, the first dedicated skeletal data may include a skeletal length corresponding to the height of the virtual character of the first style, a skeletal strength of the virtual character of the first style, a skeletal thickness level of the virtual character of the first style, etc. In some embodiments, the dedicated skeletal data corresponding to virtual characters of different styles is different. In some embodiments, the server of the target application stores dedicated skeletal data corresponding to virtual characters of different styles, respectively.
[0031] The first skeletal data refers to complete skeletal data necessary to construct the body skeleton of a virtual character displayed in the first style. A virtual character constructed based on the first skeletal data has the same body shape characteristics, such as the same height, the same head circumference, the same arm length, etc.
[0032] After determining the character type to which the virtual character belongs, for example, after determining that the virtual character is a human-shaped virtual character, the basic skeletal data of the virtual character is determined to be the basic skeletal data of the human-shaped virtual character, the basic skeletal data of the human-shaped virtual character is duplicated to obtain duplicated skeletal data based on the basic skeletal data of the human-shaped virtual character, and then, based on the first dedicated skeletal data corresponding to the first style, the duplicated skeletal data is corrected and adjusted to obtain first skeletal data.
[0033] In some embodiments, the first attribute data further includes first model data, the first model data corresponding to the first style, and the model data is used to define an appearance of the virtual character.
[0034] The first model data refers to appearance data necessary to construct the appearance of the virtual character displayed in the first style, and may include data corresponding to the virtual character's hairstyle, clothing, accessories, items, and other items added to the virtual character.
[0035] In some embodiments, the first attribute data further includes first animation data, the first animation data including animation data corresponding to the first style, the animation data being used to define a movement of the virtual character.
[0036] The first animation data refers to movement data that maintains consistency and smoothness between the movement of the virtual character displayed in the first style and the movement controlled by the client via the first controller. The first animation data relates to first skeletal data and the movement state of the virtual character when switched to the first style. If the display style of the virtual character is in a jumping state when switched from another style to the first style, the first animation data is animation data relating to the jumping state obtained from the animation database corresponding to the first style. If the display style of the virtual character is in a walking state when switched from another style to the first style, the first animation data is animation data relating to the walking state obtained from the animation database corresponding to the first style.
[0037] A virtual character displayed in a first style can be constructed based on the first skeletal data, the first model data, and the first animation data, and the movement of the virtual character displayed in the first style can be controlled by controlling a first controller on the client.
[0038] Step 220: In the process of displaying the virtual character in the first style, in response to a switching operation, obtain second attribute data, which is used to define a second style of the virtual character, and the second style is different from the first style.
[0039] The second attribute data refers to each feature data of the virtual character necessary for the virtual character to be displayed in the second style, and is used to represent each character feature of the virtual character in the second style, including the virtual character's skeletal features, model features, animation features, etc. The second attribute data includes second skeletal data, second model data, and second animation data. The second style refers to any style other than the first style for displaying the virtual character in the virtual environment.
[0040] The switching operation is an operation performed by a user, and the client can generate a corresponding switching instruction according to the user's switching operation, and thus the client can obtain the second attribute data according to the switching instruction.
[0041] In some embodiments, the switching operation may be an operation in which the user triggers a shortcut key. For example, if the user controls the first controller on the client via a keyboard, the shortcut key may be the Tab key on the keyboard, or the Ctrl key plus any alphabetic or numeric key on the keyboard.
[0042] In some embodiments, the switching operation may be a user tapping a virtual character of a second style on a UI (User Interface) of a client, as shown in FIG. 3 . The user taps the UI interface to switch between different styles of virtual characters. The UI interface displays avatars 301 of virtual characters with multiple different styles. The user may perform the switching operation by tapping any avatar 301 therein. For the avatars 301 shown in FIG. 3 , the user can only select and switch between styles corresponding to the two avatars currently available. By completing corresponding task requirements, other styles of the virtual character can be unlocked, allowing the virtual character to switch between more styles.
[0043] However, in the above-described method in which a user performs a switching operation by triggering a shortcut key, it is not possible to select a desired style. Instead, the client can acquire attribute data corresponding to a style located after a pre-set first style in response to the user's operation of triggering a shortcut key. Meanwhile, in response to the user's operation of clicking a virtual character of any style on the UI interface, the client can acquire attribute data corresponding to any style. When a user wants to switch to a virtual character of a specific style, the method in which a user performs a switching operation by triggering a shortcut key requires multiple switching operations to switch to a virtual character of a specific style. Meanwhile, by triggering a virtual character of a specific style on the UI interface, switching to a virtual character of a specific style can be achieved with a single operation.
[0044] In some embodiments, in a process of controlling a virtual character to move in a first style using a first controller, second attribute data is acquired in response to a switching operation; or in a process of controlling a virtual character to fight in a first style using a first controller, second attribute data is acquired in response to a switching operation.
[0045] A battle means that a virtual character of a first style controlled by a first controller is competing or fighting with a virtual character controlled by another controller, and a movement means that a virtual character of a first style controlled by a first controller is in a state other than a battle state.
[0046] The present invention is not particularly limited in terms of the timing at which the client responds to the switching operation. For example, the timing may be while the first controller is controlling the movement of a virtual character in a first style, or while the first controller is controlling the virtual character in a first style to fight. While the first controller is controlling the virtual character in the first style to perform an arbitrary movement or action, the client may acquire second attribute data corresponding to a second style in response to a switching operation triggered by the user.
[0047] By listing that the second attribute data may be acquired in response to a switching operation while the first controller is controlling the movement and combat of a virtual character in a first style, the present invention means that the timing of the client's response to the switching operation is not limited, and that style switching may be performed while the virtual character in the first style is performing any action. Therefore, in an embodiment of the present invention, the second attribute data can be acquired in response to a switching operation while the virtual character in the first style is performing any action, thereby improving the route for acquiring the second attribute data and the efficiency of style switching.
[0048] Step 230: The second attribute data is used to replace the first attribute data.
[0049] The process of replacing first attribute data with second attribute data is realized by respectively replacing corresponding first skeletal data, first model data, and first animation data with second skeletal data, second model data, and second animation data. FIG. 4 shows the process of replacing corresponding first skeletal data and first model data with second skeletal data and second model data. This switches the virtual character's appearance from a first style to a second style. By replacing the first skeletal data with the second skeletal data, the virtual character 41 in the first style in FIG. 4 is converted into a virtual character in a transitional state. The virtual character in the transitional state has a changed body skeleton compared to the virtual character 42 in the first style. Then, by replacing the first model data with the second model data, the virtual character 42 in the transitional state in FIG. 4 is converted into a virtual character 43 in a second style. The virtual character 43 in the second style has changed appearance, such as clothing and hairstyle, compared to the virtual character in the transitional state. Then, by replacing the first model data with the second model data, the smoothness of the movement of the virtual character displayed in the second style after the replacement can be maintained as is, while the movement state of the virtual character displayed in the first style before the replacement can be matched.
[0050] In some embodiments, the second skeletal data included in the second attribute data may be the same as or different from the first skeletal data included in the first attribute data.
[0051] If the second skeletal data included in the second attribute data and the first skeletal data included in the first attribute data are the same, it means that the type of virtual character corresponding to the second skeletal data and the type of virtual character corresponding to the first skeletal data are the same, for example, both are human-shaped virtual characters. It also means that the body skeleton of the virtual character corresponding to the second skeletal data and the body skeleton of the virtual character corresponding to the first skeletal data are the same or similar, and in terms of external features, the height, arm length, skull structure, etc. of the virtual character in the second style are the same or similar to the virtual character in the first style, that is, what is generally referred to as the face, height, etc. are completely the same or similar.
[0052] If the second skeletal data included in the second attribute data is different from the first skeletal data included in the first attribute data, this may mean that the type of virtual character corresponding to the second skeletal data is the same as the type of virtual character corresponding to the first skeletal data, or that the type of virtual character corresponding to the second skeletal data is different from the type of virtual character corresponding to the first skeletal data. If the type of virtual character corresponding to the second skeletal data is the same as the type of virtual character corresponding to the first skeletal data, for example, if both are human-shaped virtual characters, the body skeleton of the virtual character corresponding to the second skeletal data is different from the body skeleton of the virtual character corresponding to the first skeletal data, and in terms of external characteristics, the height, arm length, skull structure, etc. of the virtual character in the second style are at least partially different from the virtual character in the first style, i.e., the face, height, etc. that are normally observed are different. When the type of the virtual character corresponding to the second skeletal data is different from the type of the virtual character corresponding to the first skeletal data, for example, the virtual character corresponding to the second skeletal data may be a human-like virtual character, and the virtual character corresponding to the first skeletal data may be an animal-like virtual character, in which case the body skeleton of the virtual character corresponding to the second skeletal data is different from the body skeleton of the virtual character corresponding to the first skeletal data, and they are clearly different in terms of external features.
[0053] Step 240: Switch the virtual character in the first style to a virtual character in a second style constructed based on the second attribute data, where the movement of the virtual character in the second style is controlled by the first controller.
[0054] By replacing the first attribute data with the second attribute data, the virtual character in the first style can be switched to a virtual character in the second style constructed based on the second attribute data. The switched virtual character may refer to the user interface shown in FIG. 5. The switched virtual character 51 shown in FIG. 5 is in the process of a battle, and the action state of the switched virtual character can be taken over by the action state of the virtual character in the first style.
[0055] The process of switching a virtual character in a first style to a virtual character in a second style is completed within one frame. Here, the "switching process completed within one frame" refers only to the process of replacing the first attribute data with the second attribute data, and does not include the process of acquiring the second attribute data. The client acquires the second attribute data in response to a user's switching operation, and then completes the attribute data switching within one frame, thereby realizing the process of switching a virtual character in a first style to a virtual character in a second style. Therefore, the process of switching from a virtual character in a first style to a virtual character in a second style does not involve a problem of an unsmooth or interrupted transition, and seamless switching between different styles of virtual characters can be achieved.
[0056] For the virtual character in the second style after switching, the client may still control the movement of the virtual character in the second style with the first controller. If the virtual character to be controlled does not change, the first controller only switches the display style of the virtual character, and the corresponding controller does not need to change. During the switching, the control system in which the client controls the virtual character with the first controller does not substantially change.
[0057] The technology according to the embodiment of the present invention can switch a virtual character in a first style to a virtual character in a second style by replacing the attribute data of the virtual character without changing the virtual character's controller. Related technologies require creating a new controller, reloading the entire virtual character data in the second style, and replacing the entire virtual character data in the first style, resulting in an issue of an uneven transition during the switching process. In contrast, the embodiment of the present invention allows the virtual character to be controlled by the same controller before and after the switch. Since the control system remains unchanged except for the change in the virtual character's style, the step of replacing the entire control system can be omitted. Therefore, the technology can switch the style of a virtual character while avoiding the issue of uneven character switching, achieving seamless switching between different styles of virtual characters, and improving the switching effect.
[0058] 6 is a flowchart of acquiring second attribute data according to one embodiment of the present invention. The second attribute data includes at least one of second skeleton data, second model data, and second animation data. The method may include at least one of the following steps 610 to 630.
[0059] Step 610: Obtain second dedicated skeleton data, where the second dedicated skeleton data is dedicated skeleton data corresponding to a second style, adjust the basic skeleton data based on the second dedicated skeleton data, and obtain second skeleton data, where the second attribute data includes the second skeleton data, and the second skeletal data is used to replace the first skeletal data.
[0060] The second dedicated skeletal data is skeletal data dedicated to displaying the virtual character in the second style. In some embodiments, the second dedicated skeletal data may be skeletal data corresponding to the second style, used to indicate a body shape or skeleton dedicated to the virtual character of the second style. For example, the second dedicated skeletal data may include a skeletal length corresponding to the height of the virtual character of the second style, a skeletal strength of the virtual character of the second style, a skeletal thickness level of the virtual character of the second style, etc.
[0061] The process of acquiring the second dedicated skeletal data may refer to FIG. 7. For each style of dedicated skeletal data, a character design tool may first be used to design skeletal files corresponding to virtual characters of different styles. The character design tool may be third-party design software such as MAYA software or Max software. The skeletal files corresponding to virtual characters of different styles may then be imported into a virtual engine in a certain format. The skeletal files may be stored in the virtual engine in a file format such as JSON (JavaScript Object Notation: JS Object Profile) or text format. The virtual engine may be a virtual engine such as UE4 or Unity Engine. When the client acquires the second dedicated skeletal data in response to a switching operation, the second dedicated skeletal data may be acquired by analyzing the skeletal files corresponding to the second dedicated skeletal data in the virtual engine using a virtual plugin (unreal plugin).
[0062] After determining the character type to which the virtual character belongs, i.e., after determining the basic skeletal data of the virtual character, the basic skeletal data is duplicated to obtain duplicated skeletal data based on the basic skeletal data, and then the duplicated skeletal data obtained by duplication is corrected and adjusted based on the second dedicated skeletal data corresponding to the second style to obtain second skeletal data.
[0063] By adjusting the basic skeletal data based on the second dedicated skeletal data and obtaining the second skeletal data, it is possible to avoid replacing the entire data of the virtual character of the second style in the related art, and achieve the effect of changing the body skeleton of the virtual character, which makes the operation faster and more convenient.
[0064] In some embodiments, the second skeleton data is obtained by adjusting the feature parameters of the first skeleton included in the basic skeleton data based on the feature parameters of the first skeleton included in the second dedicated skeleton data, where the feature parameters of the first skeleton are used to define at least one of the size, shape, position, and angle of the first skeleton.
[0065] The first skeleton is a characteristic skeleton possessed by a virtual character of each style and is a main factor in differentiating the virtual character of each style from virtual characters of other styles. In some embodiments, the first skeleton is at least one of the skeletons in the virtual character, such as the head skeleton, the hand skeleton, the leg skeleton, or the torso skeleton. According to the characteristic parameters of the first skeleton, the virtual character can be displayed in a specific style, and the display style of the virtual character has its specific physical characteristics. The characteristic parameters of the first skeleton included in the basic skeleton data have no particularity and simply display the virtual character in a display format in an initialized state, while the characteristic parameters of the first skeleton included in the second dedicated skeleton data can display the virtual character in a second style.
[0066] The characteristic parameters of the first skeleton are used to define at least one of the size, shape, position, and angle of the first skeleton. For example, the characteristic parameters of the first skeleton may define the length and width of the first skeleton, the shape characteristics of the first skeleton, the position of the first skeleton in all skeletons, the set angle, the set direction, etc.
[0067] The first skeletons corresponding to virtual characters of different styles are not necessarily identical. When the corresponding first skeletons are identical, the characteristic parameters of the first skeletons are not necessarily identical. At least one first skeleton characteristic parameter included in the characteristic parameters of the first skeletons corresponding to the virtual characters of each style is different from the characteristic parameters of the first skeletons corresponding to the virtual characters of the other styles. In some embodiments, the characteristic parameters of the first skeletons corresponding to the virtual characters of the second style may include only one first skeleton characteristic parameter that is different from the characteristic parameters of the first skeletons corresponding to the virtual characters of the first style.
[0068] After obtaining the duplicated skeleton data based on the basic skeleton data, the second skeleton data is obtained by adjusting and correcting the characteristic parameters of the first skeleton included in the duplicated skeleton data based on the characteristic parameters of the first skeleton included in the second dedicated skeleton data.
[0069] By making modifications to the feature parameters of the first skeleton contained in the above skeleton data, the complexity of the process of acquiring the second skeleton data can be reduced and the speed of acquiring the second skeleton data can be improved, thereby better realizing the effect of seamlessly switching character styles.
[0070] Step 620: Obtain second model data, where the second model data is model data corresponding to a second style, where the second attribute data includes the second model data, and the second model data is used to replace the first model data.
[0071] The second model data means appearance data necessary to construct the appearance of the virtual character displayed in the second style, and may include data corresponding to the virtual character's hairstyle, clothing, accessories, items, and other items added to the virtual character.
[0072] In some embodiments, each appearance resource included in the second model data is used to replace each appearance resource included in the first model data by asynchronous loading.
[0073] Asynchronous loading means that data loading is performed in response to one operation request while simultaneously loading data corresponding to another operation. For example, the hairstyle resource of a first model data may be replaced with the hairstyle resource of a second model data, and the clothing resource of the first model data may be replaced with the clothing resource of the second model data.
[0074] Note that asynchronous loading does not mean that the process of replacing the first model data with the second model data and the process of replacing the first skeletal data with the second skeletal data are asynchronous loading, but rather means that the process of replacing each appearance resource included in the first model data with each appearance resource included in the second model data is asynchronous loading. After replacing the first skeletal data with the second skeletal data, the first model data can be replaced with the second model data.
[0075] A specific manner of replacing the first model data with the second model data is to replace each appearance resource included in the first model data with each appearance resource included in the second model data, and the specific replacement process may be seen in Figure 8. After adjusting the basic skeleton data based on the second dedicated skeleton data to obtain the second skeleton data, each appearance resource included in the second model data is used to replace each corresponding appearance resource included in the first model data. For example, a body-related clothing resource included in the second model data is used to replace a body-related clothing resource included in the first model data, an item and accessory resource related to an item included in the second model data is used to replace an item and accessory resource related to an item included in the first model data, and a hair-related hairstyle resource included in the second model data is used to replace a hair-related hairstyle resource included in the first model data.
[0076] In an embodiment of the present invention, by obtaining second model data and realizing the replacement of each appearance resource through asynchronous loading, the time required to replace the first model data with the second model data can be shortened and the efficiency of data replacement can be improved, thereby better realizing the effect of seamlessly switching character styles.
[0077] Step 630: Obtain second animation data, where the second animation data is animation data corresponding to a second style, where the second attribute data includes the second animation data, and the second animation data is used to replace the first animation data.
[0078] The second animation data refers to movement data that maintains consistency and smoothness between the movement of the virtual character displayed in the second style and the movement executed by the client by controlling the first controller. The second animation data is associated with second skeletal data and the movement state of the virtual character when switching from the first style to the second style. By replacing the first animation data with the second animation data, the movement of the virtual character when switching the second skeletal data of the virtual character when switching from the first style to the second style can be compatible and matched, ensuring a smooth transition between the movement of the virtual character when displayed in the second style and the movement of the virtual character when displayed in the first style.
[0079] In some embodiments, obtaining the second animation data includes determining a first movement currently being performed by the virtual character in the first style, and selecting animation data corresponding to the first movement as the second animation data from a plurality of candidate animation data corresponding to the second style, wherein different movements correspond to different animation data.
[0080] Each style of virtual character corresponds to one animation database, and the animation database includes animation data corresponding to different actions. The different actions correspond to different animation data. In response to a switching operation, animation data corresponding to the first action is selected as the second animation data from a plurality of candidate animation data corresponding to a second style according to a first action performed by the virtual character of the first style. For example, in response to a switching operation, if the first action performed by the virtual character of the first style is a walking action, animation data corresponding to the walking action is selected as the second animation data from a plurality of candidate animation data corresponding to the second style. For example, in response to a switching operation, if the first action performed by the virtual character of the first style is a jumping action, animation data corresponding to the jumping action is selected as the second animation data from a plurality of candidate animation data corresponding to the second style. In an embodiment of the present invention, a target action refers to at least one of the different actions described above. This target action includes, but is not limited to, jumping, running, crouching, and raising a hand.
[0081] By selecting corresponding animation data as second animation data in accordance with a first action performed by a virtual character of a first style in response to a switching operation, it is possible to better ensure consistency in the actions of the virtual character when switching styles, and to improve the smoothness of the transition of actions when switching.
[0082] The step of acquiring second animation data may be performed synchronously with the step of acquiring second skeletal data and the step of acquiring second model data. Alternatively, the steps of replacing second skeletal data, replacing second model data, and replacing second animation data may be performed separately. The data acquisition and data loading process may be shown in FIG. 9. After responding to a switching operation triggered by a user, the client synchronizes with a style switching event for the character and distributes the data to each data system requiring an update. A monitoring event is associated with each system requiring data updates. When the monitoring event detects a switching event, each system performs its role and loads and replaces the corresponding data. Since the processes of loading skeletal data, model data, and animation data are performed synchronously, the processes of loading each attribute data can be realized synchronously. After acquiring the second skeletal data, second model data, and second animation data corresponding to the second style, a sequential execution method is adopted to sequentially replace each data in the first attribute data. First, the first skeletal data is replaced with the second skeletal data. After the replacement of the skeletal data is completed, the first model data is replaced with the second model data, thereby replacing appearance resources such as the body, hair, and objects, and updating the appearance expression of the virtual character. After the replacement of the model data is completed, the first animation data is replaced with the second animation data, thereby maintaining the smoothness of the movements of the virtual character displayed in the second style after the replacement and making them consistent with the movements of the virtual character displayed in the first style before the replacement. This allows the user to switch styles at any state of the virtual character, achieving seamless switching of character styles even in combat or moving states, while also satisfying the needs of different animation expressions and avoiding the problem of unsmooth character transitions in related technologies.
[0083] The following describes an embodiment of the apparatus of the present invention that can perform the embodiment of the method of the present invention. For details not disclosed in the embodiment of the apparatus of the present invention, reference may be made to the embodiment of the method of the present invention.
[0084] 10 is a block diagram of a virtual character switching device according to one embodiment of the present invention. The device has a function for implementing the above-described virtual character switching method, and the function may be implemented by hardware or by hardware executing corresponding software. The device may be the above-described terminal device or may be provided within the terminal device. As shown in FIG. 10, the device 1000 may include a display module 1010, an acquisition module 1020, a replacement module 1030, and a switching module 1040.
[0085] The display module 1010 displays the virtual character in a first style constructed based on the first attribute data, the movement of the virtual character in the first style being controlled by a first controller, and the first attribute data being used to define the first style of the virtual character.
[0086] The acquisition module 1020 acquires second attribute data in response to a switching operation during the process of displaying the virtual character in the first style, the second attribute data being used to define a second style of the virtual character, the second style being different from the first style.
[0087] The replacement module 1030 replaces the first attribute data with the second attribute data.
[0088] The switching module 1040 switches the virtual character in the first style to a virtual character in a second style constructed based on the second attribute data, and the movement of the virtual character in the second style is controlled by the first controller.
[0089] In some embodiments, the first attribute data includes first skeleton data, the first skeleton data is obtained by adjusting the basic skeleton data based on the first dedicated skeleton data, the first dedicated skeleton data is dedicated skeleton data corresponding to the first style, and the skeleton data is used to construct the body skeleton of the virtual character. The acquisition module 1020 includes the following components:
[0090] The first acquisition unit acquires second dedicated skeleton data, which is dedicated skeleton data corresponding to a second style.
[0091] The adjustment unit adjusts the basic skeletal data based on the second dedicated skeletal data to obtain second skeletal data, where the second attribute data includes the second skeletal data, and the second skeletal data is used to replace the first skeletal data.
[0092] In some embodiments, the adjustment unit adjusts the characteristic parameters of the first skeleton included in the basic skeleton data based on the characteristic parameters of the first skeleton included in the second dedicated skeleton data, and obtains the second skeleton data.
[0093] Here, the characteristic parameters of the first skeleton are used to define at least one of the size, shape, position, and angle of the first skeleton.
[0094] In some embodiments, the first attribute data includes first model data, where the first model data is model data corresponding to a first style, and the model data is used to define an appearance of the virtual character. The acquisition module 1020 includes the following components:
[0095] The second acquisition unit acquires second model data, which corresponds to a second style.
[0096] Here, the second attribute data includes second model data, and the second model data is used to replace the first model data.
[0097] In some embodiments, each appearance resource included in the second model data is used to replace each appearance resource included in the first model data by asynchronous loading.
[0098] In some embodiments, the first attribute data includes first animation data, the first animation data includes animation data corresponding to a first style, and the animation data is used to define a movement of the virtual character. The acquisition module 1020 includes the following components:
[0099] The third acquisition unit acquires second animation data, the second animation data being animation data corresponding to a second style, where the second attribute data includes the second animation data, and the second animation data is used to replace the first animation data.
[0100] In some embodiments, the third obtainment unit determines a first action currently being performed by the virtual character in the first style, and selects animation data corresponding to the first action as the second animation data from a plurality of candidate animation data corresponding to the second style, where different actions correspond to different animation data.
[0101] In some embodiments, the acquisition module 1020 acquires the second attribute data in response to a switching operation during a process of controlling a virtual character to move in a first style using the first controller, or acquires the second attribute data in response to a switching operation during a process of controlling a virtual character to fight in a first style using the first controller.
[0102] According to the technology of the embodiment of the present invention, it is possible to switch a virtual character in a first style to a virtual character in a second style by replacing the attribute data of the virtual character without changing the virtual character's controller. Related technologies require creating a new controller, reloading the entire virtual character data in the second style, and replacing the entire virtual character data in the first style, which results in an unsmooth transition during the switching process. In contrast, the embodiment of the present invention allows the virtual character to be controlled by the same controller before and after the switch. Since the control system remains unchanged except for the change in the style of the virtual character, the step of replacing the entire control system can be omitted. Therefore, it is possible to switch the style of a virtual character while avoiding the unsmooth transition problem, achieving seamless switching between different styles of virtual characters, and improving the switching effect.
[0103] It should be noted that the apparatus according to the embodiments of the present invention is exemplified only by the division of each of the above-mentioned functional blocks when realizing its functions, and in actual applications, the allocation of the above-mentioned functions may be divided into different functional blocks as necessary to realize all or part of the above-mentioned functions. It should be noted that the apparatus according to the embodiments of the present invention belongs to the same concept as the method embodiments, and for the specific realization process thereof, please refer to the method embodiments not described in this specification.
[0104] 11 is a block diagram of a configuration of a terminal device 1100 according to one embodiment of the present invention. The terminal device 1100 may be any electronic device having data calculation, processing, and storage functions. The terminal device 1100 may be used to implement the method for switching virtual characters according to the above embodiment.
[0105] Typically, the terminal device 1100 includes a processor 1101 and a memory 1102 .
[0106] The processor 1101 may include one or more processing cores, such as a 4-core processor or an 8-core processor. The processor 1101 may be implemented using at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field Programmable Gate Array), or a PLA (Programmable Logic Array). The processor 1101 may include a main processor, also referred to as a CPU (Central Processing Unit), which is a processor for processing data in a wake-up state, and a coprocessor. The coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1101 may include a GPU (Graphics Processing Unit) responsible for rendering and drawing content required for display on a display screen. In some embodiments, the processor 1101 may also include an AI processor for processing computational operations related to machine learning.
[0107] Memory 1102 may include one or more non-transitory computer-readable storage media. Memory 1102 may include high-speed random access memory as well as non-volatile memory such as one or more magnetic disk storage devices, flash memory devices, etc. The non-transitory computer-readable storage media in memory 1102 may, in some embodiments, be used to store computer programs configured to be executed by one or more processors to implement the virtual character switching methods described above.
[0108] Those skilled in the art will appreciate that the configuration shown in FIG. 11 does not define terminal device 1100, and that terminal device 1100 may include more or fewer components than shown, may combine certain components, or may employ different component arrangements.
[0109] In an exemplary embodiment, a computer-readable storage medium having a computer program stored thereon is further provided, the computer program, when executed by a processor of the terminal device, performing the above-mentioned method for switching between virtual characters. In an exemplary embodiment, the above-mentioned computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0110] In an exemplary embodiment, a computer program product is further provided, the computer program being stored on a computer-readable storage medium, wherein a processor of a terminal device reads the computer program from the computer-readable storage medium, and the processor executes the computer program to cause the terminal device to perform the method for switching virtual characters described above.
[0111] The present invention may display a prompting interface, a pop-up window, or audio prompting information to prompt the user that relevant data is currently being collected before and during collection of user-related data. Therefore, the present invention starts the execution of the relevant step of acquiring user-related data only after receiving a user confirmation operation on the prompting interface or pop-up window. Otherwise (i.e., if the user does not confirm the prompting interface or pop-up), the relevant step of acquiring user-related data is terminated, i.e., the user-related data is not acquired. The information (including, but not limited to, user device information, user personal information, etc.), data (including, but not limited to, data used for analysis, data to be stored, data to be displayed, etc.), and signals covered by the present invention are those permitted by the user or fully authorized by the parties involved, and the collection, use, and processing of the relevant data must comply with the relevant laws and regulations of the relevant countries and regions. Data related to a virtual character controlled by a client via a controller covered by the present invention is, for example, acquired with full permission.
[0112] It should be understood that the term "plurality" in this specification refers to two or more. The term "and / or" in this specification describes a relationship between related objects and indicates that three relationships may exist. For example, A and / or B can indicate that A exists alone, that A and B exist simultaneously, or that B exists alone. The character " / " generally indicates that the related objects before and after are in an "or" relationship. Furthermore, the numbering of steps described in this specification is merely an example of a possible order between steps. In some other embodiments, for example, two different numbered steps may be performed simultaneously, two different numbered steps may be performed in the reverse order to that shown, or steps may not be performed in the numbered order; the embodiments of the present invention are not limited thereto.
[0113] The above merely describes exemplary embodiments of the present invention, and does not limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention are included within the protection scope of the present invention.
Claims
1. A method for switching a virtual character executed by a terminal device, comprising: displaying a virtual character in a first style constructed based on first attribute data, wherein the movement of the virtual character in the first style is controlled by a first controller, and the first attribute data is used to define the first style of the virtual character; In the process of displaying the virtual character in the first style, acquiring second attribute data in response to a switching operation, the second attribute data being used to define a second style of the virtual character, the second style being different from the first style; replacing the first attribute data with the second attribute data; switching the virtual character in the first style to the virtual character in the second style constructed based on the second attribute data, wherein movement of the virtual character in the second style is controlled by the first controller.
2. the first attribute data includes first skeleton data, the first skeleton data is obtained by adjusting basic skeleton data based on first dedicated skeleton data, the first dedicated skeleton data is dedicated skeleton data corresponding to the first style, and the skeleton data is used to construct a body skeleton of the virtual character; The step of acquiring the second attribute data includes: acquiring second dedicated skeleton data, the second dedicated skeleton data being dedicated skeleton data corresponding to the second style; adjusting the basic skeleton data based on the second dedicated skeleton data to obtain second skeleton data; The method of claim 1 , wherein the second attribute data includes the second skeletal data, and the second skeletal data is used to replace the first skeletal data.
3. The step of adjusting the basic skeleton data based on the second dedicated skeleton data to obtain second skeleton data includes: adjusting characteristic parameters of the first skeleton included in the basic skeleton data based on characteristic parameters of the first skeleton included in the second dedicated skeleton data, and acquiring the second skeleton data; The method of claim 2 , wherein the characteristic parameters of the first skeleton are used to define at least one of a size, a shape, a position, and an angle of the first skeleton.
4. the first attribute data includes first model data, the first model data being model data corresponding to the first style, the model data being used to define an appearance of the virtual character; The step of acquiring the second attribute data includes: acquiring second model data, the second model data being model data corresponding to the second style; The method of claim 1 , wherein the second attribute data includes the second model data, and the second model data is used to replace the first model data.
5. The method of claim 4 , wherein each appearance resource included in the second model data is used to replace each appearance resource included in the first model data by asynchronous loading.
6. the first attribute data includes first animation data, the first animation data includes animation data corresponding to the first style, the animation data is used to define a movement of the virtual character; The step of acquiring the second attribute data includes: acquiring second animation data, the second animation data being animation data corresponding to the second style; The method of claim 1 , wherein the second attribute data includes the second animation data, and the second animation data is used to replace the first animation data.
7. The step of acquiring the second animation data includes: determining a first action currently being performed by a virtual character in the first style; 7. The method of claim 6, further comprising: selecting animation data corresponding to the first movement as the second animation data from a plurality of candidate animation data corresponding to the second style, wherein different movements correspond to different animation data.
8. In the process of displaying the virtual character in the first style, the step of acquiring second attribute data in response to a switching operation includes: acquiring the second attribute data in response to the switching operation in the process of controlling the virtual character to move in the first style by the first controller; or The method according to claim 1 , further comprising the step of acquiring the second attribute data in response to the switching operation during the process of controlling the virtual characters to fight in the first style using the first controller.
9. A virtual character switching device, comprising: a display module that displays a virtual character in a first style constructed based on first attribute data, wherein the movement of the virtual character in the first style is controlled by a first controller, and the first attribute data is used to define the first style of the virtual character; an acquisition module that acquires second attribute data in response to a switching operation during the process of displaying the virtual character in the first style, the second attribute data being used to define a second style of the virtual character, the second style being different from the first style; a replacement module that replaces the first attribute data with the second attribute data; a switching module that switches a virtual character in the first style to a virtual character in a second style constructed based on the second attribute data, wherein movement of the virtual character in the second style is controlled by the first controller.
10. A terminal device including a processor and a memory in which a computer program is stored, the computer program being loaded and executed by the processor to implement the method for switching virtual characters according to any one of claims 1 to 8.
11. A computer program causing a computer to execute the method for switching between virtual characters according to any one of claims 1 to 8.
Citation Information
Patent Citations
Virtual role switching method and device, electronic equipment and storage medium
CN112546638A
Game role switching method and device and electronic equipment
CN112999662A
Virtual role control method and device
CN113209614A
Virtual character control method and device, terminal and storage medium
CN113332724A
Drawing processing program, drawing processing device, and drawing processing method
JP2010110504A