Model processing method and device, electronic equipment and storage medium

Through the update of the binding relationship between the target bone and the bone slot, the problem of low matching and adjustment efficiency of different clothing models is solved, efficient model matching is achieved, and the aesthetics of the clothing model and player experience are improved.

CN119152156APending Publication Date: 2024-12-17SHANGHAI NETEASE CUICAN NETWORK TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411182987.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-26
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

In the prior art, the matching and adjustment efficiency between different clothing models is low, resulting in low efficiency during manual adjustment and prone to problems such as interspersion, misalignment, and large coverage area.

Method used

By obtaining the first clothing model with the target bone and the second clothing model with the bone slot, based on the position and binding relationship of the bone slot, the target bone is updated to adjust the model vertex of the first clothing model, and achieve the following: Matching the two clothing models.

Benefits of technology

The model adjustment efficiency is improved when matching between different clothing models, avoiding the problems of more time and poor quality caused by manual adjustment, and enhancing the fashion aesthetics in the game and the visual experience of the players.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119152156A_ABST
    Figure CN119152156A_ABST
Patent Text Reader

Abstract

The invention discloses a model processing method and device, electronic equipment and a computer readable storage medium, and the method comprises the steps: obtaining a first clothing model with a first skeleton, and enabling the first skeleton to comprise a target skeleton corresponding to a target part of the first clothing model; a second garment model with a second skeleton is obtained, the second garment model is adjacent to the target part during wearing, a skeleton slot is formed in the second skeleton, and the position of the skeleton slot is not overlapped with that of the second garment model; and based on the binding relationship between the target skeleton and the skeleton slot and the position of the skeleton slot, updating the target skeleton so as to adjust the model vertex of the first clothing model and obtain the first clothing model matched with the second clothing model. According to the embodiment of the invention, the model adjustment efficiency during matching of different garment models can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of rendering technology, and in particular to a model processing method, device, electronic device and storage medium. Background Art

[0002] Under the tide of the Internet, entertainment projects are becoming more and more important in people's lives. In order to meet the needs of presenting character effects in different scenes in some entertainment projects (for example, animation, movies, games, etc.), it is necessary to design clothing models of different styles to be worn on corresponding virtual characters.

[0003] At present, when different clothing models are worn on different parts of the same virtual character, each clothing model needs to be manually fine-tuned to promote the matching of clothing models in different parts and avoid problems such as interlacing, misalignment, and large coverage area between clothing models. However, due to the different styles of different clothing models, the model adjustment efficiency is low when manually adjusting the clothing models. Summary of the invention

[0004] The embodiments of the present application provide a model processing method, device, electronic device and storage medium, which can improve the model adjustment efficiency when matching different clothing models.

[0005] In a first aspect, an embodiment of the present application provides a model processing method, the method comprising:

[0006] Acquire a first clothing model with a first skeleton, wherein the first skeleton includes a target skeleton corresponding to a target part of the first clothing model;

[0007] Acquire a second clothing model with a second skeleton, wherein the second clothing model is adjacent to the target part when worn, and a skeleton slot is provided on the second skeleton, and a position of the skeleton slot does not overlap with the second clothing model;

[0008] Based on the binding relationship between the target bone and the bone slot, and the position of the bone slot, the target bone is updated to adjust the model vertices of the first clothing model to obtain a first clothing model that matches the second clothing model.

[0009] In a second aspect, an embodiment of the present application provides a model processing device, the device comprising:

[0010] A first model acquisition module, used for acquiring a first clothing model with a first skeleton, wherein the first skeleton includes a target skeleton corresponding to a target part of the first clothing model;

[0011] A second model acquisition module is used to acquire a second clothing model with a second skeleton, wherein the second clothing model is adjacent to the target part when worn, and a skeleton slot is provided on the second skeleton, and a position of the skeleton slot does not overlap with the second clothing model;

[0012] The model adjustment module is used to update the target bone based on the binding relationship between the target bone and the bone slot, and the position of the bone slot, so as to adjust the model vertices of the first clothing model to obtain a first clothing model matching the second clothing model.

[0013] In a third aspect, an embodiment of the present application further provides an electronic device, comprising a memory storing a plurality of instructions; a processor loads instructions from the memory to execute the steps of any one of the model processing methods provided in the embodiments of the present application.

[0014] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores a plurality of instructions suitable for loading by a processor to execute the steps of any one of the model processing methods provided in the embodiments of the present application.

[0015] In a fifth aspect, an embodiment of the present application further provides a computer program product, including a computer program or instructions, which, when executed by a processor, implements the steps of any model processing method provided in the embodiment of the present application.

[0016] According to the scheme of the embodiment of the present application, a first clothing model with a first skeleton is obtained, and the first skeleton includes a target skeleton corresponding to the target part of the first clothing model. Then, a second clothing model with a second skeleton is obtained, and the second clothing model is adjacent to the target part when worn, and a skeleton slot is provided on the second skeleton, and the position of the skeleton slot does not overlap with the second clothing model. Finally, based on the binding relationship between the target skeleton and the skeleton slot, and the position of the skeleton slot, the target skeleton can be updated to adjust the model vertices of the first clothing model, and the first clothing model matching the second clothing model is obtained, so that the target skeleton is adjusted through the skeleton slot by designing the target skeleton corresponding to the second clothing model when worn for the first clothing model, and the skeleton slot that does not overlap is designed for the second clothing model, so as to adjust the target skeleton through the skeleton slot, and then adjust the first clothing model, so as to promote the matching of the adjusted first clothing model with the second clothing model, so as to improve the model adjustment efficiency when matching between different clothing models. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0018] Figure 1 It is a schematic diagram of an embodiment of the model processing method provided in the embodiments of the present application;

