Skeleton model processing method and device, storage medium, equipment and program product
By acquiring a preset material parameter table and bone chain, the physical parameters of the bone object are automatically matched, solving the problem of tedious manual settings in existing technologies and improving the efficiency and realism of bone model processing.
Patent Information
- Application Number
- CN202511054161.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-29
- Publication Date
- 2025-11-14
AI Technical Summary
In 3D animation and game development, the realism and efficiency of clothing ribbon skeleton simulation are low. Existing technologies require manual setting of physical parameters, which is cumbersome and inconvenient, while automated calculation tools cannot effectively simulate complex fabrics.
By obtaining the preset material parameter table and the skeleton chain, the physical parameters are determined in the preset material parameter table based on the material properties of the skeleton object. The physical parameters are automatically matched and relative motion constraints are set, avoiding manual repetition.
It improves the efficiency of skeletal model processing, ensures that the motion conforms to the material properties, and achieves skeletal simulation that is closer to the real physical effect.
Smart Images

Figure CN120953448A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of game technology, specifically to a method for processing a skeletal model, a device for processing a skeletal model, a computer-readable storage medium, a computer device, and a computer program product. Background Technology
[0002] In the fields of 3D animation and game development, the realism and efficiency of simulating the skeleton of clothing ribbons have always been core challenges for creators. Related technologies typically involve manually setting the physical parameters of the skeleton and adding physical constraints using 3ds Max's native physics system.
[0003] However, manually setting physical parameters is cumbersome and leads to low work efficiency. Summary of the Invention
[0004] This application provides a method, apparatus, storage medium, device, and program product for processing skeletal models. By setting a preset material parameter table, physical parameters can be matched according to the material properties of the skeletal object, realizing the reuse of physical parameters, avoiding manual repetitive settings, and improving work efficiency.
[0005] On one hand, embodiments of this application provide a method for processing a skeletal model, the method comprising:
[0006] Obtain a preset material parameter table and a bone chain, wherein the bone chain includes at least one bone object, and the preset material parameter table is used to represent the mapping relationship between the material properties and physical parameters of the bone object;
[0007] Based on the material properties set for the bone object in the bone chain, the physical parameters corresponding to the bone object are determined in the preset material parameter table;
[0008] Based on the physical parameters of the skeletal objects, the relative motion constraint parameters between any two adjacent skeletal objects on the skeletal chain are determined.
[0009] On the other hand, embodiments of this application provide a virtual resource processing apparatus, the apparatus comprising:
[0010] The acquisition module is used to acquire a preset material parameter table and a skeleton chain, wherein the skeleton chain includes at least one skeleton object, and the preset material parameter table is used to represent the mapping relationship between the material properties and physical parameters of the skeleton object;
[0011] The first determining module is used to determine the physical parameters corresponding to the bone object based on the material properties set by the bone object in the preset material parameter table.
[0012] The second determining module is used to determine the relative motion constraint parameters between any two adjacent bone objects on the bone chain based on the physical parameters of the bone object.
[0013] On the other hand, embodiments of this application provide a computer-readable storage medium storing a computer program adapted for loading by a processor to execute the skeletal model processing method as described in any of the above embodiments.
[0014] On the other hand, embodiments of this application provide a computer device, the computer device including a processor and a memory, the memory storing a computer program, the processor executing the skeletal model processing method as described in any of the above embodiments by calling the computer program stored in the memory.
[0015] On the other hand, embodiments of this application provide a computer program product, including computer instructions, which, when executed by a processor, implement the skeletal model processing method as described in any of the above embodiments.
[0016] The skeletal model processing method provided in this application embodiment obtains a preset material parameter table and a skeletal chain. The skeletal chain includes at least one skeletal object. The preset material parameter table represents the mapping relationship between the material properties and physical parameters of the skeletal objects. Based on the material properties set for the skeletal objects in the skeletal chain, the physical parameters corresponding to the skeletal objects are determined in the preset material parameter table. By setting the preset material parameter table and then determining the physical parameters corresponding to the material properties from the preset material parameter table as the physical parameters of the skeletal objects, when assigning values to the skeletal objects, it is only necessary to match the physical parameters according to the material properties through the preset material parameter table, realizing the reuse of physical parameters, avoiding manual repetitive setting, and improving work efficiency. Finally, based on the physical parameters of the skeletal objects, the relative motion constraint parameters between any two adjacent skeletal objects on the skeletal chain are determined. The physical parameters are determined from the material properties of the skeletal objects, and then the relative motion constraint parameters are determined based on the physical parameters of the skeletal objects, ensuring that the motion of the skeletal objects can conform to the material characteristics, and the calculation results are closer to the real physical effect. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram of an example processing system provided in an embodiment of this application.
[0019] Figure 2 This is a flowchart illustrating the method for processing a skeletal model provided in an embodiment of this application.
[0020] Figure 3 This is a schematic diagram illustrating a scenario for the skeletal model processing method provided in an embodiment of this application.
[0021] Figure 4 This is a flowchart illustrating the method for processing a skeletal model provided in an embodiment of this application.
[0022] Figure 5 This is a schematic diagram illustrating a scenario for the skeletal model processing method provided in an embodiment of this application.
[0023] Figure 6 This is a flowchart illustrating the method for processing a skeletal model provided in an embodiment of this application.
[0024] Figure 7 This is a schematic diagram illustrating a scenario for the skeletal model processing method provided in an embodiment of this application.
[0025] Figure 8 This is a schematic diagram illustrating a scenario for the skeletal model processing method provided in an embodiment of this application.
[0026] Figure 9 This is a schematic diagram illustrating a scenario for the skeletal model processing method provided in an embodiment of this application.
[0027] Figure 10 This is a schematic diagram illustrating a scenario for the skeletal model processing method provided in an embodiment of this application.
[0028] Figure 11 This is a schematic diagram illustrating a scenario for the skeletal model processing method provided in an embodiment of this application.
[0029] Figure 12 This is a schematic diagram illustrating a scenario for the skeletal model processing method provided in an embodiment of this application.
[0030] Figure 13 This is a schematic diagram illustrating a scenario for the skeletal model processing method provided in an embodiment of this application.
[0031] Figure 14 This is a flowchart illustrating the method for processing a skeletal model provided in an embodiment of this application.
[0032] Figure 15 This is a schematic diagram illustrating a scenario for the skeletal model processing method provided in an embodiment of this application.
[0033] Figure 16 This is a schematic diagram illustrating a scenario for the skeletal model processing method provided in an embodiment of this application.
[0034] Figure 17 This is a schematic diagram illustrating a scenario for the skeletal model processing method provided in an embodiment of this application.
[0035] Figure 18 This is a schematic diagram illustrating a scenario for the skeletal model processing method provided in an embodiment of this application.
[0036] Figure 19 This is a schematic diagram illustrating a scenario for the skeletal model processing method provided in an embodiment of this application.
[0037] Figure 20 This is a flowchart illustrating the method for processing a skeletal model provided in an embodiment of this application.
[0038] Figure 21 This is a schematic diagram illustrating a scenario for the skeletal model processing method provided in an embodiment of this application.
[0039] Figure 22 This is a schematic diagram illustrating a scenario for the skeletal model processing method provided in an embodiment of this application.
[0040] Figure 23 This is a schematic diagram illustrating a scenario for the skeletal model processing method provided in an embodiment of this application.
[0041] Figure 24 This is a schematic diagram illustrating a scenario for the skeletal model processing method provided in an embodiment of this application.
[0042] Figure 25 This is a schematic diagram illustrating a scenario for the skeletal model processing method provided in an embodiment of this application.
[0043] Figure 26 This is a schematic diagram of the structure of a virtual resource processing device provided in an embodiment of this application.
[0044] Figure 27 A schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0045] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0046] Below, we will further introduce the relevant background of the embodiments of this application.
[0047] In the fields of 3D animation and game development, the realism and efficiency of simulating the skeleton of clothing ribbons have always been core challenges for creators. Related technologies typically utilize the MassFX physics module (which simulates various physical phenomena such as collisions, gravity, and friction between objects) built into 3ds Max (a 3D modeling, animation, and rendering software). This allows for manual setting of the skeleton's physical parameters and the addition of physical constraints through 3ds Max's native physics system. Alternatively, SpringMagic (a ribbon plugin for quickly generating dynamic effects such as skeletons and ropes) can be used. This plugin employs a constraint-based inverse dynamics solver (which pre-calculates the position information of the next level of skeletons by iterating through the information of each level) to simulate the physical constraints between skeletons (orientation alignment, rotational delay, and position transfer) to achieve natural movement effects for ribbon-like soft objects.
[0048] Understandably, 3ds Max's native MassFX solution is too primitive. Each time it's used, physical parameters must be manually set, and constraint components must be manually added between the bones of each ribbon. Every calculation requires countless adjustments, which is extremely inconvenient. Although SpringMagic is an automated calculation tool, its algorithm is too simple and cannot handle complex fabric simulations such as long skirts, easily resulting in clipping issues.
[0049] In view of this, embodiments of this application provide a method, apparatus, storage medium, device, and program product for processing skeletal models. Specifically, the method for processing skeletal models in this application embodiment can be executed by a computer device, wherein the computer device can be a terminal or a server, etc. The terminal can be a smartphone, tablet computer, laptop computer, smart TV, wearable smart device, smart vehicle terminal, etc. The terminal can also include a client, which can be a game client, browser client, instant messaging client, or mini-program, etc. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.
[0050] For example, when the skeletal model processing method runs on a terminal device, the terminal device may include a display screen and a processor. The display screen is used to present a preset material parameter table and receive instructions generated by the user on the editing interface. The editing interface may include a skeletal chain and controls (e.g., material setting controls and reading controls). The processor is used to determine the physical parameters and relative motion constraint parameters of the skeletal object. When the user operates on the skeletal chain and the preset material parameter table through the display screen, the editing screen can control the local content of the terminal device in response to the received operation instructions. The terminal device can provide the editing interface to the user in various ways, such as rendering it on the terminal device's display screen or presenting a graphical user interface through holographic projection.
[0051] For example, when the skeletal model processing method runs on a server, this method can be implemented and executed based on a cloud processing system. A cloud processing system refers to a game based on cloud computing. A cloud processing system includes servers and client devices. The main body running the skeletal model processing application and the main body displaying the edited screen are separate. The storage and execution of the skeletal model processing method are completed on the server. The editing and displaying are completed on the client. The client is mainly used for receiving and sending skeletal object data and displaying the edited screen. For example, the client can be a display device with data transmission capabilities close to the user, such as a mobile terminal, television, computer, PDA, personal digital assistant, head-mounted display device, etc. However, the terminal device for processing skeletal object data is the server in the cloud. During processing, the user operates the client to send instructions to the server. The server controls the skeletal model according to the instructions, encodes and compresses the skeletal animation data, returns it to the client via the network, and finally, the client decodes and outputs the screen.
[0052] It should be noted that, in this embodiment, the execution entity of the skeletal model processing method can be a terminal device or a server. The terminal device can be a local terminal device or a client device in the aforementioned cloud gaming. This embodiment does not limit the type of execution entity.
[0053] For example, in conjunction with the above description, Figure 1 This application illustrates a processing system 1000 for implementing a skeletal model processing method. The processing system 1000 may include at least one terminal 1001, at least one server 1002, at least one database 1003, and a network. The user-held terminal 1001 can connect to different servers via the network. The terminal is any device with computing hardware capable of supporting and executing corresponding software development application tools for skeletal model processing.
[0054] In the aforementioned processing system 1000, terminal 1001 is used to install and run development application tools. In some cases, development application tools may not need to be installed in advance on terminal 1001. Users can directly access the development tools through clients such as browsers to process the skeletal model.
[0055] In possible application scenarios, different terminals 1001 may be served by different servers 1002. Therefore, in order to distinguish the servers 1002 corresponding to different terminals 1001, the embodiments of this application will use the terms "first" and "second" to describe them. In fact, the servers 1002 corresponding to different terminals 1001 can be the same server 1002. Therefore, without distinguishing between "first" and "second", it can be understood that the terminals 1001 corresponding to the skeletal models located in the same processing scenario are served by the same server 1002.
[0056] Furthermore, when the processing system 1000 includes multiple terminals, multiple servers, and multiple networks, different terminals can connect to each other through different networks and different servers. The network can be a wireless network or a wired network; for example, wireless networks include wireless local area networks (WLAN), local area networks (LAN), cellular networks, 2G networks, 3G networks, 4G networks, 5G networks, etc. Additionally, different terminals can also connect to other terminals or to servers using their own Bluetooth networks or hotspot networks. Furthermore, the system 100 can include multiple databases coupled to different servers, and can continuously store game-related information in the databases while different users are playing multiplayer games online.
[0057] It should be noted that, Figure 1 The schematic diagram of the processing system shown is merely an example. The processing system 1000 described in this application embodiment is for the purpose of more clearly illustrating the technical solutions of this application embodiment and does not constitute a limitation on the technical solutions provided in this application embodiment. As those skilled in the art will know, with the evolution of processing systems and the emergence of new business scenarios, the technical solutions provided in this application embodiment are also applicable to similar technical problems.
[0058] It should be noted that the triggering operations mentioned in the subsequent detailed description of the skeletal model processing method provided in the embodiments of this application can all be regarded as triggering operations performed by the user through a finger or by controlling a medium such as a mouse, keyboard, or stylus. The specific medium used can be determined according to the type of computer device. For example, when the computer device is a touchscreen device such as a mobile phone, tablet, or game console, the user can operate on the touchscreen using any suitable object or accessory such as a finger or stylus. When the terminal device is a non-touchscreen terminal device such as a desktop computer or laptop, the user can operate using an external device such as a mouse or keyboard.
[0059] The technical solution of this application will be described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0060] In this embodiment, a graphical user interface is provided via a terminal device. The graphical user interface includes at least a partial editing interface and at least one skeletal chain, with at least one bone object on the skeletal chain. After rendering, the skeletal chain can be displayed as the ribbons of a virtual character's clothing.
[0061] In this embodiment of the application, the skeletal model is processed to generate a displacement animation, which can be generated based on skeletal chain rendering.
[0062] As can be understood, a virtual character is a game character controlled by the user in a game. The user manipulates this virtual character to perform various game activities within the game environment, such as picking up items, engaging in combat, exploring, or solving puzzles. This virtual character can represent the user's image, and each virtual character can be implemented using a three-dimensional or two-dimensional virtual model; this embodiment does not specifically limit this. Virtual characters include, but are not limited to, at least one of virtual human figures, virtual animals, and virtual machines.
[0063] Please see Figure 2 , Figure 2 This is a flowchart illustrating the method for processing a skeletal model provided in an embodiment of this application. Figure 3 This diagram illustrates an application scenario of the skeletal model processing method provided in this application embodiment. It should be noted that the steps shown may be executed in a different logical order than that shown in the flowchart. The method provides a graphical user interface through a terminal device. The graphical user interface includes at least a partial editing interface and at least one skeletal chain, which includes at least one bone object. A physics calculation tool can be constructed based on this method, which may include the following steps:
[0064] Step 011: Obtain the preset material parameter table and the bone chain, wherein the bone chain includes at least one bone object, and the preset material parameter table is used to represent the mapping relationship between the material properties and physical parameters of the bone object.
[0065] Among them, physical parameters can be parameters used to describe the motion characteristics of the skeletal object, such as friction and elasticity.
[0066] Optionally, the physical parameters include at least one of the following: swing angle parameter, rotation angle parameter, shape parameter, damping parameter, elastic force parameter, friction force parameter, and impact elastic force parameter.
[0067] The swing angle parameter can be used to constrain the deviation angle of the skeletal object from its initial position, limiting the swing amplitude of the ribbon after it is rendered as a ribbon animation.
[0068] The rotation angle parameter can be used to constrain the rotation angle of the bone object around its own axis (X-axis, Y-axis, or Z-axis), limiting the degree of ribbon twist after rendering as a ribbon animation.
[0069] Among them, the shape parameter can be used to constrain the ability of a skeletal object to resist deformation and limit the softness of the ribbon after it is rendered as a ribbon animation.
[0070] Among them, the damping parameter can be reflected as the magnitude of the motion resistance of the skeletal object, which limits the decay rate of the ribbon's swing after rendering it as a ribbon animation.
[0071] Among them, the elasticity parameter can be the elasticity and rebound ability of the skeletal object, which limits the ability of the ribbon to deform and recover after being rendered as a ribbon animation.
[0072] Among them, the friction parameter can be the coefficient of friction when the skeletal object collides, which limits the smoothness of the ribbon sliding after the collision when rendered as a ribbon animation.
[0073] Among them, the collision elasticity parameter can be the degree of rebound after a skeletal object collides, which limits the degree of rebound when the ribbon touches different obstacles after being rendered as a ribbon animation.
[0074] It is understood that physical parameters may include swing angle parameters, rotation angle parameters, and shape parameters; or, they may include swing angle parameters, elastic force parameters, friction force parameters, and collision elastic force parameters; or, they may also include swing angle parameters, rotation angle parameters, shape parameters, damping parameters, elastic force parameters, friction force parameters, and collision elastic force parameters. This application does not limit these parameters and they are not listed here.
[0075] The preset material parameter table is used to store the mapping relationship between different material types (e.g., iron chain, leather armor, light gauze, cloth, etc.) and their corresponding physical parameters (swing angle parameters, rotation angle parameters, or shape parameters, etc.).
[0076] In 3D modeling or animation, a skeletal object is a single element used to represent a skeleton, possessing specific material properties and physical parameters. Skeletal objects can be used to drive the movement or deformation of objects.
[0077] A skeletal chain can be a sequence of multiple consecutive hierarchical skeletal objects (such as the bones of a ribbon or skirt). For example, see [link to relevant documentation]. Figure 3 A sequence of multiple skeletal objects is called a skeletal chain.
[0078] Among them, the material attribute can be the material type associated with the skeleton object, which is used to determine the physical properties of the skeleton object.
[0079] Step 012: Based on the material properties set for the skeletal object of the skeletal chain, determine the physical parameters corresponding to the skeletal object in the preset material parameter table.
[0080] Among them, the physical parameters of the skeleton object can be determined by selecting the physical parameters that match the material properties from the preset material parameter table.
[0081] Step 013: Based on the physical parameters of the bone objects, determine the relative motion constraint parameters between any two adjacent bone objects on the bone chain.
[0082] Among them, the relative motion constraint parameters can be constraint parameters used to constrain the relative motion of adjacent bones in the skeletal chain.
[0083] Specifically, taking the application of this method to a solver as an example, users can first create bone objects and bone chains in software such as 3ds Max. Then, using the solver, the user-selected bone objects are stored as an array, forming the bone chain to be processed. Next, the preset material parameter table and the material properties of each bone object in the bone chain are obtained. Based on the material properties set for the bone objects (e.g., material properties set by the user through the solver), the physical parameters corresponding to the material properties are determined from the preset material parameter table, thus determining the physical parameters of the bone objects. Finally, based on the physical parameters of the bone objects, the relative motion constraint parameters between any two adjacent bone objects are determined, i.e., the relative motion between any two adjacent bone objects is determined.
[0084] For example, taking a preset material parameter table consisting of m rows and n columns as an example, assuming that the fourth row of the preset material parameter table contains material attribute labels and the material attribute of the skeleton object is a light gauze attribute, by matching the light gauze attribute with the material attribute in the fourth row of the preset material parameter table, if a match is found, the physical parameters corresponding to the light gauze attribute, such as friction parameter of 0.3, swing angle parameter of 45°, and damping parameter of 100, are stored as variables and written into the physical component of the skeleton object, thereby assigning values to the physical component of the skeleton object.
[0085] It is understood that bone objects on the same bone chain can have the same material properties; or they can have different material properties. For ease of description, this application uses the example of bone objects on the same bone chain having the same material properties for illustration, but this application does not limit this.
[0086] Different materials (e.g., gauze, chains) have different physical properties (such as softness and elasticity), which affect the motion performance of skeletal chains like ribbons in animation (e.g., a skeletal chain made of gauze swings more in animation, while a skeletal chain made of chains swings more stiffly). A preset material parameter table maps the material properties of skeletal objects to quantifiable physical parameters. These physical parameters define the motion performance of skeletal objects and the relative motion between any two adjacent skeletal objects, ensuring that the motion of the skeletal chain conforms to its material properties and achieving natural and realistic physical calculation effects.
[0087] Thus, by acquiring a preset material parameter table and a skeleton chain, where the skeleton chain includes at least one skeleton object, and the preset material parameter table representing the mapping relationship between the material properties and physical parameters of the skeleton object, the physical parameters corresponding to the skeleton object are determined in the preset material parameter table based on the material properties set for the skeleton object in the skeleton chain. By setting the preset material parameter table and then determining the physical parameters corresponding to the material properties from the preset material parameter table as the physical parameters of the skeleton object, when assigning values to the skeleton object, it is only necessary to match the physical parameters according to the material properties through the preset material parameter table, realizing the reuse of physical parameters, avoiding manual repetitive settings, and improving work efficiency. Finally, based on the physical parameters of the skeleton object, the relative motion constraint parameters between any two adjacent skeleton objects on the skeleton chain are determined. The physical parameters are determined from the material properties of the skeleton object, and then the relative motion constraint parameters are determined based on the physical parameters of the skeleton object, ensuring that the motion of the skeleton object can conform to the material characteristics, and the solution result is closer to the real physical effect.
[0088] Please see Figure 4 In some implementations, the skeletal model processing method further includes:
[0089] Step 014: In response to the first triggering operation on the bone object of the skeletal chain, determine the first target bone object;
[0090] Step 012: Based on the material properties of the skeletal object according to the skeletal chain, determine the physical parameters corresponding to the skeletal object in the preset material parameter table, including:
[0091] Step 0121: Based on the material properties of the first target bone object in the skeletal chain, determine the physical parameters corresponding to the first target bone object in the preset material parameter table.
[0092] Specifically, after creating bone objects and bone chains in software such as 3ds Max, users can select the bone object to be processed. In response to the user's selection operation (i.e. the first trigger operation), the selected bone object is determined as the first target bone object. Then, based on the material properties of the first target bone object, the physical parameters corresponding to the material properties are found from the preset material parameter table.
[0093] Optionally, the method also includes, via the terminal's graphical user interface:
[0094] Step 0111: Display the editing interface, which includes material setting controls and reading controls;
[0095] Step 012: Based on the material properties of the first target bone object in the skeletal chain, determine the physical parameters corresponding to the first target bone object in the preset material parameter table, including:
[0096] Step 0122: In response to the second trigger operation of the material setting control, set the material properties of the first target bone object;
[0097] Step 0123: In response to the third trigger operation received by the read control, read the physical parameters corresponding to the first target bone object from the preset material parameter table.
[0098] The graphical user interface can be a visual operation panel displayed to the user.
[0099] The editing interface can be a sub-interface in the graphical user interface used to set material properties and read physical parameters. The editing interface includes a material setting control and a table reading control. The material setting control can be an interactive control in the editing interface for users to select or set the material properties of the skeleton object. The table reading control can be an interactive control in the editing interface used to trigger the reading of a preset material parameter table.
[0100] Specifically, please refer to Figure 5The system can display an editing interface within the terminal's graphical user interface. This interface includes material setting controls, which provide material type selection and a material index. For example, users can click or long-press the chain, leather armor, gauze, and fabric controls shown in the image as a second trigger operation. In response to this second trigger operation, the system sets the material properties of the first target skeleton object. Similarly, users can use the index control shown in the image to input data as a second trigger operation, again setting the material properties of the first target skeleton object. After the user has set the material properties, they can use clicks or long-presses as a third trigger operation to read a table. In response to the third trigger operation received by the read control, the system reads the physical parameters corresponding to the first target skeleton object from the preset material parameter table. Users no longer need to manually input material properties when setting skeleton objects; they can simply interact with the editing interface by clicking various controls to achieve the mapping from material properties to physical parameters. This method is simple and highly efficient.
[0101] It's understandable that the editing interface could also include a frame range control and an open control for opening a table. The frame range refers to the continuous frame interval covered by physics calculations or keyframe editing in animation production, used to limit the time range of skeletal model calculations and animation playback. Users can access the preset material parameter table by activating the open control.
[0102] In some implementations, the first target skeleton object is a single object, and the editing interface also includes parameter display controls. The method further includes:
[0103] Step 016: In the parameter display control, display the physical parameters corresponding to the material properties of the first target skeleton object.
[0104] Among them, the parameter display control can be a control that allows users to view physical parameters in the editing interface.
[0105] Please see Figure 5 Users can view the physical parameters corresponding to the material properties of the first target skeleton object through the parameter display control in the editing interface for further confirmation.
[0106] Optionally, step 011: Obtain a preset material parameter table, including:
[0107] Step 0111: Display the editing interface, which includes table creation controls;
[0108] Step 0112: In response to the seventh trigger operation of the table creation control, generate a preset material parameter table.
[0109] The table creation control is an interactive control that allows users to create a preset material parameter table in the editing interface. Users can click, double-click, or perform other operations on the table creation control in the editing interface, and the preset material parameter table will be generated in response to the user's seventh trigger operation.
[0110] In some implementations, the preset material parameter table includes multiple sets of physical parameters and preset material properties. Each set of physical parameters includes multiple physical parameters, and the physical parameters and preset material properties are set in a one-to-one correspondence. Step 012: The material properties set based on the skeletal object of the skeletal chain are determined in the preset material parameter table, including:
[0111] Step 0124: Determine the target material property that matches the material property set for the skeleton object. The target material property can be any preset material property.
[0112] Step 0125: Determine the physical parameters corresponding to the skeleton object based on a set of physical parameters corresponding to the target material properties.
[0113] Specifically, each material attribute corresponds to a set of physical parameters. First, a target material attribute matching the material attribute set for the bone object can be found in the preset material parameter table. Then, the set of physical parameters corresponding to the target material attribute is assigned to the bone object, thus determining the physical parameters of the bone object. In this way, values can be assigned to each bone object through material attributes, solving the inconvenience of manual assignment and improving work efficiency.
[0114] Optionally, the relative motion constraint parameters include rotation angle limit parameters and elasticity parameters. Step 013: Based on the physical parameters of the bone object, determine the relative motion constraint parameters between any two adjacent bone objects on the bone chain, including:
[0115] Step 0131: Based on the swing angle parameters, rotation angle parameters, and / or shape parameters of the bone objects, determine the rotation angle limit parameters between any two adjacent bone objects on the bone chain;
[0116] Step 0132: Based on the damping parameters, elasticity parameters, friction parameters, and / or collision elasticity parameters of the bone objects, determine the elasticity parameters between any two adjacent bone objects on the bone chain.
[0117] Specifically, components like UConstraint() (a constraint component for generating relative motion parameters) can be used to calculate the relative motion constraint parameters between any two adjacent bone objects in a skeletal chain based on the physical parameters of the skeletal objects. This is achieved by converting physical parameters (such as swing angle, rotation angle, shape, damping, and elasticity) from a preset material parameter table into rotation angle limitation parameters and elasticity parameters between adjacent bone objects, ensuring that the motion of the skeletal chain strictly follows the physical properties of the material. For example, the swing angle parameters of the bone objects control the swing range between adjacent bone objects in the X and Y axes, the rotation angle parameters determine the torsional range of adjacent bone objects around the Z axis, thus determining the rotation angle limitation parameters between two adjacent bone objects. Finally, the shape parameters further restrict the rotation angle limitation parameters to obtain the final rotation angle limitation parameters. Then, the damping and elasticity parameters determine the rebound force after the swing of two adjacent bone objects, and the friction and collision elasticity parameters control the rebound amplitude after the collision of two adjacent bone objects, thus determining the elasticity parameters between two adjacent bone objects.
[0118] Please see Figure 6 In some implementations, the skeletal model processing method further includes:
[0119] Step 015: In response to selection operations on different skeletal chains, determine the second target bone object;
[0120] Step 016: Add a third target bone object between any two adjacent second target bone objects to connect the two second target bone objects, forming a mesh skeleton.
[0121] Optionally, step 016: Add a third target bone object connecting two adjacent second target bone objects, including:
[0122] Step 0161: Add a third target bone object between the midpoints of any two adjacent second target bone objects.
[0123] The third target bone object is the horizontal bone that connects the two second target bone objects.
[0124] Specifically, the reason why the ribbon calculation algorithm in related technologies is prone to clipping is because there are large gaps between the bones of the skirt ribbon. For example, taking the middle bone as the character's thigh and the bones surrounding the middle bone as the skirt bones, when the character moves, the thigh bones lift upwards, causing them to pass through the gap between the two skirt bones, thus resulting in clipping. A second target bone object can be determined based on the user's selection operation on different bone chains. Then, a third target bone object is added between any two adjacent second target bone objects, with each end of the third target bone object connected to one of the two second target bone objects. For example, please refer to... Figure 7 When selecting the third target skeleton object to be generated, the user can first select a ring of second target skeleton objects in sequence. Responding to the user's selection order, the second target skeleton objects are arranged into an ordered array by sequence number. Adjacent skeleton objects in the array are horizontally adjacent. The second target skeleton objects in the smallest and largest sorted order are adjacent, with the largest sorted second target skeleton object preceding the smallest sorted second target skeleton object. Then, the midpoints of two second target skeleton objects are determined. For example, by obtaining the skeleton coordinates of two adjacent second target skeleton objects, the first midpoint of one (assuming the first sorted object) and the second midpoint of the other (assuming the second sorted object) are determined using linear interpolation. Based on the first and second midpoints, third target skeleton objects are added, connecting the first and second midpoints respectively. Third target skeleton objects are added sequentially between adjacent second target skeleton objects, thus forming a ring-shaped horizontal skeleton. This horizontal skeleton then forms a mesh skeleton from the scattered skeleton chains.
[0125] It is understandable that second target bone objects on different skeletal chains (such as the circumferential bones of a circular skirt) do not have fixed adjacency relationships. Responding to the user's selection order, the lateral adjacency logic of each second target bone object is clarified after sorting them sequentially. These are then connected by generated third target bone objects, with the first and last second target bone objects being adjacent, ultimately forming a closed mesh collision structure that fills the gaps between skeletal chains, thus resolving the clipping problem. For example, please refer to... Figures 8 to 11 After setting the third target bone, no matter how the middle thigh bone rotates or lifts, it will be blocked by the mesh bone, thus avoiding clipping.
[0126] Optionally, the third target bone includes a first horizontal bone and a second horizontal bone, and two adjacent second target bone objects include a first bone object and a second bone object. The first bone object is sorted before the second bone object is sorted. The two ends of the first horizontal bone are respectively connected to one end of the first bone object and one end of the second horizontal bone, and the other end of the second horizontal bone is connected to the second bone object.
[0127] The width and height of the second transverse bone are both smaller than those of the first transverse bone.
[0128] Specifically, please refer to Figure 12 The constraint formed by a single horizontal bone is too rigid. Considering the elasticity and display effects of game costumes, a third target bone object can be obtained by setting a first and a second horizontal bone, thereby constraining the first and second bone objects together to form an elastic buffer effect. The width and height of the first horizontal bone are both greater than those of the second horizontal bone. The first horizontal bone acts as the main collider, preventing external clipping. The second horizontal bone acts as an elastic transition, connecting the first and second bone objects, avoiding stiff movement caused by rigid constraints. By setting the first and second horizontal bones, the problem of clipping through gaps is solved while preserving the naturalness of the ribbon's movement. In some embodiments, the bone model processing method also includes:
[0129] Step 017: Display the constraint editing interface, which includes the first constraint control;
[0130] Step 018: In response to the fourth trigger operation on the constraint control, determine the bone parameters, which include bone width, bone height and constraint strength. The constraint strength is used to limit the physical connection strength between the third target bone object and the two second target bone objects.
[0131] Step 016: Add a third target bone object connecting any two adjacent second target bone objects, including:
[0132] Step 0162: Based on the bone parameters and the bone coordinates of two adjacent second target bone objects, add a third target bone object to connect the two second target bone objects.
[0133] The greater the constraint strength, the less mobility there is between the third target skeleton and the two second target skeleton objects.
[0134] Optionally, the first constraint control includes a width control, a height control, and a constraint strength control. Step 018: In response to the fourth trigger operation on the constraint control, determine the skeleton parameters, including:
[0135] Step 0181: In response to the first input operation received by the width control, determine the bone width;
[0136] Step 0182: In response to the second input operation received by the height control, determine the bone height;
[0137] Step 0183: In response to the third input operation received by the constraint strength control, determine the constraint strength.
[0138] The user can input the desired bone width of the third target skeleton object through a first input operation on the width control (e.g., an input operation performed after clicking the size control, a click operation, etc.), and the bone width of the third target skeleton object is determined in response to the user's input operation; the user can also input the desired bone width of the third target skeleton object through a second input operation on the height control (e.g., an input operation, a click operation, etc.), and the bone width of the third target skeleton object is determined in response to the user's input operation; the user can also input the degree of mobility between the desired third target skeleton object and the two second target skeleton objects through a third input operation on the constraint strength control (e.g., an input operation, a click operation, etc.), and the constraint strength of the third target skeleton object is determined in response to the user's input operation.
[0139] The constraint editing interface can be a visual interface for setting the bone parameters of the third target bone object. The constraint boundary interface includes a first constraint control, which can be a control for receiving user adjustments to the bone width and height (bone size) and connection strength of the third target bone object.
[0140] Specifically, please refer to Figure 13 Users can execute the fifth trigger operation through the first constraint control in the constraint editing interface. For example, if the user enters the number 5 in the width control, in response to the user's fourth trigger operation, the user-input bone parameters are determined as the bone parameters of the third target bone object. Then, based on the bone coordinates of the two adjacent second target bone objects, the position of the third target bone object is determined, and the bone parameters are assigned to the third target bone object, thereby adding a third target bone object that connects the two second target bone objects.
[0141] It is understandable that the bone width and bone height of the third target bone object directly affect its ability to cover the bone gap between two adjacent second target bone objects, while the constraint strength affects the physical connection rigidity between the third target bone object and the two connected second target bone objects. Through the constraint editing interface, users can customize the bone parameters according to the material properties and the application scenario requirements of the bone chain, so that the third target bone object generated based on the bone parameters can take into account both anti-mold-breaking effect and natural movement.
[0142] In some implementations, the skeletal model processing method further includes:
[0143] Step 017: Display the constraint editing interface, which includes the second constraint control;
[0144] Step 019: In response to the fifth trigger operation on the second constraint control, determine the bone parameters, which include bone width, bone height and constraint strength. The bone parameters are determined based on the physical parameters of two adjacent second target bone objects. The constraint strength is used to limit the physical connection strength between the third target bone object and the two connected second target bone objects.
[0145] Step 016: Add a third target bone object connecting any two adjacent second target bone objects, including:
[0146] Step 0162: Based on the bone parameters and the bone coordinates of two adjacent second target bone objects, add a third target bone object to connect the two second target bone objects.
[0147] For details, please continue reading Figure 13 Users can execute a fifth trigger action through the second constraint control, such as clicking the second constraint control. The second constraint control can then display a message such as "Auto-Constraint" to prompt the user. In response to the user's fifth trigger action on the second constraint control, the bone parameters of the third target bone object can be automatically calculated based on the physical parameters of the two adjacent second target bone objects. Based on the calculated bone parameters and the bone coordinates of the two adjacent second target bone objects, a third target bone object is added to connect the two second target bone objects.
[0148] It is understandable that the constraint editing interface may also include a clear control. In response to the operation received by the clear control, all bone parameters set on the constraint editing interface can be cleared.
[0149] In some implementations, the skeletal model processing method includes:
[0150] Step 020: Based on the connection relationship between the first bone object, the first horizontal bone, the second horizontal bone, and the second bone object, apply motion constraints to the first bone object, the first horizontal bone, the second horizontal bone, and the second bone object.
[0151] Among them, motion constraints can be used to prevent the third target skeleton object (including the first transverse skeleton and the second transverse skeleton) from detaching from the constraints of the first skeleton object and the second skeleton object.
[0152] Specifically, the parent of the first horizontal bone can be set to the parent of the first bone object to ensure that the first horizontal bone follows the overall movement (such as rotation and displacement) of the first bone object, avoiding spatial misalignment between the first horizontal bone and the first bone object. Then, functions such as `no_collision` can be used to prevent internal collisions between the first horizontal bone and the first bone object and its parent, ensuring that the third target bone object only blocks external clipping (such as the thigh bone) and does not interfere with the connection with the first bone object. Next, components such as `LookAt_Constraint` (a type of orientation component between bones) can be used to control the first horizontal bone to face the second bone object, so that the first horizontal bone can always be aligned with the gap between the first and second bone objects, preventing directional deviation from exposing the gap. Finally, a hierarchical connection can be set between the second and first horizontal bones, setting the parent of the second horizontal bone to the first horizontal bone, so that the first horizontal bone drives the movement of the second horizontal bone, ensuring that the second horizontal bone can follow the movement of the first horizontal bone. Then, by using Position_Constraint (a position constraint component between bones), the second bone object is set to position coordinates to ensure that the endpoint position of the second horizontal bone changes with the second bone object, thus avoiding connection breakage.
[0153] By imposing motion constraints on the first skeletal object, the first horizontal bone, the second horizontal bone, and the second skeletal object, a linkage structure is formed among the four objects (the first skeletal object drives the first horizontal bone, the first horizontal bone drives the second horizontal bone, and the second horizontal bone follows the second skeletal object), ensuring that the motion is seamless and conforms to physical logic.
[0154] Please see Figure 14 In some implementations, the skeletal model processing method further includes:
[0155] Step 021: Obtain the parent skeleton object; the skeleton chain moves with the parent skeleton object.
[0156] Step 022: Drive the movement of the skeletal chain based on the relative position between the position coordinates of the parent skeleton object and the preset anchor point position. The preset anchor point position is determined based on the relative position between the parent skeleton and the skeletal chain.
[0157] Alternatively, the methods for processing skeletal models also include:
[0158] Step 023: Based on the position coordinates of the parent bone object and the position coordinates of the fourth target bone object in the bone chain, determine the first distance between the parent bone object and the bone object;
[0159] Step 024: Based on the position coordinates of the parent skeleton object and the first distance, determine the anchor point position, which is located on the spatial extension line between the parent skeleton object and the skeleton object.
[0160] Among them, the distance between the parent skeleton object and the preset anchor point position is negatively correlated with the rotation angle of the skeleton chain.
[0161] The parent skeleton object can be the reference skeleton that drives the movement of the skeletal chain (such as the thigh bone of a simulated game character).
[0162] The fourth target bone object can be the target bone on the bone chain that moves when the parent bone object moves. For example, it can be a bone near the thigh in the skirt bone chain.
[0163] The preset anchor point position can be the reference position when the parent bone object moves. The preset anchor point position is a virtual reference point generated based on the initial relative position of the parent bone object and the fourth target bone object, located on the extension line of the line connecting the parent bone object and the bone objects on the bone chain.
[0164] The first distance can be the straight-line distance between the position coordinates of the parent bone object and the position coordinates of the fourth target bone object in the bone chain.
[0165] The spatial extension line can be a straight line formed by extending the line connecting the parent skeleton object and the fourth target skeleton object away from the skeleton chain, and the preset anchor point is located on this extension line.
[0166] Specifically, please refer to Figure 15 It can identify the parent skeleton object set by the user and establish the association between the parent skeleton object and the skeleton chain (the skeleton chain moves with the parent skeleton object). Then, based on the relative position between the position coordinates of the parent skeleton object and the preset anchor point position, it uses a function such as 3ds Max's paramWire (a tool in 3ds Max used for parameter association control, mainly used to realize dynamic linkage between parameters) to bind the first distance between the parent skeleton object and the preset anchor point position and the rotation angle of the skeleton chain, thereby driving the movement of the skeleton chain.
[0167] More specifically, this can be achieved by reading the position coordinates of the parent bone object and the position coordinates of the fourth target bone object in the bone chain (such as a bone near the thigh in the skirt bone chain), and calculating the spatial distance between the parent bone object and the fourth target bone object, i.e., the first distance. Using the line connecting the parent bone object and the fourth target bone object as a spatial extension line, a preset anchor point position is generated on the side of the spatial extension line away from the fourth target bone object, based on the first distance. The distance between the preset anchor point position and the parent bone object can be the first distance, or a multiple of the first distance (such as 1.5 times, 2 times, etc.). When the parent bone object is close to the preset anchor point position, the rotation angle of the bone chain increases. For example, when the parent bone representing the thigh is raised, the bone chain representing the skirt rotates upwards, thus simulating the effect of the skirt being raised when the foot is lifted, avoiding clipping. For example, please refer to... Figures 16 to 19 When a third target bone object is set to form a mesh skeleton, the movement of the bone chain driven by the parent bone object can simulate a skirt mesh collider, achieving a highly physical skirt running effect, such as... Figure 17 and Figure 19 As shown, even if the thigh bones are raised, it will not cause clipping; instead, it will kick up the skirt, making the effect more realistic.
[0168] It is understandable that there can be multiple preset anchor point positions. A corresponding preset anchor point position can be set for each bone object in the skeletal chain to drive each bone object.
[0169] Please see Figure 20 In some implementations, the skeletal model processing method further includes:
[0170] Step 025: Identify and mark clipping frames in the translation animation, which is generated by rendering based on the parent skeleton object and the skeleton chain;
[0171] Step 026: In response to the sixth trigger operation on the through-frame, determine the fifth target skeleton object in the through-frame;
[0172] Step 027: Adjust the rotation angle of the fifth target bone object so that the fifth target bone object does not clip through the frame. Based on the adjusted rotation angle of the fifth target bone object, smooth the sixth target bone objects corresponding to the fifth target bone object in multiple frames adjacent to the clipping frame so that the rotation angles of the fifth target bone object and multiple sixth target bone objects are continuous.
[0173] Among them, a clipping frame can be a single frame in a motion animation where a skeletal object (such as a ribbon skeleton) passes through another model (such as a body skeleton).
[0174] Among them, displacement animation can be a continuous animation generated by rendering based on the physical parameters and other data of the parent skeleton object (such as the thigh bone) and the skeleton chain (such as the ribbon bone).
[0175] The fifth target skeleton object can be a skeleton object that clips through the body in the clipping frame (such as a bone in the ribbon skeleton chain that penetrates the body).
[0176] The sixth trigger operation can be a manual interactive operation performed by the user on the clipping frame, such as clicking on the clipping frame and selecting the clipping bone in the clipping frame.
[0177] The sixth target skeleton object can be the same skeleton object corresponding to the fifth target skeleton object in an adjacent frame of the clipping frame. For example, it can be the corresponding skeleton object belonging to the same skeleton chain as the clipping skeleton in the first 3 frames and the last 3 frames of the clipping frame.
[0178] Specifically, in cases where the fabric is overly complex, a small number of clipping events may still occur. Therefore, clipping frames where the skeletal chain clips can be identified by frame-by-frame detection of the translation animation (or by user observation, etc.), and the positions of these clipping frames can be marked on the timeline (e.g., by highlighting them). The user can select the fifth target bone object that is clipping through the clipping frame and adjust its rotation angle. In response to the user's sixth trigger operation on the clipping frame, the rotation angle of the fifth target bone object can be adjusted or set to a non-clipping rotation angle in response to the user's adjustment. Based on the adjusted rotation angle of the fifth target bone object, interpolation calculations are performed on the sixth target bone object in several adjacent frames of the clipping frame (e.g., the 5 frames before the clipping frame, the 5 frames after the clipping frame, etc.) to ensure that the rotation angles of the fifth and sixth target bone objects are continuous, resulting in smooth animation without abrupt changes.
[0179] After the translation animation is rendered, there may be a small number of clipping frames. This is a problem that is difficult to completely avoid in complex scenes due to automatic calculation. However, the embodiments of this application directly solve the clipping problem of the frame by manually adjusting the rotation angle of the fifth target bone object in the clipping frame. Then, the sixth target bone object in the adjacent frames is smoothed (such as interpolation to calculate the rotation angle) to ensure that the adjusted clipping frame has a continuous bone rotation angle with the frames before and after, avoiding animation jitter or abrupt changes and ensuring the animation effect.
[0180] In some implementations, the skeletal model processing method further includes:
[0181] Step 028: When the translation animation is looping, insert multiple transition frames based on the first rotation matrix information of the bone object of the first frame and the second rotation matrix information of the bone object of the last frame of the translation animation, so that the last frame smoothly transitions to the first frame.
[0182] The first frame can be several frames near the first frame of the motion animation. The last frame can be several frames near the last frame of the motion animation.
[0183] The first rotation matrix information can be the rotation matrix data of the skeleton object in the first frame, used to record the three-dimensional rotation state of the skeleton object in the first frame (such as the combination of rotation angles of the X-axis, Y-axis, and Z-axis).
[0184] The second rotation matrix information can be the rotation matrix data of the skeleton object in the tail frame, used to record the three-dimensional rotation state of the skeleton object in the tail frame.
[0185] The transition frame can be an intermediate frame inserted between the tail frame and the head frame. Its skeletal rotation information is calculated by interpolation of the first rotation matrix and the second rotation matrix, which is used to achieve a smooth transition from the tail frame to the head frame.
[0186] Specifically, a looping motion animation is an animation where, after playing the last frame, it automatically jumps back to the first frame and repeats the playback. Examples include looping actions like a game character idling or walking. By obtaining the first rotation matrix information of the bone object in the first frame of the motion animation and the second rotation matrix information of the same bone object in the last frame, and then interpolating the first and second rotation matrix information, transition rotation matrix information for multiple transition frames is generated (the transition rotation matrix information is different for different transition frames). These multiple transition frames, including the transition rotation matrix information, are then inserted between the last and first frames of the motion animation. This allows the rotation angle of the bone object to gradually transition from the state of the last frame to the state of the first frame through the transition frames, achieving a smooth frame rate effect. The more times the transition frames are calculated, the better the smooth frame rate effect of the motion animation.
[0187] If the rotation angles of the skeletal objects in the first and last frames of a looping animation (such as a standby animation) are significantly different (e.g., different rotation angles), it will cause obvious jitter during playback (e.g., a sudden change when the last frame jumps to the first frame).
[0188] By extracting the first rotation matrix information of the first frame and the second rotation matrix information of the last frame, smooth interpolation is performed on both (e.g., 50% of each is mixed) to generate multiple transition frames. This allows the rotation state of the last frame to gradually approach the rotation state of the first frame through the transition frames, ultimately achieving a seamless connection between the last frame and the first frame, avoiding jitter during loop playback, and enabling the animation to loop seamlessly.
[0189] This is understandable; please refer to [link / reference]. Figure 21When smoothing translation animations, the editing interface can be set with corresponding loop controls, such as loop count (number of times the transition frame is calculated) controls and smoothing count controls. Users set the loop count on the loop control, and in response to the user's triggering action on the calculation control in the editing interface, the calculation of the transition frame begins.
[0190] In some implementations, the skeletal model processing method further includes:
[0191] Step 0111: Display the editing interface, which includes an undo control and a forward control;
[0192] Step 029: Save the editing data corresponding to each editing operation in the editing interface;
[0193] Step 030: In response to the eighth trigger operation received by the undo control, display the previous edited data of the current edited data through the editing interface;
[0194] Step 031: In response to the ninth trigger operation received by the forward control, display the next edited data of the current edited data through the editing interface.
[0195] Specifically, please refer to Figure 22 The editing interface can also include undo and forward controls. During the calculation, the editing data corresponding to each editing operation in the editing interface can be saved. In response to the eighth trigger operation received by the undo control, the editing data can be rolled back and the previous editing data of the current editing data can be displayed through the editing interface. In response to the ninth trigger operation received by the forward control, the editing data can be confirmed and the next editing data of the current editing data can be displayed through the editing interface.
[0196] In some implementations, the skeletal model processing method further includes:
[0197] Step 0111: Display the editing interface, which includes gravity controls;
[0198] Step 032: In response to the eighth trigger operation received by the gravity control, determine the gravity attribute parameters of the skeleton object.
[0199] Optionally, the editing interface includes wind field controls, and the method also includes:
[0200] Step 033: In response to the ninth trigger operation received by the wind field control, determine the wind force attribute parameters of the skeleton object.
[0201] The gravity control can be an interactive control in the editing interface used to start or adjust gravity attribute parameters.
[0202] Among them, wind field controls can be interactive controls in the editing interface used to create or adjust wind fields to determine wind force attribute parameters, including creating wind field controls, picking windmill controls, etc.
[0203] Among them, the gravity attribute parameter can be a parameter that describes the effect of gravity on the skeletal object, including whether gravity is enabled, the value of gravity acceleration, etc., which determines whether the skeletal object hangs naturally and the degree of hanging.
[0204] Among them, the wind attribute parameters can be parameters that describe the influence of wind field on the skeletal object, including wind field intensity and direction, which determine the amplitude and direction of the skeletal object being blown by the wind.
[0205] Specifically, please refer to Figure 23 Gravity and wind properties are key natural forces influencing the movement of skeletal chains such as ribbons. Gravity causes skeletal objects to droop, while wind causes them to sway. The editing interface encapsulates 3ds Max's native force field functionality into a portable operation through gravity and wind field controls. Users no longer need to manually create force and wind fields; simply triggering the controls applies gravity and wind properties to the skeletal object, making the solution results closer to realistic physics. For example, please refer to... Figure 24 and Figure 25 The editing interface and constraint editing interface provided in this application can be used to calculate the complex multi-layered fabric and skeletal chain, thereby obtaining the diagram. Figure 25 The solution shown demonstrates that there are collisions between the fabric skeletons, and wind effects can be added, resulting in a natural effect.
[0206] To facilitate better implementation of the skeletal model processing method of this application embodiment, this application embodiment also provides a virtual resource processing apparatus. Please refer to... Figure 26 , Figure 26 This is a schematic diagram of the structure of a skeletal model processing device provided in an embodiment of this application. The skeletal model processing device 200 can provide a graphical user interface via a terminal device. The graphical user interface includes at least a portion of a virtual scene and at least one virtual character. The virtual resource processing device 200 may include:
[0207] The acquisition module 201 is used to acquire a preset material parameter table and a skeleton chain, wherein the skeleton chain includes at least one skeleton object, and the preset material parameter table is used to represent the mapping relationship between the material properties and physical parameters of the skeleton object.
[0208] The first determining module 202 is used to determine the physical parameters corresponding to the bone object in the preset material parameter table based on the material properties set for the bone object based on the bone chain.
[0209] The second determining module 203 is used to determine the relative motion constraint parameters between any two adjacent bone objects on the bone chain based on the physical parameters of the bone objects.
[0210] Each unit in the aforementioned virtual resource processing device can be implemented entirely or partially through software, hardware, or a combination thereof. Each unit can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can invoke and execute the operations corresponding to each unit.
[0211] The skeletal model processing device 200 can be integrated into a terminal or server that has storage and a processor and thus computing power, or the skeletal model processing device 200 can be the terminal or server.
[0212] Optionally, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.
[0213] Figure 27 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. The computer device may be a terminal or a server. Figure 27 As shown, the computer device 300 includes a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, and a computer program stored in the memory 302 and executable on the processor. The processor 301 is electrically connected to the memory 302. Those skilled in the art will understand that the computer device structure shown in the figures does not constitute a limitation on the computer device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0214] The processor 301 is the control center of the computer device 300. It connects various parts of the computer device 300 through various interfaces and lines. By running or loading software programs and / or modules stored in the memory 302, and calling data stored in the memory 302, it performs various functions of the computer device 300 and processes data, thereby performing overall processing of the computer device 300.
[0215] In this embodiment, the processor 301 in the computer device 300 loads the instructions corresponding to the processes of one or more computer programs into the memory 302 according to the following steps, and the processor 301 runs the computer programs stored in the memory 302 to realize various functions:
[0216] Obtain a preset material parameter table and a bone chain, wherein the bone chain includes at least one bone object, and the preset material parameter table is used to represent the mapping relationship between the material properties and physical parameters of the bone object;
[0217] Based on the material properties set for the bone object of the skeletal chain, the bone object is determined in the preset material parameter table.
[0218] Based on the physical parameters of the skeletal objects, the relative motion constraint parameters between any two adjacent skeletal objects on the skeletal chain are determined.
[0219] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0220] Optional, such as Figure 27 As shown, the computer device 300 also includes: a display screen 303, a radio frequency circuit 304, an audio circuit 305, an input unit 306, and a power supply 307. The processor 301 is electrically connected to the display screen 303, the radio frequency circuit 304, the audio circuit 305, the input unit 306, and the power supply 307. Those skilled in the art will understand that... Figure 27 The computer device structure shown does not constitute a limitation on the computer device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0221] The display screen 303 can be used to display a graphical user interface (GUI) and receive operation commands generated by the user interacting with the GUI. The display screen 303 may include a display panel and a touch panel. The display panel can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the computer device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. The touch panel can be used to collect touch operations performed by the user on or near it (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near the touch panel), generate corresponding operation commands, and execute the corresponding program. Optionally, the touch panel may include a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller. The touch controller receives touch information from the touch detection device, converts it into touch point coordinates, sends it to the processor 301, and can receive and execute commands from the processor 301. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it transmits the information to the processor 301 to determine the type of touch event. Subsequently, the processor 301 provides corresponding visual output on the display panel according to the type of touch event. In this embodiment, the touch panel and the display panel can be integrated into the display screen 303 to achieve input and output functions. However, in some embodiments, the touch panel and the display screen 303 can be implemented as two independent components to achieve input and output functions. That is, the display screen 303 can also be used as part of the input unit 306 to achieve input functions.
[0222] The radio frequency circuit 304 can be used to transmit and receive radio frequency signals to establish wireless communication with network devices or other computer devices, and to transmit and receive signals with network devices or other computer devices.
[0223] Audio circuitry 305 can be used to provide an audio interface between a user and a computer device via a speaker and a microphone. Audio circuitry 305 converts received audio data into electrical signals, transmits them to the speaker, and the speaker converts them into sound signals for output. Conversely, the microphone converts collected sound signals into electrical signals, which are then received by audio circuitry 305, converted back into audio data, and output to processor 301 for processing. The audio data is then transmitted via radio frequency circuitry 304 to, for example, another computer device, or output to memory 302 for further processing. Audio circuitry 305 may also include an earphone jack to facilitate communication between peripheral headphones and the computer device.
[0224] The input unit 306 can be used to receive input numbers, characters, or object feature information (such as fingerprints, iris, facial information, etc.), and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
[0225] Power supply 307 is used to supply power to various components of computer device 300. Optionally, power supply 307 can be logically connected to processor 301 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. Power supply 307 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0226] although Figure 27 As not shown in the diagram, computer equipment 300 may also include a camera, sensor, wireless fidelity module, Bluetooth module, etc., which will not be described in detail here.
[0227] This application also provides a computer-readable storage medium for storing a computer program. This computer-readable storage medium can be applied to a computer device, and the computer program causes the computer device to execute the corresponding processes in the skeletal model processing method of the embodiments of this application; for brevity, these will not be elaborated further here.
[0228] This application also provides a computer program product including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the corresponding process in the skeletal model processing method of the embodiments of this application. For simplicity, further details are omitted here.
[0229] This application also provides a computer program comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the corresponding process in the skeletal model processing method of this application; for brevity, further details are omitted here.
[0230] It should be understood that the processor in this application may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.
[0231] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0232] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0233] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0234] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0235] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0236] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0237] In addition, the functional units in this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0238] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer or a server) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0239] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for processing a skeletal model, characterized in that, include: Obtain a preset material parameter table and a bone chain, wherein the bone chain includes at least one bone object, and the preset material parameter table is used to represent the mapping relationship between the material properties and physical parameters of the bone object; Based on the material properties set for the bone object in the bone chain, the physical parameters corresponding to the bone object are determined in the preset material parameter table; Based on the physical parameters of the skeletal objects, the relative motion constraint parameters between any two adjacent skeletal objects on the skeletal chain are determined.
2. The method for processing a skeletal model according to claim 1, characterized in that, Also includes: In response to a first triggering operation on a bone object of the skeletal chain, a first target bone object is determined; The material properties of the bone object based on the bone chain, in the preset material parameter table, respectively determine the physical parameters corresponding to the bone object, including: Based on the material properties of the first target bone object in the skeletal chain, the physical parameters corresponding to the first target bone object are determined in the preset material parameter table.
3. The method for processing a skeletal model according to claim 2, characterized in that, The method further includes, via a graphical user interface on a terminal: The editing interface is displayed, which includes material setting controls and reading controls; The material properties of the first target bone object based on the skeletal chain, in the preset material parameter table, determine the physical parameters corresponding to the first target bone object, including: In response to a second trigger operation of the material setting control, the material properties of the first target bone object are set; In response to the third trigger operation received by the reading control, the physical parameters corresponding to the first target skeleton object are read from the preset material parameter table.
4. The method for processing a skeletal model according to claim 1, characterized in that, The preset material parameter table includes multiple sets of physical parameters and preset material attributes. Each set of physical parameters includes multiple physical parameters. The physical parameters and preset material attributes are set in a one-to-one correspondence. The material attributes set for the bone object based on the skeletal chain, in the preset material parameter table, determine the physical parameters corresponding to the bone object, including: Determine a target material attribute that matches the material attribute set for the skeleton object, wherein the target material attribute is any of the preset material attributes; Based on a set of physical parameters corresponding to the target material properties, the physical parameters corresponding to the skeleton object are determined.
5. The method for processing a skeletal model according to claim 1, characterized in that, The physical parameters include at least one of the following: swing angle parameter, rotation angle parameter, shape parameter, damping parameter, elastic force parameter, friction force parameter, and collision elastic force parameter.
6. The method for processing a skeletal model according to claim 1, characterized in that, The physical parameters include swing angle parameters, rotation angle parameters, shape parameters, damping parameters, elastic force parameters, friction force parameters, and collision elastic force parameters. The relative motion constraint parameters include rotation angle limitation parameters and elastic force parameters. Determining the relative motion constraint parameters between any two adjacent bone objects on the bone chain based on the physical parameters of the bone object includes: Based on the swing angle parameters, rotation angle parameters, and / or shape parameters of the bone objects, determine the rotation angle limit parameters between any two adjacent bone objects on the bone chain; Based on the damping parameters, elasticity parameters, friction parameters, and / or collision elasticity parameters of the skeletal objects, the elasticity parameters between any two adjacent skeletal objects on the skeletal chain are determined.
7. The method for processing a skeletal model according to claim 1, characterized in that, The method further includes: In response to the selection operation of different bone chains, a second target bone object is determined; Add a third target bone object between any two adjacent second target bone objects to connect the two second target bone objects, forming a mesh skeleton.
8. The method for processing a skeletal model according to claim 7, characterized in that, Adding a third target bone object connecting two adjacent second target bone objects includes: The third target bone object is added between the midpoints of any two adjacent second target bone objects.
9. The method for processing a skeletal model according to claim 7, characterized in that, The method further includes: Displays a constraint editing interface, which includes a first constraint control; In response to a fourth trigger operation on the constraint control, bone parameters are determined, including bone width, bone height, and constraint strength, wherein the constraint strength is used to limit the physical connection strength between the third target bone object and the two connected second target bone objects; Adding a third target bone object connecting two adjacent second target bone objects includes: Based on the bone parameters and the bone coordinates of two adjacent second target bone objects, a third target bone object is added to connect the two second target bone objects.
10. The method for processing a skeletal model according to claim 7, characterized in that, The constraint editing interface also includes a second constraint control, and the method further includes: Displays a constraint editing interface, which includes a second constraint control; In response to a fifth trigger operation on the second constraint control, bone parameters are determined, including bone width, bone height, and constraint strength. The bone parameters are determined based on the physical parameters of two adjacent second target bone objects. The constraint strength is used to limit the physical connection strength between the third target bone object and the two connected second target bone objects. Adding a third target bone object connecting two adjacent second target bone objects includes: Based on the bone parameters and the bone coordinates of two adjacent second target bone objects, a third target bone object is added to connect the two second target bone objects.
11. The method for processing a skeletal model according to claim 7, characterized in that, The third target skeleton object includes a first horizontal skeleton and a second horizontal skeleton. Two adjacent second target skeleton objects include a first skeleton object and a second skeleton object. The first skeleton object is ordered before the second skeleton object. The two ends of the first horizontal skeleton are respectively connected to the first skeleton object and one end of the second horizontal skeleton. The other end of the second horizontal skeleton is connected to the second skeleton object. The width and height of the second horizontal skeleton are both smaller than the width and height of the first horizontal skeleton.
12. The method for processing a skeletal model according to claim 11, characterized in that, The method further includes: Based on the connection relationship between the first bone object, the first horizontal bone, the second horizontal bone, and the second bone object, motion constraints are applied to the first bone object, the first horizontal bone, the second horizontal bone, and the second bone object.
13. The method for processing a skeletal model according to any one of claims 7-12, characterized in that, The method further includes: Obtain the parent skeleton object; the skeleton chain moves following the parent skeleton object. The movement of the skeletal chain is driven based on the relative position between the position coordinates of the parent skeleton object and the preset anchor point position, wherein the preset anchor point position is determined based on the relative position between the parent skeleton and the skeletal chain.
14. The method for processing a skeletal model according to claim 13, characterized in that, The method further includes: Based on the position coordinates of the parent skeleton object and the position coordinates of the fourth target skeleton object of the skeleton chain, a first distance between the parent skeleton object and the skeleton object is determined; Based on the position coordinates of the parent skeleton object and the first distance, the position of the preset anchor point is determined. The preset anchor point is located on the spatial extension line of the parent skeleton object and the skeleton object. The distance between the parent skeleton object and the preset anchor point is negatively correlated with the rotation angle of the skeleton chain.
15. The method for processing a skeletal model according to claim 14, characterized in that, The method further includes: Identify and mark clipping frames in the translation animation, which is generated by rendering based on the parent skeleton object and the skeleton chain; In response to the sixth trigger operation on the through-frame, the fifth target skeleton object in the through-frame is determined; The rotation angle of the fifth target skeleton object is adjusted so that the fifth target skeleton object does not clip through the frame. Based on the adjusted rotation angle of the fifth target skeleton object, the sixth target skeleton objects corresponding to the fifth target skeleton object in multiple frames adjacent to the clipping frame are smoothed so that the rotation angles of the fifth target skeleton object and multiple sixth target skeleton objects are continuous.
16. The method for processing a skeletal model according to claim 15, characterized in that, The method further includes: When the displacement animation is played in a loop, multiple transition frames are inserted based on the first rotation matrix information of the skeleton object in the first frame and the second rotation matrix information of the skeleton object in the last frame of the displacement animation, so that the last frame smoothly transitions to the first frame.
17. A processing device for a skeletal model, characterized in that, include: The acquisition module is used to acquire a preset material parameter table and a skeleton chain, wherein the skeleton chain includes at least one skeleton object, and the preset material parameter table is used to represent the mapping relationship between the material properties and physical parameters of the skeleton object; The first determining module is used to determine the physical parameters corresponding to the bone object based on the material properties set by the bone object in the preset material parameter table. The second determining module is used to determine the relative motion constraint parameters between any two adjacent bone objects on the bone chain based on the physical parameters of the bone object.
18. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted for loading by a processor to perform the method for processing a skeletal model as described in any one of claims 1-16.
19. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing a computer program, and the processor executing the skeletal model processing method according to any one of claims 1-16 by calling the computer program stored in the memory.
20. A computer program product comprising computer instructions, characterized in that, When the computer instructions are executed by the processor, they implement the method for processing the skeletal model according to any one of claims 1-16.