Equipment skeleton processing method, device, electronic device and readable storage medium

By establishing a bone mapping relationship, a equipment skeleton adapted to different body types is generated, which solves the problems of inefficiency and unstable quality when configuring the same virtual equipment for virtual objects of different body types in the prior art, and achieves more efficient and stable equipment adaptation.

CN119784985APending Publication Date: 2025-04-08NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411606183.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-11
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

In role-playing games, when configuring the same virtual equipment for virtual objects of different body types, the existing technology requires the production of target bones by body type, resulting in inefficiency and unstable quality.

Method used

By determining the skeleton structure of the first object model and the first equipment model, and the skeleton structure of the second object model, a bone mapping relationship is established to generate the equipment skeleton adapted to the second object model.

Benefits of technology

It improves the efficiency of equipment skeleton generation adapted to different body types, reduces costs and errors, and improves the stability of wearable effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119784985A_ABST
    Figure CN119784985A_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, electronic device and readable storage medium for processing equipment skeletons, the method comprising: determining a first object skeleton corresponding to a first object model, a first equipment skeleton corresponding to a first equipment model, and a second object skeleton corresponding to a second object model; the first equipment model is adapted to the body type of the first object model, the second object model is different from the body type of the first object model, and the skeleton structure of the first object skeleton is the same as the skeleton structure of the second object skeleton; determining a skeleton mapping relationship between the first object skeleton and the first equipment skeleton; based on the skeleton mapping relationship and the second object skeleton, generating a second equipment skeleton adapted to the body type of the second object skeleton. The method can improve the generation efficiency of equipment skeletons of the same equipment adapted to different body types.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computers, and in particular to a method, device, electronic device and computer-readable storage medium for processing an equipment skeleton. Background Art

[0002] In role-playing games, it is usually necessary to design virtual objects of various sizes to satisfy the role-playing experience of game players. When configuring virtual equipment for virtual objects of different sizes, there may be a demand for virtual objects of different sizes to wear the same virtual equipment (for example, virtual clothing).

[0003] In the related art, when the object bone structures of virtual objects of different body shapes are different, in order to enable virtual objects of different body shapes to wear the same virtual equipment, it is necessary to create target bones of the same virtual equipment for each body shape, and then perform skinning operations on the virtual equipment with the target bones and the virtual objects with the corresponding body shapes. When creating the target equipment bones for each body shape, a lot of time and cost will be consumed, which makes the efficiency of configuring the same virtual equipment for virtual objects of different body shapes low, and the quality of clothing bones created for each body shape is unstable.

[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present application, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0005] In view of this, the present application provides a method, device, electronic device and computer-readable storage medium for processing equipment skeletons, which can improve the generation efficiency of equipment skeletons for the same equipment adapted to different body shapes.

[0006] In a first aspect, an embodiment of the present application provides a method for processing an equipment skeleton, the method comprising:

[0007] Determine a first object skeleton corresponding to a first object model, a first equipment skeleton corresponding to a first equipment model, and a second object skeleton corresponding to a second object model; the first equipment model is adapted to the body shape of the first object model, the second object model is different from the body shape of the first object model, and the skeleton structure of the first object skeleton is the same as the skeleton structure of the second object skeleton;

[0008] Determining a bone mapping relationship between the first object skeleton and the first equipment skeleton;

[0009] Based on the bone mapping relationship and the second object skeleton, a second equipment skeleton adapted to the body shape of the second object skeleton is generated.

[0010] In a second aspect, an embodiment of the present application provides a device for processing an equipment skeleton, the device comprising: a determination unit and a generation unit;

[0011] a determining unit, configured to determine a first object skeleton corresponding to a first object model, a first equipment skeleton corresponding to a first equipment model, and a second object skeleton corresponding to a second object model; the first equipment model is adapted to a body shape of the first object model, the second object model is different from the first object model in body shape, and a skeleton structure of the first object skeleton is the same as a skeleton structure of the second object skeleton;

[0012] The determining unit is further used to determine a bone mapping relationship between the first object skeleton and the first equipment skeleton;

[0013] A generating unit is used to generate a second equipment skeleton adapted to the body shape of the second object skeleton based on the bone mapping relationship and the second object skeleton.

[0014] In a third aspect, an embodiment of the present application provides an electronic device, including:

[0015] Processor; and

[0016] The memory is used to store a data processing program. After the electronic device is powered on and the program is run by the processor, the method of the first aspect is executed.

