A 2D re-dressing system based on refined component disassembly and dynamic conflict correction

The 2D dress-up method, which uses refined component disassembly and dynamic conflict correction, solves problems such as rough disassembly of clothing components, poor compatibility of combinations, and conflicts between clipping and layers in 2D dress-up technology. It achieves high degree of freedom of combination, low cost multi-body type adaptation and efficient rendering, thereby improving user experience and resource reuse rate.

CN122492430APending Publication Date: 2026-07-31SHANGHAI ZHANGMENG NETWORK TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHANGHAI ZHANGMENG NETWORK TECHNOLOGY CO LTD
Filing Date
2026-05-09
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing 2D dress-up technology suffers from problems such as rough disassembly of clothing components, poor compatibility of assembly, inability to fundamentally resolve conflicts between molding and layering, rigid anchor point design, high cost of adapting to multiple body types, weak conflict correction capabilities, and lack of standardization in the resource production system, resulting in poor visual experience and low resource reusability.

Method used

A refined component decomposition and dynamic conflict correction method is adopted, including standardizing the decomposition of character models and clothing resources, defining a three-level skeletal anchor point system, establishing dynamic rendering hierarchy priority rules, and performing multi-dimensional dynamic conflict detection and adaptive correction to achieve real-time deformation tracking and multi-body shape adaptation of clothing components.

Benefits of technology

It achieves a high degree of freedom in clothing combination and high reusability, solves the problems of layer misalignment and clipping, reduces art production costs, improves rendering efficiency and user experience, and clothing resources that adapt to different body types do not need to be redrawn, with a resource reuse rate of 100%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122492430A_ABST
    Figure CN122492430A_ABST
Patent Text Reader

Abstract

This invention provides a 2D dress-up system based on refined component disassembly and dynamic conflict correction. It establishes a standardized system for three-layer character model disassembly and five-level clothing resource disassembly, breaking down clothing into the smallest replaceable component units. This enables free combination of multi-level dress-up options, significantly improving the flexibility of dress-up combinations. Simultaneously, the standardized disassembly rules establish unified resource production specifications, shortening the production cycle of a single outfit, increasing resource reuse rate, and substantially reducing art production costs. A real-time conflict detection algorithm is designed, involving three stages: coordinate offset, layer overlap, and boundary clipping. This algorithm is lightweight and optimized for 2D dress-up scenes, achieving high detection accuracy and enabling real-time frame-by-frame detection of conflicts during character movements. Furthermore, corresponding adaptive correction algorithms are designed for different types of conflicts, allowing adaptation to arbitrarily complex action scenes without the need for predefined fixed rules. This fundamentally solves the long-standing industry problem of clipping, reducing the overall clipping rate across all scenes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of game digitization technology, and in particular to a 2D dress-up method based on refined component disassembly and dynamic conflict correction, as well as a 2D dress-up system, electronic device, and computer-readable storage medium based on refined component disassembly and dynamic conflict correction. Background Technology

[0002] With the rapid development of ACG (Anime, Comics, and Games) games, virtual live streaming, digital human interaction, and metaverse scenarios, personalized outfit customization for 2D virtual avatars has become a core industry demand. Users are placing increasingly higher demands on the visual fidelity, motion adaptability, and combination flexibility of outfit customization. As a core capability for the commercialization of virtual avatars, 2D outfit customization technology directly determines the user experience and monetization efficiency of products.

[0003] Current mainstream 2D ​​costume-changing technologies in the industry generally suffer from the following core pain points and technical shortcomings, failing to meet the costume-changing needs in complex scenarios: The crude disassembly of clothing components results in extremely poor compatibility: Most existing technologies adopt a crude design of "replacing entire layers of clothing," dividing clothing into only a few large layers such as tops, bottoms, and accessories, without refining the disassembly into the smallest replaceable units. This leads to problems such as overlapping parts, misaligned edges, and disordered overlapping relationships when combining multiple parts for dressing, making it impossible to achieve multi-level free combination of "inner layer + middle layer + outer layer + accessories," severely limiting the flexibility of dressing.

[0004] Clipping and layering conflicts remain unresolved: Traditional 2D dress-up software typically uses fixed rendering layering values, pre-setting fixed rendering depth values ​​for clothing components. This fails to adapt to dynamic movements and changes in layering caused by multiple layers of clothing. When a character model performs large movements or multiple layers of clothing are stacked, layering errors, clothing clipping, and component penetration are highly likely to occur. This is especially true in dynamic scenes such as arm swings, body twists, and sitting / squatting postures, where the clipping rate exceeds 60%, severely damaging the visual experience.

[0005] The rigid anchor point design and prominent coordinate offset issues are significant problems: Most existing technologies use single, fixed anchor points for clothing, which can only adapt to the standard standing posture of a human model. When the human's body shape changes or the range of motion changes, the clothing cannot adaptively adjust to follow the skeletal deformation, resulting in problems such as anchor point misalignment, clothing offset, and stretching deformation. At the same time, the lack of constraints and correction mechanisms for anchor points means that anchor point errors will continue to accumulate when multiple parts are combined, ultimately leading to serious visual distortion.

[0006] Multi-body type adaptation is extremely costly and has poor reusability: In the current technology, a set of clothing resources can only be adapted to a single body type character model. When it is necessary to adapt to multiple body types with different heights, weights, and head-to-body ratios, artists need to redraw and split the entire set of clothing resources. The adaptation cycle is long, the production cost is high, and the resource reuse rate is less than 20%, which cannot meet the needs of a large number of personalized body types for changing clothes.

[0007] The existing technology has weak conflict correction capabilities, and real-time performance and effect cannot be balanced: it can only achieve pre-verification under static posture and cannot dynamically detect and correct component conflicts in the process of real-time changes in character movements; the few solutions with correction capabilities use predefined fixed correction rules, which cannot adapt to complex and ever-changing conflict scenarios, and the correction process will bring serious performance loss, resulting in a rendering frame rate drop of more than 30%, which cannot be implemented in real-time interactive scenarios.

[0008] Lack of a standardized resource production system: The industry lacks unified standards for component disassembly, anchor point definition, and hierarchical design. The costume resources produced by different artists are not standardized, requiring a lot of manual adjustments when integrated into the dress-up system. The resource integration cycle is long and the error rate is high, which seriously affects the efficiency of product content iteration. Summary of the Invention

[0009] To address the technical problems existing in the prior art, the present invention provides the following technical solution: On the one hand, a 2D assembly replacement method based on refined component disassembly and dynamic conflict correction is provided, including the following steps: S1 performs standardized and refined component decomposition of 2D character base models and clothing resources. The character model is decomposed into a basic bone layer, a basic skin layer, and a deformation control layer. The clothing resources are decomposed into the smallest replaceable component units according to a five-level decomposition system. Standardized bounding boxes, deformation constraint areas, and coverage boundaries are defined for each component unit. S2 defines a three-level skeletal anchor point system for each disassembled component unit, establishes dynamic rendering hierarchy priority rules, and completes the binding of components to the character skeleton and the configuration of rendering baselines. S3 receives the user's clothing change command, loads the target clothing component resources, completes the component combination compatibility check, and completes the coordinate space mapping and real-time following deformation calculation of the components based on the skeletal anchor points. S4 performs frame-by-frame multi-dimensional dynamic conflict detection on all clothing components, including anchor point coordinate offset conflict detection, layer overlap conflict detection, and boundary deformation clipping detection, and outputs the conflict detection results. Based on the collision detection results, S5 performs hierarchical adaptive correction for different types of collisions, including coordinate offset smoothing correction, dynamic reordering of rendering levels, boundary clipping deformation correction, and updates the vertex coordinates and rendering priority of the components. S6 performs parameterized multi-body-type dynamic adaptation of clothing components based on the body shape parameters of the target character model, and completes the scaling, anchor point adjustment and deformation weight optimization of the components. S7 performs layered rendering and batch optimization based on the corrected component data and rendering priority queue, and outputs the final 2D dress-up screen. S8 collects rendering effect data and conflict correction records, and completes closed-loop iterative optimization of component disassembly rules, anchor point configuration, and algorithm parameters.

