A data processing method, device, equipment and storage medium

By block division and bone association of the model, filtering the target model blocks and performing distance calculations, the problem of inefficiency in traditional K-nearest neighbor search schemes when dealing with the dynamic proximity relationship between human body and cloth is solved, and more efficient and accurate data processing is achieved.

CN119167193BActive Publication Date: 2025-05-09LINGDI (ZHEJIANG) TECHNOLOGY CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411652959.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-05-09
Estimated Expiration
2044-11-19

AI Technical Summary

Technical Problem

In the field of fabric simulation in computer graphics, traditional K-nearest neighbor search solutions are inefficient in dealing with the dynamic proximity relationship between the human body and the fabric. In particular, it takes a long time to reconstruct the dynamic acceleration structure on the GPU and has limited utilization of the special memory structure of the GPU.

Method used

By blocking the model and associating the model block with bone information, we calculate the nearest projection point with the cloth geometric center of gravity on the bone, filter the target model block, and perform distance calculation to obtain the target model element.

Benefits of technology

The data processing efficiency is improved, and the model and fabric primitives are quickly positioned through bone information, which improves the processing efficiency and accuracy of fabric simulation in computer graphics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119167193B_ABST
    Figure CN119167193B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a data processing method, device, equipment and storage medium. The method includes performing block division on a model to obtain a plurality of model blocks; obtaining model skeleton information and associating the model block with at least one skeleton information; obtaining cloth primitives and calculating the first nearest skeleton projection point of the cloth geometric center of gravity of the cloth primitive on the skeleton; based on the first nearest skeleton projection point and the cloth geometric center of gravity, screening the model block to obtain the target model block corresponding to the cloth primitive; performing distance calculation on the model primitive and the cloth primitive in the target model block to obtain the target model primitive. The present disclosure can improve the efficiency of data processing when processing model and cloth primitive data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] In the field of cloth simulation in computer graphics, the dynamic performance of the human body as a boundary condition of motion driving the character's clothing is a key issue. To achieve this process, it is necessary to deal with the collision and contact detection between the human body surface and the cloth. One of the core technologies is to detect the spatial proximity relationship between the cloth geometry and the human body surface geometry. Specifically, the elements on the cloth geometry need to be aligned with the nearest 1 to K elements on the human body surface. This type of problem is usually called the K-nearest neighbor search (KNN search) problem.

[0003] Traditional methods usually establish spatial acceleration structures for the human body surface. These acceleration structures can adopt tree structures or uniform grid structures. By constructing these acceleration structures, the nearest distance search between cloth primitives and human body surface primitives can be converted into efficient queries on the acceleration structures.

[0004] Although the above-mentioned general K-nearest neighbor search scheme is relatively mature, there is still room for improvement in dealing with the specific problem of matching the proximity relationship between the human body and cloth. The general K-nearest neighbor search usually relies on dynamic spatial acceleration structures, such as spatial hashing or spatial search trees. However, as the human body moves, the space occupied by the human body geometry keeps changing, and the topological structure of the search tree or the division of the spatial uniform grid needs to be updated frequently. Reconstructing these structures on the GPU is time-consuming, and these general solutions have limited utilization of GPU special memory structures (such as shared memory). Summary of the invention

[0005] In order to overcome the problems existing in the related art, the present disclosure provides a data processing method, apparatus, device and storage medium.

[0006] According to a first aspect of the present disclosure, a data processing method is provided, the method comprising: performing block division on a model to obtain a plurality of model blocks; obtaining model skeleton information, and associating the model block with at least one skeleton information; obtaining cloth primitives, and calculating the first nearest skeleton projection point of the cloth geometric center of gravity of the cloth primitive on the skeleton; based on the first nearest skeleton projection point and the cloth geometric center of gravity, screening the model blocks to obtain a target model block corresponding to the cloth primitive; performing distance calculation on the model primitives and the cloth primitives within the target model block to obtain the target model primitive.