[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a data processing program, which is executed by a processor to perform the method of the first aspect.

[0018] The method for processing an equipment skeleton provided in the present application first determines a first object skeleton corresponding to a first object model, a first equipment skeleton corresponding to a first equipment model, and a second object skeleton corresponding to a second object model; the first equipment model is adapted to the first object model, and the second object model and the first object model have different body shapes; the skeleton structure of the first object skeleton is the same as the skeleton structure of the second object skeleton; determines a bone mapping relationship between the first object skeleton and the first equipment skeleton; and generates a second equipment skeleton adapted to the body shape of the second object skeleton based on the bone mapping relationship and the second object skeleton.

[0019] It can be seen that the bone difference information is transmitted through the bone mapping relationship between the first object skeleton and the first equipment skeleton, so as to determine the second equipment skeleton having the above-mentioned bone mapping relationship with the second object skeleton. In this way, the process of adaptively generating equipment skeletons adapted to different body types can reduce the cost and error of users making equipment skeletons according to body types, and improve the generation efficiency of equipment skeletons that can adapt to object models of different body types.

[0020] Based on the second equipment skeleton adapted to the second object skeleton, skinning operations can be further performed to achieve adaptive wearing of the same virtual equipment for object models of different body shapes, thereby improving the efficiency of virtual objects of different body shapes wearing the same virtual equipment; in addition, the problem of unstable wearing effect caused by inconsistent object model skeletons can be further reduced, thereby improving the stability of the wearing effect to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0022] Figure 1 A flowchart of an example of a method for processing an equipment skeleton provided in an embodiment of the present application;

[0023] Figure 2 Schematic diagram of object models of different sizes provided in an embodiment of the present application;

[0024] Figure 3 A schematic diagram of an object skeleton corresponding to an object model of different body shapes provided in an embodiment of the present application;

[0025] Figure 4 A flowchart of an example of generating a second clothing skeleton provided in an embodiment of the present application;

[0026] Figure 5 A schematic diagram of an example of a second object model wearing a second clothing skeleton provided in an embodiment of the present application;

[0027] Figure 6 A schematic diagram of the structure of a processing device for an equipment skeleton provided in an embodiment of the present application;

[0028] Figure 7 A structural block diagram of an electronic device for implementing a method for processing an equipment skeleton is provided for an embodiment of the present application. DETAILED DESCRIPTION

[0029] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.

[0030] It should be noted that the terms "first", "second", "third", etc. in the claims, description and drawings of the present application are used to distinguish similar objects and are not used to describe a specific order or sequence. The data used in this way are interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including", "having" and their variants are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0031] It should be understood that in the embodiments of the present application, "at least one" refers to one or more, "several" refers to one or more, and "multiple" refers to two or more. "And / or" is only a way to describe the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "Including A, B and / or C" means including any one, any two, or any three of A, B, and C.

[0032] It should be understood that in the embodiments of the present application, "B corresponding to A", "B corresponding to A", "A corresponds to B", or "B corresponds to A" means that B is associated with A, and B can be determined according to A. Determining B according to A does not mean determining B only according to A, and B can also be determined according to A and / or other information.

[0033] In the related art, the equipment skeleton of the same virtual equipment is manually and repeatedly produced, which makes it costly, time-consuming and labor-intensive to adapt the virtual equipment to object models of different sizes, thus affecting the adaptation efficiency of the virtual equipment.

[0034] Based on the above-mentioned problems, the embodiments of the present application provide a method, device, electronic device and computer-readable storage medium for processing an equipment skeleton.

[0035] The processing method of the equipment skeleton provided in the embodiment of the present application can be executed by at least one electronic device, which can be a terminal and / or a server. The terminal can be a terminal device such as a smart phone, a tablet computer, a laptop computer, etc. The server can be an independent physical server, or a server cluster or a 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 storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can be hardware or software. When the server is hardware, it can be implemented as a distributed server cluster composed of multiple servers, or it can be implemented as a single server. When the server is software, it can be implemented as multiple software or software modules (such as software or software modules used to provide distributed services), or it can be implemented as a single software or software module. The embodiment of the present application does not specifically limit this.

[0036] It should be noted that in the embodiment of the present application, the execution subject of the equipment skeleton processing method can be a terminal device, or a server, or it can be executed by the terminal device and the server at the same time, wherein the terminal device can be a local terminal device or a client device in the aforementioned cloud game. The embodiment of the present application does not limit the type of the execution subject.

[0037] The technical solution of the present application is 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 in detail in some embodiments.

[0038] like Figure 1 As shown, Figure 1 This is a flowchart of an example of a method for processing an equipment skeleton provided in an embodiment of the present application. It should be noted that the steps shown may be performed in a logical order different from that shown in the flowchart of the method. The method may include the following steps S110 to S130.

[0039] Step S110: determining a first object skeleton corresponding to the first object model, a first equipment skeleton corresponding to the first equipment model, and a second object skeleton corresponding to the second object model; the first equipment model is adapted to the body shape of the first object model, the second object model is different from the first object model in body shape, and the skeleton structure of the first object skeleton is the same as the skeleton structure of the second object skeleton;

