Object processing method and device
By calculating and adjusting the action skeleton chain of virtual objects, the time and resource issues required to create action animations for multiple game characters are solved, and efficient action data mapping and animation creation are achieved.
Patent Information
- Application Number
- CN202411460472.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-01-24
AI Technical Summary
In game production, it takes a lot of time and labor to create a set of action animations for multiple different characters, and it also requires huge resource usage and game memory.
By determining the action data and bone chain attribute parameters of the virtual object, calculate the bone adjustment parameters, and adjust the initial motion bone chain to obtain the target motion bone chain, thereby map the movement data to different virtual objects.
Create action animations for the game characters, reduce the time and labor costs of manual production, and reduce the amount of resource usage and game memory needs.
Smart Images

Figure CN119345696A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of game technology, and in particular, to an object processing method; one or more embodiments of this specification also relate to an object processing device, a computing device, a computer-readable storage medium, and a computer program product. Background Art
[0002] In the process of game production, it is necessary to create action animations for characters in order to achieve flexible control of the characters. Currently, the action animations for characters are made manually. However, when there are many characters, if a set of action animations are made for multiple different characters, it will take a lot of time and manpower costs, and the resource usage and game memory requirements are huge. Based on this, how to efficiently create action animations for game characters has become a problem that needs to be solved urgently. Summary of the invention
[0003] In view of this, an embodiment of this specification provides an object processing method. One or more embodiments of this specification also relate to an object processing device, a computing device, a computer-readable storage medium and a computer program product to solve the technical defects existing in the prior art.
[0004] According to a first aspect of an embodiment of this specification, there is provided an object processing method, including: Determining first action data of a first virtual object, and a second virtual object corresponding to the first virtual object; Determine an object skeleton chain of the second virtual object and object skeleton chain attribute parameters of the object skeleton chain, and determine an initial action skeleton chain of the first action data and action skeleton chain attribute parameters of the initial action skeleton chain; Determine skeleton adjustment parameters based on the object skeleton chain attribute parameters and the action skeleton chain attribute parameters; Adjust the initial action skeleton chain based on the skeleton adjustment parameters to obtain a target action skeleton chain of the first action data; According to the target action skeleton chain, the first action data is mapped into second action data of the second virtual object.
[0005] According to a second aspect of an embodiment of this specification, there is provided an object processing device, including: an object determination module, configured to determine first action data of a first virtual object, and a second virtual object corresponding to the first virtual object; a skeleton chain determination module, configured to determine an object skeleton chain of the second virtual object and object skeleton chain attribute parameters of the object skeleton chain, and to determine an initial action skeleton chain of the first action data and action skeleton chain attribute parameters of the initial action skeleton chain; A parameter determination module, configured to determine a skeleton adjustment parameter based on the object skeleton chain attribute parameter and the action skeleton chain attribute parameter; A skeleton chain adjustment module is configured to adjust the initial action skeleton chain based on the skeleton adjustment parameters to obtain a target action skeleton chain of the first action data; The action mapping module is configured to map the first action data into second action data of the second virtual object according to the target action skeleton chain.
[0006] According to a third aspect of an embodiment of this specification, a computing device is provided, including: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor, the steps of the above-mentioned object processing method are implemented.
[0007] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores a computer program / instruction, and the computer program / instruction implements the steps of the above-mentioned object processing method when executed by a processor.
[0008] According to a fifth aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instruction, which implements the steps of the above-mentioned object processing method when executed by a processor.
[0009] One or more embodiments of the present specification provide an object processing method, including: determining first action data of a first virtual object and a second virtual object corresponding to the first virtual object; determining an object skeleton chain of the second virtual object and object skeleton chain attribute parameters of the object skeleton chain, and determining an initial action skeleton chain of the first action data and action skeleton chain attribute parameters of the initial action skeleton chain; determining skeleton adjustment parameters based on the object skeleton chain attribute parameters and the action skeleton chain attribute parameters; adjusting the initial action skeleton chain based on the skeleton adjustment parameters to obtain a target action skeleton chain for the first action data; and mapping the first action data to second action data of the second virtual object according to the target action skeleton chain.
[0010] Specifically, the method can use the object skeleton chain attribute parameters of the object skeleton chain and the action skeleton chain attribute parameters of the initial action skeleton chain of the first action data to calculate the skeleton adjustment parameters for the initial action skeleton chain, and use the skeleton adjustment parameters to adjust the initial action skeleton chain to obtain a target action skeleton chain that matches the object skeleton chain of the second virtual object; finally, using the target action skeleton chain, the first action data is mapped to the second action data of the second virtual object, thereby achieving efficient creation of action animations for game characters, avoiding the problem of manually producing action animations that requires a lot of time and manpower costs, and reducing resource usage and game memory requirements. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 is a flow chart of an object processing method provided by an embodiment of this specification; Figure 2 is a processing flow chart of an object processing method provided by an embodiment of this specification; Figure 3 is a schematic diagram of the structure of an object processing device provided by an embodiment of this specification; Figure 4 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION
[0012] Many specific details are described in the following description to facilitate a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of this specification, so this specification is not limited to the specific implementation disclosed below.
[0013] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0014] It should be understood that although the terms first, second, etc. may be used to describe various information in one or more embodiments of this specification, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0015] In addition, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0016] In the process of game production, action animations need to be made for characters so as to achieve flexible control of the characters. Currently, action animations for characters are made manually. However, when there are many characters, it takes a lot of time and manpower to make a set of action animations for different characters. For example, when making a game, some of the same actions will be applied to multiple different characters. If a set of actions is made for each character, the demand for resources and game memory will be huge. However, for characters with different bone structures, the same set of actions cannot be used directly. At this time, action redirection is needed to map the actions of the original bones to the current bones to achieve the function of action reuse.
[0017] The redirection technology provided in this manual is for humanoid characters, and the length, position, and structure of the bones must not deviate too much from the original action bones; in addition, the redirection technology only supports one-to-one mapping of bones, and can simply copy the original animation bones to the mapped corresponding bones. However, the redirection technology cannot realize the redirection function of complex bindings, and the bones cannot be well integrated, resulting in poor action accuracy.
[0018] Based on this, in this specification, an object processing method is provided. This specification also involves an object processing device, a computing device, a computer-readable storage medium and a computer program product, which are described in detail one by one in the following embodiments.
[0019] See also Figure 1 , Figure 1A flowchart of an object processing method provided according to an embodiment of the present specification is shown, which specifically includes the following steps.
[0020] Step 102: Determine first action data of a first virtual object and a second virtual object corresponding to the first virtual object.
[0021] Among them, the virtual object can be understood as an object virtually obtained by using computer technology; the virtual object can be a game object controlled by a game player (such as a game character, a mecha, a car, an airplane, etc.), the virtual object can be a 3D model, a 3D game model (such as an NPC, a 3D mecha), or the virtual object can be a model that moves in a virtual reality (VR) scene under the control of a game player (such as a character model, a shell, a bullet, an arrow, etc.); the first virtual object and the second virtual object can be understood as two different virtual objects.
[0022] The action data can be understood as the skeletal action data that controls the virtual object to perform specific actions. For example, the action data can be the action animation, skeletal action, etc. of the virtual object; the first action data is the action data corresponding to the first virtual object, and the second action data is the action data corresponding to the second virtual object.
[0023] Taking the application of the object processing method provided in this specification in the skeletal chain action redirection scenario as an example, the object processing method is explained. Among them, the virtual object can be a mecha model, and the action data is a skeletal animation. Based on this, considering that the mecha shapes are different, the bones used for binding are also very different; therefore, how to successfully map the skeletal animation to the corresponding target bone becomes a challenge; in response to this challenge, the object processing method provided in this specification adopts the idea of skeletal chain mapping rather than skeletal mapping, which can realize the mapping of any number of bones such as one-to-many, many-to-one, and many-to-many for skeletal animation redirection. The source bones in a skeletal chain of the first mecha model and the target bones of the second mecha model can include any number of bones, and the skeletal chains of the two are matched to adapt to the redirection between bones of different skeletal structures.
[0024] Step 104: Determine the object skeleton chain of the second virtual object and the object skeleton chain attribute parameters of the object skeleton chain, and determine the initial action skeleton chain of the first action data and the action skeleton chain attribute parameters of the initial action skeleton chain.
[0025] A bone chain can be understood as a set of interconnected virtual bone structures, which are used to simulate and control the movement of 3D models (usually character models).
[0026] The object skeleton chain can be understood as the skeleton chain of the second virtual object, and the action skeleton chain can be understood as the skeleton chain corresponding to the first action data; the skeleton chain attribute parameters include but are not limited to the skeleton chain length, the number of object bones contained in the skeleton chain, and the length of the object bones, bone rotation value, moving direction, moving position and other data; the object skeleton chain attribute parameters are the skeleton chain attribute parameters of the object skeleton chain; the action skeleton chain attribute parameters are the skeleton chain attribute parameters of the action skeleton chain.
[0027] In one or more embodiments provided in this specification, since different parts of the virtual object have different actual conditions, different mapping calculation methods need to be adopted to achieve the maximum degree of action restoration. Based on this, it is necessary to determine various types of bone chains from the bone action and the target bone according to the bone type. The specific implementation method is as follows: The step of determining the object skeleton chain of the second virtual object and the object skeleton chain attribute parameters of the object skeleton chain, and determining the initial action skeleton chain of the first action data and the action skeleton chain attribute parameters of the initial action skeleton chain includes: Determine a plurality of action skeleton subchains from the action skeleton chain of the first action data, and determine action skeleton subchain attribute parameters of each action skeleton subchain, wherein the plurality of action skeleton subchains are obtained by segmenting the action skeleton chain according to preset skeleton types; Determine the object skeleton subchain corresponding to each of the action skeleton subchains from the object skeleton chain to be processed of the second virtual object, and determine the object skeleton subchain attribute parameters of each object skeleton subchain; Using a target action skeleton subchain among the multiple action skeleton subchains as the initial action skeleton chain, and using a target action skeleton chain attribute parameter corresponding to the target action skeleton subchain as the action skeleton chain attribute parameter, wherein the target action skeleton subchain is any one or more of the multiple action skeleton subchains; The target object skeleton subchain corresponding to the target action skeleton subchain in the object skeleton subchain is used as the object skeleton chain, and the object skeleton subchain attribute parameters of the target object skeleton subchain are used as the object skeleton chain attribute parameters.
[0028] Among them, the preset bone types include but are not limited to mobile bone type (Hip), normal bone type (Normal), control bone type (Controller), accessory bone type (Slot), etc.; the mobile bone type can correspond to the bone chain of legs, feet, hip joints and other parts; the normal bone type can correspond to the bone chain of head, torso and other parts; the control bone type can correspond to the bone chain of arms, palms and other parts; the accessory bone type can correspond to the bone chain of handheld accessories (such as weapons), back accessories (such as back) and other parts.
[0029] The bone sub-chain can be understood as the bone sub-chain of the legs, feet, head, torso, arms, handheld accessories, etc.
[0030] Following the above example, this solution classifies the bone chain types, dividing the source bone chain into multiple source bone sub-chains and the target bone chain into multiple target bone sub-chains according to different types; different types of bone chains will use different mapping calculation methods to achieve the maximum degree of motion restoration; this method has good scalability, and if there are new needs in the future, the required bone types can be added; the current bone types include four categories: Hip, Normal, Controller, and Slot.
[0031] Step 106: Determine the skeleton adjustment parameters based on the object skeleton chain attribute parameters and the action skeleton chain attribute parameters.
[0032] Bone adjustment parameters can be understood as parameters for adjusting the action bone chain.
[0033] In one or more embodiments provided in this specification, determining the skeleton adjustment parameters based on the object skeleton chain attribute parameters and the action skeleton chain attribute parameters includes: Determining the length of the action skeleton chain and the action skeleton lengths of the multiple action bones included in the action skeleton chain from the action skeleton chain attribute parameters; Calculate the action bone ratio parameters of each action bone and the action bone chain according to the action bone chain length and the action bone length; Determine the object bone chain length and the object bone lengths of the multiple object bones included in the object bone chain from the object bone chain attribute parameters; Calculate the object bone ratio parameter of each object bone and the object bone chain according to the object bone chain length and the object bone length; The bone rotation ratio of each action bone is calculated according to the action bone ratio parameter and the object bone ratio parameter, and the bone rotation ratio is determined as a bone adjustment parameter.
[0034] Using the above example, during the process of redirecting the bone chain, the bones need to be rotated. The rotation of the redirected bones is not simply rotating the copied source bones, but a new rotation value calculated based on the number of bone chains, bone length, etc. to adapt to characters of different heights and shapes. The specific execution steps are: 1. Determine all source bones in a source bone chain and the bone length of each source bone; and determine the source bone chain length of the source bone chain; based on the source bone chain length and bone length, calculate the bone length of the current source bone and the source bone proportion parameter of the entire source bone chain length; 2. Determine all target bones in a target bone chain and the bone length of each target bone; and determine the target bone chain length of the target bone chain; calculate the target bone ratio parameter of the current target bone length to the entire target bone chain length based on the target bone chain length and the bone length; 3. According to the source bone ratio parameters and the target bone ratio parameters, calculate the rotation ratio of all source bones in the source bone chain.
[0035] Subsequently, the action can be accurately mapped to the target bone according to the rotation value of the corresponding position of the source bone and the calculated rotation ratio.
[0036] In one or more embodiments provided in this specification, determining the skeleton adjustment parameters based on the object skeleton chain attribute parameters and the action skeleton chain attribute parameters includes: Determining the action bone lengths of the multiple action bones included in the action bone chain from the action bone chain attribute parameters; Determining object bone lengths of a plurality of object bones included in the object bone chain from the object bone chain attribute parameters; Determine a target action bone from the multiple action bones, and determine an associated object bone corresponding to the target action bone from the multiple object bones, wherein the target action bone is any one of the multiple action bones, and the associated object bones are one or more; According to the action bone length of the target action bone and the object bone length of the associated object bone, the initial movement adjustment parameter of the target action bone is adjusted to obtain the target movement adjustment parameter, and the target movement adjustment parameter is used as the bone adjustment parameter.
[0037] Among them, the action skeleton has a corresponding action skeleton controller, and the action skeleton controller can be understood as the controller corresponding to the action skeleton.
[0038] Using the above example. During the bone chain redirection process, since the character's basic skeleton has a large number of controllers, the redirection also realizes the mapping of arbitrary lengths of different bone axes; the character can map the controller's movement data from the original bone to any axis of the target bone; the character's movement length can also be mapped from the original animation movement to any length of the target axis. The specific implementation method is: 1. Determine all source bones in a source bone chain and the bone length of each source bone; and determine all target bones in a target bone chain and the bone length of each target bone; wherein each source bone has a corresponding controller; 2. Calculate the length ratio parameter of the source bone and the target bone according to the length of the source bone and the target bone; 3. According to the length ratio parameter, the movement data of the controller of the source bone is adjusted to obtain the adjusted movement data; wherein the movement data includes the movement direction, movement length, movement speed, target position of the bone, etc.
[0039] Subsequently, the action can be accurately mapped to any axis of the target bone based on the adjusted movement data.
[0040] It should be noted that this solution also supports operations such as mapping from a single controller to multiple controllers, thereby achieving correct mapping of the controllers.
[0041] In one or more embodiments provided in this specification, determining the skeleton adjustment parameters based on the object skeleton chain attribute parameters and the action skeleton chain attribute parameters includes: Determining the length of the action skeleton chain and the action skeleton lengths of the multiple action bones included in the action skeleton chain from the action skeleton chain attribute parameters; Calculate the action bone ratio parameters of each action bone and the action bone chain according to the action bone chain length and the action bone length; Determine the length of the object's skeleton chain from the object's skeleton chain attribute parameters; Based on the action bone ratio parameter, the action bone length and the object bone chain length, a scaling parameter of each action bone is calculated, and the scaling parameter is used as the bone adjustment parameter.
[0042] Using the above example, during the process of redirecting the skeleton chain, the skeleton needs to be scaled to adapt to characters of different heights and shapes. The specific steps are: 1. Determine all source bones in a source bone chain and the bone length of each source bone; and determine the source bone chain length of the source bone chain; based on the source bone chain length and bone length, calculate the bone length of the current source bone and the source bone proportion parameter of the entire source bone chain length; 2. Determine the target bone chain length of the target bone chain; 3. Calculate the scaling ratio of each source bone based on the source bone ratio parameter, the target bone length, and the source bone chain length; The source bones can then be scaled based on the scaling ratio to accurately map the action to the target bones.
[0043] It should be noted that this solution classifies the types of bone chains, and different types will use different mapping calculation methods to achieve the maximum degree of motion restoration. Therefore, the mapping calculation methods corresponding to different types of bones are: The mapping calculation method corresponding to Hip is: displacement calculation, scaling calculation, and rotation calculation of mapping animation; The mapping calculation method corresponding to Normal is: the rotation calculation of the mapping animation; The mapping calculation method corresponding to the Controller is: displacement calculation of mapping animation; The mapping calculation method corresponding to Slot is: displacement calculation and rotation calculation of mapping animation; Among them, the displacement calculation can be understood as the calculation method of the movement adjustment parameters in the above embodiment, the rotation calculation can be understood as the calculation method of the bone rotation ratio in the above embodiment, and the scaling calculation can be understood as the calculation method of the scaling ratio parameters in the above embodiment.
[0044] Step 108: adjusting the initial action skeleton chain based on the skeleton adjustment parameters to obtain a target action skeleton chain of the first action data.
[0045] The target action skeleton chain may be understood as an adjusted skeleton chain that matches the second virtual object.
[0046] Step 110: Mapping the first action data to second action data of the second virtual object according to the target action skeleton chain.
[0047] The second action data may be understood as action data matching the second virtual object.
[0048] In one or more embodiments provided in this specification, mapping the first action data to second action data of the second virtual object according to the target action skeleton chain includes: An action curve displacement parameter corresponding to the first action data is determined, and based on the action curve displacement parameter and the target action skeleton chain, the first action data is mapped to second action data of the second virtual object.
[0049] Using the above example, due to the different heights of different characters, the feet may not touch the ground during redirection. This method uses the method of correcting the Hip bone to deal with it. When redirecting, the position of the Hip bone will be superimposed with the configured animation curve displacement (i.e., the action curve displacement parameter) to ensure the correct position of the current mecha.
[0050] The object processing method provided by one or more embodiments of the present specification can use the object skeleton chain attribute parameters of the object skeleton chain and the action skeleton chain attribute parameters of the initial action skeleton chain of the first action data to calculate the skeleton adjustment parameters for the initial action skeleton chain, and use the skeleton adjustment parameters to adjust the initial action skeleton chain to obtain a target action skeleton chain that matches the object skeleton chain of the second virtual object; finally, use the target action skeleton chain to map the first action data to the second action data of the second virtual object, thereby achieving efficient creation of action animations for game characters, avoiding the problem of manually producing action animations that requires a lot of time and manpower costs, and reducing resource usage and game memory requirements.
[0051] The following combination Figure 2 , taking the application of the object processing method provided in this specification in the skeletal chain action redirection scenario as an example, the object processing method is further described. Figure 2 A processing flow chart of an object processing method provided by an embodiment of the present specification is shown, which specifically includes the following steps.
[0052] Step 202: Determine the source skeletal action of the source mecha model and the source skeletal chain corresponding to the source skeletal action, and determine the target skeletal chain of the target mecha model.
[0053] Step 204: According to the classification of the bone chain type, multiple source bone sub-chains are determined from the source bone chain, and corresponding mapping calculation methods are determined for various types of source bone sub-chains.
[0054] Specifically, this solution classifies the types of bone chains, and different types of bones will use different mapping calculation methods to achieve the maximum degree of motion restoration. The current bone types include four categories: Hip, Normal, Controller, and Slot.
[0055] Among them, the Hip type can correspond to the skeleton chains of legs, feet, hip joints, etc.; the Normal type can correspond to the skeleton chains of the head, torso, etc.; the Controller type can correspond to the skeleton chains of arms, palms, etc.; the Slot type can correspond to the skeleton chains of handheld accessories (such as weapons) and back accessories (such as the back), etc.
[0056] The mapping calculation method corresponding to different types of bones is: The mapping calculation method corresponding to Hip is: displacement calculation, scaling calculation, and rotation calculation of mapping animation; The mapping calculation method corresponding to Normal is: the rotation calculation of the mapping animation; The mapping calculation method corresponding to the Controller is: displacement calculation of mapping animation; The mapping calculation method corresponding to Slot is: displacement calculation and rotation calculation of mapping animation; Step 206: Calculate the bone adjustment parameters of each source bone based on the mapping calculation method.
[0057] The mapping calculation provided by this solution includes three parameter calculation methods, namely: displacement calculation, scaling calculation, and rotation calculation.
[0058] Among them, for the rotation calculation, the specific processing process is as follows: In the process of redirecting the bone chain, the bones need to be rotated. The rotation of the redirected bones is not simply to rotate the copied source bones, but to calculate the new rotation value based on the number of bone chains, bone length, etc. to adapt to characters of different heights and shapes. The specific execution steps are: 1. Determine all source bones in a source bone chain and the bone length of each source bone; and determine the source bone chain length of the source bone chain; based on the source bone chain length and bone length, calculate the bone length of the current source bone and the source bone proportion parameter of the entire source bone chain length; 2. Determine all target bones in a target bone chain and the bone length of each target bone; and determine the target bone chain length of the target bone chain; calculate the target bone ratio parameter of the current target bone length to the entire target bone chain length based on the target bone chain length and the bone length; 3. According to the source bone ratio parameters and the target bone ratio parameters, calculate the rotation ratio of all source bones in the source bone chain; Among them, for displacement calculation, the specific processing process is as follows: In the process of bone chain redirection, since the character's basic skeleton has a large number of controllers, the redirection also realizes the mapping of arbitrary lengths of different axes of the bones; the character can map the controller's movement data from the original bone to any axis of the target bone; the character's movement length can also be mapped from the original animation movement to any length of the target axis. The specific implementation method is: 1. Determine all source bones in a source bone chain and the bone length of each source bone; and determine all target bones in a target bone chain and the bone length of each target bone; wherein each source bone has a corresponding controller; 2. Calculate the length ratio parameter of the source bone and the target bone according to the length of the source bone and the target bone; 3. According to the length ratio parameter, the movement data of the controller of the source bone is adjusted to obtain the adjusted movement data; wherein the movement data includes the movement direction, movement length, movement speed, target position of the bone, etc.
[0059] It should be noted that this solution also supports operations such as mapping from a single controller to multiple controllers, thereby achieving correct mapping of the controllers.
[0060] Among them, for the scaling calculation, the specific processing process is as follows: In the process of redirecting the skeleton chain, the skeleton needs to be scaled to adapt to characters of different heights and shapes. The specific steps are as follows: 1. Determine all source bones in a source bone chain and the bone length of each source bone; and determine the source bone chain length of the source bone chain; based on the source bone chain length and bone length, calculate the bone length of the current source bone and the source bone proportion parameter of the entire source bone chain length; 2. Determine the target bone chain length of the target bone chain; 3. Calculate the scaling ratio of each source bone based on the source bone scale parameter, the source bone length, and the target bone chain length.
[0061] Based on this scale, each source bone can be scaled so that the original bone can be mapped to the target bone.
[0062] Step 208: Adjust the source skeleton based on the skeleton adjustment parameters, and use the adjusted skeleton to map the skeleton action to the target mecha model.
[0063] Specifically, after obtaining the rotation ratio corresponding to the source bone, the rotation value of the corresponding position of the source bone is adjusted according to the calculated rotation ratio to obtain the adjusted source bone, and the adjusted source bone is mapped to the target bone of the target mecha model.
[0064] According to the length ratio parameter, the movement data of the controller of the source bone is adjusted, and after the adjusted movement data is obtained, the adjusted movement data is mapped from the original bone to any axis of the target bone of the target mecha model. Or After scaling each source bone based on the scaling ratio to obtain an adjusted source bone, the adjusted source bone is mapped to the target bone of the target mecha model.
[0065] It should be noted that due to the inconsistent heights of different characters, the feet may not touch the ground during redirection; this method uses the method of correcting the Hip bone to deal with it; when redirecting, the position of the Hip bone will be superimposed with the configured animation curve displacement to ensure the correct position of the current mecha.
[0066] Based on the above steps, it can be seen that through this solution, the action data of a single mecha can be applied to all mechas, reducing the workload required to create new actions. During iteration, only the actions of a single mecha need to be updated to achieve overall replacement, which facilitates the rapid iteration of game development.
[0067] Corresponding to the above method embodiment, this specification also provides an object processing device embodiment, Figure 3 FIG. 1 shows a schematic diagram of the structure of an object processing device provided by an embodiment of the present specification. Figure 3 As shown, the device comprises: The object determination module 302 is configured to determine first action data of a first virtual object and a second virtual object corresponding to the first virtual object; The skeleton chain determination module 304 is configured to determine the object skeleton chain of the second virtual object and the object skeleton chain attribute parameters of the object skeleton chain, and determine the initial action skeleton chain of the first action data and the action skeleton chain attribute parameters of the initial action skeleton chain; A parameter determination module 306 is configured to determine a skeleton adjustment parameter based on the object skeleton chain attribute parameter and the action skeleton chain attribute parameter; A skeleton chain adjustment module 308 is configured to adjust the initial action skeleton chain based on the skeleton adjustment parameters to obtain a target action skeleton chain of the first action data; The action mapping module 310 is configured to map the first action data into second action data of the second virtual object according to the target action skeleton chain.
[0068] Optionally, the parameter determination module 306 is further configured to: Determining the length of the action skeleton chain and the action skeleton lengths of the multiple action bones included in the action skeleton chain from the action skeleton chain attribute parameters; Calculate the action bone ratio parameters of each action bone and the action bone chain according to the action bone chain length and the action bone length; Determine the object bone chain length and the object bone lengths of the multiple object bones included in the object bone chain from the object bone chain attribute parameters; Calculate the object bone ratio parameter of each object bone and the object bone chain according to the object bone chain length and the object bone length; The bone rotation ratio of each action bone is calculated according to the action bone ratio parameter and the object bone ratio parameter, and the bone rotation ratio is determined as a bone adjustment parameter.
[0069] Optionally, the parameter determination module 306 is further configured to: Determining the action bone lengths of the multiple action bones included in the action bone chain from the action bone chain attribute parameters; Determining object bone lengths of a plurality of object bones included in the object bone chain from the object bone chain attribute parameters; Determine a target action bone from the multiple action bones, and determine an associated object bone corresponding to the target action bone from the multiple object bones, wherein the target action bone is any one of the multiple action bones, and the associated object bones are one or more; According to the action bone length of the target action bone and the object bone length of the associated object bone, the initial movement adjustment parameter of the target action bone is adjusted to obtain the target movement adjustment parameter, and the target movement adjustment parameter is used as the bone adjustment parameter.
[0070] Optionally, the parameter determination module 306 is further configured to: Determining the length of the action skeleton chain and the action skeleton lengths of the multiple action bones included in the action skeleton chain from the action skeleton chain attribute parameters; Calculate the action bone ratio parameters of each action bone and the action bone chain according to the action bone chain length and the action bone length; Determine the length of the object's skeleton chain from the object's skeleton chain attribute parameters; Based on the action bone ratio parameter, the action bone length and the object bone chain length, a scaling parameter of each action bone is calculated, and the scaling parameter is used as the bone adjustment parameter.
[0071] Optionally, the skeleton chain determination module 304 is further configured to: Determine a plurality of action skeleton subchains from the action skeleton chain of the first action data, and determine action skeleton subchain attribute parameters of each action skeleton subchain, wherein the plurality of action skeleton subchains are obtained by segmenting the action skeleton chain according to preset skeleton types; Determine the object skeleton subchain corresponding to each of the action skeleton subchains from the object skeleton chain to be processed of the second virtual object, and determine the object skeleton subchain attribute parameters of each object skeleton subchain; Using a target action skeleton subchain among the multiple action skeleton subchains as the initial action skeleton chain, and using a target action skeleton chain attribute parameter corresponding to the target action skeleton subchain as the action skeleton chain attribute parameter, wherein the target action skeleton subchain is any one or more of the multiple action skeleton subchains; The target object skeleton subchain corresponding to the target action skeleton subchain in the object skeleton subchain is used as the object skeleton chain, and the object skeleton subchain attribute parameters of the target object skeleton subchain are used as the object skeleton chain attribute parameters.
[0072] Optionally, the action mapping module 310 is further configured to: An action curve displacement parameter corresponding to the first action data is determined, and based on the action curve displacement parameter and the target action skeleton chain, the first action data is mapped to second action data of the second virtual object.
[0073] The object processing device provided by one or more embodiments of the present specification can use the object skeleton chain attribute parameters of the object skeleton chain and the action skeleton chain attribute parameters of the initial action skeleton chain of the first action data to calculate the skeleton adjustment parameters for the initial action skeleton chain, and use the skeleton adjustment parameters to adjust the initial action skeleton chain to obtain a target action skeleton chain that matches the object skeleton chain of the second virtual object; finally, use the target action skeleton chain to map the first action data to the second action data of the second virtual object, thereby achieving efficient creation of action animations for game characters, avoiding the problem of manually producing action animations that requires a lot of time and manpower costs, and reducing resource usage and game memory requirements.
[0074] The above is a schematic scheme of an object processing device of this embodiment. It should be noted that the technical scheme of the object processing device and the technical scheme of the object processing method described above are of the same concept, and the details not described in detail in the technical scheme of the object processing device can be referred to the description of the technical scheme of the object processing method described above.
[0075] Figure 4 The block diagram of a computing device 400 according to one embodiment of the present specification is shown. The components of the computing device 400 include but are not limited to a memory 410 and a processor 420. The processor 420 is connected to the memory 410 via a bus 430, and the database 450 is used to store data.
[0076] The computing device 400 also includes an access device 440 that enables the computing device 400 to communicate via one or more networks 460. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 440 may include one or more of any type of network interface (e.g., a network interface card (NIC)) that is wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a world-wide interoperability for microwave access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, and a near field communication (NFC).
[0077] In one embodiment of the present specification, the above components of the computing device 400 and Figure 4 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 4 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0078] The computing device 400 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or a personal computer (PC). The computing device 400 may also be a mobile or stationary server.
[0079] The processor 420 is used to execute the following computer executable instructions, which implement the steps of the above-mentioned object processing method when executed by the processor.
[0080] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the computing device embodiment, since it is basically similar to the object processing method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the object processing method embodiment.
[0081] An embodiment of the present specification further provides a computer-readable storage medium storing a computer program / instruction, which implements the steps of the above-mentioned object processing method when executed by a processor.
[0082] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the computer-readable storage medium embodiment, since it is basically similar to the object processing method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the object processing method embodiment.
[0083] An embodiment of the present specification also provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned object processing method when executed by a processor.
[0084] The above is a schematic scheme of a computer program product of this embodiment. It should be noted that the technical scheme of the computer program product and the technical scheme of the object processing method described above are of the same concept, and the details not described in detail in the technical scheme of the computer program product can be referred to the description of the technical scheme of the object processing method described above.
[0085] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0086] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0087] It should be noted that, for the convenience of description, the aforementioned method embodiments are all described as a series of action combinations, but those skilled in the art should be aware that the embodiments of this specification are not limited by the order of the actions described, because according to the embodiments of this specification, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the embodiments of this specification.
[0088] In the above embodiments, 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.
[0089] The preferred embodiments of this specification disclosed above are only used to help explain this specification. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the embodiments of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of this specification, so that technicians in the relevant technical field can understand and use this specification well. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. An object processing method, characterized in that: include: Determining first action data of a first virtual object, and a second virtual object corresponding to the first virtual object; Determine an object skeleton chain of the second virtual object and object skeleton chain attribute parameters of the object skeleton chain, and determine an initial action skeleton chain of the first action data and action skeleton chain attribute parameters of the initial action skeleton chain; Determine skeleton adjustment parameters based on the object skeleton chain attribute parameters and the action skeleton chain attribute parameters; Adjust the initial action skeleton chain based on the skeleton adjustment parameters to obtain a target action skeleton chain of the first action data; According to the target action skeleton chain, the first action data is mapped into second action data of the second virtual object.
2. The object processing method according to claim 1, characterized in that: The determining of the skeleton adjustment parameters based on the object skeleton chain attribute parameters and the action skeleton chain attribute parameters includes: Determining the length of the action skeleton chain and the action skeleton lengths of the multiple action bones included in the action skeleton chain from the action skeleton chain attribute parameters; Calculate the action bone ratio parameters of each action bone and the action bone chain according to the action bone chain length and the action bone length; Determine the object bone chain length and the object bone lengths of the multiple object bones included in the object bone chain from the object bone chain attribute parameters; Calculate the object bone ratio parameter of each object bone and the object bone chain according to the object bone chain length and the object bone length; The bone rotation ratio of each action bone is calculated according to the action bone ratio parameter and the object bone ratio parameter, and the bone rotation ratio is determined as a bone adjustment parameter.
3. The object processing method according to claim 1, characterized in that: The determining of the skeleton adjustment parameters based on the object skeleton chain attribute parameters and the action skeleton chain attribute parameters includes: Determining the action bone lengths of the multiple action bones included in the action bone chain from the action bone chain attribute parameters; Determining object bone lengths of a plurality of object bones included in the object bone chain from the object bone chain attribute parameters; Determine a target action bone from the multiple action bones, and determine an associated object bone corresponding to the target action bone from the multiple object bones, wherein the target action bone is any one of the multiple action bones, and the associated object bones are one or more; According to the action bone length of the target action bone and the object bone length of the associated object bone, the initial movement adjustment parameter of the target action bone is adjusted to obtain the target movement adjustment parameter, and the target movement adjustment parameter is used as the bone adjustment parameter.
4. The object processing method according to claim 1, characterized in that: The determining of the skeleton adjustment parameters based on the object skeleton chain attribute parameters and the action skeleton chain attribute parameters includes: Determining the length of the action skeleton chain and the action skeleton lengths of the multiple action bones included in the action skeleton chain from the action skeleton chain attribute parameters; Calculate the action bone ratio parameters of each action bone and the action bone chain according to the action bone chain length and the action bone length; Determine the length of the object's skeleton chain from the object's skeleton chain attribute parameters; Based on the action bone ratio parameter, the action bone length and the object bone chain length, a scaling parameter of each action bone is calculated, and the scaling parameter is used as the bone adjustment parameter.
5. The object processing method according to any one of claims 1 to 4, characterized in that: The step of determining the object skeleton chain of the second virtual object and the object skeleton chain attribute parameters of the object skeleton chain, and determining the initial action skeleton chain of the first action data and the action skeleton chain attribute parameters of the initial action skeleton chain includes: Determine a plurality of action skeleton subchains from the action skeleton chain of the first action data, and determine action skeleton subchain attribute parameters of each action skeleton subchain, wherein the plurality of action skeleton subchains are obtained by segmenting the action skeleton chain according to preset skeleton types; Determine the object skeleton subchain corresponding to each of the action skeleton subchains from the object skeleton chain to be processed of the second virtual object, and determine the object skeleton subchain attribute parameters of each object skeleton subchain; Using a target action skeleton subchain among the multiple action skeleton subchains as the initial action skeleton chain, and using a target action skeleton chain attribute parameter corresponding to the target action skeleton subchain as the action skeleton chain attribute parameter, wherein the target action skeleton subchain is any one or more of the multiple action skeleton subchains; The target object skeleton subchain corresponding to the target action skeleton subchain in the object skeleton subchain is used as the object skeleton chain, and the object skeleton subchain attribute parameters of the target object skeleton subchain are used as the object skeleton chain attribute parameters.
6. The object processing method according to claim 1, characterized in that: The mapping the first action data to second action data of the second virtual object according to the target action skeleton chain includes: An action curve displacement parameter corresponding to the first action data is determined, and based on the action curve displacement parameter and the target action skeleton chain, the first action data is mapped to second action data of the second virtual object.
7. An object processing device, characterized in that: include: an object determination module, configured to determine first action data of a first virtual object, and a second virtual object corresponding to the first virtual object; a skeleton chain determination module, configured to determine an object skeleton chain of the second virtual object and object skeleton chain attribute parameters of the object skeleton chain, and to determine an initial action skeleton chain of the first action data and action skeleton chain attribute parameters of the initial action skeleton chain; A parameter determination module, configured to determine a skeleton adjustment parameter based on the object skeleton chain attribute parameter and the action skeleton chain attribute parameter; A skeleton chain adjustment module is configured to adjust the initial action skeleton chain based on the skeleton adjustment parameters to obtain a target action skeleton chain of the first action data; The action mapping module is configured to map the first action data into second action data of the second virtual object according to the target action skeleton chain.
8. A computing device, characterized in that include: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions. When the computer program / instructions are executed by the processor, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium storing a computer program / instruction, characterized in that: When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.