[0010] Preferably, in step S1, the five-level disassembly system of clothing resources is as follows: Level 1 inner layer, Level 2 middle layer, Level 3 outer layer, Level 4 accessory layer, and Level 5 special layer. The smallest component unit after each level of disassembly is defined with an axis-aligned bounding box (AABB) and an oriented bounding box (OBB). Simultaneously, the component unit is divided into a core anchoring area, a following deformation area, and a free deformation area, each with a corresponding deformation weight defined. The deformation weight formula is: in, Let p be the deformation weight of the pixel on the component. is the distance from pixel p to the corresponding anchor point, and k is the deformation attenuation coefficient.

[0011] Preferably, in step S2, the three-level skeletal anchor point system includes a main anchor point, auxiliary anchor points, and constraint anchor points; wherein, each component unit is provided with one main anchor point, which determines the overall position of the component, and the coordinates change in real time following the corresponding skeletal node; 2-8 auxiliary anchor points are provided to control the deformation and fit of the component, and positional constraint relationships are set with the main anchor point; 1-3 constraint anchor points are provided to limit the maximum offset range of the component.

[0012] Preferably, in step S2, the final rendering priority of the component in the dynamic rendering hierarchy priority rule is calculated as follows: in, The basic priority of the clothing level to which the component belongs. To cover the dynamic weights of the relationships, For dynamic weights of actions, Custom weights.

[0013] Preferably, in step S3, the coordinate space mapping of the component includes a four-level transformation from local space to model space to world space to screen space. Simultaneously, based on the component's deformation weight, the deformation-following coordinates of the component's vertices are calculated in real time. in, Let be the real-time coordinates of the component vertex at time t, and n be the number of skeletal nodes associated with that vertex. Let be the deformation weight of the i-th bone corresponding to that vertex. Let be the transformation matrix of the i-th bone at time t. These are the initial reference coordinates of the vertices.

[0014] Preferably, in step S4, the multi-dimensional dynamic conflict detection specifically includes: The first stage of anchor point coordinate offset conflict detection: calculate the position offset and rotation angle difference between the main anchor point and the corresponding bone node, and determine the coordinate offset conflict when it exceeds the preset threshold. The second stage of hierarchical overlap conflict detection: calculate the bounding box overlap rate between components. For components whose overlap rate exceeds the threshold, check whether the theoretical hierarchical priority is consistent with the actual rendering order. If they are inconsistent, they are judged as hierarchical overlap conflict. The third stage of boundary deformation penetration detection: The optimized 2D separation axis theorem SAT is used to detect the boundary intersection of components with overlapping boundary boxes. If the projection intervals on all separation axes overlap, it is determined to be a penetration conflict. At the same time, the minimum penetration depth and penetration direction are calculated.

[0015] Preferably, in step S5, the hierarchical adaptive correction specifically includes: To address coordinate offset conflicts, a constrained smooth PID correction algorithm is employed to calculate the correction offset and smoothly correct the component anchor point coordinates. in, Let be the correction offset at time t. Let be the position error at time t. , , These are the proportional coefficient, integral coefficient, and differential coefficient, respectively. To address layer overlap conflicts, a dynamic priority reordering algorithm is adopted to calculate the minimum priority increment required by the upper-level component, update the rendering priority of the component, and regenerate the rendering order queue. To address boundary clipping conflicts, a boundary deformation correction algorithm with weighted smooth transition is adopted. This algorithm smoothly offsets the vertices in the clipping region to eliminate clipping. The correction formula is as follows: in, These are the corrected vertex coordinates. Minimum penetration depth The normal vector in the direction of penetration. This is a smoothing weight function.

[0016] Preferably, in step S6, the parameterized multi-body shape dynamic adaptation specifically involves: quantifying the differences in human body shape into five core parameters: height scaling parameter, weight scaling parameter, head-to-body ratio parameter, arm ratio parameter, and leg ratio parameter; constructing a non-uniform scaling matrix based on the body shape parameters; scaling the clothing components as a whole; and adaptively adjusting the anchor point position and deformation weight to complete the multi-body shape adaptation.

[0017] On the other hand, a 2D costume change system based on refined component disassembly and dynamic conflict correction is provided to implement the above-mentioned method. The system includes: The clothing and character model detailed component decomposition preprocessing module is used to perform standardized and detailed decomposition of character models and clothing resources, generating the smallest replaceable component unit and standardized attribute configuration file; The standardized skeleton anchor point and rendering hierarchy rule definition module is used to define a three-level skeleton anchor point system for component units and establish dynamic rendering hierarchy priority rules. The module for real-time adaptation and coordinate mapping of replacement components is used to receive replacement instructions and complete the coordinate mapping and real-time deformation calculation of the components. The multi-dimensional component conflict dynamic detection module is used to complete the three-stage conflict detection of component coordinate offset, layer overlap and boundary clipping frame by frame, and output the conflict detection results. The hierarchical conflict adaptive correction module is used to perform adaptive correction of component coordinates, rendering level, and boundary deformation based on conflict detection results. The multi-body dynamic adaptation module is used to complete the parametric multi-body adaptation of clothing components based on human body shape parameters; The real-time layered rendering output module is used to complete layered rendering and batch optimization based on the corrected component data, and output the final dressing screen. The resource iteration optimization module is used to collect rendering effects and feedback data to complete the closed-loop iterative optimization of the system.

[0018] On the other hand, an electronic device is provided, comprising: a processor; and a memory storing computer-readable instructions, which, when executed by the processor, implement the method described above.

[0019] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction is stored therein, the at least one instruction being loaded and executed by a processor to implement the above method.

[0020] The beneficial effects of the technical solutions provided in the embodiments of the present invention include at least the following: 1. It pioneered a standardized and refined component disassembly system, enabling clothing to achieve a high degree of freedom in combination and high reusability. This invention abandons the traditional, crude design of replacing entire layers and establishes a standardized system for three-layer disassembly of character models and five-level disassembly of clothing resources. Clothing is disassembled into the smallest replaceable component units, realizing multi-level free combination of "inner layer - middle layer - outer layer - accessories", increasing the flexibility of dressing combinations by more than 10 times. At the same time, the standardized disassembly rules establish unified resource production specifications, shorten the production cycle of a single set of clothing, increase the resource reuse rate, and significantly reduce the cost of art production.

[0021] 2. A three-level anchor point system and dynamic hierarchical rules were constructed to avoid misalignment and hierarchical disorder at the baseline level. This invention designs a three-level anchor point system consisting of a main anchor point, auxiliary anchor points, and constraint anchor points, replacing the traditional single fixed anchor point. This ensures that clothing can accurately and naturally deform following the character's skeleton, reducing coordinate offset problems at the source. At the same time, it establishes a rendering hierarchy rule of "basic priority + dynamic weight adjustment," abandoning the fixed hierarchy design and enabling dynamic adjustment of hierarchy priority based on coverage relationships and action states, completely solving the hierarchy disorder problem caused by the traditional fixed hierarchy.

[0022] 3. A multi-dimensional dynamic conflict detection and adaptive correction algorithm was developed, which fundamentally solves the problem of clipping issues in 2D costume changes. This invention designs a real-time conflict detection algorithm with three stages: coordinate offset, layer overlap, and boundary clipping. It is lightweight and optimized for 2D dress-up scenes, achieving high detection accuracy and enabling real-time frame-by-frame detection of conflicts during character movements. At the same time, it designs corresponding adaptive correction algorithms for different types of conflicts, achieving a correction success rate of 99.5%. It can adapt to any complex action scene without the need for predefined fixed rules, fundamentally solving the long-standing clipping problem in the industry and reducing the occurrence rate of clipping in all scenes.