[0007] In some embodiments, based on the first nearest bone projection point and the geometric center of gravity of the cloth, the model blocks are screened to obtain the target model blocks, including: generating a ray from the first nearest bone projection point to the center of gravity of the cloth primitive; obtaining all model blocks corresponding to the bone where the nearest bone projection point is located, performing intersection detection between the ray and the model blocks; and determining the model block intersecting with the ray as the target model block.

[0008] In some embodiments, the method further includes: determining geometric change information of the model based on motion information of the model; determining a model block to be updated according to the geometric change information, and updating model primitive information in the model block.

[0009] In some embodiments, associating the model block with at least one piece of bone information includes: calculating the block geometric center of gravity of each model block, and associating each model block to the bone that is closest to the projection distance of its block geometric center of gravity.

[0010] In some embodiments, a model block is associated with at least one bone information, including: generating a buffer area based on the model block, merging the buffer area into the model block, and updating the model block; for the model primitives in the updated model block, obtaining the second nearest bone projection point and the corresponding bone of each model primitive on the bone, and obtaining a first bone index set, wherein the first bone index set is used to determine the model primitives corresponding to each bone.

[0011] In some embodiments, the method also includes: generating bounding boxes based on each updated model block; for each bounding box vertex of the bounding box, respectively obtaining the third closest bone projection point of the bounding box vertex on the bone and the corresponding bone to obtain a second bone index set; based on the first bone index set and the second bone index set, obtaining a third bone index set, and the third bone index set is used to determine the bounding boxes and model primitives corresponding to each bone, thereby determining the model block corresponding to each bone and the model primitives within the block.

[0012] In some embodiments, the method further includes: generating a target primitive index according to a correspondence between the target model primitive and the cloth primitive.

[0013] In some embodiments, a distance calculation is performed on the model primitives and the cloth primitives in the target model block to obtain the target model primitives, including: setting a parameter K, wherein the parameter K is used to determine the number of the target model primitives, and when the number of the target model primitives reaches K, the calculation result is output.

[0014] According to a second aspect of the present disclosure, a pattern data processing device is provided, the device comprising:

[0015] A segmentation unit performs block partitioning on the model to obtain multiple model blocks;

[0016] An association unit, which obtains the model skeleton information and associates the model block with at least one skeleton information;

[0017] A screening unit, which obtains a cloth primitive, calculates a first nearest bone projection point of a geometric center of gravity of the cloth primitive on the skeleton, and screens a model block based on the first nearest bone projection point and the geometric center of gravity to obtain a target model block;

[0018] The calculation unit performs distance calculation on the model primitives and the cloth primitives in the target model block to obtain the target model primitives.

[0019] According to a third aspect of the present disclosure, an electronic device is provided, the device comprising: a processor; and a memory for storing instructions executable by the processor to execute the method described in any embodiment of the present disclosure.

[0020] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described in any embodiment of the present disclosure is implemented.

[0021] Through the method disclosed in the present invention, the model primitives and cloth primitives involved in the distance calculation are classified and screened in advance, and the corresponding model primitives and cloth primitives are quickly located through the skeleton information, which effectively improves the data processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 is a flow chart of a data processing method provided by an embodiment of this specification;

[0023] Figure 2 It is a schematic diagram of the model partition provided in an embodiment of this specification;

[0024] Figure 3 is a schematic diagram of human body model block and skeleton registration provided in an embodiment of this specification;

[0025] Figure 4 is a schematic diagram of a bounding box and skeleton registration provided in an embodiment of this specification;

[0026] Figure 5 is a schematic diagram of a human body model block after expansion and updating provided in an embodiment of this specification;

[0027] Figure 6 is a schematic diagram of intersection detection between rays and model blocks provided in an embodiment of this specification;

[0028] Figure 7is a schematic diagram of the skeleton in the human body model provided in an embodiment of this specification;

[0029] Figure 8 is a hardware structure diagram of a data processing device provided in an embodiment of this specification;