[0019] Figure 2 is a schematic diagram of a target skeleton provided in an embodiment of the present application;

[0020] Figure 3 is a schematic diagram of a bone slot provided in an embodiment of the present application;

[0021] Figure 4 It is a schematic diagram of an application scenario of the model processing method provided in the embodiments of the present application;

[0022] Figure 5 It is another application scenario schematic diagram of the model processing method provided in the embodiment of the present application;

[0023] Figure 6 is an updated schematic diagram of the target skeleton provided in the embodiment of the present application;

[0024] Figure 7 is a structural schematic diagram of a model processing device provided in an embodiment of the present application;

[0025] Figure 8 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present application. At the same time, in the description of the embodiments of the present application, the terms "first", "second", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more features. In the description of the embodiments of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0027] Embodiments of the present application provide a model processing method, device, electronic device, and computer-readable storage medium.

[0028] Specifically, this embodiment will be described from the perspective of a model processing device, which can be integrated in an electronic device, that is, the model processing method of the embodiment of the present application can be executed by an electronic device, and optionally, the electronic device can include: a terminal device. The terminal device can be a mobile phone, a tablet computer, a smart Bluetooth device, a laptop computer, a game console, or a personal computer (PC) and other devices.

[0029] The model processing method provided in the embodiment of the present application can be applied to a model processing system. The model processing system may include a player terminal device and a server, and the terminal may be a device including both receiving and transmitting hardware, that is, a device having receiving and transmitting hardware capable of performing two-way communication on a two-way communication link. The player terminal device and the server may perform two-way communication via a network.

[0030] Optionally, the server may be an independent server, or a server network or server cluster composed of servers, including but not limited to a computer, a network host, a single network server, a plurality of network server sets or a cloud server composed of multiple servers. The cloud server is composed of a large number of computers or network servers based on cloud computing.

[0031] The following is a detailed description in conjunction with the accompanying drawings. In this embodiment, the execution subject is a terminal device as an example. It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments. Although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in an order different from that shown in the accompanying drawings.

[0032] The model processing method of this embodiment can improve the model adjustment efficiency when matching different clothing models.

[0033] Please refer to Figure 1 Taking a terminal as an example, this embodiment provides a model processing method. The specific process of the model processing method can be as follows: Step 101 to Step 103, wherein:

[0034] Step 101: Acquire a first clothing model with a first skeleton, wherein the first skeleton includes a target skeleton corresponding to a target part of the first clothing model.

[0035] It should be noted that the clothing model is used to be worn on a certain part of a virtual character, and the clothing model includes but is not limited to models of pants, tops, shoes, hats, gloves, socks, scarves, hair accessories, earrings, etc.

[0036] Among them, the above-mentioned first clothing model with the first skeleton is used to indicate the first clothing model whose model vertices are bound to the first skeleton. By binding the model vertices of the first clothing model to the first skeleton, the shape of the first clothing model is linked to the posture of the first skeleton, and then the dynamic effect of the first clothing model is achieved by changing the posture and position of the first skeleton.

[0037] It can be understood that, since the efficiency of manual adjustment of clothing models is currently low when matching models between different clothing models, in this embodiment, the terminal can set a target bone on the first bone of the first clothing model, and the target bone corresponds to the target part of the first clothing model, so that by adjusting the target bone, the target part of the first clothing model can be adjusted, so as to achieve rapid adjustment of the first clothing model.

[0038] Among them, the above-mentioned target part is the part adjacent to the first clothing model and the second clothing model to be matched when worn. For example, when the first clothing model is a pants model and the second clothing model to be matched is a shoe model, the above-mentioned target part can be the end part of the foot bone, and the target bone corresponding to the end part of the foot bone can be called the trouser leg bone.

[0039] It should be noted that the number of the above-mentioned target bones can be designed according to the accuracy requirements. The higher the number of target bones, the higher the adjustment accuracy of the corresponding first clothing model, which is not limited here.

[0040] In some embodiments, the above-mentioned acquisition of the first clothing model with the first skeleton may include: the terminal may acquire the first clothing model to be processed, wherein the above-mentioned first clothing model is bound to an initial first skeleton, and the initial first skeleton has no target skeleton. Then, the terminal may acquire the second clothing model to be matched with the first clothing model to determine the target part adjacent to the second clothing model when the first clothing model is worn, and then determine the position corresponding to the target part on the initial first skeleton, so as to add at least one target skeleton corresponding to the target part of the above-mentioned first clothing model on the above-mentioned initial first skeleton. Finally, the above-mentioned target skeleton is bound to each model vertex of the target part of the above-mentioned first clothing model, so as to obtain the processed first clothing model.

[0041] It can be understood that by binding the target skeleton to each model vertex of the target part of the first clothing model, the movement of the target skeleton can drive the model vertex to change, thereby driving the first clothing model to deform.