[0023] 4. It achieves parameterized multi-body dynamic adaptation, significantly reducing the cost of multi-body adaptation. This invention designs a parametric body shape adaptation algorithm, which quantifies the differences in human body shape into 5 core parameters. Based on these parameters, clothing components are adaptively scaled, anchor points are adjusted, and deformation weights are optimized. Without redrawing art resources, a single set of clothing can be quickly adapted to multiple body shapes with different heights, weights, and head-to-body ratios. The adaptation cycle is shortened from 72 hours to 4 hours, and the resource reuse rate is increased to 100%. This solves the core pain points of traditional technology, such as high cost and poor reusability in multi-body shape adaptation.

[0024] 5. It balances real-time rendering efficiency with visual effects, achieving a balance between commercial value and user experience. The detection and correction algorithm of this invention has been optimized for lightweight design, resulting in minimal impact on rendering performance. At the same time, through rendering batch optimization, the number of draw calls is reduced, the rendering frame rate is increased, and it can run stably in real-time interactive scenes. Meanwhile, the correction process adopts a smooth transition algorithm to ensure that clothing deformation is natural and there is no visual distortion problem. The ultimate dress-up experience drives a doubling of player dress-up usage and payment conversion rate, achieving a win-win situation for user experience and commercial value.

[0025] 6. A fully closed-loop resource iteration and optimization system has been established to continuously improve production efficiency and equipment replacement effectiveness. This invention designs a resource iteration optimization module that can automatically optimize component disassembly rules, anchor point configuration, and algorithm parameters based on rendering effects, correction records, and user feedback. This forms a complete business closed loop of "resource production - effect output - feedback optimization," which can continuously improve resource production efficiency and costume effects, and adapt to the long-term content iteration needs of games. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 This is a schematic diagram of a system architecture provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the working mechanism of the real-time adaptation and coordinate mapping module for the replacement components of the present invention; Figure 3 This is a flowchart of a multi-dimensional component conflict dynamic detection method provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of a hierarchical conflict adaptive correction logic provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of a data communication mechanism architecture provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the real-time operation control flow of the system provided in an embodiment of the present invention. Detailed Implementation

[0028] The technical solution of the present invention will now be described with reference to the accompanying drawings.

[0029] In embodiments of the present invention, words such as "exemplarily," "for example," etc., are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" in the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the word "exemplary" is intended to present the concept in a concrete manner. Furthermore, in embodiments of the present invention, the meaning expressed by "and / or" can be both, or either one.

[0030] In the embodiments of this invention, the terms "image" and "picture" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning. Similarly, the terms "of," "corresponding (relevant)," and "corresponding" may sometimes be used interchangeably. It should be noted that, without emphasizing the distinction between them, they convey the same meaning.

[0031] In this embodiment of the invention, sometimes a subscript such as W1 may be mistakenly written as a non-subscript form such as W1. When the difference is not emphasized, the meaning they express is the same.

[0032] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.

[0033] This invention proposes a 2D costume system based on refined component disassembly and dynamic conflict correction. Through a standardized refined component disassembly system, multi-dimensional skeletal anchor point rules, real-time dynamic conflict detection algorithm, and hierarchical adaptive correction mechanism, it fundamentally solves the core problems of clipping, hierarchical conflict, and poor adaptability in 2D costume changing. At the same time, it achieves low-cost and rapid adaptation for multiple body types, while taking into account real-time rendering efficiency and visual fidelity.

[0034] I. System Architecture Description like Figure 1 As shown, the 2D dress-up system of the present invention adopts a four-layer closed-loop architecture of "offline preprocessing layer - real-time engine layer - rendering output layer - iterative optimization layer". The overall architecture has the characteristics of high standardization, high real-time performance and high scalability, and can be compatible with all categories of 2D dress-up application scenarios such as 2D mobile games, virtual live broadcasts, web-based digital humans, and H5 interactive scenarios.

[0035] The core modules of the system include: a preprocessing module for detailed component disassembly of clothing and character models; a module for defining standardized skeletal anchor points and rendering layer rules; a module for real-time adaptation and coordinate mapping of clothing components; a module for dynamic detection of multi-dimensional component conflicts; a module for adaptive correction of layered conflicts; a module for dynamic adaptation of multiple body types; a module for real-time layered rendering output; and a module for iterative resource optimization. These modules achieve data interoperability through standardized data interfaces and process control through a centralized scheduling engine, forming a complete business closed loop of "standardized resource preprocessing - real-time clothing adaptation - conflict detection and correction - rendering output - feedback iteration".

[0036] Detailed descriptions of each module are as follows: (I) Pre-processing module for disassembling and refining clothing and character models This module serves as the resource foundation for the entire system. It is responsible for the standardized and refined component decomposition of the 2D character base model and clothing resources. It defines the boundary range, deformation constraint area, coverage relationship and adaptation rules of each component unit, decomposing the coarse whole layer of resources into the smallest component units that can be freely combined and independently deformed. This avoids the problems of component overlap and misfit from the source of resources, and establishes standardized resource production specifications.

[0037] This module designs a "three-layer disassembly system for character models" and a "five-level disassembly system for clothing resources." It also defines standardized design rules for the smallest component unit. The disassembly process completely avoids the existing technology's whole-layer replacement mode, achieving fine disassembly with controllable granularity.

[0038] The core of this module involves decomposing and standardizing the Spine / Live2D source files of the 2D character base model, the layered PSD files of the clothing art resources, and the character's skeletal motion data. The resulting output includes a decomposed character model component library, a clothing minimum component unit resource package, and standardized attribute configuration files (bounding box, deformation weight, coverage boundary) for each component. These are then synchronously transmitted to the standardized skeletal anchor point and rendering layer rule definition module. The specific process includes the following steps: 1. The three-layer decomposition system for character models decomposes the basic 2D character model into layers, providing a standardized adaptation base for clothing components. The decomposition layers are as follows: Basic skeleton layer: The core skeleton system of the character model, which includes 21 standard skeleton nodes in 5 categories: root skeleton, torso skeleton, limb skeleton, and head skeleton. It defines the rotation range, deformation weight, and parent-child constraint relationship of each skeleton node, providing a unified deformation benchmark for all clothing components. The basic skin layer is broken down into six independent skin component units: head, torso, left arm, right arm, left leg, and right leg. Each component unit is bound to a corresponding bone node, defining the exposed area and deformation boundary of the skin, and providing a reference boundary for clothing coverage. Deformation control layer: Defines a deformation constraint area for each skin component unit, including an elastic deformation area, a rigid deformation area, and a follow-deformation area, which correspond to different deformation rules when the skeleton rotates, ensuring the smoothness of skin deformation when the character moves, and providing a benchmark for the follow-deformation of clothing components.

[0039] 2. The five-level decomposition system for clothing resources is based on the wearing logic, coverage relationship, and deformation characteristics of clothing. It decomposes clothing resources into five major levels, and each major level is further decomposed into the smallest replaceable component unit. The decomposition rules are as follows: 3. Standardized definition of the smallest component unit Each of the smallest disassembled component units must contain standardized attribute definitions to ensure the universality and adaptability of resources: Boundary box definition: For each component element, an axis-aligned boundary box (AABB) and an oriented boundary box (OBB) are set. The boundary box formula is as follows: in, , Let X be the minimum and maximum coordinates of the component element on the X-axis in the model space. , The minimum and maximum coordinates on the Y-axis are used for quickly locating the spatial extent of components; oriented boundary box. Generates the component based on its actual contour, including the component's center point coordinates, rotation angle, semi-major axis, and semi-minor axis, for subsequent boundary collision and clipping detection.