[0030] Fig. 9 It is a module of a data processing device provided in an embodiment of this specification. DETAILED DESCRIPTION

[0031] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with this specification. Instead, they are merely examples of devices and methods consistent with some aspects of this specification as detailed in the appended claims.

[0032] The terms used in this specification are for the purpose of describing specific embodiments only and are not intended to limit this specification. The singular forms "a", "the" and "the" used in this specification and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0033] It should be understood that although the terms first, second, third, etc. may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0034] There are still some parts that can be improved in some existing methods of using K-nearest neighbor search algorithms to solve the specific problem of neighbor relationship matching between human body models and cloth. For the scene of neighbor relationship matching between human body models and cloth involved in the present disclosure, the usual solution is to find the K human body model primitives with the highest matching degree for each cloth primitive. In this process, for each cloth primitive, the system needs to traverse all human body model primitives to find the appropriate human body model primitive, and the human body model is often in motion in the actual simulation scene, which will cause the human body model primitives to be continuously updated. Therefore, during the motion process, a large amount of GPU video memory is required to find the human body model primitive that matches the cloth primitive, and this method of continuously traversing all human body model primitives will result in low data processing efficiency.

[0035] In order to improve data processing efficiency, the present disclosure provides a data processing method, including performing block division on a model to obtain multiple model blocks; obtaining model skeleton information and associating the model block with at least one skeleton information; obtaining cloth primitives and calculating the first nearest skeleton projection point of the cloth geometric center of gravity of the cloth primitive on the skeleton; based on the first nearest skeleton projection point and the cloth geometric center of gravity, screening the model blocks to obtain the target model blocks corresponding to the cloth primitives; performing distance calculation on the model primitives and the cloth primitives in the target model block to obtain the target model primitives.

[0036] In the above process, the model usually refers to a three-dimensional model that needs to wear clothes, which is more common in some well-known 3D modeling software. The model of the present disclosure can be a human model or an animal model, because according to the method of the present disclosure, it is not only applicable to the scene of human models and clothes, but also to the scene of customizing clothes for pets. Therefore, the method of the present disclosure does not overly limit its application scenario; in addition, it can be understood that fabric is an important part of clothing, and clothing is usually made of multiple pieces of fabric spliced ​​and sewn together; the data referred to by the primitive is usually defined by the user, for example, a fabric primitive can be defined as a vertex on the fabric, that is, a fabric. A primitive can also be defined as an area on the cloth as a cloth primitive. In this case, a cloth primitive will contain multiple cloth vertices. Similarly, a model primitive in a model block can be a vertex or an area composed of multiple vertices. The flexible transformation of these definitions does not affect the implementation of this method. Therefore, the conceptual definition of the primitive does not constitute a limitation on the method. At the same time, although the business scenario used in this method is to improve the K-nearest neighbor search algorithm to solve the problem of matching the proximity relationship between the human body model and the cloth, other algorithms can also refer to this method to further improve data processing efficiency. Therefore, the application scenario of this solution should not be limited.

[0037] Specifically, refer to Figure 1 The flowchart of the data processing method is further explained in detail.

[0038] Step 110, performing block division on the model to obtain multiple model blocks. In some embodiments, the model is a human body model as an example, by partitioning the outer surface of the human body model, the outer surface of the human body model is divided into multiple regions to obtain multiple model blocks of the human body model. The schematic diagram after partitioning can refer to Figure 2 The human body model is divided into multiple areas, and areas of different colors represent a block. In the process of partitioning, in order to further improve the subsequent processing efficiency, the size of each human body model block can be kept consistent, that is, the area of ​​each human body model block can be kept as close as possible. For example, the K-means algorithm can be used to divide the blocks to achieve similar block areas. However, it should be noted that the inconsistency of the human body model block size does not affect the overall implementation of this method. It is just that keeping the human body model block size consistent can bring about the effect of further improving the data processing efficiency.