[0042] Among them, the model vertices of the above-mentioned target part can be determined by pre-setting a corresponding part area for the target part on the first clothing model, and using the model vertices in the part area as the model vertices of the target part; or an association relationship between each part and the model vertices on the first clothing model can be pre-established, and then based on the association relationship, the model vertices that have an association relationship with the target part are determined, and the model vertices that have an association relationship with the target part are used as the model vertices of the target part, etc. The specific settings can be made according to needs and are not limited here.

[0043] Specifically, the terminal can call the bone tool to add a target bone to the initial first bone through a preset modeling software, and the modeling software includes but is not limited to Maya software or 3dMax software, etc. In addition, the terminal can also adjust the position and direction of the target bone, set the parent-child relationship between the target bone and other local bones of the initial first bone, and other attribute settings through the modeling software.

[0044] In some embodiments, the terminal can associate the target skeleton with the first clothing model through skinning technology, and then, through the relative distance between the target skeleton and each model vertex, the terminal directly assigns corresponding weight values ​​to the model vertices based on the mapping relationship between the relative distance and the weight value, or manually and indirectly sets it on the terminal, so as to clarify the degree of deformation of each vertex of the first clothing model driven by the change of the target skeleton. For example, in the target part of the first clothing model, the weight value of the model vertex closest to the target skeleton is set to 1, the weight value of the model vertex farthest from the target skeleton is set to 0, and the weight value of the model vertex between the nearest model vertex and the farthest model vertex is taken from 0 to 1 according to the relative distance, for example, 0.75, so that the weight value of the model vertex gradually decreases with the increase of the relative distance from the target skeleton.

[0045] Specifically, the above-mentioned binding of the target bone to each model vertex of the target part of the above-mentioned first clothing model includes: establishing a binding relationship between the above-mentioned target bone and each model vertex, and assigning a corresponding weight value to each model vertex based on the relative distance between the above-mentioned target bone and each model vertex to complete the binding of the above-mentioned target bone and each model vertex, wherein the greater the relative distance between the above-mentioned model vertex and the above-mentioned target bone, the smaller the above-mentioned weight value.

[0046] In some embodiments, since in some scenarios the first clothing model may include multiple symmetrically distributed target parts, such as pants models, shoe models, etc., and when the number of the second clothing models matches the number of the target parts, it means that there is a second clothing model at each target part or a partial area of ​​the second clothing model is close to the first clothing model.

[0047] Correspondingly, the above-mentioned adding at least one target bone corresponding to the target part of the above-mentioned first clothing model on the above-mentioned initial first skeleton includes: adding the above-mentioned target bones respectively at multiple bone adding positions corresponding to the above-mentioned target part on the above-mentioned initial first skeleton, and symmetrically processing the multiple target bones, so that when the animation is rendered, by adjusting one of the target bones, all other target bones can follow the adjustment, thereby improving the animation effect.

[0048] Specifically, when the first clothing model is a pants model, since the pants model includes multiple target parts that are symmetrically distributed on the left and right sides, and when the second clothing model is a shoe model, the number of the shoe models matches the number of the target parts, that is, the shoe model and the pants model are two symmetrical adjacent parts on the left and right sides when worn, that is, the above-mentioned target parts include the end part of the left foot bone and the end part of the right foot bone;

[0049] Correspondingly, the target bones are respectively added at the multiple bone adding positions corresponding to the target parts on the initial first skeleton, and the multiple target bones are symmetrically processed, including: the target bones are respectively added at the bone adding positions corresponding to the end parts of the left foot bones and the right foot bones on the first skeleton, and the target bones at the end parts of the left foot bones and the right foot bones are symmetrically processed.

[0050] For example, Figure 2 As shown, the first clothing model is set to be a pants model, and the second clothing model to be matched is a shoe model. Accordingly, the above target parts may include the end parts of the left foot bones and the end parts of the right foot bones. The terminal can obtain the binding Figure 2 The first clothing model of the initial first skeleton is displayed in the left area of ​​the middle, and then the terminal can add trouser leg bones corresponding to the end parts of the left foot skeleton and the right foot skeleton respectively on the initial first skeleton, and the trouser leg bones are used to control the front trouser legs of the trouser model to obtain Figure 2 The first bone containing the trouser leg bone is shown in the middle right area. Figure 2 The bones added to the end parts of the left foot bone and the right foot bone of the first bone in the middle right area are trouser leg bones.

[0051] Step 102: Obtain a second clothing model with a second skeleton, wherein the second clothing model is adjacent to the target part when worn, and a skeleton slot is provided on the second skeleton, and a position of the skeleton slot does not overlap with the second clothing model.

[0052] Among them, the above-mentioned second clothing model is a clothing model to be matched with the first clothing model. The second clothing model has a second skeleton, which is used to indicate that the model vertices of the second clothing model are bound to the second skeleton. By binding the model vertices of the second clothing model to the second skeleton, the shape of the second clothing model is linked to the posture of the second skeleton, and then the dynamic effect of the second clothing model is achieved by changing the posture and position of the second skeleton.

