Method, device, storage medium and electronic device for controlling virtual character skeleton
By determining the target parts and bones associated with game actions in virtual characters, using the muscle morphology changes of game actions to obtain the direction of bone movement, and controlling bone displacement and rotation, the problems of high cost, poor versatility and poor effect in the existing technology are solved, and high-quality game animation effects are achieved.
Patent Information
- Application Number
- CN202111660786.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2041-12-30
AI Technical Summary
The existing technology is costly, poorly versatile and poorly effective when simulating the muscle effect of virtual characters, and fails to effectively solve the need for improving game animation quality.
Through game actions performed by virtual characters, the target part and its corresponding multiple bones are determined, the muscle morphology changes corresponding to the game actions are used to obtain the bone movement direction, and the displacement and/or rotation of the bones are controlled according to the movement direction, and the muscle morphology is adjusted to achieve the target effect.
It realizes the simulation of virtual character muscle effects through general skeleton skinning, improves the game animation quality and player game experience, and solves the problems of high cost, poor versatility and poor effect.
Smart Images

Figure CN114419211B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method, device, storage medium and electronic device for controlling a virtual character skeleton. Background Art
[0002] In computer game production, it is usually necessary to control the skeleton of the virtual character to perform animation design and effect realization of the virtual character. In the traditional method of making virtual characters in games, the model contains basic skeletons (for example, the arm skeleton only contains the upper arm skeleton and the lower arm skeleton) and basic animation, and it is impossible to simulate the muscle animation effect of the virtual character. In recent years, with the development of computer technology and the improvement of user aesthetic needs, the requirements for the fineness of virtual character animation effects have gradually increased. In this regard, technicians in this field continue to try various methods of simulating virtual character muscle effects.
[0003] In the related schemes, there are two main methods for simulating the muscle effects of virtual characters:
[0004] (1) By carving a model, multiple shapes of the virtual character are produced, and then the corresponding shapes are driven according to the rotation angle of the virtual character's skeleton to achieve a realistic muscle effect. The disadvantages of this method are that the effect depends on the fineness of the model carving, the production cost is high, and the flexibility is poor.
[0005] (2) Use muscle plug-ins to create corresponding muscles at the bone joints, so as to achieve the effect of muscle deformation with bone animation. The disadvantage of this method is that muscle plug-ins have poor versatility and are difficult to apply to actual game production scenarios.
[0006] Therefore, how to simulate the muscle effect of virtual characters to improve the quality of game animation has become an important issue in current game production. In view of the above problems, no effective solution has been proposed yet.
[0007] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0008] The embodiments of the present invention provide a method, device, storage medium and electronic device for controlling the skeleton of a virtual character, so as to at least solve the technical problems of high cost, poor versatility and poor effect of the method for simulating the muscle effect of a virtual character in the related art.
[0009] According to one aspect of an embodiment of the present invention, a method for controlling a virtual character skeleton is provided, comprising:
[0010] Based on the game action performed by the virtual character, a target part of the virtual character associated with the game action and multiple bones corresponding to the target part are determined, wherein the multiple bones are used to simulate the muscle morphology change of the target part; the movement direction of each bone of the multiple bones is obtained by using the muscle morphology change corresponding to the game action; the displacement and / or rotation of the multiple bones are controlled according to the movement direction, and the initial muscle morphology of the target part is adjusted to the target muscle morphology.
[0011] Optionally, the above method for controlling the skeleton of a virtual character also includes: creating multiple skeletons, wherein the multiple skeletons include: a main skeleton and multiple sub-skeletons; setting multiple controllers for the multiple skeletons; selecting a main controller from the multiple controllers, and setting the remaining controllers of the multiple controllers except the main controller as multiple sub-controllers, wherein the main controller is used to control the main skeleton, and the multiple sub-controllers are used to control the multiple sub-skeletons.
[0012] Optionally, creating multiple skeletons includes: dividing the whole body muscle groups corresponding to the virtual character into multiple muscle groups; determining a target muscle group corresponding to the target part from the multiple muscle groups; and creating multiple skeletons based on the target muscle group.
[0013] Optionally, the above method for controlling the skeleton of a virtual character also includes: loading a main controller as a driver, and loading multiple sub-controllers as driven ones, wherein the driver is used to generate drive control on the driven one by sending a drive control command to the driven one, and the driven one is used to respond to the drive control command and perform operations corresponding to the drive control; and attribute links are made between the attributes of the driver and the attributes of the driven one to determine that the main controller drives and controls the multiple sub-controllers.
[0014] Optionally, linking the attributes of the driver with the attributes of the driven includes: when a trigger condition that the attribute value of each of the multiple controllers is an initial value is met, linking the attributes of the driver with the attributes of the driven.
[0015] Optionally, utilizing muscle morphology changes corresponding to game actions to obtain the movement direction of each bone in multiple skeletons includes: utilizing muscle morphology changes corresponding to game actions to determine a first movement direction of a main controller, wherein the first movement direction is used to determine the movement direction of the main skeleton; based on the first movement direction, determining second movement directions of multiple sub-controllers, wherein the second movement direction is used to determine the movement directions of multiple sub-skeletons.
[0016] Optionally, controlling the displacement and / or rotation of multiple bones according to the movement direction and adjusting the initial muscle morphology of the target part to the target muscle morphology includes: obtaining the initial muscle morphology, wherein the initial muscle morphology is the muscle morphology of the target part before the virtual character performs the game action in the game scene; controlling the displacement and / or rotation of the main skeleton according to the first movement direction, and controlling the displacement and / or rotation of multiple sub-bones according to the second movement direction to determine the target muscle morphology, wherein the target muscle morphology is the muscle morphology of the target part after the virtual character performs the game action in the game scene; adjusting the initial muscle morphology to the target muscle morphology.
[0017] Optionally, the muscle volume corresponding to the initial muscle morphology is the same as the muscle volume corresponding to the target muscle morphology.
[0018] According to another aspect of an embodiment of the present invention, a device for controlling the skeleton of a virtual character is also provided, including: a determination module, for determining, based on the game action performed by the virtual character, a target part of the virtual character associated with the game action and a plurality of bones corresponding to the target part, wherein the plurality of bones are used to simulate the muscle morphological changes of the target part; an acquisition module, for obtaining the movement direction of each of the plurality of bones by using the muscle morphological changes corresponding to the game action; and a control module, for controlling the displacement and / or rotation of the plurality of bones according to the movement direction, and adjusting the initial muscle morphology of the target part to the target muscle morphology.
[0019] Optionally, the device for controlling the skeleton of a virtual character also includes: a creation module for creating multiple skeletons, wherein the multiple skeletons include: a main skeleton and multiple sub-skeletons; setting multiple controllers for the multiple skeletons; selecting a main controller from the multiple controllers, and setting the remaining controllers of the multiple controllers except the main controller as multiple sub-controllers, wherein the main controller is used to control the main skeleton, and the multiple sub-controllers are used to control the multiple sub-skeletons.
[0020] Optionally, the creation module is also used to: divide the whole body muscle groups corresponding to the virtual character into multiple muscle groups; determine the target muscle group corresponding to the target part from the multiple muscle groups; and create multiple skeletons based on the target muscle group.
[0021] Optionally, the device for controlling the skeleton of a virtual character also includes: a loading module, used to load the main controller as a driver, and load multiple sub-controllers as driven ones, wherein the driver is used to generate drive control on the driven one by sending a drive control command to the driven one, and the driven one is used to respond to the drive control command and perform operations corresponding to the drive control; attribute links are made between the attributes of the driver and the attributes of the driven one to determine that the main controller drives and controls the multiple sub-controllers.
[0022] Optionally, the loading module is further used to: when a trigger condition that the attribute value of each controller in the multiple controllers is an initial value is met, to link the attributes of the driver with the attributes of the driven.
[0023] Optionally, the acquisition module is also used to: determine the first movement direction of the main controller by using the muscle morphology changes corresponding to the game actions, wherein the first movement direction is used to determine the movement direction of the main skeleton; based on the first movement direction, determine the second movement directions of multiple sub-controllers, wherein the second movement direction is used to determine the movement directions of multiple sub-skeletons.
[0024] Optionally, the control module is also used to: obtain an initial muscle morphology, wherein the initial muscle morphology is the muscle morphology of a target part before the virtual character performs a game action in a game scene; control the displacement and / or rotation of a main skeleton in a first motion direction, and control the displacement and / or rotation of multiple sub-bones in a second motion direction to determine a target muscle morphology, wherein the target muscle morphology is the muscle morphology of a target part after the virtual character performs a game action in the game scene; and adjust the initial muscle morphology to the target muscle morphology.
[0025] Optionally, in the device for controlling the skeleton of a virtual character, the muscle volume corresponding to the initial muscle morphology is the same as the muscle volume corresponding to the target muscle morphology.
[0026] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute any of the above methods for controlling a virtual character skeleton when running.
[0027] According to another aspect of an embodiment of the present invention, an electronic device is provided, comprising: a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute any of the above methods for controlling a virtual character skeleton.
[0028] In at least some embodiments of the present invention, a method is adopted to determine a target part associated with a game action in a virtual character and a plurality of bones corresponding to the target part based on a game action performed by a virtual character, wherein the plurality of bones are used to simulate muscle morphological changes of the target part, and the movement direction of each bone in the plurality of bones is obtained by utilizing the muscle morphological changes corresponding to the game action, and the displacement and / or rotation of the plurality of bones are controlled according to the movement direction, so that the initial muscle morphology of the target part is adjusted to the target muscle morphology, thereby achieving the purpose of simulating the muscle effect of the virtual character through a general bone skinning method, thereby realizing the technical effect of displaying the muscle effect of the virtual character to improve the quality of game animation and the game experience of the player, and further solving the technical problems of high cost, poor versatility and poor effect of the method for simulating the muscle effect of the virtual character in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0030] Figure 1 It is a hardware structure block diagram of a mobile terminal of a method for controlling a virtual character skeleton according to an embodiment of the present invention;
[0031] Figure 2 is a flow chart of a method for controlling a virtual character skeleton according to an embodiment of the present invention;
[0032] Figure 3 is a schematic diagram of an optional virtual human body model according to an embodiment of the present invention;
[0033] Figure 4 is a schematic diagram of an optional virtual human muscle morphology analysis according to an embodiment of the present invention;
[0034] Figure 5 is a schematic diagram of a partial result of creating a virtual human skeleton according to an optional embodiment of the present invention;
[0035] Figure 6 is a schematic diagram of an optional virtual skeleton structure of the triceps brachii of a virtual character according to an embodiment of the present invention;
[0036] Figure 7 is a schematic diagram of an optional change in the morphology of the triceps brachii of a virtual character according to an embodiment of the present invention;
[0037] Figure 8 is a schematic diagram of an optional change in the pectoral muscle morphology of a virtual character according to an embodiment of the present invention;
[0038] Fig. 9 is a schematic diagram of an optional change in the shape of abdominal muscles of a virtual character according to an embodiment of the present invention;
[0039] Fig.10 is a structural block diagram of a device for controlling a virtual character skeleton according to an embodiment of the present invention;
[0040] Fig.11 is a structural block diagram of another device for controlling a virtual character skeleton according to an embodiment of the present invention;
[0041] Fig.12 4 is a structural block diagram of another device for controlling a skeleton of a virtual character according to an embodiment of the present invention. DETAILED DESCRIPTION
[0042] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0043] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0044] According to one embodiment of the present invention, an embodiment of a method for controlling the skeleton of a virtual character is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0045] In one embodiment of the present invention, the method for controlling the skeleton of a virtual character can be run on a terminal device or a server. The terminal device can be a local terminal device. When the method for controlling the skeleton of a virtual character is run on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.
[0046] In an optional embodiment, various cloud applications can be run under the cloud interaction system, such as cloud games. Taking cloud games as an example, cloud games refer to a game mode based on cloud computing. In the operation mode of cloud games, the operating body of the game program and the main body of the game screen presentation are separated. The storage and operation of the method of controlling the skeleton of the virtual character are completed on the cloud game server. The role of the client device is used for receiving and sending data and presenting the game screen. For example, the client device can be a display device with data transmission function close to the user side, such as a mobile terminal, a TV, a computer, a handheld computer, etc.; but the terminal device for information processing is a cloud game server in the cloud. When playing the game, the player operates the client device to send an operation instruction to the cloud game server. The cloud game server runs the game according to the operation instruction, encodes and compresses the game screen and other data, and returns it to the client device through the network. Finally, the client device decodes and outputs the game screen.
[0047] In an optional embodiment, the terminal device may be a local terminal device. Taking a game as an example, the local terminal device stores a game program and is used to present a game screen. The local terminal device is used to interact with the player through a graphical user interface, that is, the game program is downloaded and installed by an electronic device and run conventionally. The local terminal device may provide the graphical user interface to the player in a variety of ways, for example, it may be rendered and displayed on a display screen of the terminal, or provided to the player through a holographic projection. For example, the local terminal device may include a display screen and a processor, the display screen is used to present a graphical user interface, the graphical user interface includes a game screen, and the processor is used to run the game, generate a graphical user interface, and control the display of the graphical user interface on the display screen.
[0048] In a possible implementation, an embodiment of the present invention provides a method for controlling a virtual character skeleton by providing a graphical user interface through a terminal device, wherein the terminal device may be the local terminal device mentioned above or the client device in the cloud interaction system mentioned above.
[0049] Taking a mobile terminal running in a local terminal device as an example, the mobile terminal can be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, referred to as MID), a PAD, a game console, and other terminal devices. Figure 1 1 is a hardware structure block diagram of a mobile terminal of a method for controlling a virtual character skeleton according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1Only one is shown in the figure) processor 102 (processor 102 may include but is not limited to a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microprocessor (MCU), a programmable logic device (FPGA), a neural network processor (NPU), a tensor processor (TPU), an artificial intelligence (AI) type processor, etc.) and a memory 104 for storing data. Optionally, the mobile terminal may also include a transmission device 106 for communication functions, an input and output device 108, and a display device 110. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0050] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for controlling the skeleton of a virtual character in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, realizes the above-mentioned method for controlling the skeleton of a virtual character. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0051] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0052] The inputs in the input / output device 108 may come from a plurality of human interface devices (HIDs), such as keyboards and mice, game controllers, and other dedicated game controllers (such as steering wheels, fishing rods, dance mats, remote controls, etc.). In addition to providing input functions, some human interface devices may also provide output functions, such as force feedback and vibration of game controllers, audio output of controllers, etc.
[0053] The display device 110 may be, for example, a head-up display (HUD), a touch-screen liquid crystal display (LCD), and a touch display (also referred to as a "touch screen" or "touch display screen"). The liquid crystal display may enable a user to interact with a user interface of the mobile terminal. In some embodiments, the mobile terminal has a graphical user interface (GUI), and a user may interact with the GUI by finger contacts and / or gestures on a touch-sensitive surface, wherein the human-computer interaction functions here may optionally include the following interactions: creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, sending and receiving emails, call interfaces, playing digital videos, playing digital music, and / or web browsing, etc. The executable instructions for executing the above-mentioned human-computer interaction functions are configured / stored in a computer program product or a readable storage medium executable by one or more processors.
[0054] In this embodiment, a method for controlling a virtual character skeleton running on the mobile terminal is provided. Figure 2 is a flow chart of a method for controlling a virtual character skeleton according to an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:
[0055] Step S21, based on the game action performed by the virtual character, determining a target part of the virtual character associated with the game action and a plurality of bones corresponding to the target part, wherein the plurality of bones are used to simulate changes in muscle morphology of the target part;
[0056] The virtual character can be a virtual human model in a virtual game scene. To enhance virtual reality, during the production of the game, a technician can create the virtual human model based on the human skeletal muscle structure in a real scene. The virtual human model can include a plurality of virtual skeletons (skeletons for short), which correspond to a plurality of human body parts of the virtual human model.
[0057] The game actions may be a variety of actions performed by the virtual characters in different types of virtual game scenes, such as shooting actions of virtual characters in gunfight games, jumping actions of virtual characters in competitive sports games, etc.
[0058] According to the game action performed by the virtual character, the target part associated with the game action can be determined in the virtual character. For example, the part associated with the shooting action of the virtual character is the arm, and the part associated with the jumping action of the virtual character is the legs, buttocks, etc.
[0059] The above-mentioned muscle morphology change may be caused by the shape change of the muscle due to the above-mentioned target part performing the game action. For example, when the arm moves from a straight state to a bent state, the arm muscle is squeezed and deformed due to the bending of the elbow. The above-mentioned multiple bones can be used to simulate the muscle morphology change corresponding to the target part. According to the game action performed by the above-mentioned virtual character, the multiple bones corresponding to the target part associated with the game action can also be determined in the virtual character.
[0060] Step S22, using the muscle morphology change corresponding to the game action to obtain the movement direction of each bone in the multiple bones;
[0061] In a virtual game scene, a game action may correspond to a muscle morphology change. Based on the muscle morphology change corresponding to the game action, the movement direction of each of the above-mentioned multiple skeletons may be obtained. Among them, the multiple skeletons may simulate the muscle morphology change of the above-mentioned target part through the movement of the skeleton.
[0062] Step S23, controlling the displacement and / or rotation of multiple bones according to the movement direction, and adjusting the initial muscle morphology of the target part to the target muscle morphology.
[0063] The above movement direction is the movement direction of each of the multiple skeletons, and according to the movement direction, each of the multiple skeletons can be controlled to perform at least one of a displacement action and a rotation action. Furthermore, the initial muscle morphology of the above target part can be adjusted to the target muscle morphology.
[0064] In at least some embodiments of the present invention, a method is adopted to determine a target part associated with a game action in a virtual character and a plurality of bones corresponding to the target part based on a game action performed by a virtual character, wherein the plurality of bones are used to simulate muscle morphological changes of the target part, and the movement direction of each bone in the plurality of bones is obtained by utilizing the muscle morphological changes corresponding to the game action, and the displacement and / or rotation of the plurality of bones are controlled according to the movement direction, so that the initial muscle morphology of the target part is adjusted to the target muscle morphology, thereby achieving the purpose of simulating the muscle effect of the virtual character through a general bone skinning method, thereby realizing the technical effect of displaying the muscle effect of the virtual character to improve the quality of game animation and the game experience of the player, and further solving the technical problems of high cost, poor versatility and poor effect of the method for simulating the muscle effect of the virtual character in the related art.
[0065] Optionally, the method for controlling the skeleton of a virtual character may further include the following execution steps:
[0066] Step S24, creating multiple skeletons, wherein the multiple skeletons include: a main skeleton and multiple sub-skeletons;
[0067] Step S25, setting multiple controllers for multiple skeletons;
[0068] Step S26, selecting a main controller from the multiple controllers, and setting the remaining controllers except the main controller in the multiple controllers as multiple sub-controllers, wherein the main controller is used to control the main skeleton, and the multiple sub-controllers are used to control the multiple sub-skeletons.
[0069] The above-mentioned multiple skeletons may include a main skeleton and multiple sub-skeletons. When creating the multiple skeletons, the human body structure in real scenes may be referred to. Corresponding multiple controllers may be set for the multiple skeletons, and a main controller may be selected from the multiple controllers, and the main controller may be used to control the main skeleton. The remaining multiple controllers in the multiple controllers except the main controller are set as sub-controllers, and the sub-controllers may be used to control the multiple sub-skeletons.
[0070] Optionally, in step S24, creating multiple skeletons may include the following execution steps:
[0071] Step S241, dividing the whole body muscle groups corresponding to the virtual character into multiple muscle groups;
[0072] Step S242, determining a target muscle group corresponding to the target part from the multiple muscle groups;
[0073] Step S243, creating multiple bones based on the target muscle group.
[0074] The virtual character may be a virtual human model in a virtual game scene. The whole body muscle groups corresponding to the virtual character may be divided into the above-mentioned multiple muscle groups. For example, the multiple muscle groups may include: arm muscle groups, leg muscle groups, back muscle groups, chest muscle groups, abdominal muscle groups, etc.
[0075] The target part is a part of the virtual character associated with the game action. According to the target part, the target muscle group can be determined from the multiple muscle groups. For example, if the part associated with the shooting action of the virtual character is the arms, the arm muscle group is determined as the target muscle group from the whole body muscle group.
[0076] The multiple skeletons are created based on the target muscle group, so the target muscle group can be controlled by controlling each of the multiple skeletons, that is, the muscle morphology of the target part is changed. The multiple skeletons may include a main skeleton and multiple sub-skeletons.
[0077] For example, when creating a virtual character model taking muscle effects into consideration in a game scene, the method provided in this embodiment can be used. Figure 3 is a schematic diagram of an optional virtual human body model according to an embodiment of the present invention, such as Figure 3 As shown, referring to the distribution of multiple muscle groups of the human body in the real scene, the virtual character model can be divided into multiple corresponding skinning areas. It is also possible to refer to the distribution of multiple muscle groups of the human body to create multiple corresponding main skeletons for the virtual character model. In this way, the correct skinning can be ensured and the animation effect after skinning can be improved.
[0078] Further, Figure 4 is a schematic diagram of an optional virtual human muscle morphology analysis according to an embodiment of the present invention, such as Figure 4 As shown, when the virtual character performs a certain action, the muscle group corresponding to the action can undergo a corresponding morphological change. The muscle morphological change is specifically manifested as the displacement or rotation of multiple muscles in the muscle group in corresponding directions.
[0079] Further, Figure 5 is a schematic diagram of a partial result of creating a virtual human skeleton according to an optional embodiment of the present invention, such as Figure 5 As shown (only the virtual human skeleton creation results of the right arm, right chest, abdomen and right thigh are shown in the figure), according to the multiple muscles of each muscle group in the above-mentioned multiple muscle groups, multiple sub-bones corresponding to each muscle group can be created, and the main skeleton corresponding to the muscle group and the multiple sub-bones are in a parent-child relationship. Furthermore, corresponding multiple controllers can be created for the multiple bones (including the main skeleton and multiple sub-bones) corresponding to each muscle group, and the multiple controllers are used to control the multiple bones to simulate the morphological changes of the muscle group.
[0080] For another example, when simulating the muscle effect of a virtual character A, the method provided in this embodiment can be used. Virtual character A is a virtual character in a shooting game. By default, the virtual character A is in a stationary standing state. When the virtual character A performs a shooting action (equivalent to the above-mentioned game action), it is necessary to bend the arm to complete the action. At this time, it can be determined that the arm part of the virtual character A (equivalent to the above-mentioned target part) is associated with the shooting action. Because when the arm is bent, the upper arm muscle group and the forearm muscle group of the virtual character A will deform with the movement of the bones. Therefore, for the multiple muscles in the upper arm muscle group and the forearm muscle group, the corresponding muscle effects can be simulated using the method provided in this embodiment.
[0081] Taking the triceps brachii in the arm muscle of the virtual character A as an example, four bones (equivalent to the multiple bones corresponding to the target parts) can be created to simulate the morphological changes of the triceps brachii when performing the shooting action. Specifically, the four bones include a main bone and three sub-bones, the main bone is used to simulate the overall movement direction of the triceps brachii of the virtual character A, and the three sub-bones are used to simulate the morphological changes and movement directions of multiple muscle parts in the triceps brachii of the virtual character A.
[0082] Optionally, the method for controlling the skeleton of a virtual character may further include the following execution steps:
[0083] Step S27, loading the main controller as a driver, and loading the plurality of sub-controllers as driven ones, wherein the driver is used to generate drive control on the driven ones by sending drive control commands to the driven ones, and the driven ones are used to respond to the drive control commands and perform operations corresponding to the drive control;
[0084] Step S28: linking the attributes of the driver with the attributes of the driven to determine that the main controller drives and controls the multiple sub-controllers.
[0085] The above-mentioned main controller is used to control the main skeleton, and the main controller is loaded as the above-mentioned driver. The above-mentioned multiple sub-controllers are used to control multiple sub-skeletons, and the main controller is loaded as the above-mentioned driven. At this time, the main controller can send the above-mentioned drive control command to the multiple sub-controllers to generate drive control for the multiple sub-controllers, that is, the main controller can drive the multiple sub-controllers to move, rotate, etc. In addition, the sub-controllers can respond to the drive control command issued by the main controller and perform corresponding operations (i.e., movement, rotation, etc.).
[0086] In order to ensure that the driving relationship corresponds accurately, an attribute link may be established between the attributes of the driver and the corresponding attributes of the driven, and the attribute link is used to determine that the main controller drives and controls the multiple sub-controllers.
[0087] Still taking the simulation of the triceps muscle morphology change in the upper arm muscle of a virtual character A as an example, Figure 6 FIG. 4 is a schematic diagram of an optional virtual skeleton structure of the triceps brachii of a virtual character according to an embodiment of the present invention. Figure 6 As shown, the main skeleton of the triceps brachii corresponds to a main controller C1. For the shooting action in the shooting game, the movement direction of the upper arm of the virtual character A can be determined, and then the main movement direction of the triceps brachii as a whole can be controlled by the main controller C1. For example, when the virtual character raises his arm, the main controller C1 controls the triceps brachii to move upward as a whole.
[0088] Still like Figure 6As shown, the three sub-bones of the triceps brachii correspond to three sub-controllers Z1, Z2, and Z3 respectively. For shooting actions in shooting games, the movement directions of multiple muscle parts in the triceps brachii can be analyzed according to the shape of the triceps brachii of the virtual character A, that is, the movement directions corresponding to the three sub-controllers can be determined.
[0089] It should be noted that the main controller C1 can be determined as the driver, and the three sub-controllers Z1, Z2, and Z3 can be determined as the driven objects corresponding to the main controller C1. And attribute links are made between the attributes of the main controller C1 and the attributes of the three sub-controllers Z1, Z2, and Z3. That is, the driving control relationship between the main controller C1 and the three sub-controllers Z1, Z2, and Z3 can be determined.
[0090] By establishing the above attribute link, the driving control relationship between the triceps main bone of the virtual character A and the triceps sub-bone can be determined, and then the overall movement and local deformation of the triceps caused by the upper arm movement in the real scene can be simulated. The above method can achieve the effect of improving the accuracy of the virtual model and the quality of the game animation through the general bone skinning method by creating a virtual bone to simulate the muscle effect, which has practical significance for the application in the game production scene.
[0091] Optionally, in step S28, linking the attributes of the driver with the attributes of the driven may include: when a trigger condition that the attribute value of each controller in the plurality of controllers is an initial value is met, linking the attributes of the driver with the attributes of the driven.
[0092] Optionally, the attribute value of each controller in the above-mentioned multiple controllers is an initial value, which can be used as a trigger condition for the above-mentioned attribute linking. For example, assuming that the initial value is 0, when the attribute values of all controllers in the multiple controllers are 0, an attribute link is performed between the attribute of the main controller and the corresponding multiple sub-controller attributes.
[0093] Optionally, the trigger condition may also be: the attribute value of each controller in the plurality of controllers satisfies any preset condition. Here, the trigger condition only needs to ensure that the attribute of the driver and the attribute of the driven are correctly linked. The example of the trigger condition is only a preferred solution.
[0094] Optionally, in step S22, using the muscle morphology change corresponding to the game action to obtain the movement direction of each bone in the multiple bones may include the following execution steps:
[0095] Step S221, determining a first movement direction of the main controller by using the muscle morphology change corresponding to the game action, wherein the first movement direction is used to determine the movement direction of the main skeleton;
[0096] Step S222: Determine the second movement directions of the multiple sub-controllers based on the first movement direction, wherein the second movement direction is used to determine the movement directions of the multiple sub-skeletons.
[0097] In a virtual game scene, a game action may correspond to a muscle morphology change. Based on the muscle morphology change, a first movement direction of the main controller may be determined. The main controller is used to control the main skeleton, and the first movement direction is used to determine the movement direction of the main skeleton. That is, according to the muscle morphology change corresponding to the game action, the movement direction of the main skeleton used to simulate the muscle morphology change may be determined.
[0098] According to the first movement direction, the second movement direction of the plurality of sub-controllers can be determined. The plurality of sub-controllers are used to control the plurality of sub-bones, and the second movement direction is used to determine the movement direction of the plurality of sub-bones. That is, according to the movement direction of the main skeleton, the movement directions of the plurality of sub-bones used to simulate muscle morphology changes can be determined.
[0099] Still taking the simulation of the triceps muscle morphology change in the upper arm muscle of a virtual character A as an example, Figure 7 1 is a schematic diagram of an optional virtual character's triceps brachii morphology change according to an embodiment of the present invention. By default, the distribution of the four controllers of the triceps brachii is shown in sub-figure (1).
[0100] like Figure 7 As shown in the middle figure (2), when the triceps brachii is driven to shake backward by the recoil of the shooting, the two sides of the triceps brachii are pulled and squeezed inward (equivalent to the muscle morphology changes corresponding to the above-mentioned game actions). From this, it can be determined that the movement direction of the main controller C1 is backward (equivalent to the above-mentioned first movement direction). Further, it can be determined that among the three sub-controllers Z1, Z2, and Z3: the sub-controller Z1 in the middle position moves backward with the main controller; the sub-controllers Z2 and Z3 on the two sides move inward (equivalent to the above-mentioned second movement direction). Conversely, when the triceps brachii is squeezed forward, the two sides of the triceps brachii are squeezed outward, thereby determining the corresponding movement directions of the above-mentioned four controllers (not shown in the figure).
[0101] Optionally, in step S23, controlling the displacement and / or rotation of multiple bones according to the movement direction to adjust the initial muscle shape of the target part to the target muscle shape may include the following execution steps:
[0102] Step S231, obtaining an initial muscle morphology, wherein the initial muscle morphology is the muscle morphology of the target part before the virtual character performs a game action in the game scene;
[0103] Step S232, controlling the displacement and / or rotation of the main skeleton according to the first movement direction, and controlling the displacement and / or rotation of the plurality of sub-skeletons according to the second movement direction, to determine a target muscle morphology, wherein the target muscle morphology is the muscle morphology of the target part after the virtual character performs a game action in the game scene;
[0104] Step S233, adjusting the initial muscle shape to the target muscle shape.
[0105] The target part is the part of the virtual character associated with the game action. The initial muscle morphology may be the muscle morphology of the target part before the virtual character performs the game action in the game scene. The target muscle morphology may be the muscle morphology of the target part after the virtual character performs the game action in the game scene.
[0106] The above-mentioned multiple skeletons are used to simulate the muscle morphological changes of the above-mentioned target parts, and the multiple skeletons include: a main skeleton and multiple sub-skeletons. The above-mentioned first movement direction can be the movement direction of the main skeleton, and according to the first movement direction, the main skeleton can be controlled to perform at least one of a displacement action and a rotation action. The above-mentioned second movement direction can be the movement direction of the multiple sub-skeletons, and according to the second movement direction, the multiple sub-skeletons can be controlled to perform at least one of a displacement action and a rotation action.
[0107] By controlling the above-mentioned multiple skeletons to perform corresponding displacement and / or rotation movements, the above-mentioned target muscle morphology can be determined. By adjusting the initial muscle morphology of the target part of the virtual character in the game scene to the target muscle morphology, the corresponding muscle effect can be achieved when the virtual character performs the game action, thereby improving the quality of game animation production.
[0108] For example, when simulating the changes in the pectoral muscle morphology of a virtual character B, the method provided in this embodiment may be used. Figure 8 is a schematic diagram of an optional change in the pectoral muscle morphology of a virtual character according to an embodiment of the present invention, such as Figure 8 As shown in the sub-diagram (1), when the virtual character B is in the default state (standing still, without performing any game action), the control point of the main controller C2 corresponding to the pectoral muscle is located at the center position, and the three sub-controllers Y1, Y2, and Y3 corresponding to the pectoral muscle are in the initial position.
[0109] like Figure 8As shown in the middle sub-figure (2), when the virtual character performs a backward movement, the chest muscles are lifted up. The control point of the main controller C2 moves upward (equivalent to the first movement direction mentioned above), and the main skeleton corresponding to the chest muscle is displaced upward. The sub-controller Y1 in the middle position follows the main controller C2 to control the corresponding sub-skeleton to move upward. The sub-controller Y2 in the upper position controls the corresponding sub-skeleton to rotate outward, and the sub-controller Y3 in the lower position controls the corresponding sub-skeleton to rotate inward. At this time, the chest muscles of the virtual character B are adjusted to the upward shape shown in the figure (equivalent to the above-mentioned target muscle shape).
[0110] like Figure 8 As shown in the middle sub-figure (3), when the virtual character performs a leaning action, the pectoral muscles are compressed. The control point of the main controller C2 moves downward (equivalent to the first movement direction mentioned above), and the main skeleton corresponding to the pectoral muscle is displaced downward. The sub-controller Y1 in the middle position follows the main controller C2 to control the corresponding sub-skeleton to move downward. The sub-controller Y2 in the upper position controls the corresponding sub-skeleton to rotate inward, and the sub-controller Y3 in the lower position controls the corresponding sub-skeleton to rotate outward. At this time, the pectoral muscles of the virtual character B are adjusted to the downward compression shape shown in the figure (equivalent to the above-mentioned target muscle shape).
[0111] Optionally, the above method for controlling the skeleton of a virtual character may further include: the muscle volume corresponding to the initial muscle morphology is the same as the muscle volume corresponding to the target muscle morphology.
[0112] In real life, when the human body performs an action, the muscles will be squeezed and deformed due to the movement of the bones, but in this process, the volume of the muscles remains unchanged. Based on the changing rules of human muscles in real life, when controlling the changes in the muscle morphology of the target part of the virtual character, it should be ensured that the muscle volume corresponding to the above initial muscle morphology is the same as the muscle volume corresponding to the above target muscle morphology.
[0113] For example, when simulating the changes in the abdominal muscle morphology of a virtual character E, the method provided in this embodiment may be used. Fig. 9 is a schematic diagram of an optional change in the abdominal muscle shape of a virtual character according to an embodiment of the present invention, such as Fig. 9 As shown, the main skeleton of the abdominal muscles corresponds to one main controller C3, and the four sub-bones of the abdominal muscles correspond to four sub-controllers X1, X2, X3, and X4. When the main controller C3 is determined to move upward by the game action, the corresponding main skeleton of the abdominal muscles moves upward. At this time, in order to ensure that the volume of the abdominal muscles remains unchanged, the four sub-controllers X1, X2, X3, and X4 respectively control the corresponding distances of the upward displacement of the four sub-bones of the abdominal muscles.
[0114] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0115] In this embodiment, a device for controlling the skeleton of a virtual character is also provided, and the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0116] Fig.10 is a structural block diagram of a device for controlling a virtual character skeleton according to an embodiment of the present invention. Fig.10 As shown, the device includes: a determination module 1001, which is used to determine, based on the game action performed by the virtual character, a target part associated with the game action in the virtual character and a plurality of bones corresponding to the target part, wherein the plurality of bones are used to simulate the muscle morphological changes of the target part; an acquisition module 1002, which is used to obtain the movement direction of each bone in the plurality of bones by using the muscle morphological changes corresponding to the game action; and a control module 1003, which is used to control the displacement and / or rotation of the plurality of bones according to the movement direction, and adjust the initial muscle morphology of the target part to the target muscle morphology.
[0117] Optionally, Fig.11 is a structural block diagram of another device for controlling a virtual character skeleton according to an embodiment of the present invention. Fig.11 As shown, the device includes Fig.10 In addition to all the modules shown, it also includes: a creation module 1004, which is used to create multiple skeletons, wherein the multiple skeletons include: a main skeleton and multiple sub-skeletons; multiple controllers are set for the multiple skeletons; a main controller is selected from the multiple controllers, and the remaining controllers of the multiple controllers except the main controller are set as multiple sub-controllers, wherein the main controller is used to control the main skeleton, and the multiple sub-controllers are used to control the multiple sub-skeletons.
[0118] Optionally, the creation module 1004 is further used to: divide the whole body muscle groups corresponding to the virtual character into multiple muscle groups; determine the target muscle group corresponding to the target part from the multiple muscle groups; and create multiple skeletons based on the target muscle group.
[0119] Optionally, Fig.12 is a structural block diagram of another device for controlling a virtual character skeleton according to an embodiment of the present invention. Fig.12 As shown, the device includes Fig.11 In addition to all the modules shown, it also includes: a loading module 1005, which is used to load the main controller as a driver and load multiple sub-controllers as driven ones, wherein the driver is used to generate drive control on the driven one by sending a drive control command to the driven one, and the driven one is used to respond to the drive control command and perform operations corresponding to the drive control; attribute links are made between the attributes of the driver and the attributes of the driven one to determine that the main controller drives and controls the multiple sub-controllers.
[0120] Optionally, the loading module 1005 is further used to: when a trigger condition that the attribute value of each of the multiple controllers is an initial value is met, perform attribute linking between the attribute of the driver and the attribute of the driven.
[0121] Optionally, the above-mentioned acquisition module 1002 is also used to: determine the first movement direction of the main controller by utilizing the muscle morphology changes corresponding to the game actions, wherein the first movement direction is used to determine the movement direction of the main skeleton; based on the first movement direction, determine the second movement directions of multiple sub-controllers, wherein the second movement direction is used to determine the movement directions of multiple sub-skeletons.
[0122] Optionally, the above-mentioned control module 1003 is also used to: obtain an initial muscle morphology, wherein the initial muscle morphology is the muscle morphology of a target part before the virtual character performs a game action in a game scene; control the displacement and / or rotation of a main skeleton according to a first movement direction, and control the displacement and / or rotation of multiple sub-bones according to a second movement direction to determine a target muscle morphology, wherein the target muscle morphology is the muscle morphology of a target part after the virtual character performs a game action in the game scene; and adjust the initial muscle morphology to the target muscle morphology.
[0123] Optionally, in the device for controlling the skeleton of a virtual character, the muscle volume corresponding to the initial muscle morphology is the same as the muscle volume corresponding to the target muscle morphology.
[0124] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0125] In this embodiment, a computer-readable storage medium is further provided, in which a computer program is stored. The computer program is configured to execute the steps of any of the above method embodiments when running.
[0126] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0127] S1, based on a game action performed by the virtual character, determining a target part of the virtual character associated with the game action and a plurality of bones corresponding to the target part, wherein the plurality of bones are used to simulate changes in muscle morphology of the target part;
[0128] S2, using the muscle morphology changes corresponding to the game actions to obtain the movement direction of each bone in the multiple bones;
[0129] S3, controlling the displacement and / or rotation of multiple bones according to the movement direction, and adjusting the initial muscle morphology of the target part to the target muscle morphology.
[0130] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0131] In this embodiment, an electronic device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0132] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0133] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0134] S1, based on a game action performed by the virtual character, determining a target part of the virtual character associated with the game action and a plurality of bones corresponding to the target part, wherein the plurality of bones are used to simulate changes in muscle morphology of the target part;
[0135] S2, using the muscle morphology changes corresponding to the game actions to obtain the movement direction of each bone in the multiple bones;
[0136] S3, controlling the displacement and / or rotation of multiple bones according to the movement direction, and adjusting the initial muscle morphology of the target part to the target muscle morphology.
[0137] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0138] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0139] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0140] In the several embodiments provided by the present invention, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0141] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0142] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0143] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0144] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for controlling a virtual character skeleton, characterized in that: The method comprises: Based on a game action performed by a virtual character, a target part of the virtual character associated with the game action and a plurality of bones corresponding to the target part are determined, wherein the plurality of bones are used to simulate changes in muscle morphology of the target part, and the plurality of bones include: a main skeleton and a plurality of sub-skeletons, and a main controller corresponding to the main skeleton is used to drive and control a plurality of sub-controllers corresponding to the plurality of sub-skeletons; Determine a first movement direction of the main controller by using the muscle morphology change corresponding to the game action, wherein the first movement direction is used to determine the movement direction of the main skeleton; Based on the first movement direction, determining the second movement directions of the multiple sub-controllers, wherein the second movement direction is used to determine the movement directions of the multiple sub-skeletons; The displacement and / or rotation of the plurality of bones are controlled according to the first movement direction and the second movement direction, and the initial muscle morphology of the target part is adjusted to the target muscle morphology.
2. The method according to claim 1, characterized in that: The method further comprises: creating the plurality of bones; Setting a plurality of controllers for the plurality of bones; A main controller is selected from the multiple controllers, and the remaining controllers of the multiple controllers except the main controller are set as multiple sub-controllers, wherein the main controller is used to control the main skeleton, and the multiple sub-controllers are used to control the multiple sub-skeletons.
3. The method according to claim 2, characterized in that Creating the plurality of bones includes: Dividing the whole body muscle groups corresponding to the virtual character into multiple muscle groups; Determining a target muscle group corresponding to the target part from the multiple muscle groups; The plurality of bones are created based on the target muscle group.
4. The method according to claim 2, characterized in that: The method further comprises: The main controller is loaded as a driver, and the plurality of sub-controllers are loaded as driven devices, wherein the driver is used to generate drive control on the driven devices by sending drive control commands to the driven devices, and the driven devices are used to respond to the drive control commands and perform operations corresponding to the drive control; Attribute links are made between the attributes of the driver and the attributes of the driven to determine that the main controller drives and controls the plurality of sub-controllers.
5. The method according to claim 4, characterized in that The attribute linking between the attribute of the driver and the attribute of the driven includes: When a trigger condition that the attribute value of each of the plurality of controllers is an initial value is met, an attribute link is performed between the attribute of the driver and the attribute of the driven.
6. The method according to claim 1, characterized in that Controlling the displacement and / or rotation of the plurality of bones according to the first movement direction and the second movement direction to adjust the initial muscle shape of the target part to the target muscle shape includes: Acquire the initial muscle morphology, wherein the initial muscle morphology is the muscle morphology of the target part before the virtual character performs the game action in the game scene; Control the displacement and / or rotation of the main skeleton according to the first movement direction, and control the displacement and / or rotation of the plurality of sub-skeletons according to the second movement direction, to determine the target muscle morphology, wherein the target muscle morphology is the muscle morphology of the target part after the virtual character performs the game action in the game scene; The initial muscle shape is adjusted to the target muscle shape.
7. The method according to claim 6, characterized in that The muscle volume corresponding to the initial muscle morphology is the same as the muscle volume corresponding to the target muscle morphology.
8. A device for controlling a virtual character skeleton, characterized in that: The device comprises: A determination module, used for determining, based on a game action performed by a virtual character, a target part of the virtual character associated with the game action and a plurality of bones corresponding to the target part, wherein the plurality of bones are used to simulate changes in muscle morphology of the target part, and the plurality of bones include: a main skeleton and a plurality of sub-skeletons, and a main controller corresponding to the main skeleton is used to drive and control a plurality of sub-controllers corresponding to the plurality of sub-skeletons; An acquisition module, configured to determine a first movement direction of the main controller by using the muscle morphology change corresponding to the game action, wherein the first movement direction is used to determine the movement direction of the main skeleton; based on the first movement direction, determine a second movement direction of the plurality of sub-controllers, wherein the second movement direction is used to determine the movement directions of the plurality of sub-skeletons; A control module is used to control the displacement and / or rotation of the multiple bones according to the first movement direction and the second movement direction, and adjust the initial muscle shape of the target part to the target muscle shape.
9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method for controlling the skeleton of a virtual character as described in any one of claims 1 to 7 when running.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the method for controlling the skeleton of a virtual character as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Motion simulation method and device for virtual character in game and electronic equipment
CN111402372A