[0039] Step 120, obtaining model skeleton information, and associating the model block with at least one skeleton information. Figure 3 As shown, the geometric center of gravity of each human body model block can be calculated first, and then the nearest bone projection point of the block geometric center of gravity on the skeleton is calculated, and the human body model block is associated with the bone segment where the bone projection point is located, so as to establish a connection between the skeleton and the outer surface of the human body model, so as to establish a preliminary correspondence between the human body model block and each skeleton, and realize the registration of the human body model block and the skeleton. The skeleton in the embodiment, such as Figure 7 The figure shows the skeleton in the human body model. In the process of 3D animation production, the skeleton of the model is a common and important parameter. By dividing the surface of the human body model into several blocks with topological continuity and registering these blocks to the skeleton according to the spatial proximity relationship, the semantic layering of the human body model geometry is realized. This semantic registration method not only helps to avoid wrong matching during the proximity search process, but also enables intelligent correction when processing user interaction behaviors, such as position correction in the case of wearing errors.

[0040] Step 130, obtain cloth primitives, and calculate the first closest bone projection point of the cloth geometric center of gravity of the cloth primitive on the skeleton. In some embodiments, for ease of understanding, the cloth primitives may be individual cloth vertices on the cloth, in which case the geometric center of gravity of the cloth primitive is the cloth vertex itself, and by calculating and finding the first closest bone projection point of the cloth geometric center of gravity on the skeleton, the skeleton closest to the cloth primitive can be found. However, it is understandable that if the cloth primitive is an area of ​​a specific size on the cloth, the registration of the cloth primitive with the skeleton can also be achieved by solving the geometric center of gravity of its cloth area.

[0041] Step 140, based on the first nearest bone projection point and the geometric center of gravity of the cloth, the model block is screened to obtain the target model block corresponding to the cloth primitive. An implementation method in this embodiment includes, Figure 6 As shown, a ray is generated from the first nearest bone projection point to the center of gravity of the cloth primitive, and all model blocks corresponding to the bone where the first nearest bone projection point is located are obtained, and an intersection check is performed between the ray and the model block, and the model block intersecting with the ray is determined as the target model block. For ease of understanding, the cloth primitives in this process are still taken as cloth vertices as an example, that is, one cloth primitive is one cloth vertex. At this time, the first nearest bone projection point generates a ray to the corresponding cloth vertex, and according to the registration relationship between the human body model block and the bone, all human body model blocks corresponding to the bone where the first nearest bone projection point is located are obtained, and an intersection check is performed between the ray and the human body model block, and the human body model block intersecting with the ray is determined as the target human body model block. In some cases, although the cloth primitive and the model block are bound to the same bone, the bone itself has volume, so there may be a situation where the cloth primitive and the model block are bound to the same bone but no collision simulation is required. Therefore, the above steps can further eliminate the model blocks that are bound to the same bone but will not cause collision simulation with the cloth, reducing the amount of data processing. If this screening is not done, some model blocks that are far away from the cloth primitive will participate in the distance calculation, but it is obvious that the results of such distance calculations usually have no business value.

[0042] Step 150, performing distance calculation on the model primitives and the cloth primitives in the target model block to obtain the target model primitives. In some embodiments, the model primitives in the target model block may be the model vertices on the surface of the human body model. It is easy for those skilled in the art to determine all the model vertices in a block based on a model block. Distance calculation is performed on all the model vertices in the target human body model block and the cloth vertices. After numerical comparison, one or more target model vertices closest to the cloth vertices are found, which means that the proximity relationship matching between the cloth vertices and the model vertices is completed. The matching relationship can be used for future collision simulation calculations. It should be noted that, in this embodiment, the model primitive is defined as a model vertex and the cloth primitive is defined as a cloth vertex only for the convenience of illustration. However, in other embodiments, the model primitive can be a set of model vertices, which is used to express an area on the outer surface of the human body model, and the cloth primitive can also be a set of cloth vertices, which is used to express an area of ​​the cloth. When the model primitive and the cloth primitive are both represented as an area, the method will calculate the distance between the set of model vertices and each vertex in the set of cloth vertices. This situation may increase the data processing amount of the distance calculation between vertices, but can reduce the data processing amount of the screening target model block. Personnel in this field can flexibly adjust the implementation strategy according to actual conditions. The present disclosure effectively associates the spatial position of the human body model surface with the skeleton, uses the skeleton as a guide, and realizes efficient neighbor relationship matching of the geometry of the cloth and the human body surface. Compared with the traditional K-nearest neighbor search algorithm, this skeleton-based search method has higher accuracy and robustness, especially when processing complex dynamic scenes.