[0053] It is understandable that, since the efficiency of manual adjustment of clothing models is currently low when matching models between different clothing models, in this embodiment, when a target bone is set on the first bone of the first clothing model, a bone slot that does not overlap with the second clothing model is added to the second bone corresponding to the second clothing model, so that the target bone can be adjusted through the bone slot, and the target part of the first clothing model can be adjusted, so as to quickly adjust the first clothing model and enable the adjusted first clothing model to match the second clothing model.

[0054] Among them, the coverage range of the above-mentioned bone slot and the second clothing model on the second skeleton does not overlap, and different second clothing models cover different ranges, which leads to different positions of the corresponding bone slots. For example, the height of the bone slot is determined based on the thickness of the instep of the shoe model, that is, the height of the bone slot is greater than or equal to the thickness of the instep of the shoe model.

[0055] It should be noted that, since the above-mentioned bone slots can be used to adjust the above-mentioned target bones, each target bone must correspond to at least one bone slot, and the bone slots corresponding to different target bones can be the same or different. They can be specifically set according to the matching design between the first clothing model and the second clothing model, and are not limited here.

[0056] In some embodiments, before obtaining the second clothing model with the second skeleton, it may also include: the terminal may obtain the second clothing model to be processed, wherein the second clothing model is bound with an initial second skeleton, and the initial second skeleton does not have a skeleton slot corresponding to the target skeleton. Then, the terminal may add a skeleton slot under the level of the initial second skeleton, the added skeleton slot is a skeleton slot for adjusting the target skeleton, and the skeleton slot is moved to an area that does not overlap with the second clothing model, so as to obtain the processed second clothing model.

[0057] In some embodiments, since there are multiple second clothing models corresponding to the same target part of the first clothing model, in order to be able to quickly find the file corresponding to the bone slot from the folders corresponding to different second clothing models, the above-mentioned bone slot can be stored with a common file name, such as stored in the storage space of the Unreal game engine with a common file name, wherein the bone slots of multiple second clothing models corresponding to the same target part of the above-mentioned first clothing model use the same common file name, and the bone slots of the second clothing models corresponding to different target parts of the above-mentioned first clothing model use different common file names.

[0058] In this embodiment, when there are multiple second clothing models corresponding to the target part of the first clothing model, the bone slots of the multiple second clothing models for the same target part use the same common file name, and the bone slots of the multiple second clothing models for different target parts use different common file names, so that relevant staff or relevant programs can quickly find the bone slots of the second clothing model for the target part from different files based on the common file name when executing.

[0059] Exemplarily, if the first clothing model is set as a pants model and the second clothing model is set as a shoe model, the above-mentioned target part can be the end part of the left foot bone and the end part of the right foot bone. A general file name "L-Instep" can be designed for the bone slots of multiple second clothing models at the end part of the left foot bone, and a general file name "R-Instep" can be designed for the bone slots of multiple second clothing models at the end part of the right foot bone.

[0060] In some embodiments, the above-mentioned acquisition of a second clothing model with a second skeleton may include: the terminal may obtain a preset clothing binding instruction, the above-mentioned clothing binding instruction is used to indicate the second clothing model to be bound, and then, based on the above-mentioned clothing binding instruction, a target model file corresponding to the above-mentioned second clothing model is selected from at least one candidate model file, and then based on the general file name of the skeleton slot corresponding to the above-mentioned target part, the skeleton slot of the above-mentioned second clothing model is obtained from the above-mentioned target model file to obtain the above-mentioned second clothing model.

[0061] In some embodiments, since in some scenarios the first clothing model may include multiple symmetrically distributed target parts, such as pants models, shoe models, etc., and when the number of the second clothing models matches the number of the target parts, it means that there is a second clothing model at each target part or a partial area of ​​the second clothing model is close to the first clothing model. Therefore, each target part corresponds to at least one bone slot, and the bone slots corresponding to different target parts may be the same or different.

[0062] For example, the above-mentioned adding of bone slots under the level of the above-mentioned initial second skeleton includes: adding a plurality of bone slots corresponding to the above-mentioned target part under the level of the above-mentioned initial second skeleton, so as to adjust the corresponding target bone through the bone slot during animation rendering. Among them, the bone slot may only be associated with the target part, so as to be used to adjust the bone slot at the target part, but the position of the bone slot may not be associated with the target part, and the position of the bone slot may also be associated with the target part, which can be set according to the needs and is not limited here.

[0063] Specifically, when the first clothing model is a pants model, since the pants model includes multiple target parts that are symmetrically distributed on the left and right sides, and when the second clothing model is a shoe model, the number of the shoe models matches the number of the target parts, that is, the shoe model and the pants model are two symmetrical adjacent parts on the left and right sides when worn, that is, the above-mentioned target parts include the end part of the left foot bone and the end part of the right foot bone;

[0064] Correspondingly, the adding of multiple bone slots corresponding to the target parts under the level of the initial second skeleton includes: adding bone slots corresponding to the end parts of the left foot skeleton and the end parts of the right foot skeleton under the level of the initial second skeleton.

[0065] For example, Figure 3 As shown, the first clothing model is set to be a pants model, and the second clothing model to be matched is a shoe model. Accordingly, the target part may include the end part of the left foot bone and the end part of the right foot bone. The terminal may respectively Figure 3 In the left area and the right area shown, bone slots corresponding to the end parts of the left foot bone and the end parts of the right foot bone are added under the level of the initial second bone.