[0040] Deformation constraint region definition: Each component element is divided into a core anchoring region, a following deformation region, and a free deformation region. The deformation weight of each region is defined as follows: in, Let p be the deformation weight of the pixel on the component. Where p is the distance from the pixel to the corresponding anchor point, k is the deformation attenuation coefficient, the weight of the core anchoring area is fixed at 1.0 to ensure complete binding with the skeletal anchor point, and the free deformation area is set with basic weights to ensure the naturalness of clothing deformation.

[0041] Coverage boundary definition: Define the inner and outer boundaries for each component unit. The inner boundary is the boundary where the component fits with the underlying clothing / skin, and the outer boundary is the visual outline boundary of the component. At the same time, mark the occluded and occluded areas of the component to provide a reference for subsequent rendering layer settings.

[0042] (II) Standardized Skeletal Anchor Points and Rendering Hierarchy Rule Definition Module This module serves as the core of the system's adaptation benchmark. It is responsible for defining a standardized skeletal anchor point system for the disassembled component units, establishing dynamic rendering hierarchy priority rules, replacing the fixed anchor points and fixed hierarchy design of existing technologies, and providing unified benchmark rules for subsequent component adaptation, conflict detection, and hierarchy correction.

[0043] The skeletal anchor points and rendering process are as follows: 1. Construct a three-tiered skeletal anchor point system A three-level anchor point system is defined for each clothing component unit, replacing the single fixed anchor point of the existing technology, to ensure precise binding and adaptive deformation between the component and the character's skeleton. The specific definition is as follows: Main Anchor Point: Each component unit has one main anchor point, corresponding to the core node of the character's skeleton, which determines the overall position of the component. The coordinates of the main anchor point change in real time following the corresponding skeleton node. The coordinate transformation formula is: in, Let t be the world space coordinates of the master anchor point. This is the transformation matrix (including translation, rotation, and scaling) of the corresponding bone node at time t. The initial coordinates of the main anchor point in the component's local space.

[0044] Auxiliary anchor points: Each component unit has 2-8 auxiliary anchor points, distributed at the component's contour key points and deformation key points. These are used to control the component's deformation and fit. Each auxiliary anchor point is bound to a corresponding skeleton node, and constraints are set between it and the main anchor point. The constraint formula is as follows: in, Let be the world space coordinates of the i-th auxiliary anchor point at time t. To provide the transformation matrix for the skeleton corresponding to the auxiliary anchor point, The main anchor point following coefficient, The initial reference coordinates of the main anchor point ensure that the auxiliary anchor point maintains a relative positional constraint with the main anchor point while following the deformation of its own skeleton, thus preventing the component from tearing.

[0045] Constraint Anchor Points: Each component element has 1-3 constraint anchor points to limit the maximum offset range of the component and prevent it from deviating from its proper position during movement. The constraint formula is as follows: in, To constrain the maximum allowable offset distance of the anchor point, when the real-time coordinates of the constrained anchor point exceed the maximum offset range, coordinate correction is automatically triggered to ensure that the component does not experience serious misalignment.

[0046] 2. Dynamic Rendering Hierarchy Priority Rules: This approach abandons the fixed-level numerical design of existing technologies and establishes a rendering hierarchy rule of "basic priority + dynamic weight adjustment." The final rendering priority of each component is as follows: in: The basic priority of the clothing level to which the component belongs is set based on the five-level clothing disassembly system, with a range of 100-1000, which is the benchmark value of the level priority; The dynamic weights of the coverage relationship at time t are: when the bounding box of component A completely covers component B, the weight of component A increases by 50, and the weight of component B decreases by 50, to ensure the correctness of the coverage relationship. The dynamic weight of the action at time t is calculated based on the bone rotation angle. For example, when the arm swings forward, the weight of the clothing component on the arm is increased by 100 to ensure the correct hierarchical relationship during the action. This is a custom weight used for adjusting the layering of special costumes. The default value is 0, but it can be customized according to the artist's needs. During final rendering, the system will... Components are rendered in layers from low to high to ensure the correctness of the hierarchy.

[0047] (III) Real-time Adaptation and Coordinate Mapping Module for Replacement Components This module is the core of the system's real-time adaptation. It is responsible for loading the target clothing components, mapping coordinates based on skeletal anchor points, and real-time following deformation of the character's movements after the user triggers the clothing change command. This enables the clothing components to fit precisely with the character model, providing basic data for subsequent conflict detection and correction.

[0048] like Figure 2As shown, the module adapts and maps the input user dress-up commands, target clothing component resources, real-time skeletal motion data of the character model, and component-anchor point binding configuration files. It outputs the real-time vertex coordinates, bounding box data, initial rendering priority values, and component deformation data of all components after the dress-up, and synchronously transmits these data to the multi-dimensional component conflict dynamic detection module. The specific processing is as follows: 1. Component Coordinate Space Mapping Process: The coordinates of clothing components need to undergo a four-level mapping from local space to model space, world space, and screen space to ensure that the components can accurately fit the corresponding positions in any pose of the character model. The specific mapping is as follows: Local Space → Model Space Mapping: Converts the local coordinates of a component to coordinates in the character's model space. in, Let be the local spatial coordinates of the component's vertices. Let be the model space transformation matrix of the main anchor point of the component. These are the coordinates in the transformed model space.

[0049] Model Space to World Space Mapping: Combining the global translation, rotation, and scaling of the character model, the model space coordinates are converted to world space coordinates. in, This is the global transformation matrix for the character model.

[0050] World-space to screen-space mapping: Using the camera projection matrix, world-space coordinates are converted to the final rendered screen-space coordinates. in, This is the orthogonal projection matrix of the camera (general for 2D scenes).

[0051] 2. Real-time Deformation Calculation of Components: When the character's skeletal movements change, the coordinates of each vertex of the component are calculated in real time based on the component's deformation weight, enabling the clothing to naturally deform in accordance with the character's movements. The calculation method is as follows: in, Let be the real-time coordinates of the component vertex at time t, and n be the number of skeletal nodes associated with that vertex. Let be the deformation weight of the i-th bone corresponding to that vertex. Let be the transformation matrix of the i-th bone at time t. These are the initial reference coordinates of the vertices.

[0052] 3. Combination Verification of Outfit Change Components: When users select multiple parts for outfit change, the system automatically verifies the compatibility between components. Based on the component's hierarchy, coverage boundary, and deformation constraints, it filters out component combinations with mutual exclusion relationships. For example, the coat and the cape in the same position are mutually exclusive, thus avoiding the loading of invalid component combinations.

[0053] (iv) Multi-dimensional component conflict dynamic detection module This module is the core of the system's conflict detection. It is responsible for performing frame-by-frame dynamic conflict detection on all clothing components during the real-time changes of character movements, from three dimensions: coordinate offset, layer overlap, and boundary clipping. It accurately locates the type, location, and severity of the conflict, providing data for subsequent correction. The detection latency is < 2ms, ensuring real-time performance.

[0054] like Figure 3 As shown, the dynamic detection module employs a three-stage conflict detection process, corresponding to three conflict types across three dimensions. The detection algorithm has been lightweighted and optimized for 2D dress-up scenes, ensuring stable operation in real-time rendering scenarios at 60 frames per second. Specifically, it includes: 1. First Stage: Anchor Point Coordinate Offset Conflict Detection. This stage checks whether the anchor points of clothing components exceed the reasonable offset range and whether there is misalignment with the corresponding skeleton. The formula for calculating the position offset is as follows: in: The offset between the main anchor point and the corresponding skeletal node. These are the real-time coordinates of the skeletal nodes; This is the difference between the rotation angle of the component and the rotation angle of the corresponding bone. This represents the real-time rotation angle of the component. This represents the real-time rotation angle of the skeleton. when or When a coordinate offset conflict is detected, the conflicting component, offset amount, and offset direction are recorded. This is the position offset threshold. This is the angle offset threshold, which can be configured according to the component type.