[0043] In some embodiments, the method can also determine the geometric change information of the model based on the motion information of the model, determine the model block to be updated according to the geometric change information, and update the model primitive information in the model block. The general K-nearest neighbor search usually relies on the dynamic spatial structure, that is, when the human body model is in motion, even if the spatial structure of some areas has not changed, all the external surface vertex data of the human body model will be updated, which takes a lot of time. The embodiment of the present disclosure can only update the model vertex data in the model block where the geometric information has changed according to the motion situation after partitioning the surface of the human body model, thereby reducing the amount of data processing and improving data processing efficiency.

[0044] In some embodiments, the method can also generate a buffer area based on the model block, merge the buffer area into the model block, and update the model block; for the model primitives in the updated model block, obtain the second nearest bone projection point and the corresponding bone of each model primitive on the skeleton to obtain a first bone index set, and the first bone index set is used to determine the model primitives corresponding to each skeleton, thereby improving the speed of skeleton search for corresponding model primitives. The specific method in some embodiments is as follows: first, each human body model block is expanded by a buffer area generated by an adjacency relationship, and the buffer area and the original human body model block together constitute an expanded human body model block. The buffer area can be extended outward from the human body model block by a circle of vertices, or by N circles of vertices. The specific value of N can be determined by the user and is not limited here. For example, Figure 5 In the figure, the first area 510 (yellow part) represents a selected human body model block, the blue vertex in the first area 510 is the model vertex 511, and the second area 520 (blue part) is a buffer area formed by geometric primitives adjacent to the area 510. The first area 510 and the second area 520 are combined to form an extended and updated human body model block. The second nearest bone projection point on the human body skeleton is obtained for all model vertices in the extended and updated human body model block, so as to find the skeleton closest to each model vertex, and register the relationship between the model vertex and the nearest skeleton, so as to form a first skeleton index set. In this embodiment, the first skeleton index set can be used to determine the model vertex corresponding to each skeleton, eliminating the repeated positioning calculation of the model vertex and the skeleton. In addition, this method can ensure that the human body model blocks overlap, ensure that in complex motion scenes, the K-nearest neighbor search algorithm can stably output correct results, avoid the spatial discontinuity problem that may occur at the seams of the model blocks or the joints of the skeleton, effectively avoid the jump problem, and improve the stability of the algorithm.