[0066] Step 103: Based on the binding relationship between the target bone and the bone slot, and the position of the bone slot, the target bone is updated to adjust the model vertices of the first clothing model to obtain a first clothing model that matches the second clothing model.

[0067] Among them, the above-mentioned binding relationship can be a preset binding relationship or a real-time binding relationship based on scene settings. For example, the position of the bone slot can be used as the position of the target bone; or a mapping relationship between the position of the bone slot and the position of the target bone can be established to determine the position of the corresponding target bone based on the position of the bone slot. The specific setting can be made according to needs and is not limited here.

[0068] In this embodiment, the terminal imports the acquired first clothing model and the second clothing model into the Unreal Engine, and creates an animation blueprint for them, so as to adjust the first clothing model in the animation blueprint. For example, the position and posture of the target bone can be updated according to the above-mentioned binding relationship and the above-mentioned bone slot, and then the model vertices of the first clothing model that has a binding relationship with the target bone are adjusted, thereby prompting the adjusted first clothing model to match the second clothing model, so as to facilitate the later rendering of the matching first clothing model and second clothing model to the virtual character.

[0069] It is understandable that if Figure 4 As shown, when the first clothing model is a pants model and the second clothing model is a shoe model, the first clothing model is adjusted so that the adjusted first clothing model matches the second clothing model, such as from Figure 4 In the scene where the trouser legs on the left side of the image do not fit the instep, the first clothing model is adjusted to obtain Figure 4 In the scene where the trouser legs in the right area of ​​the game fit the instep, the problems of interlacing, misalignment, and large coverage area between clothing models can be solved, the aesthetics of the fashion in the game can be improved, and the visual experience of the players can be enhanced. In addition, the method of adjusting the first clothing model by the terminal using the above method can improve the efficiency of model adjustment when matching different clothing models, avoid the situation of more time and poor adjustment quality caused by manual adjustment, and reduce the cost of model processing.

[0070] In addition, since there are many different styles of second clothing models, such as Figure 5 As shown, when the first clothing model is a pants model and the second clothing model is a shoe model, Figure 5 The left and right areas respectively correspond to different styles of shoe models matched with the pants model. By designing only one target skeleton for the first clothing model and designing corresponding skeleton slots for different second clothing models, the first clothing model can be adjusted respectively through the skeleton slots corresponding to different second clothing models, and then the first clothing models corresponding to the second clothing models of different styles are obtained. Conversely, the skeleton slots of the second clothing model can also correspond to multiple first clothing models of different styles, so as to adjust the first clothing models of different styles, so that the solution has universality.

[0071] Specifically, the target bone is updated based on the binding relationship between the target bone and the bone slot, and the position of the bone slot, including: the terminal can use the position of the bone slot as the position of the end of the target bone based on the binding relationship between the target bone and the bone slot to update the target bone.

[0072] In some embodiments, the above-mentioned adjustment of the model vertices of the above-mentioned first clothing model includes: based on the update result of the target skeleton, determining the vertex adjustment information indicated by the weight value corresponding to each model vertex, that is, determining the adjustment degree of each model vertex according to the deformation degree indicated by the weight value, the larger the weight value, the larger the corresponding adjustment degree; based on the vertex adjustment information of each model vertex, adjusting each model vertex separately.

[0073] For example, Figure 6 As shown, Figure 6 The left area of ​​​​the trousers model contains the target bones that have not been updated, and Figure 6 In the right area of ​​, the target bone corresponding to the end of the right foot bone on the first bone is deformed, that is, the target bone corresponding to the end of the right foot bone is elongated in a specific direction by a specific length, resulting in that among the model vertices at the end of the right foot bone, the model vertex close to the target bone corresponding to the end of the right foot bone changes more with the movement of the target bone, and as the distance from the target bone increases, the degree to which the corresponding model vertex changes with the movement of the target bone gradually decreases, until the model vertex farthest from the target bone does not change with the movement of the target bone. Finally, as the target bone moves, the model vertex Figure 6 The front side of the trouser legs of the trouser model in the right area is completely affected, while the back side of the trouser legs of the trouser model is completely unaffected, and the area between the front side and the back side of the trouser legs is gradually transitioned according to the weight value, resulting in a softer shape change at the trouser legs of the trouser model, thereby ensuring the aesthetics of the adjusted trouser model.

[0074] The target bone is stretched to a specific length in a specific direction, and each model vertex of the first clothing model is adjusted accordingly. The movement of the target bone can cause the model vertex to change, so as to cause the first clothing model to deform.

[0075] As can be seen from the above, a first clothing model with a first skeleton is obtained, and the first skeleton includes a target skeleton corresponding to the target part of the first clothing model. Then, a second clothing model with a second skeleton is obtained, and the second clothing model is adjacent to the target part when worn, and a skeleton slot is provided on the second skeleton, and the position of the skeleton slot does not overlap with the second clothing model. Finally, based on the binding relationship between the target skeleton and the skeleton slot, and the position of the skeleton slot, the target skeleton can be updated to adjust the model vertices of the first clothing model, and the first clothing model matching the second clothing model is obtained, so that the target skeleton is adjusted through the skeleton slot by designing the target skeleton corresponding to the second clothing model when worn for the first clothing model, and the skeleton slot that does not overlap is designed for the second clothing model, so as to adjust the target skeleton through the skeleton slot, and then adjust the first clothing model, so as to match the adjusted first clothing model with the second clothing model, so as to improve the model adjustment efficiency when matching between different clothing models.