[0040] Step S120: determining a skeleton mapping relationship between the first object skeleton and the first equipment skeleton;

[0041] Step S130: Based on the bone mapping relationship and the second object skeleton, generate a second equipment skeleton adapted to the body shape of the second object skeleton.

[0042] Next, the above steps S110 to S130 are described in detail.

[0043] Step S110: Determine a first object skeleton corresponding to the first object model, a first equipment skeleton corresponding to the first equipment model, and a second object skeleton corresponding to the second object model; the first equipment model is adapted to the body shape of the first object model, the second object model is different from the first object model in body shape, and the skeleton structure of the first object skeleton is the same as the skeleton structure of the second object skeleton.

[0044] The object model and equipment model described in this embodiment may include: a mesh model and a skeleton system.

[0045] The first object model is a reference object model with a reference body shape, that is, the body shape of the first object model can be regarded as a standard body shape, and its model type can include but is not limited to: a character model, an animal model, a monster model, a mecha model, etc., without specific restrictions. The first equipment model can be a pre-made virtual equipment adapted to the body shape of the first object model, that is, the first object model can wear the first equipment model, and its model category can include but is not limited to: clothing, accessories, etc.

[0046] The second object model is a target object model with a target body shape, which is different from the reference body shape, and the second object model is not wearing the first equipment model. Body shape refers to the body shape or structure of the object model, which may include but is not limited to: the character's height, limb proportions, skeleton size, body fat ratio, muscle mass, etc.; for example, the object model has broad shoulders and narrow waist, long legs and short body, well-developed muscles, and roundness. Figure 2 As shown, Figure 2 Provides schematic diagrams of object models of two different body types, where: Figure 2 The object model shown in (a) is relatively tall and strong. Figure 2 The object model shown in (b) is petite and delicate.

[0047] It should be noted that in the embodiment of the present application, the topological structures of the first object model and the second object model may be the same or different, and this embodiment does not specifically limit it. That is, the mesh model of the second object model and the mesh model of the first object model have the same or different number of vertices, and the arrangement order of the vertices is consistent.

[0048] The first object skeleton corresponding to the above-mentioned first object model refers to the basic skeleton structure of the first object model, and the basic skeleton structure can be used to drive the first object model to move or control the posture of the first object model. Similarly, the second object skeleton corresponding to the above-mentioned second object model can be used to drive the second object model to move or control the posture of the second object model.

[0049] It is understandable that the object skeleton may include multiple bone nodes (or bones). For example, the object skeleton of an object model may include: head bones, trunk bones, limb bones, etc. according to the model parts, which will not be introduced in detail.

[0050] In the present embodiment, the skeleton structure of the first object skeleton corresponding to the first object model is the same as the skeleton structure of the second object skeleton corresponding to the second object model. Wherein, the skeleton structure can include the quantity, bone identification and hierarchical relationship of each bone in the skeleton, and the same skeleton structure means the same quantity, the same bone identification and the same hierarchical relationship. Exemplary, when the first object skeleton includes 10 bones, the second object skeleton also corresponds to 10 bones, and the skeleton hierarchy distribution of the 10 bones of the two is the same, and the bone identification of each bone is also the same.

[0051] Optionally, if the first object skeleton is used as a reference skeleton, the first object skeleton can be used as a standard skeleton and copied. Without changing the number, hierarchy and bone identification of bones, the copied first object skeleton can be adjusted according to the body shape information of the second object model to obtain a second object skeleton that matches the body shape information of the second object model.

[0052] like Figure 3 As shown, Figure 3 An example of a relationship between a first object skeleton and a second object skeleton is provided.

[0053] The first object skeleton is Figure 2 The skeleton corresponding to the first object model with a tall and strong figure shown in the figure includes a head bone, a neck bone ab, a right shoulder bone bc, a left shoulder bone bd, a trunk bone bf, a right arm bone ce, a left arm bone dg, a right leg bone fh, and a left leg bone fi; based on the first object skeleton, without changing the number, level, and bone identification of the bones, according to Figure 2 According to the information corresponding to the small and exquisite body shape of the second object model shown, the first object skeleton is adjusted to obtain the second object skeleton, and the bones of the second object skeleton include head bones, neck bones ab, right shoulder bones bc, left shoulder bones bd, trunk bones bf, right arm bones ce, left arm bones dg, right leg bones fh and left leg bones fi.

[0054] The first equipment skeleton is a pre-made equipment skeleton system for driving the first equipment model to deform, and the first equipment skeleton is adapted to the first object skeleton.

[0055] For step S120: determine a bone mapping relationship between the first object skeleton and the first equipment skeleton.

[0056] As recorded in step S110, the first equipment model is adapted to the first object model, and therefore, there is a certain mapping relationship between the first equipment skeleton and the first object skeleton, and the mapping relationship determines that the first equipment model can be adapted to the first object model.