[0045] In some embodiments, the method further generates bounding boxes based on each updated model block, and for each bounding box vertex of the bounding box, obtains the third closest projection point of the bounding box vertex on the skeleton and the corresponding skeleton, to obtain a second skeleton index set, and obtains a third skeleton index set based on the first skeleton index set and the second skeleton index set. The third skeleton index set is used to determine the bounding boxes and model primitives corresponding to each bone, thereby determining the model block corresponding to each bone and the model primitives within the block, thereby improving the speed of searching for the corresponding model block and model primitive by the skeleton. Specifically, a homogeneous bounding box is established for the extended updated human body model block, wherein the homogeneous bounding box is a type of bounding box, and the characteristic of the homogeneous bounding box is that the directions of the edges of the bounding box and the spatial coordinate axes are consistent, but the method can be implemented normally even if the homogeneous bounding box is not used. Figure 4As shown, for each vertex of the homogeneous bounding box in the extended and updated human body model block, the third closest projection point of each vertex on the skeleton and the corresponding skeleton are obtained respectively, and each vertex is registered on the corresponding skeleton, thereby obtaining a second skeleton index set. Finally, the model vertices in the extended and updated human body model block and the skeleton indexes registered by the vertices of the homogeneous bounding box constitute a set, which is the third skeleton index set. This embodiment can use the third skeleton index set to determine the model vertices and homogeneous bounding boxes corresponding to each skeleton. In some embodiments, this method can generate rays from the first closest skeleton projection point to the centroid of the cloth primitive based on the first closest skeleton projection point and the geometric centroid of the cloth, and obtain all homogeneous bounding boxes corresponding to the skeleton where the first closest skeleton projection point is located, perform intersection detection between the ray and the homogeneous bounding box, and the intersecting homogeneous bounding box is the target homogeneous bounding box corresponding to the cloth primitive, thereby further obtaining the target model block. This embodiment reorganizes the mapping relationship between the generated bones and the model blocks after their registration extension and update, ensuring that each bone can be quickly located to the extended and updated model blocks associated with it, eliminating repeated positioning calculations, facilitating efficient query and processing in subsequent algorithms, and in subsequent data processes, the static acceleration structure only needs to reconstruct the local homogeneous bounding box when the model movement causes geometric changes, thereby greatly improving the efficiency of structural reconstruction. In addition, the parallel execution of the static structure on the GPU is more efficient, reducing the computational overhead caused by dynamic reconstruction.

[0046] In some embodiments, the method further includes generating a target primitive index according to the correspondence between the target model primitive and the cloth primitive. Specifically, the target model primitive is the model vertex closest to the cloth primitive. In the case where the cloth primitive in this embodiment is a cloth vertex, the target primitive index is to establish a correspondence between the cloth vertex and the model vertex closest to it, and form a database. This database of correspondence can be directly imported into future collision simulation calculations.

[0047] In some embodiments, the method further includes setting a parameter K, wherein the parameter K is used to determine the number of target model primitives. When the number of target model primitives reaches K, the calculation result is output. The parameter K is usually an integer value. It can be understood that some embodiments of the present disclosure are to obtain the target model vertex corresponding to each cloth vertex to achieve the proximity relationship matching between the cloth vertex and the model vertex. However, in the collision simulation calculation, the number of target model vertices is not limited to one, but can also be multiple. Therefore, the method can be set by the user, or a K value is preset, indicating that the K target model vertices closest to each cloth vertex are obtained. Only when the number of obtained target model vertices reaches K, the target model vertex is obtained. For example, when K is 5, the method will obtain the 5 target model vertices closest to the cloth vertex. Of course, the present embodiment is only to illustrate the target model vertex as the target model primitive. It is conceivable that if the present embodiment defines the primitive as an area composed of a group of vertices, the present method can also be used to achieve the corresponding effect. For example, the geometric center of gravity of the area composed of the above group of vertices is calculated, and then the distance between the cloth vertex and the geometric center of gravity of the area is calculated, and K groups of areas closest to the cloth vertex can also be obtained.

[0048] Corresponding to the aforementioned data processing method embodiments, this specification also provides embodiments of data processing method devices. The device embodiments can be implemented by software, or by hardware, or by a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor of the device in which it is located reading the corresponding computer program in the non-volatile memory into the memory and running it. From the hardware level, such as Figure 8 The figure is a hardware structure diagram of the device where the data processing device of this manual is located, except Figure 8 In addition to the processor, network interface, memory and non-volatile memory shown, the device in which the apparatus in the embodiment is located may also include other hardware according to the actual communication function, which will not be described in detail.

[0049] See also Fig. 9 , is a block diagram of a data processing device provided in an embodiment of this specification, and the device corresponds to Figure 1 In the embodiment shown, the device comprises:

[0050] Segmentation unit: performs block division on the model to obtain multiple model blocks;