[0076] This embodiment also provides a model processing device, which can be integrated into a terminal device. Figure 7 As shown, the model processing device may include:

[0077] A first model acquisition module 701 is used to acquire a first clothing model with a first skeleton, wherein the first skeleton includes a target skeleton corresponding to a target part of the first clothing model;

[0078] A second model acquisition module 702 is used to acquire a second clothing model with a second skeleton, wherein the second clothing model is adjacent to the target part when worn, and a skeleton slot is provided on the second skeleton, and the position of the skeleton slot does not overlap with the second clothing model;

[0079] The model adjustment module 703 is used to update the target bone based on the binding relationship between the target bone and the bone slot, and the position of the bone slot, so as to adjust the model vertices of the first clothing model to obtain a first clothing model matching the second clothing model.

[0080] In some embodiments, the first model acquisition module 701 is specifically used to:

[0081] Acquire a first clothing model to be processed, wherein an initial first skeleton is bound to the first clothing model;

[0082] Adding at least one target bone corresponding to the target part of the first clothing model to the initial first bone;

[0083] The target skeleton is bound to each model vertex of the target part of the first clothing model to obtain a processed first clothing model.

[0084] In some embodiments, the first model acquisition module 701 is specifically used to:

[0085] Establish a binding relationship between the target bone and each model vertex. Based on the relative distance between the target bone and each model vertex, assign corresponding weight values ​​to each model vertex to complete the binding between the target bone and each model vertex. The greater the relative distance between the model vertex and the target bone, the smaller the weight value.

[0086] In some embodiments, the first clothing model includes a plurality of symmetrically distributed target parts, and the number of the second clothing models matches the number of the target parts; the first model acquisition module 701 is specifically used for:

[0087] The target bones are added respectively at multiple bone adding positions corresponding to the target parts on the initial first bone, and the multiple target bones are symmetrically processed.

[0088] In some embodiments, the first clothing model includes a pants model, the second clothing model includes a shoe model, and the target part includes a left foot bone end part and a right foot bone end part; the first model acquisition module 701 is specifically used for:

[0089] The above-mentioned target bones are added respectively at the bone adding positions on the above-mentioned first skeleton corresponding to the end parts of the above-mentioned left foot skeleton and the end parts of the above-mentioned right foot skeleton, and the target bones at the end parts of the above-mentioned left foot skeleton and the end parts of the above-mentioned right foot skeleton are symmetrically processed.

[0090] In some embodiments, the model adjustment module 703 is specifically used to:

[0091] Based on the update result of the target skeleton, vertex adjustment information indicated by the weight value corresponding to each model vertex is determined respectively;

[0092] Based on the vertex adjustment information of each model vertex, each model vertex is adjusted respectively.

[0093] In some embodiments, the model processing device further includes a slot adding module, and the slot adding module is specifically used to:

[0094] Acquire a second clothing model to be processed, wherein an initial second skeleton is bound to the second clothing model;

[0095] A bone slot is added under the level of the initial second bone, and the bone slot is moved to an area that does not overlap with the second clothing model, so as to obtain a processed second clothing model.

[0096] In some embodiments, the above-mentioned bone slots are stored with a common file name, wherein the bone slots of multiple second clothing models corresponding to the same target part of the above-mentioned first clothing model use the same common file name, and the bone slots of the second clothing models corresponding to different target parts of the above-mentioned first clothing model use different common file names.

[0097] In some embodiments, the second model acquisition module 702 is specifically used to:

[0098] Obtaining a preset clothing binding instruction, where the clothing binding instruction is used to indicate a second clothing model to be bound;

[0099] Based on the clothing binding instruction, a target model file corresponding to the second clothing model is selected from at least one candidate model file;

[0100] Based on the common file name of the bone slot corresponding to the target part, the bone slot of the second clothing model is obtained from the target model file to obtain the second clothing model.

[0101] In some embodiments, the model adjustment module 703 is specifically used to:

[0102] Based on the binding relationship between the target bone and the bone slot, the position of the bone slot is used as the position of the end of the target bone to update the target bone.

[0103] As can be seen from the above, a first clothing model with a first skeleton is obtained, and the first skeleton includes a target skeleton corresponding to the target part of the first clothing model. Then, a second clothing model with a second skeleton is obtained, and the second clothing model is adjacent to the target part when worn, and a skeleton slot is provided on the second skeleton, and the position of the skeleton slot does not overlap with the second clothing model. Finally, based on the binding relationship between the target skeleton and the skeleton slot, and the position of the skeleton slot, the target skeleton can be updated to adjust the model vertices of the first clothing model, and the first clothing model matching the second clothing model is obtained, so that the target skeleton is adjusted through the skeleton slot by designing the target skeleton corresponding to the second clothing model when worn for the first clothing model, and the skeleton slot that does not overlap is designed for the second clothing model, so as to adjust the target skeleton through the skeleton slot, and then adjust the first clothing model, so as to match the adjusted first clothing model with the second clothing model, so as to improve the model adjustment efficiency when matching between different clothing models.