[0057] In an optional embodiment, step S120 may be specifically implemented through the following steps S121 and S122.

[0058] Step S121: determining attribute difference data of bone attributes between a first bone in the first object skeleton and a second bone in the first equipment skeleton corresponding to the first bone;

[0059] Step S122: determining a skeleton mapping relationship between the first object skeleton and the first equipment skeleton according to the attribute difference data of the skeleton attributes.

[0060] In this embodiment, the first bone refers to each bone in the first object skeleton. As described above, the skeleton structures of the first object skeleton and the second object skeleton are the same. Therefore, in the second object skeleton, there is a second bone that uniquely corresponds to the first bone. Exemplarily, taking the bone at the scapula in the first object skeleton as an example, the bone identification of the first bone at the scapula in the first object skeleton is: scapula_01; correspondingly, the bone identification of the second bone at the scapula in the second object skeleton is also: scapula_01; the two correspond one to one.

[0061] The attribute difference data is used to measure the difference in a certain bone attribute between a first bone in the first object skeleton and a second bone in the second equipment skeleton corresponding to the first skeleton.

[0062] Optionally, in this embodiment, the above-mentioned bone attributes may include but are not limited to: bone length, bone position and / or bone angle.

[0063] Among them, bone length refers to the length value of each bone in the object skeleton; bone position refers to the three-dimensional position information of each bone in the object skeleton in the preset virtual space, that is, it is used to represent the coordinate value of the bone in the virtual space; bone angle refers to the angle information that each bone can rotate. In a specific embodiment, the rotation state of the bone in the three-dimensional space can be described by the Euler angle information, quaternion or rotation matrix, etc., which will not be described in detail.

[0064] Then, the length difference data corresponding to the bone length attribute is used to describe the difference in length between the first bone and the corresponding second bone; the position difference data corresponding to the bone position attribute is used to describe the difference in position between the first bone and the corresponding second bone in the virtual space; the angle difference data corresponding to the bone angle attribute is used to describe the difference in rotation between the first bone and the corresponding second bone in the virtual space;

[0065] That is, in this optional implementation, the bone mapping relationship between the first object skeleton and the first equipment skeleton is determined based on the length difference data corresponding to the bone length, the angle difference data corresponding to the bone angle, and / or the position difference data corresponding to the bone position. Specifically, at least one of the above-mentioned bone attributes can be selected according to actual needs to determine the bone mapping relationship.

[0066] In an optional specific embodiment, a preset radial basis function (RBF) can be used to determine the above-mentioned bone mapping relationship through attribute difference data, and the radial basis function is not described here. Exemplarily, the above-mentioned bone mapping relationship can be specifically determined by formula (1).

[0067] Φ(X)=log10(d(X)+1.0) (1)

[0068] Among them, Φ(X) is the bone mapping relationship described above; d(X) is the attribute difference data corresponding to a certain bone attribute; the above log10( ) is a logarithmic function, which is used to map the attribute difference data to obtain a mapping relationship; X is used to represent the attribute data of a certain bone attribute.

[0069] The above attribute difference data +1.0 does not have a specific physical meaning. It is only to ensure that even when d(X)=0, that is, there is no attribute difference in a certain bone attribute between the first bone and the corresponding second bone, that is, when they completely overlap, the above logarithmic function value can be 0.

[0070] It should be noted that the mapping relationship represented by the above Φ(X) is used to characterize the nonlinear relative relationship between the first skeleton and the corresponding second skeleton.

[0071] For the calculation of specific bone attribute differences, please refer to the following introduction and will not be repeated here.

[0072] Step S130: Based on the bone mapping relationship and the second object skeleton, generate a second equipment skeleton adapted to the body shape of the second object skeleton.

[0073] In this embodiment, specifically, the equipment skeleton information corresponding to the second object skeleton can be determined based on the bone mapping relationship and the skeleton information of the second object skeleton; and each bone in the first equipment skeleton can be rotated, displaced or scaled based on the equipment skeleton information corresponding to the second object skeleton to obtain a second equipment skeleton that is compatible with the second object skeleton.

[0074] Exemplarily, the equipment skeleton information corresponding to the second object skeleton (such as the bone position, bone length and / or rotation angle in the equipment skeleton) can be determined according to the length, rotation angle and / or position of each bone in the second object skeleton and based on the bone mapping relationship. Then, the determined bone length, rotation angle and / or bone position information can be assigned to the first equipment skeleton, so that each bone in the first equipment skeleton can be rotated, scaled and / or displaced according to the above-mentioned determined bone length, rotation angle and / or bone position information to obtain the second equipment skeleton.

[0075] It can be seen that, through the above-mentioned bone mapping relationship, the mapping relationship between the first object skeleton and the first equipment skeleton can be transferred to the second object skeleton to generate a second equipment skeleton adapted to the second object skeleton.