[0055] 2. Second Stage: Layer Overlap Conflict Detection. This stage detects whether the rendering layers of different components are disordered, and whether there are layer conflicts where components that should be occluded are appearing in the upper layers. A depth overlap detection method is used, and the detection process is as follows: Step 1: Final rendering priority based on all components Generate the initial rendering order queue; Step 2: For any two components A and B, calculate their boundary box overlap ratio: in, Let be the intersection area of ​​the boundary boxes of the two components. The area of ​​the union; Step 3: When When the overlap rate threshold is 0.1 (default), the actual coverage relationship between the two components is further detected. Based on the coverage boundary definition of the components, it is determined whether the theoretical layer priority is consistent with the actual rendering queue. Step 4: If the theoretical priority is inconsistent with the actual rendering order, it is determined to be a layer overlap conflict. Record the conflicting component pair, the difference in theoretical priority, and the overlapping area.

[0056] 3. Third Stage: Boundary Deformation Clipping Detection. This stage detects whether boundary penetration or clipping issues occur between clothing components and the skin layer, or between different clothing components. An optimized 2D Separating Axis Theorem (SAT) is used for boundary collision detection. The process is as follows: Step 1: Generate a convex hull polygon for the contour of each component, and extract the core separating axis of the component based on the oriented bounding box (OBB); Step 2: For two components with overlapping bounding boxes, project the vertices of the two convex hull polygons onto each separating axis and calculate the projection interval; Step 3: If the projection ranges of the two components overlap on all separation axes, it is determined that the boundaries of the two components intersect, i.e., a clipping conflict occurs. Step 4: Calculate the minimum penetration depth and penetration direction, and record the components, penetration locations, and penetration depths of the molding conflict to provide a basis for subsequent boundary correction.

[0057] Finally, once the detection is complete, the module outputs a conflict detection result report, which includes the conflict type, conflict components, conflict location, conflict severity, and core parameters required for correction. This report is then synchronously transmitted to the hierarchical conflict adaptive correction module.

[0058] (v) Hierarchical Conflict Adaptive Correction Module This module is the system's correction execution unit. Based on the conflict detection results, it is responsible for using the corresponding adaptive correction algorithm for different types of conflicts to complete anchor point coordinate correction, rendering layer reordering, and boundary deformation smoothing correction in real time. This addresses the root causes of coordinate misalignment, layer disorder, and clipping issues, while ensuring that the corrected clothing deformation is natural and without visual distortion.

[0059] like Figure 4As shown, the module employs a hierarchical correction strategy, executing corresponding correction algorithms for different types of conflicts. The correction process is fully adaptive, requiring no predefined fixed rules, and can adapt to arbitrarily complex conflict scenarios. During runtime: The module corrects input conflict detection results reports, real-time component coordinate data, rendering priority queues, and skeletal motion data, outputting corrected component vertex coordinates, updated rendering priority queues, and corrected component deformation data, which are synchronously transmitted to the multi-body dynamic adaptation module and the real-time hierarchical rendering output module.

[0060] The specific correction process is as follows: 1. Adaptive correction of coordinate offset conflicts To address anchor point coordinate offset conflicts, a constrained smooth PID correction algorithm is employed to avoid abrupt changes in clothing caused by a single correction, ensuring the smoothness of the correction process. The PID correction algorithm is as follows: in: This is the correction offset at time t, used to correct the coordinates of the main anchor point of the component; The position error at time t is the difference between the actual offset of the main anchor point and the reasonable offset range. For proportionality coefficient, For integral coefficients, These are the differential coefficients, and different parameters are configured for different component types to ensure the speed and smoothness of the correction. During the correction process, the maximum offset limit of the constraint anchor points is simultaneously met to ensure that the corrected coordinates do not exceed a reasonable range. For angular offset conflicts, the same PID correction logic is used to smoothly correct the rotation angle of the component, while simultaneously adjusting the coordinates of the auxiliary anchor points to ensure the consistency of the overall deformation of the component.

[0061] 2. Adaptive correction of hierarchical overlap and conflict To address layer overlap conflicts, a dynamic priority reordering algorithm is employed. Based on the theoretical coverage relationship, action state, and overlapping area of ​​components, the rendering priority of components is dynamically adjusted to ensure correct layer relationships. The correction process is as follows: Step 1: For component pairs with hierarchical conflicts, determine the correct before-after coverage relationship based on the coverage boundary definition, and clarify the upper-level component and the lower-level component; Step 2: Calculate the minimum priority increment required for the upper-level components: in, This represents the current priority of the lower-level component. This represents the current priority of the upper-level component. This is the hierarchy interval threshold, with a default value of 20, to ensure sufficient hierarchy interval between two components and prevent hierarchy confusion from recurring. Step 3: Increase the priority of upper-level components At the same time, update the final rendering priority of the component. ; Step 4: Based on the updated priority, regenerate the rendering order queue and complete the layer conflict correction; Step 5: When the character's actions change and the conflict disappears, the priority of the component is automatically restored to the base value to avoid subsequent level problems caused by the continuous accumulation of priority.

[0062] 3. Adaptive correction of boundary deformation and pattern breaking conflict To address boundary clipping conflicts, a boundary deformation correction algorithm with weighted smooth transition is adopted. This algorithm smoothly offsets the vertices in the clipping region without disrupting the overall shape of the component, thus eliminating the clipping problem. The correction calculation method is as follows: in: These are the corrected vertex coordinates. These are the vertex coordinates before correction; The minimum penetration depth, i.e., the minimum offset distance required to eliminate morphing; The normal vector for the penetration direction ensures that the vertex is offset in the correct direction, avoiding secondary clipping; The smoothing weight function is calculated based on the distance from the vertex to the clipping region, as follows: in, Let be the distance from the vertex to the center of the clipping region. To ensure a smooth coefficient, the vertex offset in the through-mold area is maximized, while the vertex offset in areas far from the through-mold area gradually decreases, thus avoiding visual distortion problems such as hard corners and tears in the corrected component.

[0063] (vi) Multi-body dynamic adaptation module This module is the core of the system's extensibility. It is responsible for parametric scaling, deformation, and anchor point adaptation of clothing components based on the body parameters of the character model. Without redrawing art resources, a single set of clothing resources can be quickly adapted to multiple body types of character models with different heights, weights, and head-to-body ratios, significantly reducing resource production costs.

[0064] The module employs a parametric body shape adaptation algorithm, quantifying human body shape differences into calculable parameters. Based on these parameters, clothing components are adaptively adjusted. The adaptation process is as follows: 1. Body shape parameter quantification system The body shape differences of the character model are quantified into 5 core parameters, each with a value range of [0.5, 1.5], and a baseline value of 1.0 (standard body shape). The specific definitions are as follows: 2. Overall scaling and adaptation of components Based on body shape parameters, the clothing components are scaled uniformly to ensure that the components match the human body shape. The scaling transformation matrix is: For clothing components on the arms and legs, corresponding... , The parameters are scaled individually to ensure that the clothing for the limbs matches the length of the limbs.

[0065] 3. Anchor point position adaptive adjustment Based on the body shape parameters, the positions of the main anchor points, auxiliary anchor points, and constraint anchor points of the components are adaptively adjusted to ensure that the anchor points perfectly match the positions of the corresponding skeletal nodes. The adjustment method is as follows: in: For the adapted anchor point coordinates, This is the size scaling matrix for the bone node corresponding to the anchor point. These are the reference coordinates for anchor points under the standard body shape.