[0104] Accordingly, an embodiment of the present application further provides an electronic device, which may be a terminal, and the terminal may be a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC, Personal Computer), a personal digital assistant (Personal Digital Assistant, PDA) and other terminal devices. Alternatively, the electronic device may be a server.

[0105] like Figure 8 As shown, Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 800 includes a processor 801 having one or more processing cores, a memory 802 having one or more computer-readable storage media, and a computer program stored in the memory 802 and executable on the processor. The processor 801 is electrically connected to the memory 802. Those skilled in the art will appreciate that the electronic device structure shown in the figure does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or arrange components differently.

[0106] The processor 801 is the control center of the electronic device 800, and uses various interfaces and lines to connect various parts of the entire electronic device 800. By running or loading software programs and / or units stored in the memory 802, and calling data stored in the memory 802, the processor 801 executes various functions of the electronic device 800 and processes data, thereby monitoring the electronic device 800 as a whole. The processor 801 can be a central processing unit CPU, a graphics processing unit GPU, a network processor (Network Processor, NP), etc., and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application.

[0107] In the embodiment of the present application, the processor 801 in the electronic device 800 will load instructions corresponding to the processes of one or more application programs into the memory 802 according to the following steps, and the processor 801 will run the application programs stored in the memory 802 to implement various functions, such as:

[0108] Acquire a first clothing model with a first skeleton, wherein the first skeleton includes a target skeleton corresponding to a target part of the first clothing model;

[0109] Acquire a second clothing model with a second skeleton, wherein the second clothing model is adjacent to the target part when worn, and a skeleton slot is provided on the second skeleton, and a position of the skeleton slot does not overlap with the second clothing model;

[0110] Based on the binding relationship between the target bone and the bone slot, and the position of the bone slot, the target bone is updated to adjust the model vertices of the first clothing model to obtain a first clothing model that matches the second clothing model.

[0111] Therefore, the electronic device 800 provided in this embodiment can bring the following technical effects: improving the model adjustment efficiency when matching different clothing models.

[0112] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0113] Optional, such as Figure 8 As shown, the electronic device 800 further includes: a touch screen 803, a radio frequency circuit 804, an audio circuit 805, an input unit 806, and a power supply 807. The processor 801 is electrically connected to the touch screen 803, the radio frequency circuit 804, the audio circuit 805, the input unit 806, and the power supply 807, respectively. Those skilled in the art can understand that Figure 8 The electronic device structure shown in the figure does not constitute a limitation of the electronic device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0114] The touch display screen 803 can be used to display a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. The touch display screen 803 may include a display panel and a touch panel. Among them, the display panel may be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device, and these graphical user interfaces may be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light-emitting diode (OLED, Organic Light-Emitting Diode) and the like. The touch panel may be used to collect the user's touch operation on or near it (such as the user using any suitable object or attachment such as a finger, a stylus, etc. on the touch panel or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 801, and can receive the command sent by the processor 801 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 801 to determine the type of touch event, and then the processor 801 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 803 to realize the input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 803 can also be used as a part of the input unit 806 to realize the input function.

[0115] The radio frequency circuit 804 may be used to send and receive radio frequency signals, so as to establish wireless communication with a network device or other electronic devices through wireless communication, and to send and receive signals with the network device or other electronic devices.

[0116] The audio circuit 805 can be used to provide an audio interface between the user and the electronic device through a speaker and a microphone. The audio circuit 805 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 805 and converted into audio data, and then the audio data is output to the processor 801 for processing, and then sent to another electronic device through the radio frequency circuit 804, or the audio data is output to the memory 802 for further processing. The audio circuit 805 may also include an earplug jack to provide communication between an external headset and an electronic device.

[0117] The input unit 806 may be used to receive input numbers, character information or user feature information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0118] The power supply 807 is used to supply power to various components of the electronic device 800. Optionally, the power supply 807 can be logically connected to the processor 801 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The power supply 807 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0119] although Figure 8 Not shown, the electronic device 800 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.

[0120] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0121] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0122] To this end, an embodiment of the present application provides a computer-readable storage medium, in which multiple computer programs are stored, and the computer program can be loaded by a processor to execute any model processing method provided in the embodiment of the present application. The computer program can execute the steps of the following model processing method:

[0123] Acquire a first clothing model with a first skeleton, wherein the first skeleton includes a target skeleton corresponding to a target part of the first clothing model;

[0124] Acquire a second clothing model with a second skeleton, wherein the second clothing model is adjacent to the target part when worn, and a skeleton slot is provided on the second skeleton, and a position of the skeleton slot does not overlap with the second clothing model;

[0125] Based on the binding relationship between the target bone and the bone slot, and the position of the bone slot, the target bone is updated to adjust the model vertices of the first clothing model to obtain a first clothing model that matches the second clothing model.

[0126] It can be seen that the computer program can be loaded by the processor to execute any model processing method provided in the embodiments of the present application, thereby bringing the following technical effects: improving the model adjustment efficiency when matching different clothing models.

[0127] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0128] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0129] Since the computer program stored in the computer-readable storage medium can execute any one of the model processing methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the model processing methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0130] According to one aspect of the present application, a computer program product or a computer program is also provided, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the electronic device executes the methods provided in various optional implementations of the above embodiments.