[0076] In an optional specific embodiment, when the bone attributes include bone length, the above step S121 "determining the attribute difference data of the bone attributes between the first bone in the first object skeleton and the second bone in the first equipment skeleton corresponding to the first bone" can be specifically implemented through the following steps S1210 to S1211.

[0077] Step S1210: Obtain a first length of a first bone in the first object skeleton, and a second length of a second bone in the first equipment skeleton corresponding to the first bone.

[0078] Step S1211: Determine a first difference between the first length and the second length, and use the square value of the first difference as length difference data of the bone length between the first object skeleton and the first equipment skeleton.

[0079] As introduced above, the above-mentioned first bone refers to each bone in the first object skeleton, that is, the first length of each bone in the first object skeleton is obtained, and the second bone refers to each bone in the first equipment skeleton, and each second bone corresponds to the first bone, and the length of the second bone is called the second length.

[0080] The purpose of the above step S1211 is to clarify that in this embodiment, the square value of the length difference between the first length of the first bone and the second length of the corresponding second bone is used as the difference data to measure the length difference between the first bone and the corresponding second bone.

[0081] Exemplarily, the length of a first bone is l1, and the length of a second bone corresponding to the first bone is l2, then the length difference data between the first bone and the second bone can be calculated by the following formula (2).

[0082] d(X)=(l1-l2) 2 (2)

[0083] Among them, l1-l2 represents the difference between the length of the first bone l1 and the length of the second bone corresponding to the first bone l2.

[0084] After the length difference data is calculated by the above formula (2), the length difference data can be substituted into the above formula (1) to obtain the bone mapping relationship between the first bone and the second bone based on the length difference.

[0085] In an optional specific embodiment, when the bone attributes include bone angles, the above step S121 "determining the attribute difference data of the bone attributes between the first bone in the first object skeleton and the second bone in the first equipment skeleton corresponding to the first bone" can be specifically implemented through the following steps S1212 to S1213.

[0086] Step S1212: Acquire a first angle of a first bone in the first object skeleton and a second angle of a second bone in the first equipment skeleton corresponding to the first bone.

[0087] Step S1213: Determine a plurality of second differences between the first angle and the second angle, and use the sum of the squares of the plurality of second differences as angle difference data of the bone angles between the first object skeleton and the first equipment skeleton.

[0088] As described above, in a specific embodiment, the first angle and the second angle may be Euler angles. For example, the first angle may be obtained by a set of three independent rotation angles (θ1, ψ1, ) is used to represent the orientation of the first skeleton, wherein the angle θ1 corresponds to the rotation state of the first skeleton around the X-axis of the spatial coordinate system of the preset virtual space, the angle ψ1 corresponds to the rotation state of the first skeleton around the Y-axis of the spatial coordinate system of the preset virtual space, and the angle Corresponding to the rotation state of the first skeleton around the Z axis of the spatial coordinate system of the preset virtual space; similarly, the second angle can be rotated by an angle (θ2, ψ2, ) is used to represent the orientation of the second skeleton, wherein the angle θ2 corresponds to the rotation state of the second skeleton around the X-axis of the spatial coordinate system of the preset virtual space, the angle ψ2 corresponds to the rotation state of the second skeleton around the Y-axis of the spatial coordinate system of the preset virtual space, and the angle Corresponding to the rotation state of the second skeleton around the Z-axis of the spatial coordinate system of the preset virtual space.

[0089] Therefore, when calculating the difference between the first angle and the second angle, it is necessary to calculate the difference of the angle rotated around each axis respectively to obtain a plurality of second differences.

[0090] After obtaining the first angle and the second angle, the angle difference data between the first angle and the second angle can be calculated by the following formula (3).

[0091]

[0092] Wherein, θ1-θ2 represents the difference between the first angle θ1 of the first bone and the second angle θ2 of the second bone, ψ1-ψ2 represents the difference between the first angle ψ1 of the first bone and the second angle ψ2 of the second bone, Indicates the first angle of the first bone Second angle to the second bone The difference between .

[0093] After the angle difference data is calculated by the above formula (3), the angle difference data can be substituted into the above formula (1) to obtain the bone mapping relationship between the first bone and the second bone based on the angle difference.

[0094] In an optional specific embodiment, when the bone attributes include bone positions, the above step S121 "determining the attribute difference data of the bone attributes between the first bone in the first object skeleton and the second bone in the first equipment skeleton corresponding to the first bone" can be specifically implemented through the following steps S1214 to S1215.

[0095] Step S1214: Obtain a first position of a first bone in the first object skeleton, and a second position of a second bone in the first equipment skeleton corresponding to the first bone.

[0096] Step S1215: Determine a plurality of third differences between the first position and the second position, and use the sum of the squares of the plurality of third differences as position difference data of the bone positions between the first object skeleton and the first equipment skeleton.