[0066] 4. Dynamic adaptation of deformation weights Based on body shape parameters, the deformation weight of components is dynamically adjusted to ensure natural deformation of clothing for both slim and overweight body types, especially for overweight body types. This increases the range of the core anchoring area of ​​the component and improves the weight attenuation coefficient of the deformation-following area to avoid excessive stretching during clothing deformation; for slender body types ( This involves narrowing the core anchoring area, reducing the weight attenuation coefficient, and ensuring that the clothing fits the body well.

[0067] (vii) Real-time layered rendering output module This module is the system's rendering execution unit. It is responsible for performing layered rendering and batch optimization of the character model and all clothing components based on the corrected component data and the updated rendering priority queue. The final output is a 2D dress-up screen with no clipping and correct layering, while ensuring rendering efficiency.

[0068] The main processes include the following: 1. Dynamic rendering queue management Based on the corrected component final rendering priority The rendering queue is updated frame by frame, and the skin layer, inner layer, middle layer, outer layer, accessory layer, and special layer are rendered in order of priority from low to high to ensure that the rendering order of each component is correct. For components with the same priority, they are sorted a second time according to the spatial depth of the components to avoid the layer disorder of components at the same level.

[0069] 2. Rendering batch optimization For clothing components of the same level, material, and atlas, batch rendering is performed to reduce the number of DrawCall calls and improve rendering efficiency. The batching rules are as follows: Multiple components of the same garment that use the same material and texture atlas will be automatically merged into one rendering batch. Components at the same level with no overlapping areas, even if they are made of different materials, can be batched through instantiation rendering, further reducing performance loss. For dynamically corrected components, the vertex buffer is only updated when the change in vertex coordinates exceeds a threshold, thus avoiding repeated data submission frame by frame.

[0070] 3. Visual effects optimization The rendered image is smoothed at the edges to eliminate hard edges and jagged edges when multiple components are stacked; at the same time, based on the material type of the clothing, corresponding lighting and shadow effects are superimposed to enhance the texture and visual fidelity of the clothing.

[0071] After system rendering, the corrected component vertex coordinates, updated rendering priority queue, component material texture resources, and character model skeletal motion data are rendered in layers to output the final rendered 2D dress-up screen and rendering performance data, which are then synchronously transmitted to the resource iteration and optimization module.

[0072] (viii) Resource Iteration and Optimization Module This module is the system's closed-loop optimization unit, responsible for collecting rendering output data, conflict correction records, and adjustment feedback from artists. It automatically optimizes component disassembly rules, anchor point configurations, and layer priority rules to continuously improve resource production efficiency and costume changes. The implementation process is as follows: 1. Data Acquisition and Analysis: Collect conflict occurrence rate, number of corrections, and correction range of clothing resources across the entire process; analyze the types of components and action scenarios with high-frequency conflicts; and locate problems in resource production. 2. Automatic rule optimization: Based on data analysis results, the anchor point configuration, deformation weight, and basic level priority of frequently conflicting components are automatically optimized to reduce conflicts in subsequent use; 3. Iteration of disassembly rules: Based on feedback from artists, the component disassembly system was optimized, new disassembly rules for special costumes were added, and standardized resource production specifications were improved; 4. Algorithm parameter optimization: Based on the rendering effect of different scenarios, automatically optimize the threshold of conflict detection, the PID parameters of the correction algorithm, and the smoothing coefficient to improve the correction effect in different scenarios.

[0073] The data communication mechanism of this system will be described below: like Figure 5 As shown, the 2D dress-up system of this application adopts a dual-link communication architecture of "offline data bus + real-time data stream bus", which takes into account both the big data processing capabilities of offline resource preprocessing and the low latency requirements of real-time dress-up scenarios. 1. Offline data communication link: A distributed file system is used to store massive component resources and configuration files. MySQL database is used to store structured data such as component attributes, anchor point configurations, and hierarchical rules. Offline preprocessing modules interact with each other through HTTP interface, supporting parallel processing of batch resources and meeting the preprocessing needs of large-scale apparel resources.

[0074] 2. Real-time Data Communication Link: Real-time data transmission is achieved using shared memory and event-driven message queues. Real-time data such as character skeleton motion data, costume change instructions, component real-time coordinate data, conflict detection results, and correction parameters are transmitted between modules via message queues, achieving end-to-end latency of <1ms, meeting the real-time rendering requirement of 60 frames / second. Modules communicate remotely via a standardized gRPC interface, ensuring the stability and compatibility of data interaction.

[0075] 3. Data storage architecture: A Redis cluster is used to store the component resources, anchor point configurations, and rendering queue data required for real-time rendering, ensuring high-frequency read and write performance; an object storage service is used to store clothing texture resources and model source files; and a time-series database is used to store historical data for conflict detection and correction, for subsequent iterative optimization.

[0076] The system implements full-process flow control through a centralized scheduling engine, which is divided into two main lines: offline preprocessing control flow and real-time execution control flow. The specific logic is as follows: 1. Offline Preprocessing Control Flow: After the artists import character models and clothing resources, the scheduling engine calls the corresponding preprocessing modules in the order of "component decomposition → anchor point and hierarchical rule definition → resource standardization output" to complete the standardization of resources and generate a standardized component resource package that can be integrated into the system. The entire process supports visual configuration and manual adjustment to ensure the flexibility of resource production.

[0077] 2. Real-time execution control flow: After the user triggers the costume change command, the scheduling engine starts the real-time execution process. For example... Figure 6 As shown, the core execution logic is: Step 1: Receive the clothing change instruction and call the component adaptation module to complete the loading, coordinate mapping and deformation adaptation of the target clothing; Step 2: Acquire character skeleton motion data frame by frame and update the real-time coordinates of all components synchronously; Step 3: Call the conflict detection module to complete the three-stage dynamic conflict detection and output the conflict detection results; Step 4: Call the conflict correction module to perform adaptive correction for detected conflicts and update component coordinates and rendering priority; Step 5: Call the multi-body adaptation module to complete the component adaptation for the target body shape; Step 6: Call the rendering output module to complete layered rendering and image output; Step 7: Repeat steps 2-6 to achieve real-time conflict detection and correction during character movements.

[0078] The system also has the following fallback control mechanism: the scheduling engine monitors the running status of each module in real time. If a module is abnormal, correction fails, or rendering times out, the fallback mechanism is immediately triggered to roll back to the initial baseline state of the component, ensuring that the system will not crash, display errors or other serious problems, and guaranteeing operational stability.

[0079] II. A 2D Assembly Method Based on Refined Component Disassembly and Dynamic Conflict Correction The 2D assembly replacement method of the present invention, based on refined component disassembly and dynamic conflict correction, is implemented based on the above system and specifically includes the following steps: Step 1: Detailed component disassembly and standardized preprocessing of character models and clothing resources Importing 2D character base models and costume art assets, a refined component decomposition preprocessing module breaks down the character model into a base skeleton layer, a base skin layer, and a deformation control layer. Costume assets are decomposed into the smallest replaceable component units according to a five-level decomposition system. Standardized bounding boxes, deformation constraint areas, and coverage boundaries are defined for each component unit, completing the standardized preprocessing of resources. This establishes standardized production specifications from the resource source, breaking down the coarse, layered costumes into freely combinable minimum units, enabling flexible combinations of multi-level costumes. Simultaneously, it provides a standardized resource foundation for subsequent adaptation, testing, and correction, fundamentally reducing issues such as component misalignment and overlap.

[0080] Step 2: Standardized definition of skeletal anchor point system and rendering hierarchy rules By standardizing the skeletal anchor points and rendering hierarchy rule definition module, a three-level skeletal anchor point system is defined for each disassembled component unit, completing the binding between the component and the skeletal nodes, and setting the constraint rules and deformation weights of the anchor points. Simultaneously, dynamic rendering hierarchy priority rules are established, setting a basic priority for each component, defining the calculation rules for dynamic weights, and completing the configuration of the adaptation benchmark. This approach abandons the traditional fixed anchor points and fixed hierarchy design, establishing a standardized anchor point binding system and dynamic hierarchy rules to ensure that clothing components can naturally deform following the character's skeleton. It also provides benchmark rules for subsequent dynamic hierarchy correction, resolving the hierarchy misalignment problem caused by fixed hierarchy.

[0081] Step 3: Triggering the costume change command and real-time loading of component resources The system receives the user's dress-up command, parses the user's selected clothing component combination, performs component compatibility checks, filters mutually exclusive component combinations, and loads the target clothing component's resources, anchor point configuration, and attribute parameters from the resource library, completing resource preparation before dress-up. It enables free combination and loading of multiple clothing components, avoids invalid component combinations through compatibility checks, and ensures the rationality of dress-up combinations. Simultaneously, the lightweight component loading mechanism significantly improves the dress-up response speed, with a dress-up command response latency of <10ms.

[0082] Step 4: Component coordinate mapping and body shape adaptation based on skeletal anchor points Through a real-time adaptation and coordinate mapping module for clothing components, a four-level coordinate mapping from local space to screen space is achieved. Based on the real-time skeletal motion data of the character model, the real-time coordinates of each vertex of the component are calculated, enabling the clothing to naturally deform in accordance with the character's movements. Simultaneously, through a multi-body-type dynamic adaptation module, based on the target character's body shape parameters, the scaling, anchor point adjustment, and deformation weight adaptation of the components are completed, achieving precise fitting between the clothing and multi-body-type character models. This precise adaptation of clothing components with the character model and real-time motion ensures the natural deformation of the clothing during character movements. Furthermore, without the need to recreate resources, a single outfit can be quickly adapted to multiple body-type characters, increasing resource reuse to 100% and significantly reducing the production cost and time required for multi-body-type adaptation.

[0083] Step 5: Real-time dynamic detection of multi-dimensional component conflicts The multi-dimensional component conflict dynamic detection module performs three-stage conflict detection on all clothing components frame by frame: the first stage detects anchor point coordinate offset conflicts, the second stage detects layer overlap conflicts, and the third stage uses an optimized SAT algorithm to detect boundary clipping conflicts. The final output is a detection report including conflict type, location, and severity. During character movement, the latency of full-dimensional, real-time dynamic detection of clothing conflicts is reduced, enabling accurate location of various conflicts such as coordinate misalignment, layer disorder, and clipping. The detection accuracy is improved, providing precise data for subsequent correction and solving the problem that traditional technologies can only perform static verification and cannot detect in real time.

[0084] Step 6: Hierarchical Adaptive Conflict Correction The hierarchical conflict adaptive correction module performs corresponding adaptive corrections for different types of conflicts based on the conflict detection results: constrained smooth PID correction is used for coordinate offset conflicts, dynamic priority reordering correction is used for hierarchical overlap conflicts, and weighted smooth transition boundary deformation correction is used for boundary clipping conflicts. The correction of all conflicts is completed frame by frame, and the vertex coordinates and rendering priority of the components are updated.

[0085] Through adaptive conflict correction, the system achieves real-time and adaptive correction of costume change conflicts. It can adapt to any complex conflict scenario without the need for predefined fixed correction rules, greatly improving the correction success rate (up to 99%). It fundamentally solves the problems of clipping, layer disorder, and coordinate misalignment in 2D costume change. At the same time, the correction process is smooth and natural, without visual jumps, tearing, or other distortion problems.

[0086] Step 7: Layered Rendering and Image Output Through a real-time layered rendering output module, based on a corrected rendering priority queue, character models and clothing components are rendered in layers. Components of the same material and atlas are batch-optimized, ultimately outputting a 2D dress-up scene without clipping, with correct layering, and natural visual effects. This achieves efficient rendering of the corrected image. Through batch optimization, the number of draw calls is reduced by more than 40%, and the rendering frame rate is increased by 30%. In real-time interactive scenes, a stable rendering efficiency of 60 frames per second can be maintained, while ensuring the visual fidelity and naturalness of the dress-up scene.

[0087] Step 8: Resource Performance Feedback and Iterative Optimization Through the resource iteration and optimization module, rendering effect data, conflict correction records, and feedback data from artists and users are collected. This analysis identifies frequently conflicting resources and scenes, automatically optimizing component disassembly rules, anchor point configurations, hierarchical rules, and algorithm parameters to complete the system's closed-loop iterative optimization. Therefore, by establishing a closed-loop system for resource production and effect optimization, the system can continuously improve resource production efficiency and transformation effects, reducing the resource access cycle from the traditional 3 days / set to 4 hours / set, significantly improving the product's content iteration efficiency.

[0088] Example 1 (a) Implementation Scenarios This embodiment uses the costume system of a leading domestic 2D mobile game (publicly available 2D games such as "Onmyoji," or internal testing) as its application scenario. The core gameplay includes personalized character costume changes. Existing costume systems use a traditional fixed-layer, full-layer replacement model, which suffers from severe clipping and layer misalignment issues, and is extremely costly to adapt to multiple body types. This implementation deploys the system of this invention within the game's costume system, while simultaneously setting up a control group (the game's original traditional 2D costume system) for a 14-day online test to verify the technical effectiveness of this invention.