[0131] In the above-mentioned model processing device, computer-readable storage medium, electronic device, and computer program product embodiments, the description of each embodiment has its own emphasis. For parts not described in detail in a certain embodiment, reference can be made to the relevant description of other embodiments. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process and beneficial effects of the above-mentioned model processing device, computer-readable storage medium, computer program product, electronic device and its corresponding units can refer to the description of the model processing method in the above embodiment, and will not be repeated here.

[0132] The above is a detailed introduction to a model processing method, device, electronic device, computer-readable storage medium and computer program product provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A model processing method, characterized in that: The method comprises: Acquire a first clothing model with a first skeleton, wherein the first skeleton includes a target skeleton corresponding to a target part of the first clothing model; Acquire a second clothing model with a second skeleton, wherein the second clothing model is adjacent to the target part when worn, and a skeleton slot is provided on the second skeleton, and a position of the skeleton slot does not overlap with the second clothing model; Based on the binding relationship between the target bone and the bone slot, and the position of the bone slot, the target bone is updated to adjust the model vertices of the first clothing model to obtain a first clothing model that matches the second clothing model.

2. The model processing method according to claim 1, characterized in that: The step of obtaining a first clothing model with a first skeleton includes: Acquire a first clothing model to be processed, wherein an initial first skeleton is bound to the first clothing model; adding at least one target bone corresponding to the target part of the first clothing model to the initial first bone; The target skeleton is bound to each model vertex of the target part of the first clothing model to obtain a processed first clothing model.

3. The model processing method according to claim 2, characterized in that: The step of binding the target skeleton to each model vertex of the target part of the first clothing model comprises: Establish a binding relationship between the target bone and each model vertex, and assign corresponding weight values ​​to each model vertex based on the relative distance between the target bone and each model vertex to complete the binding of the target bone and each model vertex, wherein the greater the relative distance between the model vertex and the target bone, the smaller the weight value.

4. The model processing method according to claim 2, characterized in that: The first clothing model includes a plurality of target parts that are symmetrically distributed, and the number of the second clothing models matches the number of the target parts; The step of adding at least one target bone corresponding to the target part of the first clothing model to the initial first bone comprises: The target bones are added respectively at multiple bone adding positions corresponding to the target parts on the initial first bone, and the multiple target bones are symmetrically processed.

5. The model processing method according to claim 4, characterized in that: The first clothing model includes a pants model, the second clothing model includes a shoe model, and the target part includes a left foot bone end part and a right foot bone end part; The step of adding the target bones at a plurality of bone adding positions corresponding to the target part on the initial first bone, and performing symmetric processing on the plurality of target bones comprises: The target bones are added respectively at the bone adding positions on the first skeleton corresponding to the end parts of the left foot skeleton and the right foot skeleton, and the target bones at the end parts of the left foot skeleton and the right foot skeleton are symmetrically processed.

6. The model processing method according to claim 1, characterized in that: The adjusting the model vertices of the first clothing model comprises: Based on the update result of the target skeleton, vertex adjustment information indicated by the weight value corresponding to each model vertex is determined respectively; Based on the vertex adjustment information of each model vertex, each model vertex is adjusted respectively.

7. The model processing method according to claim 1, characterized in that: Before getting the second clothing model with the second skeleton, also include: Acquire a second clothing model to be processed, wherein an initial second skeleton is bound to the second clothing model; A bone slot is added under the level of the initial second skeleton, and the bone slot is moved to an area that does not overlap with the second clothing model, so as to obtain a processed second clothing model.

8. The model processing method according to claim 7, characterized in that: The bone slots are stored with a common file name, wherein the bone slots of multiple second clothing models corresponding to the same target part of the first clothing model use the same common file name, and the bone slots of second clothing models corresponding to different target parts of the first clothing model use different common file names.

9. The model processing method according to claim 8, characterized in that: The step of obtaining a second clothing model with a second skeleton includes: Obtaining a preset clothing binding instruction, where the clothing binding instruction is used to indicate a second clothing model to be bound; Based on the clothing binding instruction, selecting a target model file corresponding to the second clothing model from at least one candidate model file; Based on the common file name of the bone slot corresponding to the target part, the bone slot of the second clothing model is obtained from the target model file to obtain the second clothing model.

10. The model processing method according to any one of claims 1 to 9, characterized in that: The updating of the target bone based on the binding relationship between the target bone and the bone slot, and the position of the bone slot, comprises: Based on the binding relationship between the target bone and the bone slot, the position of the bone slot is used as the position of the end of the target bone to update the target bone.

11. A model processing device, characterized in that: The device comprises: A first model acquisition module, used for acquiring a first clothing model with a first skeleton, wherein the first skeleton includes a target skeleton corresponding to a target part of the first clothing model; A second model acquisition module is used to acquire a second clothing model with a second skeleton, wherein the second clothing model is adjacent to the target part when worn, and a skeleton slot is provided on the second skeleton, and a position of the skeleton slot does not overlap with the second clothing model; A model adjustment module is used to update the target bone based on the binding relationship between the target bone and the bone slot, and the position of the bone slot, so as to adjust the model vertices of the first clothing model to obtain a first clothing model matching the second clothing model.

12. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute the steps of the model processing method according to any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps of the model processing method according to any one of claims 1 to 10.