[0097] It can be understood that in three-dimensional space, the position information of the first bone and the second bone is represented by three-dimensional coordinates. For example, the position coordinates of the first bone can be (x1, y1, z1), and the position coordinates of the second bone can be (x2, y2, z2).

[0098] After obtaining the first position and the second position, the angle difference data between the first position and the second position can be calculated by the following formula (4).

[0099] d(X)=[(x1-x2) 2 +(y1-y2) 2 +(z1-z2) 2 ] (4)

[0100] Among them, x1-x2 represents the difference between the first position x1 of the first bone and the second position x2 of the second bone, y1-y2 represents the difference between the first position y1 of the first bone and the second position y2 of the second bone, and z1-z2 represents the difference between the first position z1 of the first bone and the second position z2 of the second bone.

[0101] In this embodiment, the attribute difference data of different attributes can be calculated by formula (2), formula (3) and / or formula (4), and then the obtained attribute difference data are respectively substituted into the above formula (1) to obtain the bone mapping relationship between the first object skeleton and the first equipment skeleton based on the different attribute difference data.

[0102] Furthermore, based on the second equipment skeleton generated in the above-mentioned embodiments, the equipment skeleton processing method provided in the present application may further include the following step S140.

[0103] Step S140: adjusting the first equipment model according to the second equipment skeleton to obtain a second equipment model adapted to the second object model; the second equipment model has the same equipment features as the first equipment model.

[0104] In this embodiment, adjusting the first equipment model according to the second equipment skeleton can be understood as skinning the mesh model of the first equipment model and the second equipment skeleton, so that the mesh model of the first equipment model can be controlled by the second equipment skeleton to obtain the second equipment model.

[0105] It is understandable that the skinning operation may include operations such as binding the mesh model of the first equipment model with the second equipment skeleton, weight allocation, and weight adjustment, which will not be described in detail here.

[0106] The second equipment model has the same equipment features as the first equipment model, which can be understood as the second equipment model having the same appearance style as the first equipment model, and can be considered to be the same equipment.

[0107] like Figure 4 As shown, Figure 4 A schematic diagram of the process is provided. Figure 4 In the specific example shown, the virtual equipment is virtual clothing.

[0108] First, a first object skeleton corresponding to the first object model and a first clothing skeleton corresponding to the first clothing model adapted to the first object model are obtained; then, based on a preset radial basis function, a bone mapping relationship between the first object skeleton and the first clothing skeleton is determined. Since the skeleton structure of the second object skeleton is the same as the skeleton structure of the first object skeleton, a second clothing skeleton adapted to the second object skeleton can be generated according to the above-mentioned bone mapping relationship and the second object skeleton.

[0109] So far, the method provided in this embodiment has been described. The skeleton information is transferred through the skeleton mapping relationship between the first object skeleton and the first equipment skeleton, so as to determine the second equipment skeleton having the above-mentioned skeleton mapping relationship with the second object skeleton. In this way, the process of adaptively generating equipment skeletons adapted to different body shapes can reduce the cost and error of users making equipment skeletons according to body shapes, and improve the generation efficiency of equipment skeletons that can adapt to object models of different body shapes.

[0110] In addition, if Figure 5 As shown, Figure 5 An example is provided based on the above Figure 4 The specific example shown is a schematic diagram of a process of generating a second clothing model adapted to a second object model from a second clothing skeleton generated.

[0111] The first clothing model introduced above can be adjusted through the second clothing skeleton generated as above. Specifically, the first clothing skeleton of the first clothing model and the clothing mesh model of the first clothing model can be untied first, and then the clothing mesh model of the first clothing model is skinned through the second clothing skeleton to obtain the second clothing model; then, based on the mesh model corresponding to the second clothing model and the second object model, the corresponding skinning operation can be performed to obtain the second object model wearing the second clothing model.

[0112] Based on the second equipment skeleton adapted to the second object skeleton, skinning operations can be further performed to achieve adaptive wearing of the same virtual equipment for object models of different body shapes, thereby improving the efficiency of virtual objects of different body shapes wearing the same virtual equipment; in addition, the problem of unstable wearing effect caused by inconsistent object model skeletons can be further reduced, thereby improving the stability of the wearing effect to a certain extent.

[0113] It can be understood that the above is similar to Figures 2 to 5 The size, appearance, layout, display text and other information of each element in the schematic diagram shown are exemplary and are not intended to limit the actual data.

[0114] Corresponding to the method for processing the equipment skeleton provided in the embodiment of the present application, the embodiment of the present application also provides a device 1000 for processing the equipment skeleton, such as Figure 6 As shown, the device 1000 includes: a determining unit 1001 and a generating unit 1002;

