Object processing method, data processing method, and object processing system
By determining and applying object adjustment parameters in the object processing unit, adjusting and scaling the game model, the possibility of inefficiency and error in the prior art is solved, and efficient and accurate model processing in game development is achieved.
Patent Information
- Application Number
- CN202510256947.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-05
- Publication Date
- 2025-06-06
AI Technical Summary
The prior art is difficult to accurately adjust and scale game models according to actual needs, resulting in the possibility of inefficiency and errors in game development.
The target sub-object is obtained by determining the object adjustment parameters of the initial sub-object in the initial object in the object processing unit and adjusting the initial sub-object based on these parameters. At the same time, multiple scaling parameters are used to adjust the physical interaction unit of the target sub-object in the initial object to obtain a target object that can accurately perform physical interaction.
It realizes accurate adjustment and scaling of the game model as needed, improves the efficiency of game development and reduces the occurrence of errors.
Smart Images

Figure CN120107530A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification relate to the field of computer technology, and more particularly to an object processing method. One or more embodiments of this specification also relate to a data processing method, an object processing system, a computing device, a computer-readable storage medium, and a computer program product. Background Art
[0002] With the continuous development of computer technology and game development technology, in the process of developing games, it is often necessary to process game objects in the game, for example, to process game objects such as character models, object models, and scenes.
[0003] Currently, in the process of processing game objects, it involves adjusting and scaling the game objects to meet the needs of game development, but how to accurately adjust and scale the game model according to actual needs has become a technical problem that needs to be solved urgently. Summary of the invention
[0004] In view of this, an embodiment of this specification provides an object processing method. One or more embodiments of this specification also relate to a data processing method, an object processing system, a computing device, a computer-readable storage medium and a computer program product to solve the technical defects existing in the prior art.
[0005] According to a first aspect of an embodiment of this specification, there is provided an object processing method, which is applied to an object processing unit, and the method includes: Determining an object adjustment parameter for an initial sub-object in the initial object, wherein the object adjustment parameter is generated by a data processing unit when a parameter configuration tool performs a parameter configuration operation; Based on the object adjustment parameter, adjusting the initial sub-object to obtain a target sub-object; Based on a plurality of scaling parameters, a physical interaction unit of the target sub-object in the initial object is adjusted to obtain a target object.
[0006] According to a second aspect of an embodiment of this specification, a data processing method is provided, which is applied to a data processing unit, and the method includes: Determine a parameter storage structure for an initial sub-object in the initial object, and construct a parameter configuration tool based on the parameter storage structure; Parameter configuration operations are performed based on the parameter configuration tool to obtain object adjustment parameters, so that the above object processing method obtains the target object based on the object adjustment parameters, wherein the object adjustment parameters are stored in the parameter storage structure.
[0007] According to a third aspect of the embodiments of this specification, there is provided an object processing system, including a data processing unit and an object processing unit, wherein: The data processing unit is configured to determine a parameter storage structure for an initial sub-object in the initial object, and to construct a parameter configuration tool based on the parameter storage structure, and to perform a parameter configuration operation based on the parameter configuration tool to obtain object adjustment parameters, wherein the object adjustment parameters are stored in the parameter storage structure; The object processing unit is configured to determine object adjustment parameters for an initial sub-object in an initial object, adjust the initial sub-object based on the object adjustment parameters to obtain a target sub-object, and adjust a physical interaction unit of the target sub-object in the initial object based on multiple scaling parameters to obtain a target object.
[0008] According to a fourth 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 or data processing method are implemented.
[0009] According to a fifth aspect of the embodiments of this specification, a computer-readable storage medium is provided, which stores a computer program / instruction, and when the computer program / instruction is executed by a processor, the steps of the above-mentioned object processing method or data processing method are implemented.
[0010] According to a sixth aspect of the embodiments of this specification, a computer program product is provided, comprising a computer program / instruction, which implements the steps of the above-mentioned object processing method or data processing method when executed by a processor.
[0011] An embodiment of the present specification provides an object processing method applied to an object processing unit. In the process of processing the initial object, the data processing unit will generate object adjustment parameters in advance according to actual needs, and then use the object adjustment parameters to adjust the initial sub-object to obtain a target sub-object that meets the actual needs; at the same time, in order to ensure that the target object is consistent with the actual needs, multiple scaling parameters can be calculated, and the physical interaction unit of the target sub-object in the initial object can be adjusted using the multiple scaling parameters to obtain a target object that can accurately perform physical interaction, thereby achieving accurate adjustment and scaling of the game model as needed to meet the needs of game development. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 is a flow chart of an object processing method provided by an embodiment of this specification; Figure 2 is a flow chart of a data processing method provided by an embodiment of this specification; Figure 3 It is a schematic diagram of a processing process of an object processing method provided by an embodiment of this specification; Figure 4 is a schematic diagram of a data structure in an object processing method provided by an embodiment of this specification; Figure 5 is a schematic diagram of the structure of an object processing system provided by an embodiment of this specification; Figure 6 It is a structural block diagram of a computing device provided by an embodiment of this specification. DETAILED DESCRIPTION
[0013] 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.
[0014] 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.
[0015] 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".
[0016] 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.
[0017] First, the terms involved in one or more embodiments of this specification are explained.
[0018] Resources: refers to all files and content that can be imported into Unity and used when developing models in Unity. Resources include but are not limited to: 3D models (such as FBX files), textures, prefabs, etc.
[0019] FBX file: It is a general 3D model file format, mainly used in 3D modeling, animation, rendering and game development.
[0020] Prefab: A pre-built game object that can contain multiple components and can be reused; the multiple components include dynamic components (for example, dynamic objects such as hair, body, accessories, etc.).
[0021] Unity: is a game engine. It is a comprehensive development environment that supports the creation of 2D, 3D, virtual reality (VR) and augmented reality (AR) content. The Unity engine is not only used for game development, but also used in non-game fields such as architectural visualization, film and television animation, and real-time 3D applications.
[0022] Blender: is a 3D computer graphics software suitable for tasks such as modeling, texture mapping, rigging, animation, simulation, rendering, compositing, and motion tracking. It is widely used to create high-quality 3D models, animated shorts, video game art, interactive 3D applications, scientific visualization, and more.
[0023] MagicaCloth2: is a dynamic plug-in for the Unity engine, also known as a dynamic component; MagicaCloth2 can be used to create realistic cloth, hair, flags, plants and other objects with soft properties. These objects can respond to physical rules in the game, such as gravity, wind and collision with other objects.
[0024] Gizmo: Also written as "gizom", is a tool used to assist in aligning, transforming and manipulating 3D objects. It is usually represented by a small icon that contains handles that can be used to move, rotate, scale, etc. Users can intuitively change the position, rotation angle or size of an object by clicking and dragging different parts of the Gizmo.
[0025] In the game development environment, the configuration of the dynamics system in the engine is usually carried out in the engine, requiring the skeleton structure to be accurately matched with the corresponding physical simulation components. This method currently uses a dynamics plug-in for the Unity engine - MagicaCloth2, which provides cloth or soft body physical simulation functions for characters or objects. However, under the current workflow, whenever the art resources are modified, resulting in changes in the skeleton structure and bone position, the MagicaCloth2 component cannot automatically update the relevant changes, resulting in each skeleton change. The MagicaCloth2 component must be manually reconfigured to ensure that the physical simulation is correctly bound to the updated skeleton.
[0026] In the case of a large amount of project resources and frequent iterations, there are high communication and maintenance costs, which can easily lead to effect errors. For example, if the changes in bone information are not accurately communicated to the team members responsible for dynamic configuration, it may cause errors in the dynamic effects of the model, such as dynamic bone displacement or loss. Therefore, a solution for automatic configuration of dynamics is needed to simplify the configuration process, improve resource iteration efficiency and reduce errors.
[0027] Furthermore, the scaling performance of MagicaCloth2's collision body in the three axes of XYZ cannot meet the needs of the game's body pinching. The performance of its Gizom and actual size is inconsistent. The Gizom only scales with the x-axis of the bone, while the actual size scales with which axis of the bone is determined by the collision body attribute Direction, which only scales with Direction. Moreover, both the Gizom and the actual size are proportionally scaled, which cannot adapt to the non-uniform scaling changes of the bone when the body is pinched. Therefore, it is necessary to optimize a collision body design scheme that allows the collision body to scale and stretch independently with the bone in the XYZ axis to adapt to the mesh shape changes after pinching the body, and ensure coordination between dynamic response and character appearance.
[0028] Based on this, in this specification, an object processing method is provided. One or more embodiments of this specification also relate to a data processing method, an object processing system, 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.
[0029] See also Figure 1 , Figure 1 A flowchart of an object processing method provided according to an embodiment of the present specification is shown. The object processing method is applied to an object processing unit and specifically includes the following steps.
[0030] Step 102: Determine an object adjustment parameter for an initial sub-object in the initial object, wherein the object adjustment parameter is generated by a data processing unit when a parameter configuration tool performs a parameter configuration operation.
[0031] Among them, the initial object can be understood as a model that can be arranged in the game scene, such as a character model, an object model, a scene model, a 3D model, etc., or the initial object can be understood as a prefabricated part of the game model; the initial sub-object can be understood as a component configured on the initial object, such as a dynamic object and a dynamic component; the object adjustment parameters can be understood as parameters for configuring the initial sub-object, such as the adjustment parameters of the dynamic object and the dynamic object configuration information.
[0032] The data processing unit can be understood as a unit for generating object adjustment parameters, for example, the data processing unit can be a blender. The object processing unit can be understood as a unit for rendering, adjusting, creating, and other processing operations on the initial object, such as Unity, a game engine, and the like.
[0033] In one or more embodiments provided in this specification, determining the object adjustment parameter for the initial sub-object in the initial object includes: In the case where it is determined that the initial object satisfies the parameter acquisition condition, the sub-object type of the initial sub-object is determined, and based on the sub-object type, the object adjustment parameter is acquired from the data processing unit.
[0034] In one or more embodiments provided in this specification, determining the object adjustment parameter for the initial sub-object in the initial object includes: In the case of determining that the initial object satisfies the parameter acquisition condition, determining the sub-object type of the initial sub-object, and determining to acquire the data processing parameter from the data processing unit; The object adjustment parameter is obtained from the data processing parameter based on the sub-object type.
[0035] The initial object satisfying the parameter acquisition condition can be understood as when the initial object is created or edited, it can be determined that the parameter acquisition condition is satisfied, thereby obtaining the object adjustment parameters.
[0036] The sub-object type can be understood as information used to represent the initial sub-object type, for example, the sub-object type may include: hair type, body type, accessory type, equipment type, etc. The sub-object type can be set according to the actual application scenario.
[0037] The data processing parameters may be understood as parameters acquired from the data processing unit and configured by the data processing unit. For example, the data processing parameters may be configuration information or resources generated by blender.
[0038] Taking the application of the object processing method provided in this specification in the game development scenario as an example, the object processing method is explained. The initial object can be understood as a prefabricated part; the initial sub-object can be a dynamic component on the prefabricated part; the data processing unit can be a blender; and the object processing unit can be Unity. Based on this, Unity in this method can realize the automatic configuration of the dynamic objects of the game model; specifically, this method can automatically obtain the dynamic configuration information in Unity, and the dynamic configuration information can be used to automatically create, modify, and other configuration processes for the dynamic objects of the game model.
[0039] Specifically, after blender generates the resource, it can import the resource into unity1; after Unity imports the resource, it will extract the dynamic configuration information (i.e. object adjustment parameters) corresponding to the parameter type (i.e. sub-object type) of the dynamic object from the custom properties of the resource (i.e. data processing parameters) by calling the OnPostprocessGameObjectWithUserProperties() function, and parse the JSON data stored as a string.
[0040] Based on the above embodiments, this method designs a process of configuring dynamics information in Blender software (artistic original resource production environment) and automatically restoring it in Unity engine; this process of automatically configuring dynamics process realizes configuring dynamics in Blender and automatically restoring it in Unity, thereby simplifying the configuration process, improving resource iteration efficiency and reducing errors. In addition, this process makes it easier for binders to see whether the bound model will have a good dynamic effect more quickly.
[0041] In addition, when exporting data from Blender, compared with the previous solution of saving the information text as a json file, this method saves the information text into the custom attributes of the resource, reducing resource redundancy for large and fragmented hair, body, and accessory type resources.
[0042] In one or more embodiments provided in this specification, before determining the object adjustment parameter for the initial sub-object in the initial object, the method further includes: Determine sub-object generation parameters for the initial object, and generate the initial sub-object based on the sub-object generation parameters, wherein the sub-object generation parameters are generated by a data processing unit based on a parameter configuration tool performing a parameter configuration operation; Determine the associated skeleton information of the initial sub-object from the sub-object generation parameters, and determine the sub-object associated skeleton from the object skeleton of the initial object based on the associated skeleton information; Based on the sub-object associated skeleton, the initial sub-object is configured on the initial object.
[0043] Among them, the sub-object generation parameters can be understood as parameters used to generate the initial sub-object, and the sub-object generation parameters can be the configuration information of the dynamic component; that is, this method needs to first generate the dynamic component based on the configuration information of the dynamic component, and when the configuration information is updated, the dynamic component is adjusted using the updated configuration information (such as object adjustment parameters) to obtain a dynamic component that meets actual needs.
[0044] Among them, the associated bone information can be understood as the bone information corresponding to the initial sub-object; the sub-object associated bone can be understood as the bone in the object bone of the initial object that corresponds to the initial sub-object.
[0045] Continuing with the above example, after Unity imports the asset, it will call the OnPostprocessGameObjectWithUserProperties() method to extract the dynamics configuration information from the asset's custom properties, parse the JSON data stored as a string, and perform the following steps based on the parsed JSON data (i.e. the sub-object generation parameters): 1. Component creation: Create the corresponding dynamic component (i.e. the initial sub-object) on the resource prefab according to the parsed parameter type.
[0046] 2. Bone mapping and association: By parsing the bone list contained in the parameter type (i.e. associated bone information), find the corresponding bones in the prefab (i.e. sub-object associated bones) and configure them to each dynamic component.
[0047] The parameter setting steps can be performed later, specifically reading the dynamic type parameter Json file (i.e. object adjustment parameters) pre-stored in Unity according to the parameter type; then based on the Json file, the dynamic object can be accurately adjusted and scaled to obtain a model that meets actual needs.
[0048] Step 104: Based on the object adjustment parameters, the initial sub-object is adjusted to obtain a target sub-object.
[0049] The target sub-object may be understood as a sub-object obtained after adjusting the initial sub-object, such as an adjusted dynamic object.
[0050] In one or more embodiments provided in this specification, determining a sub-object to be adjusted from a plurality of initial sub-objects of an initial object based on the object adjustment parameter, and adjusting the sub-object to be adjusted to obtain a target sub-object includes: Determine the skeleton update information in the object adjustment parameter, and adjust the sub-object skeleton of the initial sub-object based on the skeleton update information to obtain the target sub-object; and / or An updated sub-object corresponding to the initial object is generated by using the object adjustment parameter, and the initial sub-object is replaced by the updated sub-object to obtain the target sub-object in the initial object.
[0051] The bone update information may be understood as updated bone information obtained after adjusting the bones corresponding to the dynamic components.
[0052] Continuing with the above example, when the resource is imported and configured for the first time, Unity will adjust the initially created dynamic object based on the dynamic type parameter Json file to obtain a dynamic object that is configured on the resource prefab and conforms to the dynamics.
[0053] After the first resource import configuration, this method can read the dynamics type parameter Json file (i.e. object adjustment parameters) pre-stored in Unity when it is determined that the resource has been iterated. Then the dynamics object can be adjusted based on the Json file. Resource iteration is handled in three cases: 1. If there is no bone addition or deletion (for example, no bone level change, no bone position change), the processing method is: In Blender, there is no need to reconfigure dynamics.
[0054] In Unity, Unity's tools will automatically refresh the dynamic component (i.e. dynamic object) configuration to ensure consistency.
[0055] 2. The processing method for adding, deleting and changing bones is as follows: In Blender, users (i.e. riggers) need to update the bone list in the dynamic configuration (i.e. bone update information) simultaneously when iterating bones.
[0056] In Unity, Unity's tools will automatically refresh the dynamic component configuration to adapt to the new bone structure.
[0057] 3. Change of dynamics type, processing method: In Blender, after iterating the model and skeleton, the user (modeler, rigger) needs to update the parameter type list in the dynamic configuration as needed to obtain the new configuration information.
[0058] In Unity, Unity's tools delete old type components (i.e., initial sub-objects) and add new type components (i.e., target sub-objects) based on new configuration information (i.e., object adjustment parameters), while keeping the parameter information of those type components that do not need to be changed unaffected.
[0059] Based on the above embodiments, it can be seen that when adjusting the initial sub-object, the method can consider various situations and perform flexible adjustments, thereby improving the applicability of the method.
[0060] Step 106: Based on multiple scaling parameters, adjust the physical interaction unit of the target sub-object in the initial object to obtain the target object.
[0061] The physical interaction unit can be understood as a unit in the target sub-object used to implement physical interaction (such as collision, contact, etc.), such as a collision body of a dynamic object, and the scaling parameter can be understood as a parameter for scaling the collision body.
[0062] In one or more embodiments provided in this specification, adjusting the physical interaction unit of the target sub-object in the initial object based on multiple scaling parameters to obtain the target object includes steps 1 to 4: Step 1: Determine the world scaling parameters of the target sub-object, wherein the world scaling parameters include a first world coordinate axis parameter, a second world coordinate axis parameter and a third world coordinate axis parameter.
[0063] Among them, the world scale parameter can be understood as the world scale of the target child object's bones; in the process of using the Unity engine, the world scale of the bones (lossyScale) is used to represent the final world space scale value of an object (ie, the target child object) under the transformation of all its parent objects.
[0064] The world scale parameter can be a three-dimensional vector, which contains three components, namely the first world coordinate axis parameter, the second world coordinate axis parameter and the third world coordinate axis parameter; the first world coordinate axis parameter (lossyScale.x) can represent the scale ratio of the object (i.e. the target child object) in the X-axis direction of the world coordinate system; the second world coordinate axis parameter (lossyScale.y) can represent the scale ratio of the object in the Y-axis direction of the world coordinate system. The third world coordinate axis parameter (lossyScale.z) can represent the scale ratio of the object in the Z-axis direction of the world coordinate system.
[0065] Step 2: Determine a first scaling parameter based on the world scaling parameter and the coordinate axis of the physical interaction unit.
[0066] The first scaling parameter may be understood as a Gizom scaling size for scaling the target sub-object.
[0067] Specifically, the method may determine the coordinate axis parameters of the coordinate axis of the physical interaction unit based on the world scaling parameter, and determine the first scaling parameter based on the world scaling parameter and the coordinate axis parameter.
[0068] In one or more embodiments provided in this specification, the physical interaction unit is a capsule collision body, and the coordinate axis includes a first coordinate axis, a second coordinate axis, and a third coordinate axis; The determining a first scaling parameter based on the world scaling parameter and the coordinate axis of the physical interaction unit includes: Determine, from the first coordinate axis, the second coordinate axis, and the third coordinate axis of the capsule collision body, a motion coordinate axis corresponding to the motion direction of the capsule collision body, and two other coordinate axes except the motion coordinate axis; A target world coordinate axis parameter corresponding to the movement direction of the capsule collision body is obtained from the world scaling parameter, and the target world coordinate axis parameter is determined as the coordinate axis parameter of the movement coordinate axis; Determine two other world coordinate axis parameters except the target world coordinate axis parameter from the world scaling parameters, and determine the maximum coordinate axis parameter of the two other world coordinate axis parameters as the coordinate axis parameter of the two other coordinate axes; The first world coordinate axis parameter is multiplied by the coordinate axis parameter of the first coordinate axis, the second world coordinate axis parameter is multiplied by the coordinate axis parameter of the second coordinate axis, and the third world coordinate axis parameter is multiplied by the coordinate axis parameter of the third coordinate axis to obtain the first scaling parameter.
[0069] The first coordinate axis, the second coordinate axis and the third coordinate axis may be an X-axis, a Y-axis and a Z-axis of the capsule collision body.
[0070] The motion coordinate axis may be understood as a coordinate axis corresponding to the motion direction of the collision body. For example, the motion direction of the collision body may be along the X-axis, the Y-axis, or the Z-axis.
[0071] The coordinate axis parameters of the first coordinate axis, the second coordinate axis and the third coordinate axis can be understood as the scaling parameters corresponding to the first coordinate axis, the second coordinate axis and the third coordinate axis. For example, the first coordinate axis (cscl.x) can represent the scaling factor of the collision body in the X-axis direction, the second coordinate axis (cscl.y) can represent the scaling factor of the collision body in the Y-axis direction, and the third coordinate axis (cscl.z) can represent the scaling factor of the collision body in the Z-axis direction.
[0072] Using the above example, the Gizom scaling calculation method provided by this method is: First, get the lossyScale.xyz three-axis value (world scaling parameter), and based on the lossyScale.xyz three-axis value, determine the cscl (cscl.x, cscl.y, cscl.z) of the capsule collision body. The specific steps are: 1. Determine the coordinate axis corresponding to the running direction of the collider (i.e., the capsule collider) (i.e., the motion coordinate axis), and determine the coordinate axis not corresponding to the running direction of the collider (i.e., the other coordinate axis); 2. From the lossyScale.xyz three-axis values, determine the scaling parameters of the three coordinate axes of the capsule collider (i.e. cscl.x, cscl.y, cscl.z).
[0073] When Direction is X-Axis, cscl.y and cscl.z (i.e. axis parameters) of the Y-axis and Z-axis (i.e. the other two axes) of the collision body will take the maximum value of lossyScale.y and lossyScale.z (i.e. the maximum axis parameter); cscl.x of the collision body will take lossyScale.x (i.e. the target world axis parameter).
[0074] When Direction is Y-Axis, the cscl.x and cscl.z of the collision body's X-axis and Z-axis (that is, the other two coordinate axes) will take the maximum value of lossyScale.x and lossyScale.z (that is, the maximum coordinate axis parameter); the cscl.y of the collision body will take lossyScale.y (that is, the target world coordinate axis parameter).
[0075] When Direction is Z-Axis, the cscl.x and cscl.y of the collision body's X-axis and Y-axis (that is, the other two coordinate axes) will take the maximum value of lossyScale.x and lossyScale.y (that is, the maximum coordinate axis parameter); the cscl.z of the collision body will take lossyScale.z (that is, the target world coordinate axis parameter).
[0076] Among them, X-Axis, Y-Axis, and Z-Axis are the motion coordinate axes of the capsule; Secondly, multiply the x, y, and z of the collision body by lossyScale.xyz respectively to get the multiplication result; Subsequently, the multiplication result is used as the new size of the collision body (ie, the first scaling parameter), and the collision body Gizom is scaled based on the new size.
[0077] Based on the above embodiments, the collision body of the dynamic component in this method can be independently scaled and stretched along the XYZ axis with the skeleton to adapt to the change of the mesh shape after pinching the body shape, ensuring the coordination between the dynamic response and the character appearance.
[0078] In one or more embodiments provided in this specification, the physical interaction unit is a spherical collision body, and the coordinate axis includes a first coordinate axis, a second coordinate axis, and a third coordinate axis; The determining a first scaling parameter based on the world scaling parameter and the coordinate axis of the physical interaction unit includes: Determine a maximum coordinate axis parameter from the world scaling parameter, and determine the maximum coordinate axis parameter as the coordinate axis parameter of the first coordinate axis, the second coordinate axis, and the third coordinate axis; The first world coordinate axis parameter is multiplied by the coordinate axis parameter of the first coordinate axis, the second world coordinate axis parameter is multiplied by the coordinate axis parameter of the second coordinate axis, and the third world coordinate axis parameter is multiplied by the coordinate axis parameter of the third coordinate axis to obtain the first scaling parameter.
[0079] Using the above example, when the collider is a Sphere (spherical collider), the Gizom scaling calculation method is: First, cscl.x, cscl.y, and cscl.z will take the maximum value of lossyScale.x, lossyScale.y, and lossyScale.z (that is, the maximum coordinate axis parameter).
[0080] Secondly, multiply the x, y, and z (i.e. cscl.x, cscl.y, and cscl.z) of the collision body by the corresponding lossyScale.xyz to obtain the multiplication result.
[0081] Subsequently, the multiplication result is used as the new size of the collision body (ie, the first scaling parameter), and the collision body Gizom is scaled based on the new size.
[0082] Based on the above embodiments, the collision body of the dynamic component in this method can be independently scaled and stretched along the XYZ axis with the skeleton to adapt to the change of the mesh shape after pinching the body shape, ensuring the coordination between the dynamic response and the character appearance.
[0083] Step three: Determine the unit size information of the physical interaction unit, and determine a second scaling parameter based on the unit size information and the coordinate axis of the physical interaction unit.
[0084] The unit size information may be understood as size attribute information used for a physical interaction unit, such as the csize of a capsule.
[0085] Specifically, the method may multiply the unit size information of the physical interaction unit by the coordinate axis parameter of the coordinate axis of the physical interaction unit to obtain the second scaling parameter.
[0086] Continuing with the above example, this method multiplies csize by the corresponding value of cscl (coordinate axis parameter) according to the Direction, and uses the multiplication result as the new size of the collision body (i.e., the second scaling parameter) to scale the actual size of the collision body.
[0087] In one or more embodiments provided in this specification, the physical interaction unit is a capsule collision body, and the coordinate axis includes a first coordinate axis, a second coordinate axis, and a third coordinate axis; The determining of the unit size information of the physical interaction unit, and determining the second scaling parameter based on the unit size information and the coordinate axis of the physical interaction unit, includes: Determine collision body size information of the capsule collision body, wherein the collision body size information includes a starting radius, a starting radius, and a length; Determine, from the first coordinate axis, the second coordinate axis, and the third coordinate axis of the capsule collision body, a motion coordinate axis corresponding to the motion direction of the capsule collision body, and two other coordinate axes except the motion coordinate axis; Determining a maximum coordinate axis parameter from the coordinate axis parameters of the two other coordinate axes; The second scaling parameter is obtained by multiplying the length by the coordinate axis parameter of the moving coordinate axis, multiplying the starting radius by the maximum coordinate axis parameter, and multiplying the starting radius by the maximum coordinate axis parameter.
[0088] Among them, the capsule collider can be defined by three main parameters: start_radius, end_radius and length, which together determine the size and proportion of the capsule shape; start_radius (start radius) and end_radius (end radius): These two parameters generally refer to the radius of the circular parts at both ends of the capsule collider. For a standard capsule collider, these two values can be the same because they represent the radius of the spherical parts at both ends of the capsule; in addition, in custom implementations or based on the characteristics of specific engines, start_radius (start radius) and end_radius (end radius) can be different. Length (length): This parameter specifies the length of the middle cylindrical part of the capsule collider. It does not include the diameter of the spherical parts at both ends, only the middle extension is calculated.
[0089] Continuing with the above example, the actual size scaling calculation method provided by this method will multiply the corresponding values of csize and cscl according to the Direction direction, and use the multiplication result as the new size of the collision body to scale the actual size of the collision body.
[0090] It should be noted that, depending on the type of collision body, there will be the following calculation differences: When the collider is a Capsule, the actual size scaling calculation is: ① When the Capsule's Direction is X-Axis: csize's start_radius and end_radius are multiplied by the maximum of cscl.y and cscl.z (i.e. the maximum axis parameter); csize's length is multiplied by cscl.x.
[0091] ②When the Capsule's Direction is Y-Axis: csize's start_radius and end_radius are multiplied by the maximum of cscl.x and cscl.z (i.e. the maximum axis parameter); csize's length is multiplied by cscl.y.
[0092] ③When the Capsule's Direction is Z-Axis: multiply the start_radius and end_radius of csize by the maximum of cscl.y and cscl.x (i.e. the maximum axis parameter); multiply the length of csize by cscl.z.
[0093] After performing the above multiplication operation, the multiplication result can be used as the new size of the collision body.
[0094] Based on the above embodiments, it can be seen that after the collision body is optimized by the actual size scaling calculation method, the optimized collision body of MagicaCloth2 can be scaled and stretched in the three axes of XYZ to fit various complex shape changes when pinching the body.
[0095] Step 4: Based on the first scaling parameter and the second scaling parameter, adjust the physical interaction unit of the target sub-object in the initial object to obtain the target object.
[0096] Continuing with the above example, the multiplication result is used as the new size of the collision body, and the collision body Gizom is scaled based on the new size to obtain a model (i.e., the target object) that meets the actual needs.
[0097] Based on the above embodiments, it can be seen that after optimizing the collision body through the above-mentioned Gizom scaling calculation method and the actual size scaling calculation method, the Gizom and actual size performance of the optimized MagicaCloth2 collision body are basically consistent, and the three axes of XYZ can be scaled and stretched separately to fit various complex shape changes when pinching the body.
[0098] An embodiment of the present specification provides an object processing method applied to an object processing unit. In the process of processing the initial object, the data processing unit will generate object adjustment parameters in advance according to actual needs, and then use the object adjustment parameters to adjust the initial sub-object to obtain a target sub-object that meets the actual needs; at the same time, in order to ensure that the target object is consistent with the actual needs, multiple scaling parameters can be calculated, and the physical interaction unit of the target sub-object in the initial object can be adjusted using the multiple scaling parameters to obtain a target object that can accurately perform physical interaction, thereby achieving accurate adjustment and scaling of the game model as needed to meet the needs of game development.
[0099] See also Figure 2 , Figure 2 A flow chart of a data processing method provided according to an embodiment of the present specification is shown. The data processing method is applied to a data processing unit and specifically includes the following steps.
[0100] Step 202: determining a parameter storage structure for an initial sub-object in the initial object, and constructing a parameter configuration tool based on the parameter storage structure; Step 204: Execute parameter configuration operation based on the parameter configuration tool to obtain object adjustment parameters, so that the above object processing method obtains the target object based on the object adjustment parameters, wherein the object adjustment parameters are stored in the parameter storage structure.
[0101] The parameter storage structure can be understood as a structure for storing the object adjustment parameters. The parameter configuration tool can be understood as a human-computer interaction tool for configuring the object adjustment parameters, for example, the parameter configuration tool can be an application, a plug-in or other tool.
[0102] Following the above example, this method proposes an automated dynamics configuration process, and designs a process for configuring dynamics information in Blender software (art original resource production environment) and automatically restoring it in the Unity engine. This process can store dynamics configuration as information in Blender and in resources; users input the required dynamics configuration through the configuration tool (i.e. parameter configuration tool) in Blender, and store the dynamics configuration as dynamics configuration information in the resource. This resource refers to a file that can be imported into Unity and used to configure dynamic objects in Unity.
[0103] Specifically, in Blender, storing the dynamics configuration as information in an asset may include the following steps: 1. Define the data structure for storing dynamic configuration (i.e. parameter storage structure).
[0104] According to the needs of the project, this method can divide the dynamic object into three types of objects: hair, body, and accessories. Each object type corresponds to an object list and index; The object instances in the object list are used to store object names, associated skeletons, and dynamic objects. The dynamic objects are used to store parameter type lists, indexes, whether to customize enumerations, and type enumerations of dynamic objects. The instances in the parameter type list are used to store type names, bone lists, and indexes; and the instances in the bone list are used to store the bone names corresponding to the dynamic objects.
[0105] 2. Create a configuration tool.
[0106] Based on the data structure defined above, a configuration tool is further made to create and store dynamic configuration information.
[0107] It should be noted that the configuration tool can be understood as a software program or software module in Blender; the configuration tool interacts with users (modelers, riggers) through a human-computer interaction interface. When the user inputs the dynamic configuration through the data structure displayed in the human-computer interaction interface, the configuration tool can obtain the dynamic configuration and store it in the defined data structure.
[0108] An embodiment of the present specification provides a data processing method applied to a data processing unit. During the process of processing an initial object, a parameter storage structure is determined for an initial sub-object in the initial object, and a parameter configuration tool is constructed based on the parameter storage structure. Parameter configuration operations are performed based on the parameter configuration tool to obtain object adjustment parameters, so as to facilitate subsequent adjustment of the initial sub-object based on the object adjustment parameters, thereby accurately adjusting and scaling the game model as needed to meet the needs of game development.
[0109] The following combination Figure 3 , taking the application of the object processing method provided in this specification in a dynamic scene as an example, the object processing method is further described. Figure 3 A schematic diagram of a processing process of an object processing method provided by an embodiment of this specification is shown.
[0110] In view of the defects mentioned in the background technology, this method proposes an automatic configuration dynamics process and designs a process from configuring dynamics information in Blender software (art original resource production environment) to automatically restoring it in the Unity engine. At the same time, the MagicaCloth2 collision body is optimized to achieve the function of independent scaling and stretching of the collision body along the XYZ axis with the skeleton.
[0111] Specifically, the method includes the following three parts: storing the dynamic configuration as information in Blender and storing it in resources; automatically configuring the dynamic objects of the game model in Unity; and optimizing the collider of the dynamic object (i.e. MagicaCloth2) in Unity.
[0112] Among them, in Blender, the dynamic configuration is taken as information and stored in the resource, which means that the user inputs the required dynamic configuration through the configuration tool in Blender, and stores the dynamic configuration as dynamic configuration information in the resource. The resource refers to a file that can be imported into Unity and used to configure the dynamic object in Unity. Among them, the resource can be an FBX file; after the FBX file is imported into Unity, the corresponding MagicaCloth component is added to the prefab of the FBX file; it should be noted that the prefab is a variant of the FBX file, and one FBX file can correspond to multiple prefabs; the MagicaCloth component can be defined according to the dynamic configuration information on the FBX file.
[0113] Specifically, in Blender, storing the dynamics configuration as information in an asset may include the following steps: 1. Define the data structure for storing dynamic configuration.
[0114] Figure 4 is a schematic diagram of a data structure in an object processing method provided in an embodiment of this specification, based on Figure 4 It can be seen that according to the needs of the project, this method can divide the dynamic object into three types of objects: hair, body, and accessories. One object type corresponds to an object list and index; The object instances in the object list are used to store object names, associated skeletons, and dynamic objects. The dynamic objects are used to store parameter type lists, indexes, whether to customize enumerations, and type enumerations of dynamic objects. The instances in the parameter type list are used to store type names, bone lists, and indexes; and the instances in the bone list are used to store the bone names corresponding to the dynamic objects.
[0115] It should be noted that the parameter type enumeration is different for different object types. Some parameter types are set according to the current needs of the project. For example, hair parameter types include but are not limited to: LongHair, FringeHair, ShortHair, PonyTail, Braids; body parameter types include but are not limited to: Breast, Buttock; accessory parameter types include but are not limited to: EarPendant, Glasses, Pendant.
[0116] 2. Create a configuration tool.
[0117] Based on the data structure defined above, a configuration tool is further made to create and store dynamic configuration information.
[0118] It should be noted that the configuration tool can be understood as a software program or software module in Blender; the configuration tool interacts with users (modelers, riggers) through a human-computer interaction interface. When the user inputs the dynamic configuration through the data structure displayed in the human-computer interaction interface, the configuration tool can obtain the dynamic configuration and store it in the defined data structure.
[0119] Specifically, the functions of the configuration tool include but are not limited to: object management, parameter type management, bone list management, and export of configuration data.
[0120] Among them, object management: through the human-computer interaction page, prompt the user to create a dynamic object under the corresponding type, name the dynamic object and specify the associated skeleton.
[0121] Parameter type management: Through the human-computer interaction page, the user is prompted to create corresponding parameter types for the simulated dynamic objects. These parameter types will reflect various properties and behaviors in the dynamic simulation in Unity.
[0122] Bone list management: Through the human-computer interaction page, determine the bone chain that needs to be dynamically simulated for the dynamic object, and configure the root bone of the bone chain into the bone list.
[0123] Export of configuration data: When the asset (i.e. FBX file) is exported, the above data structure will be serialized into JSON format and then stored in the custom properties of the asset.
[0124] It should be noted that the export function of configuration data can flatten the internal complex data structure into a universal and easy-to-transmit text format. Compared with the solution of saving the information text as a json file, this method can save the information text into the custom attributes of the resource, reducing the resource redundancy for a large number of fragmented hair, body, and accessories type resources.
[0125] In addition, the configuration tool in Blender of this method also has the function of custom parameter types. In order to adapt to the continuous increase of resource types (such as accessories, weapons, etc.) and solve the problem of insufficient existing dynamic types, this method provides a more flexible strategy: open custom dynamic types in Blender, and implement the reading of these custom types in Unity. The custom type will read the default parameter json. This strategy makes this dynamic system more modular and flexible, which can adapt to various resource requirements, while ensuring the consistency of parameter sets and easy management.
[0126] Among them, automatically configuring the dynamic objects of the game model in Unity refers to automatically obtaining dynamic configuration information in Unity, and automatically creating, modifying, and other configuration processes on the dynamic objects of the game model using the dynamic configuration information.
[0127] Specifically, after Unity imports the resource, it will call the OnPostprocessGameObjectWithUserProperties() method to extract the dynamic configuration information from the custom properties of the resource, parse the JSON data stored as a string, and perform the following steps based on the parsed JSON data: 1. Component creation: Create a corresponding dynamic component (also called a dynamic object) on the resource prefab based on the parsed parameter type.
[0128] The parameter type refers to the type of the dynamic object (such as the hair, body, accessories, etc. mentioned above).
[0129] The dynamic component refers to the dynamic object configured in Blender mentioned above.
[0130] The resource prefab refers to a 3D model pre-configured in Unity. For example, the 3D model may be a character model, an object model, a building model, etc.
[0131] 2. Bone mapping and association: By parsing the bone list of the parameter type, find the corresponding bones in the prefab and configure them to each dynamic component.
[0132] 3. Parameter setting: According to the parameter type, read the dynamic type parameter Json file pre-stored in Unity, and adjust the dynamic object based on the Json file.
[0133] It should be noted that in the case of the first resource import configuration, Unity will adjust the initially created dynamic object based on the dynamic type parameter Json file to obtain a dynamic object that is configured on the resource prefab and conforms to the dynamics.
[0134] After the first resource import configuration, subsequent resource iterations are handled in three situations: 1. If there is no bone addition or deletion (for example, no bone level change, no bone position change), the processing method is: In Blender, there is no need to reconfigure dynamics.
[0135] The Unity tool developed by this method will automatically refresh the configuration of dynamic components (i.e., dynamic objects) to ensure consistency, thereby achieving process standardization and preventing component loss during resource iteration.
[0136] 2. The processing method for adding, deleting and changing bones is as follows: In Blender, when the user (i.e. rigger) iterates on the bones, he needs to update the list of bones in the dynamic configuration synchronously.
[0137] In Unity, Unity's tools will automatically refresh component configurations to accommodate the new bone structure.
[0138] 3. Change of dynamics type, processing method: In Blender, users (modelers, riggers) need to update the parameter type list in the dynamic configuration as needed after iterating the model and bones.
[0139] In Unity, Unity's tools delete old type components and add new type components based on the new configuration information, while keeping the parameter information of those type components that do not need to be changed unaffected.
[0140] Among them, optimizing the collision body of the dynamic object refers to adjusting the collision body of the adjusted dynamic object during the resource iteration process, so that the collision body of the dynamic object can adapt to the mesh shape changes caused by pinching the character's body shape in the game.
[0141] It should be noted that the collision body of dynamic objects (i.e. MagicaCloth2) is not adjusted only once after resource iteration, but is calculated all the time when the game is running; therefore, "optimizing the collision body of dynamic objects" can be understood as a way of calculating the collision body size.
[0142] Specifically, the collision body Gizom only scales with the x-axis of the bone, while the axis along which the actual size of the collision body scales is determined by the collision body attribute Direction, and only scales with Direction. In addition, both the Gizom and the actual size are scaled proportionally, so the performance of the collision body Gizom and the actual size of MagicaCloth2 are inconsistent.
[0143] To solve the problem of mismatch between Gizom and actual size, this method provides Gizom scaling calculation method and actual size scaling calculation method, so that the performance of the collision body Gizom and actual size are consistent.
[0144] Calculation method for Gizom scaling: Gizom scaling calculation is to obtain the x value of the skeleton world scaling (hereinafter referred to as lossyScale) as the scaling coefficient of the collision body (hereinafter referred to as cscl). In the initial state of the Gizom, after the skeleton x-axis is enlarged, the collision body Gizom is enlarged in the same proportion, but after the skeleton y-axis is enlarged, the collision body Gizom remains unchanged. Based on this, the performance of the Gizom and the actual size are inconsistent.
[0145] To address this problem, the Gizom scaling calculation method provided by this method is: First, get the three-axis values of lossyScale.xyz as cscl; Secondly, multiply the x, y, and z of the collision body by lossyScale.xyz respectively to get the multiplication result; Finally, the multiplication result is used as the new size of the collider, and the collider Gizom is scaled based on the new size.
[0146] It should be noted that, depending on the type of collision body, there will be the following calculation differences: When the collider is a Capsule, the Gizom scaling calculation is: ①When Direction is X-Axis, the cscl.y and cscl.z of the collision body will take the maximum value of lossyScale.y and lossyScale.z; the cscl.x of the collision body will take lossyScale.x.
[0147] ②When Direction is Y-Axis, the cscl.x and cscl.z of the collision body will take the maximum value of lossyScale.x and lossyScale.z; the cscl.y of the collision body will take lossyScale.y.
[0148] ③When Direction is Z-Axis, the cscl.x and cscl.y of the collision body will take the maximum value of lossyScale.x and lossyScale.y; the cscl.z of the collision body will take lossyScale.z.
[0149] ④ After determining the lossyScale.xyz corresponding to the x, y, and z of the collision body through the above three steps, multiply the x, y, and z of the collision body by lossyScale.xyz respectively to obtain the multiplication result.
[0150] Among them, Direction is X-Axis, Y-Axis, and Z-Axis, which means that the movement direction of the collision body is along the X-axis, Y-axis, and Z-axis.
[0151] When the collider is a Sphere (spherical collider), the Gizom scaling calculation method is: ①cscl.x, cscl.y, and cscl.z will take the maximum value of lossyScale.x, lossyScale.y, and lossyScale.z.
[0152] ②Multiply the x, y, and z of the collision body by the corresponding lossyScale.xyz to obtain the multiplication result.
[0153] Calculation method for actual size scaling: Actual size scaling only obtains the cscl value of the Direction and multiplies it by the collision body size information (hereinafter referred to as csize), but this will cause the collision body Gizom of MagicaCloth2 to be inconsistent with the actual size, and will not fit the mesh shape changes after the character is pinched.
[0154] To address this problem, this method provides an actual size scaling calculation method that multiplies the corresponding values of csize and cscl according to the Direction direction, and uses the multiplication result as the new size of the collision body to scale the actual size of the collision body.
[0155] It should be noted that, depending on the type of collision body, there will be the following calculation differences: When the collider is a Capsule, the actual size scaling calculation is: ①When the Capsule's Direction is X-Axis: csize's start_radius and end_radius are multiplied by the maximum of cscl.y and cscl.z; csize's length is multiplied by cscl.x.
[0156] ②When the Capsule's Direction is Y-Axis: multiply the start_radius and end_radius of csize by the maximum of cscl.x and cscl.z; multiply the length of csize by cscl.y.
[0157] ③When the Capsule's Direction is Z-Axis: multiply the start_radius and end_radius of csize by the maximum of cscl.y and cscl.x; multiply the length of csize by cscl.z.
[0158] After optimizing the collision body through the above-mentioned Gizom scaling calculation method and actual size scaling calculation method, the Gizom and actual size performance of the optimized MagicaCloth2 collision body are basically consistent, and the three axes of XYZ can be scaled and stretched separately to fit various complex shape changes when pinching the body.
[0159] Based on the above content, the object processing method in this method provides a dynamic solution and provides a process for automatically configuring the dynamic process: configuring dynamics in Blender and automatically restoring in Unity; the automatic configuration of the dynamic process simplifies the configuration process, improves resource iteration efficiency and reduces errors. In addition, this process makes it easier for riggers to see whether the bound model will have a good dynamic effect more quickly.
[0160] When exporting data from Blender, this method saves the information text into the custom attributes of the resource, compared to the previous solution of saving the information text as a json file, which reduces resource redundancy for large and fragmented hair, body, and accessory type resources.
[0161] In addition, by optimizing the MagicaCloth2 collision body, the performance of the Gizom is consistent with the actual size. In addition, the MagicaCloth2 collision body scales and stretches independently along the XYZ axis with the skeleton to adapt to the changes in the mesh shape after pinching the body shape, ensuring coordination between the dynamic response and the character's appearance.
[0162] Corresponding to the above method embodiment, this specification also provides an object processing system embodiment. Figure 5 FIG. 1 shows a schematic diagram of the structure of an object processing system provided by an embodiment of the present specification. Figure 5 As shown, the object processing system includes: a data processing unit 502 and an object processing unit 504 .
[0163] The data processing unit 502 is configured to determine a parameter storage structure for an initial sub-object in the initial object, and to construct a parameter configuration tool based on the parameter storage structure, and to perform a parameter configuration operation based on the parameter configuration tool to obtain object adjustment parameters, wherein the object adjustment parameters are stored in the parameter storage structure; The object processing unit 504 is configured to determine object adjustment parameters for an initial sub-object in the initial object, adjust the initial sub-object based on the object adjustment parameters to obtain a target sub-object, and adjust a physical interaction unit of the target sub-object in the initial object based on multiple scaling parameters to obtain a target object.
[0164] The object processing unit 504 is further configured to: Determine the skeleton update information in the object adjustment parameter, and adjust the sub-object skeleton of the initial sub-object based on the skeleton update information to obtain the target sub-object; and / or An updated sub-object corresponding to the initial object is generated by using the object adjustment parameter, and the initial sub-object is replaced by the updated sub-object to obtain the target sub-object in the initial object.
[0165] The object processing unit 504 is further configured to: In the case of determining that the initial object satisfies the parameter acquisition condition, determining the sub-object type of the initial sub-object, and determining to acquire the data processing parameter from the data processing unit; The object adjustment parameter is obtained from the data processing parameter based on the sub-object type.
[0166] The object processing unit 504 is further configured to: Determine sub-object generation parameters for the initial object, and generate the initial sub-object based on the sub-object generation parameters, wherein the sub-object generation parameters are generated by a data processing unit based on a parameter configuration tool performing a parameter configuration operation; Determine the associated skeleton information of the initial sub-object from the sub-object generation parameters, and determine the sub-object associated skeleton from the object skeleton of the initial object based on the associated skeleton information; Based on the sub-object associated skeleton, the initial sub-object is configured on the initial object.
[0167] The object processing unit 504 is further configured to: Determine a world scaling parameter of the target sub-object, wherein the world scaling parameter includes a first world coordinate axis parameter, a second world coordinate axis parameter, and a third world coordinate axis parameter; Determining a first scaling parameter based on the world scaling parameter and a coordinate axis of the physical interaction unit; Determine unit size information of the physical interaction unit, and determine a second scaling parameter based on the unit size information and a coordinate axis of the physical interaction unit; Based on the first scaling parameter and the second scaling parameter, a physical interaction unit of the target sub-object in the initial object is adjusted to obtain a target object.
[0168] Optionally, the physical interaction unit is a capsule collision body, and the coordinate axis includes a first coordinate axis, a second coordinate axis and a third coordinate axis; The object processing unit 504 is further configured to: Determine, from the first coordinate axis, the second coordinate axis, and the third coordinate axis of the capsule collision body, a motion coordinate axis corresponding to the motion direction of the capsule collision body, and two other coordinate axes except the motion coordinate axis; A target world coordinate axis parameter corresponding to the movement direction of the capsule collision body is obtained from the world scaling parameter, and the target world coordinate axis parameter is determined as the coordinate axis parameter of the movement coordinate axis; Determine two other world coordinate axis parameters except the target world coordinate axis parameter from the world scaling parameters, and determine the maximum coordinate axis parameter of the two other world coordinate axis parameters as the coordinate axis parameter of the two other coordinate axes; The first world coordinate axis parameter is multiplied by the coordinate axis parameter of the first coordinate axis, the second world coordinate axis parameter is multiplied by the coordinate axis parameter of the second coordinate axis, and the third world coordinate axis parameter is multiplied by the coordinate axis parameter of the third coordinate axis to obtain the first scaling parameter.
[0169] Optionally, the physical interaction unit is a spherical collision body, and the coordinate axes include a first coordinate axis, a second coordinate axis and a third coordinate axis; The object processing unit 504 is further configured to: Determine a maximum coordinate axis parameter from the world scaling parameter, and determine the maximum coordinate axis parameter as the coordinate axis parameter of the first coordinate axis, the second coordinate axis, and the third coordinate axis; The first world coordinate axis parameter is multiplied by the coordinate axis parameter of the first coordinate axis, the second world coordinate axis parameter is multiplied by the coordinate axis parameter of the second coordinate axis, and the third world coordinate axis parameter is multiplied by the coordinate axis parameter of the third coordinate axis to obtain the first scaling parameter.
[0170] Optionally, the physical interaction unit is a capsule collision body, and the coordinate axis includes a first coordinate axis, a second coordinate axis and a third coordinate axis; The object processing unit 504 is further configured to: Determine collision body size information of the capsule collision body, wherein the collision body size information includes a starting radius, a starting radius, and a length; Determine, from the first coordinate axis, the second coordinate axis, and the third coordinate axis of the capsule collision body, a motion coordinate axis corresponding to the motion direction of the capsule collision body, and two other coordinate axes except the motion coordinate axis; Determining a maximum coordinate axis parameter from the coordinate axis parameters of the two other coordinate axes; The second scaling parameter is obtained by multiplying the length by the coordinate axis parameter of the moving coordinate axis, multiplying the starting radius by the maximum coordinate axis parameter, and multiplying the starting radius by the maximum coordinate axis parameter.
[0171] An embodiment of the present specification provides an object processing system. During the process of processing the initial object, object adjustment parameters are generated in advance by a data processing unit according to actual needs, and then the initial sub-object is adjusted using the object adjustment parameters to obtain a target sub-object that meets the actual needs; at the same time, in order to ensure that the target object is consistent with the actual needs, multiple scaling parameters can be calculated, and the physical interaction unit of the target sub-object in the initial object can be adjusted using the multiple scaling parameters to obtain a target object that can accurately perform physical interaction, thereby achieving accurate adjustment and scaling of the game model as needed to meet the needs of game development.
[0172] The above is a schematic scheme of an object processing system of this embodiment. It should be noted that the technical scheme of the object processing system and the technical scheme of the object processing method or data processing method described above belong to the same concept, and the details not described in detail in the technical scheme of the object processing system can be referred to the description of the technical scheme of the object processing method or data processing method described above.
[0173] Figure 6 The block diagram of a computing device 600 according to an embodiment of the present specification is shown. The components of the computing device 600 include but are not limited to a memory 610 and a processor 620. The processor 620 is connected to the memory 610 via a bus 630, and the database 650 is used to store data.
[0174] The computing device 600 also includes an access device 640 that enables the computing device 600 to communicate via one or more networks 660. 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 640 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).
[0175] In one embodiment of the present specification, the above components of the computing device 600 and Figure 6 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 6 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.
[0176] The computing device 600 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 600 may also be a mobile or stationary server.
[0177] The processor 620 is used to execute the following computer executable instructions, which, when executed by the processor, implement the steps of the above-mentioned object processing method or data processing method.
[0178] 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 or data processing method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the object processing method or data processing method embodiment.
[0179] 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 or data processing method when executed by a processor.
[0180] 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 or data processing method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the object processing method or data processing method embodiment.
[0181] 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 or data processing method when executed by a processor.
[0182] 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 or data processing method described above belong to 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 or data processing method described above.
[0183] 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.
[0184] 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.
[0185] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed 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.
[0186] 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.
[0187] 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 only 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 well understand and use this specification. This specification is only limited by the claims and their full scope and equivalents.
Claims
1. An object processing method, characterized in that: Applied to an object processing unit, the method comprises: Determining an object adjustment parameter for an initial sub-object in the initial object, wherein the object adjustment parameter is generated by a data processing unit when a parameter configuration tool performs a parameter configuration operation; Based on the object adjustment parameter, adjusting the initial sub-object to obtain a target sub-object; Based on a plurality of scaling parameters, a physical interaction unit of the target sub-object in the initial object is adjusted to obtain a target object.
2. The object processing method according to claim 1, characterized in that: The step of determining a sub-object to be adjusted from a plurality of initial sub-objects of an initial object based on the object adjustment parameter, and adjusting the sub-object to be adjusted to obtain a target sub-object includes: Determine the skeleton update information in the object adjustment parameter, and adjust the sub-object skeleton of the initial sub-object based on the skeleton update information to obtain the target sub-object; and / or An updated sub-object corresponding to the initial object is generated by using the object adjustment parameter, and the initial sub-object is replaced by the updated sub-object to obtain the target sub-object in the initial object.
3. The object processing method according to any one of claims 1 to 2, characterized in that: The determining of the object adjustment parameter for the initial sub-object in the initial object comprises: In the case of determining that the initial object satisfies the parameter acquisition condition, determining the sub-object type of the initial sub-object, and determining to acquire the data processing parameter from the data processing unit; The object adjustment parameter is obtained from the data processing parameter based on the sub-object type.
4. The object processing method according to any one of claims 1 to 2, characterized in that: Before determining the object adjustment parameter for the initial sub-object in the initial object, the method further includes: Determine sub-object generation parameters for the initial object, and generate the initial sub-object based on the sub-object generation parameters, wherein the sub-object generation parameters are generated by a data processing unit based on a parameter configuration tool performing a parameter configuration operation; Determine the associated skeleton information of the initial sub-object from the sub-object generation parameters, and determine the sub-object associated skeleton from the object skeleton of the initial object based on the associated skeleton information; Based on the sub-object associated skeleton, the initial sub-object is configured on the initial object.
5. The object processing method according to any one of claims 1 to 2, characterized in that: The step of adjusting the physical interaction unit of the target sub-object in the initial object based on the multiple scaling parameters to obtain the target object includes: Determine a world scaling parameter of the target sub-object, wherein the world scaling parameter includes a first world coordinate axis parameter, a second world coordinate axis parameter, and a third world coordinate axis parameter; Determining a first scaling parameter based on the world scaling parameter and a coordinate axis of the physical interaction unit; Determine unit size information of the physical interaction unit, and determine a second scaling parameter based on the unit size information and a coordinate axis of the physical interaction unit; Based on the first scaling parameter and the second scaling parameter, a physical interaction unit of the target sub-object in the initial object is adjusted to obtain a target object.
6. The object processing method according to claim 5, characterized in that: The physical interaction unit is a capsule collision body, and the coordinate axes include a first coordinate axis, a second coordinate axis and a third coordinate axis; The determining a first scaling parameter based on the world scaling parameter and the coordinate axis of the physical interaction unit includes: Determine, from the first coordinate axis, the second coordinate axis, and the third coordinate axis of the capsule collision body, a motion coordinate axis corresponding to the motion direction of the capsule collision body, and two other coordinate axes except the motion coordinate axis; A target world coordinate axis parameter corresponding to the movement direction of the capsule collision body is obtained from the world scaling parameter, and the target world coordinate axis parameter is determined as the coordinate axis parameter of the movement coordinate axis; Determine two other world coordinate axis parameters except the target world coordinate axis parameter from the world scaling parameters, and determine the maximum coordinate axis parameter of the two other world coordinate axis parameters as the coordinate axis parameter of the two other coordinate axes; The first world coordinate axis parameter is multiplied by the coordinate axis parameter of the first coordinate axis, the second world coordinate axis parameter is multiplied by the coordinate axis parameter of the second coordinate axis, and the third world coordinate axis parameter is multiplied by the coordinate axis parameter of the third coordinate axis to obtain the first scaling parameter.
7. The object processing method according to claim 5, characterized in that: The physical interaction unit is a spherical collision body, and the coordinate axes include a first coordinate axis, a second coordinate axis and a third coordinate axis; The determining a first scaling parameter based on the world scaling parameter and the coordinate axis of the physical interaction unit includes: Determine a maximum coordinate axis parameter from the world scaling parameter, and determine the maximum coordinate axis parameter as the coordinate axis parameter of the first coordinate axis, the second coordinate axis, and the third coordinate axis; The first world coordinate axis parameter is multiplied by the coordinate axis parameter of the first coordinate axis, the second world coordinate axis parameter is multiplied by the coordinate axis parameter of the second coordinate axis, and the third world coordinate axis parameter is multiplied by the coordinate axis parameter of the third coordinate axis to obtain the first scaling parameter.
8. The object processing method according to claim 5, characterized in that: The physical interaction unit is a capsule collision body, and the coordinate axes include a first coordinate axis, a second coordinate axis and a third coordinate axis; The determining of the unit size information of the physical interaction unit, and determining the second scaling parameter based on the unit size information and the coordinate axis of the physical interaction unit, includes: Determine collision body size information of the capsule collision body, wherein the collision body size information includes a starting radius, a starting radius, and a length; Determine, from the first coordinate axis, the second coordinate axis, and the third coordinate axis of the capsule collision body, a motion coordinate axis corresponding to the motion direction of the capsule collision body, and two other coordinate axes except the motion coordinate axis; Determining a maximum coordinate axis parameter from the coordinate axis parameters of the two other coordinate axes; The second scaling parameter is obtained by multiplying the length by the coordinate axis parameter of the moving coordinate axis, multiplying the starting radius by the maximum coordinate axis parameter, and multiplying the starting radius by the maximum coordinate axis parameter.
9. A data processing method, characterized in that: Applied to a data processing unit, the method comprises: Determine a parameter storage structure for an initial sub-object in the initial object, and construct a parameter configuration tool based on the parameter storage structure; Parameter configuration operations are performed based on the parameter configuration tool to obtain object adjustment parameters, so that the object processing method in claim 1 above obtains the target object based on the object adjustment parameters, wherein the object adjustment parameters are stored in the parameter storage structure.
10. An object processing system, characterized in that: It includes a data processing unit and an object processing unit, wherein: The data processing unit is configured to determine a parameter storage structure for an initial sub-object in the initial object, and to construct a parameter configuration tool based on the parameter storage structure, and to perform a parameter configuration operation based on the parameter configuration tool to obtain object adjustment parameters, wherein the object adjustment parameters are stored in the parameter storage structure; The object processing unit is configured to determine object adjustment parameters for an initial sub-object in an initial object, adjust the initial sub-object based on the object adjustment parameters to obtain a target sub-object, and adjust a physical interaction unit of the target sub-object in the initial object based on multiple scaling parameters to obtain a target object.
11. 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 described in any one of claims 1 to 9 are implemented.
12. A computer-readable storage medium, characterized in that: It stores a computer program / instruction, which implements the steps of the method described in any one of claims 1 to 9 when executed by a processor.
13. A computer program product, characterized in that The method comprises a computer program / instruction which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 9.