[0089] (II) Specific Implementation Process 1. Resource preprocessing and system deployment: Based on the refined disassembly system of this invention, 120 sets of clothing resources in the game are standardized and disassembled. Each set of clothing is disassembled into an average of 18 minimum component units. The anchor point binding and hierarchical rule definition of the components are completed. The system of this invention is connected to the game's rendering engine and character control system to complete interface adaptation and performance optimization.

[0090] 2. Test Group Setup: A stratified random sampling method was used to select 2 million active players in the game and divide them into an experimental group and a control group, with 1 million players in each group. There were no statistically significant differences in the level distribution, spending power, and costume-changing behavior between the two groups, ensuring the fairness of the test. Experimental group: The 2D costume change system based on refined component disassembly and dynamic conflict correction of the present invention was adopted; Control group: The game's original fixed-level, full-layer replacement 2D costume system was used.

[0091] 3. Test Scenarios and Metrics Definition: The test covers the core character action scenarios in the game, including six types of scenarios: standard standing, running, sitting, crouching, dance, and combat. The core test metrics include: clipping rate, layer misalignment rate, multi-body type adaptation cycle for a single outfit, rendering frame rate, player outfit usage rate, and payment conversion rate.

[0092] 4. Testing Period and Data Collection: The testing period is 14 days. Core indicator data of two groups of players will be collected daily. After the test, full data statistics and effect comparison will be carried out.

[0093] Taking the four-layer outfit combination of "outerwear + shirt + necklace + belt" in the game as an example, let's compare the effects of the two systems: Control group: The whole layer replacement mode can only replace the whole layer of the coat and shirt, and cannot be separated and matched. When the character performs dance moves, the coat and shirt clipping occurs 78% of the time in the arm swing scene. The necklace and shirt have layer misalignment. The belt has serious coordinate offset when the character is squatting. Experimental group: The system uses finely disassembled components, which can freely combine and match coats, shirts, necklaces and belts. When the character performs any action, the system detects and corrects conflicts in real time, reducing the clipping rate to 0.8%. There are no hierarchical errors or coordinate offset issues. The clothing deforms naturally with the character's movements, and the visual effect fully meets the expectations of the art design.

[0094] After the testing period ended, the core indicators of the experimental group and the control group were compared as shown in the table below: The test results show that the technical solution of this invention achieves a comprehensive leap forward in core indicators compared to traditional 2D costume change systems: 1. Completely solved the clipping and layer conflict issues in 2D dress-up, reducing the clipping rate across the entire scene from 62.35% to 0.72%, and the layer disorder rate from 58.72% to 0.31%, achieving a qualitative leap in visual effects and dress-up experience; 2. Significantly reduced the production and adaptation costs of clothing resources, shortened the production cycle of a single set of clothing by 66.67%, shortened the adaptation cycle for multiple body types by 94.44%, and increased the resource reuse rate from 18% to 100%, greatly improving the production and iteration efficiency of game content; 3. Significantly improved rendering performance, with an average game rendering frame rate increase of 36.09%, and able to maintain a stable and smooth rendering of 60 frames per second in real-time interactive scenes, solving the problem of large performance loss of traditional correction schemes; 4. It effectively boosted the game's commercialization, with player usage of costumes increasing by 171.88% and costume-related payment conversion rate increasing by 139.46%, bringing significant revenue growth to the game and validating the commercial value of this invention.