[0115] The determining unit 1001 is used to determine a first object skeleton corresponding to the first object model, a first equipment skeleton corresponding to the first equipment model, and a second object skeleton corresponding to the second object model; the first equipment model is adapted to the body shape of the first object model, the second object model is different from the first object model in body shape, and the skeleton structure of the first object skeleton is the same as the skeleton structure of the second object skeleton;

[0116] The determining unit 1001 is further used to determine a skeleton mapping relationship between the first object skeleton and the first equipment skeleton;

[0117] The generating unit 1002 is used to generate a second equipment skeleton adapted to the body shape of the second object skeleton based on the bone mapping relationship and the second object skeleton.

[0118] Optionally, the above device 1000 further includes an adjustment unit 1003;

[0119] The adjustment unit 1003 is used to adjust the first equipment model according to the second equipment skeleton to obtain a second equipment model adapted to the second object model; the second equipment model has the same equipment features as the first equipment model.

[0120] The generation unit 1002 is specifically used to determine the equipment skeleton information corresponding to the second object skeleton according to the bone mapping relationship and the skeleton information of the second object skeleton; according to the equipment skeleton information, each bone in the first equipment skeleton is rotated, displaced and / or scaled to obtain a second equipment skeleton adapted to the second object skeleton.

[0121] Determination unit 1001 is specifically used to determine the attribute difference data of the bone attributes between the first bone in the first object skeleton and the second bone in the first equipment skeleton corresponding to the first bone; and determine the bone mapping relationship between the first object skeleton and the first equipment skeleton based on the attribute difference data of the bone attributes.

[0122] Optionally, the bone attribute differences include: bone length, bone angle, and / or bone position.

[0123] Optional, when bone attributes include bone length;

[0124] Determination unit 1001 is specifically used to obtain a first length of a first bone in a first object skeleton, and a second length of a second bone corresponding to the first bone in a first equipment skeleton; determine a first difference between the first length and the second length, and use the square value of the first difference as the length difference data of the bone length between the first object skeleton and the first equipment skeleton.

[0125] Optional, when bone properties include bone angles;

[0126] Determination unit 1001 is specifically used to obtain a first angle of a first bone in a first object skeleton, and a second angle of a second bone corresponding to the first bone in a first equipment skeleton; determine multiple second differences between the first angle and the second angle, and use the sum of the squares of the multiple second differences as the angle difference data of the bone angles between the first object skeleton and the first equipment skeleton.

[0127] Optionally, when the bone attributes include the bone position;

[0128] Determination unit 1001 is specifically used to obtain a first position of a first bone in a first object skeleton, and a second position of a second bone corresponding to the first bone in a first equipment skeleton; determine a plurality of third differences between the first position and the second position, and use the square values ​​of the plurality of third differences as position difference data of the bone positions between the first object skeleton and the first equipment skeleton.

[0129] Corresponding to the equipment skeleton processing method provided in the embodiment of the present application, the embodiment of the present application also provides an electronic device 2000 for implementing the equipment skeleton processing method, such as Figure 7 As shown, the electronic device 2000 includes: a processor 2001; and a memory 2002, which is used to store a program of a method for processing an equipment skeleton. After the device is powered on and the program of the method for processing an equipment skeleton is run by the processor, any implementation of the method for processing an equipment skeleton is executed, for example, the following steps may be executed:

[0130] Determine a first object skeleton corresponding to a first object model, a first equipment skeleton corresponding to a first equipment model, and a second object skeleton corresponding to a second object model; the first equipment model is adapted to the body shape of the first object model, the second object model is different from the body shape of the first object model, and the skeleton structure of the first object skeleton is the same as the skeleton structure of the second object skeleton;

[0131] Determining a bone mapping relationship between the first object skeleton and the first equipment skeleton;

[0132] Based on the bone mapping relationship and the second object skeleton, a second equipment skeleton adapted to the body shape of the second object skeleton is generated.

[0133] Corresponding to the equipment skeleton processing method provided in the embodiment of the present application, the embodiment of the present application further provides a computer-readable storage medium storing a program of the equipment skeleton processing method, the program is executed by a processor to execute any implementation of the above-mentioned equipment skeleton processing method, for example, the following steps may be executed:

[0134] Determine a first object skeleton corresponding to a first object model, a first equipment skeleton corresponding to a first equipment model, and a second object skeleton corresponding to a second object model; the first equipment model is adapted to the body shape of the first object model, the second object model is different from the body shape of the first object model, and the skeleton structure of the first object skeleton is the same as the skeleton structure of the second object skeleton;

[0135] Determining a bone mapping relationship between the first object skeleton and the first equipment skeleton;

[0136] Based on the bone mapping relationship and the second object skeleton, a second equipment skeleton adapted to the body shape of the second object skeleton is generated.