[0051] Association unit: obtains model skeleton information and associates the model block with at least one skeleton information;

[0052] Screening unit: obtaining a cloth primitive, calculating a first nearest bone projection point of the geometric center of gravity of the cloth primitive on the skeleton, and screening the model block based on the first nearest bone projection point and the geometric center of gravity to obtain a target model block;

[0053] Calculation unit: Perform distance calculation on the model primitives and cloth primitives in the target model block to obtain the target model primitives.

[0054] In some embodiments, the segmentation unit uses a K-means algorithm to divide the model into blocks to achieve similar areas of the model blocks. Optionally, the geometric change information of the model is determined based on the motion information of the model; the model block to be updated is determined according to the geometric change information, and the model primitive information in the model block is updated.

[0055] In some embodiments, the association unit calculates the block geometric center of gravity of each model block, and associates each model block to the bone with the closest projection distance to its block geometric center of gravity. Optionally, a buffer area is generated based on the model block, and the buffer area is merged into the model block, and the model block is updated; for the model primitives in the updated model block, the second nearest bone projection point and the corresponding bone of each model primitive on the bone are obtained to obtain a first bone index set, and the first bone index set is used to determine the model primitive corresponding to each bone. Optionally, a bounding box is generated based on each updated model block; for each bounding box vertex of the bounding box, the third nearest bone projection point and the corresponding bone of the bounding box vertex on the bone are obtained to obtain a second bone index set; based on the first bone index set and the second bone index set, a third bone index set is obtained, and the third bone index set is used to determine the bounding box and model primitive corresponding to each bone, thereby determining the model block corresponding to each bone and the model primitive in the block.

[0056] In some embodiments, the screening unit generates a ray from the first nearest bone projection point to the center of gravity of the cloth primitive; obtains all model blocks corresponding to the bone where the first nearest bone projection point is located, performs intersection detection between the ray and the model block; and determines the model block that intersects with the ray as the target model block.

[0057] In some embodiments, the calculation unit sets a parameter K, which is used to determine the number of target model primitives. When the number of target model primitives reaches K, the calculation result is output. Optionally, a target primitive index is generated based on the correspondence between the target model primitives and the cloth primitives.

[0058] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.

[0059] The implementation process of the functions and effects of each unit in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0060] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are only schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. Ordinary technicians in this field can understand and implement it without paying creative work.

[0061] Figure 8 The internal functional modules and structural schematic diagram of the data processing device are described. Its actual execution subject can be an electronic device, including:

[0062] processor;

[0063] a memory for storing processor-executable instructions;

[0064] The processor is configured to execute any one of the above data processing method embodiments.

[0065] In the above-mentioned embodiment of the electronic device, it should be understood that the processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or the processor can be any conventional processor, etc., and the aforementioned memory can be a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk or a solid-state drive. The steps of the method disclosed in the embodiment of the present invention can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor.

[0066] A computer-readable storage medium stores computer instructions, which, when executed by a processor, implement the steps of any of the above-mentioned data processing methods.

[0067] A computer program product includes a computer program, which implements the steps of any of the above data processing methods when executed by a processor.

[0068] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the electronic device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0069] Those skilled in the art will readily appreciate other embodiments of the specification after considering the specification and practicing the invention disclosed herein. The specification is intended to cover any variations, uses, or adaptations of the specification that follow the general principles of the specification and include common knowledge or customary techniques in the art that are not disclosed in the specification. The specification and examples are to be considered exemplary only, and the true scope and spirit of the specification are indicated by the following claims.

[0070] It should be understood that the present description is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.

Claims