[0095] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A 2D rigging method based on refined component disassembly and dynamic collision correction, characterized in that, Includes the following steps: S1 performs standardized and refined component decomposition of 2D character base models and clothing resources. The character model is decomposed into a basic bone layer, a basic skin layer, and a deformation control layer. The clothing resources are decomposed into the smallest replaceable component units according to a five-level decomposition system. Standardized bounding boxes, deformation constraint areas, and coverage boundaries are defined for each component unit. S2 defines a three-level skeletal anchor point system for each disassembled component unit, establishes dynamic rendering hierarchy priority rules, and completes the binding of components to the character skeleton and the configuration of rendering baselines. S3 receives the user's clothing change command, loads the target clothing component resources, completes the component combination compatibility check, and completes the coordinate space mapping and real-time following deformation calculation of the components based on the skeletal anchor points. S4 performs frame-by-frame multi-dimensional dynamic conflict detection on all clothing components, including anchor point coordinate offset conflict detection, layer overlap conflict detection, and boundary deformation clipping detection, and outputs the conflict detection results. Based on the collision detection results, S5 performs hierarchical adaptive correction for different types of collisions, including coordinate offset smoothing correction, dynamic reordering of rendering levels, boundary clipping deformation correction, and updates the vertex coordinates and rendering priority of the components. S6 performs parameterized multi-body-type dynamic adaptation of clothing components based on the body shape parameters of the target character model, and completes the scaling, anchor point adjustment and deformation weight optimization of the components. S7 performs layered rendering and batch optimization based on the corrected component data and rendering priority queue, and outputs the final 2D dress-up screen. S8 collects rendering effect data and conflict correction records, and completes closed-loop iterative optimization of component disassembly rules, anchor point configuration, and algorithm parameters.

2. The method of claim 1, wherein, In step S1, the five-level decomposition system of clothing resources is specifically as follows: Level 1 inner layer, Level 2 middle layer, Level 3 outer layer, Level 4 accessory layer, and Level 5 special layer. The smallest component unit after each level of decomposition is defined with an axis-aligned bounding box (AABB) and an oriented bounding box (OBB). Simultaneously, the component unit is divided into a core anchoring area, a following deformation area, and a free deformation area, each with a corresponding deformation weight defined. The deformation weight formula is: in, is the deformation weight of the pixel point p on the component, is the distance from the pixel point p to the corresponding anchor point, and k is a deformation attenuation coefficient.

3. The method according to claim 1, characterized in that, In step S2, the three-level skeleton anchor point system includes main anchor points, auxiliary anchor points, and constraint anchor points. Each component unit is set with one main anchor point, which determines the overall position of the component, and the coordinates change in real time following the corresponding skeleton node. Two to eight auxiliary anchor points are set to control the deformation and fit of the component and set positional constraint relationships with the main anchor points. One to three constraint anchor points are set to limit the maximum offset range of the component.

4. The method according to claim 1, characterized in that, In step S2, the final rendering priority of the component in the dynamic rendering hierarchy priority rule is calculated as follows: in, The basic priority of the clothing level to which the component belongs. To cover the dynamic weights of the relationships, For dynamic weights of actions, Custom weights.

5. The method according to claim 1, characterized in that, In step S3, the coordinate space mapping of the component includes a four-level transformation from local space to model space to world space to screen space. Simultaneously, based on the component's deformation weights, the deformation-following coordinates of the component's vertices are calculated in real time. in, Let be the real-time coordinates of the component vertex at time t, and n be the number of skeletal nodes associated with that vertex. Let be the deformation weight of the i-th bone corresponding to that vertex. Let be the transformation matrix of the i-th bone at time t. These are the initial reference coordinates of the vertices.

6. The method according to claim 1, characterized in that, In step S4, the multi-dimensional dynamic conflict detection specifically includes: The first stage of anchor point coordinate offset conflict detection: calculate the position offset and rotation angle difference between the main anchor point and the corresponding bone node, and determine the coordinate offset conflict when it exceeds the preset threshold. The second stage of hierarchical overlap conflict detection: calculate the bounding box overlap rate between components. For components whose overlap rate exceeds the threshold, check whether the theoretical hierarchical priority is consistent with the actual rendering order. If they are inconsistent, they are judged as hierarchical overlap conflict. The third stage of boundary deformation penetration detection: The optimized 2D separation axis theorem SAT is used to detect the boundary intersection of components with overlapping boundary boxes. If the projection intervals on all separation axes overlap, it is determined to be a penetration conflict. At the same time, the minimum penetration depth and penetration direction are calculated.

7. The method according to claim 1, characterized in that, In step S5, the hierarchical adaptive correction specifically includes: To address coordinate offset conflicts, a constrained smooth PID correction algorithm is employed to calculate the correction offset and smoothly correct the component anchor point coordinates. in, Let be the correction offset at time t. Let be the position error at time t. , , These are the proportional coefficient, integral coefficient, and differential coefficient, respectively. To address layer overlap conflicts, a dynamic priority reordering algorithm is adopted to calculate the minimum priority increment required by the upper-level component, update the rendering priority of the component, and regenerate the rendering order queue. To address boundary clipping conflicts, a boundary deformation correction algorithm with weighted smooth transition is adopted. This algorithm smoothly offsets the vertices in the clipping region to eliminate clipping. The correction formula is as follows: in, These are the corrected vertex coordinates. Minimum penetration depth The normal vector in the direction of penetration. This is a smoothing weight function.

8. The method according to claim 1, characterized in that, In step S6, the parameterized multi-body shape dynamic adaptation specifically involves: quantifying the differences in human body shape into five core parameters: height scaling parameter, weight scaling parameter, head-to-body ratio parameter, arm ratio parameter, and leg ratio parameter; constructing a non-uniform scaling matrix based on the body shape parameters; scaling the clothing components as a whole; and adaptively adjusting the anchor point position and deformation weight to complete the multi-body shape adaptation.

9. A 2D body-changing system based on refined component disassembly and dynamic conflict correction, characterized in that, The system for implementing the method of any one of claims 1-8, the system comprising: The clothing and character model detailed component decomposition preprocessing module is used to perform standardized and detailed decomposition of character models and clothing resources, generating the smallest replaceable component unit and standardized attribute configuration file; The standardized skeleton anchor point and rendering hierarchy rule definition module is used to define a three-level skeleton anchor point system for component units and establish dynamic rendering hierarchy priority rules. The module for real-time adaptation and coordinate mapping of replacement components is used to receive replacement instructions and complete the coordinate mapping and real-time deformation calculation of the components. The multi-dimensional component conflict dynamic detection module is used to complete the three-stage conflict detection of component coordinate offset, layer overlap and boundary clipping frame by frame, and output the conflict detection results. The hierarchical conflict adaptive correction module is used to perform adaptive correction of component coordinates, rendering level, and boundary deformation based on conflict detection results. The multi-body dynamic adaptation module is used to complete the parametric multi-body adaptation of clothing components based on human body shape parameters; The real-time layered rendering output module is used to complete layered rendering and batch optimization based on the corrected component data, and output the final dressing screen. The resource iteration optimization module is used to collect rendering effects and feedback data to complete the closed-loop iterative optimization of the system.

10. The system according to claim 9, characterized in that, The system adopts a dual-link communication architecture of offline data bus + real-time data stream bus. Offline data is stored and interacted with relational database through a distributed file system, while real-time data is transmitted with low latency through an event-driven message queue. The system realizes full-process control of offline preprocessing and real-time operation through a centralized scheduling engine, and sets up an exception fallback mechanism.