[0137] It should be noted that for the detailed description of the device, electronic device and computer-readable storage medium provided in the embodiments of the present application, reference can be made to the relevant description of the embodiment of the equipment skeleton processing method provided in the embodiments of the present application, which will not be repeated here.

[0138] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.

[0139] In a typical configuration, an electronic device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0140] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0141] 1. Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable operations, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined in this article, computer-readable media does not include non-transitory media such as modulated data signals and carrier waves.

[0142] 2. Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0143] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.

Claims

1. A method for processing an equipment skeleton, characterized in that: The method comprises: Determine a first object skeleton corresponding to a first object model, a first equipment skeleton corresponding to a first equipment model, and a second object skeleton corresponding to a second object model; the first equipment model is adapted to the body shape of the first object model, the second object model is different from the body shape of the first object model, and the skeleton structure of the first object skeleton is the same as the skeleton structure of the second object skeleton; Determining a bone mapping relationship between the first object skeleton and the first equipment skeleton; Based on the bone mapping relationship and the second object skeleton, a second equipment skeleton adapted to the body shape of the second object skeleton is generated.

2. The method according to claim 1, characterized in that The method further comprises: The first equipment model is adjusted according to the second equipment skeleton to obtain a second equipment model adapted to the second object model; the second equipment model has the same equipment features as the first equipment model.

3. The method according to claim 1, characterized in that: The step of generating a second equipment skeleton adapted to the body shape of the second object skeleton based on the bone mapping relationship and the second object skeleton comprises: Determine equipment skeleton information corresponding to the second object skeleton according to the bone mapping relationship and the skeleton information of the second object skeleton; According to the equipment skeleton information, each bone in the first equipment skeleton is rotated, displaced and / or scaled to obtain the second equipment skeleton adapted to the second object skeleton.

4. The method according to claim 1, characterized in that The determining of the skeleton mapping relationship between the first object skeleton and the first equipment skeleton includes: Determining attribute difference data of bone attributes between a first bone in the first object skeleton and a second bone in the first equipment skeleton corresponding to the first bone; A bone mapping relationship between the first object skeleton and the first equipment skeleton is determined according to the attribute difference data of the bone attributes.

5. The method according to claim 4, characterized in that The bone attribute differences include: bone length, bone angle, and / or bone position.

6. The method according to claim 4, characterized in that When the bone attribute includes the bone length, the determining of the attribute difference data of the bone attribute between a first bone in the first object skeleton and a second bone in the first equipment skeleton corresponding to the first bone includes: Obtaining a first length of a first bone in the first object skeleton and a second length of a second bone in the first equipment skeleton corresponding to the first bone; A first difference between the first length and the second length is determined, and a square value of the first difference is used as length difference data of bone lengths between the first object skeleton and the first equipment skeleton.

7. The method according to claim 4, characterized in that When the bone attribute includes the bone angle, the determining of the attribute difference data of the bone attribute between the first bone in the first object skeleton and the second bone in the first equipment skeleton corresponding to the first bone includes: Obtaining a first angle of a first bone in the first object skeleton and a second angle of a second bone in the first equipment skeleton corresponding to the first bone; A plurality of second differences between the first angle and the second angle are determined, and a sum of squares of the plurality of second differences is used as angle difference data of bone angles between the first object skeleton and the first equipment skeleton.

8. The method according to claim 4, characterized in that When the bone attribute includes the bone position, the determining of the attribute difference data of the bone attribute between a first bone in the first object skeleton and a second bone in the first equipment skeleton corresponding to the first bone includes: Obtaining a first position of a first bone in the first object skeleton and a second position of a second bone in the first equipment skeleton corresponding to the first bone; A plurality of third differences between the first position and the second position are determined, and square values ​​of the plurality of third differences are used as position difference data of bone positions between the first object skeleton and the first equipment skeleton.

9. A processing device for an equipment skeleton, characterized in that: The device comprises: a determination unit and a generation unit; The determining unit is used to determine a first object skeleton corresponding to a first object model, a first equipment skeleton corresponding to a first equipment model, and a second object skeleton corresponding to a second object model; the first equipment model is adapted to the body shape of the first object model, the second object model is different from the body shape of the first object model, and the skeleton structure of the first object skeleton is the same as the skeleton structure of the second object skeleton; The determining unit is further used to determine a skeleton mapping relationship between the first object skeleton and the first equipment skeleton; The generating unit is used to generate a second equipment skeleton adapted to the body shape of the second object skeleton based on the bone mapping relationship and the second object skeleton.

10. An electronic device, characterized in that: include: processor; as well as The memory is used to store a data processing program. After the electronic device is powered on and the program is run by the processor, the method according to any one of claims 1 to 8 is executed.

11. A computer-readable storage medium, characterized in that: A data processing program is stored, and the program is run by a processor to execute the method according to any one of claims 1 to 8.