1. A data processing method, characterized in that: Perform block partitioning on the model to obtain multiple model blocks; Obtain model skeleton information, and associate the model block with at least one skeleton information; Obtain a cloth primitive, and calculate the first closest bone projection point of the cloth geometric center of gravity of the cloth primitive on the bone; Based on the first nearest bone projection point and the geometric center of gravity of the cloth, the model block is screened to obtain the target model block corresponding to the cloth primitive; Perform distance calculation on the model primitives and the cloth primitives in the target model block to obtain the target model primitives; The associating the model block with at least one piece of skeleton information comprises: generating a buffer region based on the adjacency relationship of the model block, merging the buffer region into the model block, and updating the model block; For the model primitives in the updated model block, the second nearest bone projection point of each model primitive on the bone and the corresponding bone are obtained to obtain a first bone index set, wherein the first bone index set is used to determine the model primitive corresponding to each bone; Generate bounding boxes based on each updated model block; For each bounding box vertex of the bounding box, respectively obtain the third closest bone projection point of the bounding box vertex on the bone and the corresponding bone to obtain a second bone index set; Based on the first bone index set and the second bone index set, a third bone index set is obtained, and the third bone index set is used to determine the bounding box and model primitives corresponding to each bone, thereby determining the model block corresponding to each bone and the model primitives within the block.

2. A data processing method according to claim 1, characterized in that: Based on the first nearest bone projection point and the geometric center of gravity of the cloth, the model block is screened to obtain a target model block, including: Generate a ray from the first closest bone projection point to the geometric center of gravity of the cloth; Obtain all model blocks corresponding to the skeleton where the first nearest skeleton projection point is located, and perform intersection detection between the ray and the model blocks; The model block intersecting with the ray is determined as the target model block.

3. A data processing method according to claim 1, characterized in that: The method further comprises: Based on the motion information of the model, determine the geometric change information of the model; According to the geometric change information, the model block to be updated is determined, and the model primitive information in the model block is updated.

4. A data processing method according to claim 1, characterized in that: Associating the model block with at least one bone information, including: The block geometric center of gravity of each model block is calculated, and each model block is associated with the bone that is closest to the projection distance of its block geometric center of gravity.

5. A data processing method according to claim 1, characterized in that: The method further comprises: Generate a target primitive index based on the correspondence between the target model primitive and the cloth primitive.

6. A data processing method according to claim 1, characterized in that: Perform distance calculation on the model primitives and cloth primitives in the target model block to obtain the target model primitives, including: A parameter K is set, and the parameter K is used to determine the number of target model primitives. When the number of target model primitives reaches K, the calculation result is output.

7. A pattern rendering device, characterized in that: The device comprises: Segmentation unit: performs block division on the model to obtain multiple model blocks; An associating unit: obtaining model skeleton information, associating a model block with at least one skeleton information; associating a model block with at least one skeleton information includes: generating a buffer region based on the adjacency relationship of the model block, merging the buffer region into the model block, and updating the model block; For the model primitives in the updated model block, the second nearest bone projection point of each model primitive on the bone and the corresponding bone are obtained to obtain a first bone index set, wherein the first bone index set is used to determine the model primitive corresponding to each bone; Generate bounding boxes based on each updated model block; For each bounding box vertex of the bounding box, respectively obtain the third closest bone projection point of the bounding box vertex on the bone and the corresponding bone to obtain a second bone index set; Based on the first bone index set and the second bone index set, a third bone index set is obtained, wherein the third bone index set is used to determine the bounding box and model primitives corresponding to each bone, thereby determining the model block corresponding to each bone and the model primitives within the block; Screening unit: obtaining a cloth primitive, calculating a first nearest bone projection point of the geometric center of gravity of the cloth primitive on the skeleton, and screening the model block based on the first nearest bone projection point and the geometric center of gravity to obtain a target model block; Calculation unit: Perform distance calculation on the model primitives and cloth primitives in the target model block to obtain the target model primitives.

8. An electronic device, characterized in that: The device comprises: processor; A memory for storing processor executable instructions to perform the method according to any one of claims 1 to 7.

9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Animal model hierarchical division method

    CN101101673A

  • Bone skin method and device, computer equipment and storage medium

    CN113902876A

  • Expression animation redirection method and device and electronic equipment

    CN115393482A