Personalized replacing, cutting and deformation rendering method and system for design file
By structurally parsing and binding inverse mapping rules to design files, combined with premultiplication transparency and blending mode rules, the instability and high computational overhead of image replacement and cropping deformation rendering in design files are solved, achieving efficient and stable personalized rendering and incremental reuse.
Patent Information
- Application Number
- CN202511959098.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-24
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2045-12-24
AI Technical Summary
In existing technologies, the personalized image replacement and cropping deformation rendering process of design files lacks a unified deformation normalization path and incremental reuse mechanism, resulting in unstable results, high computational overhead, and insufficient real-time performance.
By performing structured analysis on the design files, a one-to-one binding relationship between external materials and target layers is established, forming a single inverse mapping rule. The rules of pre-multiplication of transparency and blending mode are used for compositing. Combined with the layer dependency graph, dirty rectangular areas are determined and reuse identifiers and texture fingerprints are generated to achieve incremental rendering.
It improves the stability, efficiency, and repeatability of personalized replacement, cropping, deformation, and rendering, reduces the global computational load, and enables the traceability and cross-task reuse of results.
Smart Images

Figure CN121392102A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of graphic image processing, and particularly relates to a personalized replacement, cutting, deformation and rendering method and system for design files. BACKGROUND
[0002] Design files are widely used in scenarios such as graphic design, UI design, advertising materials and e-commerce templates, and usually save information such as layers, cutting groups, masks, blending and deformation in a layered structure, and rely on online rendering to complete preview and export. In the prior art, personalized image replacement is usually implemented by re-rendering at the bitmap level. On the one hand, the binding of external materials and target layers lacks unified checking rules, and there are multi-source binding conflicts or uncertain orders, resulting in unstable replacement results. On the other hand, deformation, cutting and synthesis are usually processed in different stages, and the combination order of perspective, affine, free deformation and grid deformation lacks a fixed normalization path, which is prone to problems such as non-reproducible coordinate mapping, multiple sampling superposition and mask boundary distortion. In addition, when the materials or parameters change locally, the traditional scheme usually relies on full-canvas redrawing, lacks an influence domain propagation and dirty rectangle area positioning mechanism based on layer dependency, and it is difficult to trigger recalculation in the smallest range; at the same time, it also lacks reuse identification management of deformation and sampling rules, resulting in that similar rendering tasks cannot reuse historical results, and the calculation overhead is large and real-time performance is insufficient. SUMMARY
[0003] The application provides a personalized replacement, cutting, deformation and rendering method and system for design files, which solves the technical problem that the personalized material replacement and cutting deformation rendering process in the related art lacks a unified deformation normalization path and an incremental reuse mechanism.
[0004] The application provides a personalized replacement, cutting, deformation and rendering method for design files, which comprises the following steps: Step 1. A layer set, a cutting group set, a mask parameter, a blending mode, a deformation parameter and a target pixel area are obtained by parsing a design file, a one-to-one binding relationship between external materials and target layers is established based on a replacement mapping table, and an adapted material texture is generated; Step 2. For the replaced layer, according to the existence and values of the perspective deformation parameter, the affine deformation parameter, the grid parameter and the free deformation parameter, a single inverse mapping rule from the target pixel position to the adapted material texture coordinate is normalized in a predetermined order; Step 3. In the target pixel area, pixel values and transparencies are obtained from the adapted material texture according to the single inverse mapping rule, and the mask parameter is applied to the pixel values and transparencies according to the source-in synthesis rule to obtain a cut layer output; Step 4, assign a local composite area to the clipping group, accumulate and superimpose the output of the clipped layers in the original layer order according to the rule of premultiplied alpha, and obtain the local composite texture of the clipping group; Step 5, paste the local composite texture of the clipping group back to the corresponding position of the main canvas, and combine it with the non-group layers to perform merging on the main canvas according to the blending mode; Step 6, propagate the changes of the material based on the layer dependency graph, determine the dirty rectangle area, and generate the reuse identifier and texture fingerprint according to the deformation parameter, single inverse mapping rule and output size; Step 7, output the main canvas, and export the local composite texture of the clipping group and the metadata.
[0005] Further, the layer set, clipping group set, mask parameter, blending mode, deformation parameter and target pixel area are obtained by parsing the design file, a one-to-one binding relationship between the external material and the target layer is established based on the replacement mapping table, and the adapted material texture is generated, including: Step 11, structurally parse the design file to obtain the layer set, clipping group set, mask parameter, blending mode, deformation parameter and target pixel area; check the consistency of the replacement mapping table and the layer set, and only keep the first binding of each target layer according to the order of entry appearance, and delete the remaining bindings; Step 12, read the width and height of the target pixel area as the size reference, and fix the coordinate system of the target pixel area as the pixel coordinate system with the top-left corner as the origin, horizontal right and vertical down; Step 13, calculate the ratio of the target pixel area width to the external material width and the ratio of the target pixel area height to the external material height, and take the smaller value as the scaling ratio; the center displacement is composed of horizontal displacement and vertical displacement, the horizontal displacement is half of the difference between the target pixel area width and the scaled external material width, and the vertical displacement is half of the difference between the target pixel area height and the scaled external material height; when the scaled size exceeds the target pixel area, it is cut according to the center line, and when it does not exceed, it is filled with transparent pixels with premultiplied alpha, to generate the adapted material texture, and complete the association binding with the mask parameter, blending mode, deformation parameter and target pixel area.
[0006] Further, for the replaced layers, normalize them in a predetermined order to form a single inverse mapping rule from the target pixel position to the adapted material texture coordinate, including: Step 21, perform existence determination on the perspective deformation parameter, affine deformation parameter, free deformation parameter and grid parameter of the replaced layer, determine the execution order in the fixed order of perspective first, then affine, then free deformation, and finally grid, and register the parameters that are not set as not set; Step 22, convert the target pixel position to homogenous coordinates and normalize it with the third component according to the inverse of the perspective deformation parameters. If the perspective deformation parameters are not invertible or the denominator of the normalization is zero, treat it as an identity perspective transformation and keep the target pixel position unchanged.
[0007] Step 23, convert the homogenous coordinates to the affine normalized position according to the inverse of the affine deformation parameters. If the affine deformation parameters are not invertible, treat it as an identity affine transformation. Step 24, if the free-form deformation parameters are set, use the spline basis functions to calculate the basis function weights in ascending order of control point index and sequentially superimpose the control point displacements. If the mesh parameters are set, locate the triangular elements containing the position in the order of top-down and left-to-right, and limit the resulting texture coordinates to the range of the adapted material texture with boundary clipping to form a single inverse mapping rule from the target pixel position to the adapted material texture coordinates.
[0008] Further, obtain the pixel value and transparency from the adapted material texture according to the single inverse mapping rule, and apply the mask parameters to the pixel value and transparency to obtain the cropped layer output, including: Step 31, for each target pixel position in the target pixel region, calculate the adapted material texture coordinates according to the single inverse mapping rule, and limit the coordinates to the valid range of the adapted material texture with boundary clipping. Step 32, obtain the pixel value and transparency at the adapted material texture coordinates using bilinear interpolation, with four adjacent pixels participating in the interpolation, multiply the color channels by the transparency respectively, and convert to pre-multiplied transparency representation. Step 33, apply the mask parameters according to the source-in compositing rule in the target pixel region. When the mask parameters come from a vector mask, perform scanline rasterization with the target pixel region resolution according to the mask rendering rules of the design file, determine the pixel coverage using the non-zero wrap rule, and use the coverage as the mask parameter. Multiply the pre-multiplied transparency by the mask parameter. Step 34, take the masked color and the masked transparency as the cropped layer output. The cropped layer output is represented in pre-multiplied transparency and is saved together with the mask parameters, blending mode, and target pixel region.
[0009] Further, assign a local compositing region to each cropped group and accumulate and superimpose the cropped layer outputs using the pre-multiplied transparency rule in the original layer order to obtain the cropped group local compositing texture, including: Step 41, for each cropped group, find the union of the target pixel regions of the layers within the group and take its minimum axis-aligned bounding rectangle as the local compositing region. Establish a translation mapping from the main canvas coordinates to the local compositing region coordinates. Step 42, set up accumulation buffer in local synthesis area, initialize accumulated color as zero value, initialize accumulated transparency as zero value, as the only initial state of layer-by-layer synthesis; Step 43, output layer-by-layer synthesis in local synthesis area according to original layer order, when blending mode is normal mode, use source-on-top synthesis rule with premultiplied transparency; when blending mode is not normal mode, first de-premultiply current accumulated color and current layer color, get mode-processed source color according to pixel-by-pixel calculation rule, then update accumulated color and accumulated transparency according to source-on-top synthesis rule; Step 44, generate cropped group local synthesis texture in local synthesis area, save local synthesis area, accumulated color, accumulated transparency and cropped group identifier together, and save together with translation mapping, for global synthesis outside the group and pasting back to main canvas.
[0010] Further, paste the cropped group local synthesis texture back to the corresponding position of the main canvas, and combine with non-group layers to perform merging on the main canvas according to the blending mode, including: Step 51, generate processing sequence according to original global layer order of the design file, for each cropped group, determine the pasting position of the main canvas according to the positional relationship between the local synthesis area of the cropped group local synthesis texture and the main canvas, and take the union bounding rectangle of all pasting positions and the target pixel area of all cropped layer outputs as the main canvas processing range; Step 52, initialize accumulated color and accumulated transparency to zero value in the main canvas processing range, and perform element-by-element synthesis according to the processing sequence, when the element is a non-group layer, read its cropped layer output and blending mode, when the element is a cropped group, read its cropped group local synthesis texture and the blending mode of the group, when the blending mode is normal mode, use source-on-top synthesis rule with premultiplied transparency, when the blending mode is not normal mode, first get mode-processed source color according to the pixel-by-pixel calculation rule of the blending mode, then update the main canvas color and transparency according to the source-on-top synthesis rule; Step 53, generate main canvas output in the main canvas processing range, save the main canvas output together with the pasting position of each cropped group local synthesis texture, the blending mode of each cropped group, and the blending mode of non-group layers.
[0011] Further, determine the dirty rectangle area, generate reuse identifier and texture fingerprint, including: Step 61, establish layer dependency graph according to original layer order of the design file and cropping, masking, blending and group inclusion relationship; parse external events into change set, record change object, change type and timestamp; change type includes material content change, masking parameter change, blending mode change, deformation parameter change, single inverse mapping rule change and output size change; Step 62, propagate each change along the layer dependency graph from bottom to top, the target layer takes its target pixel area as the initial impact domain, and the clipping group takes its pasting position as the initial impact domain; round down by pixel and take the union bounding rectangle as the dirty rectangle region set, overlap or adjacent merge, and sort from top to bottom and left to right; Step 63, generate reuse identification and texture fingerprint for objects entering recalculation, reuse identification concatenates fields such as deformation parameters, discrete description of single inverse mapping rule, and output size in order, with output size width first and height second, and calculates a deterministic hash; texture fingerprint reads pixel data of adapted material texture from left to right and top to bottom, determines a deterministic hash after forming a byte sequence with each channel quantization bit in channel order, and is registered in the reuse record table; Step 64, generate a recalculation queue in units of dirty rectangle regions; mark as reuse when reuse identification and texture fingerprint are equal to the record time of the reuse record table, otherwise mark as recalculation; sort the recalculation queue in ascending order of dirty rectangle region y-coordinate and ascending order of x-coordinate under the same y-coordinate; merge queue items with the same region and the same affected object, and output the dirty rectangle region, the recalculation queue, and the reuse record table.
[0012] Further, when the number of rectangle regions in the dirty rectangle region set exceeds the upper limit, sort them in ascending order of area; when there are intersecting rectangle pairs and rectangle pairs with adjacent common edges, select the pair with the smallest increase in the area of the union bounding rectangle for merging, and take the minimum axis-aligned bounding rectangle of the union of the two rectangles as the merging result, and round down the boundary coordinates to pixel integers after merging; if there are no such rectangle pairs and the number of rectangles still exceeds the upper limit, continue to merge in ascending order of the distance between the center points of the rectangles until the number of rectangles is not greater than the upper limit.
[0013] Further, output the main canvas, and export the clipping group local composite texture and metadata, including: Step 71, output the main canvas color and main canvas transparency in the main canvas processing range from top to bottom and left to right, using premultiplied transparency representation; generate a check digest by performing a deterministic hash calculation on the byte sequence of the header, color, and transparency, and register the output path and the check digest; Step 72, export the clipping group local composite texture and translation mapping for each clipping group, record the width and height of the local composite region, the row-priority byte sequence of the color and transparency, and the mapping parameters, generate a check digest by performing a deterministic hash calculation, and register the clipping group identifier and the check digest; Step 73, register and export metadata related to reuse, including reuse identification and texture fingerprint, with the field order being object identifier, reuse identification, texture fingerprint, and output size, generate an export directory, and output the main canvas.
[0014] The beneficial effects of the present application are that: the present application eliminates multi-source conflicts by binding the design file structure analysis and the replacement mapping table one by one; the format and scale are kept consistent by unifying the pixel coordinate system, taking smaller scaling ratio, center line cutting and transparent filling; the single inverse mapping is formed by the order of perspective first, then affine, then free deformation and finally grid, so as to reduce resampling and coordinate ambiguity; the mask boundary and color consistency are ensured by the pre-multiplication of transparency and the composite of the deterministic operator; the global calculation is reduced by the hierarchical synthesis of the local synthesis of the clipping group and the paste back of the main canvas; the affected area is calculated only by the layer dependency graph and the dirty rectangle positioning; the cross-task reuse is realized by the reuse identifier and the texture fingerprint; the result traceability is realized by the deterministic export and the check summary. Overall, the stability, efficiency and reviewability of personalized replacement, cutting, deformation and rendering are improved. BRIEF DESCRIPTION OF DRAWINGS
[0015] Figure 1 is a flowchart of the personalized replacement cutting deformation rendering method for design files of the present application. DETAILED DESCRIPTION
[0016] The subject matter described herein will now be discussed with reference to example implementations. It should be understood that the discussion of these implementations is merely meant to provide a better understanding of the subject matter described herein and can be changed in function and arrangement without departing from the scope of the present specification. Various processes or components can be omitted, substituted, or added according to various examples. Additionally, features described with respect to some examples can be combined in other examples.
[0017] As shown in Figure 1 , the personalized replacement cutting deformation rendering method for design files includes the following steps: Step 1: obtaining a layer set, a clipping group set, a mask parameter, a mixing mode, a deformation parameter and a target pixel area from a design file, establishing a one-to-one binding relationship between external materials and target layers based on a replacement mapping table, and generating an adapted material texture; Step 2: for the replaced layer, normalizing the perspective deformation parameter, the affine deformation parameter, the grid parameter and the free deformation parameter according to the existence and value in the given order to form a single inverse mapping rule from the target pixel position to the adapted material texture coordinate; Step 3: obtaining the pixel value and transparency from the adapted material texture in the target pixel area according to the single inverse mapping rule, and applying the mask parameter to the pixel value and transparency according to the source-in synthesis rule to obtain the clipped layer output; Step 4, a local synthesis area is allocated to the clipping group, and the clipped layer output is accumulated and superimposed according to the original layer order and the rule of premultiplied transparency to obtain a local synthesis texture of the clipping group; Step 5, the local synthesis texture of the clipping group is pasted back to the corresponding position of the main canvas, and combined with the non-group layer, the main canvas is merged according to the blending mode; Step 6, based on the layer dependency graph, the change of the material is propagated, the dirty rectangle area is determined, and the reuse identifier and texture fingerprint are generated according to the deformation parameter, the single inverse mapping rule and the output size; Step 7, the main canvas is output, and the local synthesis texture of the clipping group and the metadata are exported.
[0018] In an embodiment of the present application, the layer set, the clipping group set, the mask parameter, the blending mode, the deformation parameter and the target pixel area are parsed from the design file, the external material and the target layer are one-to-one bound based on the replacement mapping table, and the adapted material texture is generated, including: Step 11, the design file is structurally parsed to obtain the layer set, the clipping group set, the mask parameter, the blending mode, the deformation parameter and the target pixel area; the consistency of the replacement mapping table and the layer set is checked, only the first binding of each target layer is retained according to the order of the entries, and the remaining bindings are deleted; the target layer not appearing in the replacement mapping table is marked as unbound and does not enter the subsequent adaptation process. In the present application, the design file refers to a layered file containing layer relationship, clipping group, mask, blending mode and deformation information; the clipping group refers to a set of clipping relationships within the group defined according to the design file; the mask parameter refers to a pixel-by-pixel weight aligned with the layer, with a value range of zero to one; the blending mode refers to a layer synthesis mode identifier recorded in advance for each layer in the design file, each blending mode corresponds to a fixed pixel-by-pixel color operation rule, which is used to specify the synthesis method between the source color of the layer and the accumulated color below it. The deformation parameter refers to a parameter set related to perspective, affine, grid and free deformation; the target pixel area refers to the output pixel range of the target layer; the replacement mapping table refers to a one-to-one binding rule of the target layer and the external material.
[0019] Step 12, the width and height of the target pixel area are read as the size reference, and the coordinate system of the target pixel area is fixed as the pixel coordinate system with the upper left corner as the origin, the horizontal direction to the right and the vertical direction downward; the coordinate system is used as the only reference for subsequent scaling, positioning, cutting and filling in this embodiment, without any change to the original coordinate direction and unit.
[0020] Step 13, calculate the ratio of the target pixel region width to the external material width and the ratio of the target pixel region height to the external material height, and take the smaller value as the scaling ratio; the scaling uses bilinear interpolation, and the scaled pixel coordinates are rounded down to pixel integers to ensure alignment with the pixel grid; the center displacement is composed of a horizontal displacement and a vertical displacement, the horizontal displacement is half of the difference between the target pixel region width and the scaled external material width, and the vertical displacement is half of the difference between the target pixel region height and the scaled external material height; when the scaled size exceeds the target pixel region, the center line is cut, and when it does not exceed, the transparent pixels with the premultiplied transparency are filled in the center, that is, the transparency channel takes zero value and the color channel takes zero value, to generate the adapted material texture, and the adapted material texture is associated with the mask parameter, the blending mode, the deformation parameter and the target pixel region. The adapted material texture refers to the material texture after scaling, positioning, cutting or filling in the target pixel region scale; the premultiplied transparency refers to the storage representation of the color channel multiplied by the transparency channel pixel by pixel.
[0021] The embodiment realizes the spatial consistency of the replacement assembly by unifying the pixel coordinate system and the size reference; realizes the format stability and the sampling single by taking the smaller value scaling and cutting according to the center line or filling in the center with the premultiplied transparency transparent pixels; and finally forms the assembly result which can be reviewed and reused by one-to-one binding the first reserved and associated binding of the adapted material texture with the mask parameter, the blending mode, the deformation parameter and the target pixel region.
[0022] In an embodiment of the present application, for the replaced layer, according to the existence and value of the perspective deformation parameter, the affine deformation parameter, the mesh parameter and the free deformation parameter, a single inverse mapping rule from the target pixel position to the adapted material texture coordinate is formed in a predetermined order, including: Step 21, existence determination is performed on the perspective deformation parameter, the affine deformation parameter, the free deformation parameter and the mesh parameter of the replaced layer, and the execution order is determined in a fixed order of perspective first, affine second, free deformation third and mesh last, and the parameters not set are registered as not set and do not participate in the calculation. The replaced layer in this step refers to the target layer which has established a one-to-one binding relationship with the external material; the existence determination refers to that only when the corresponding parameter has been set in the design file and has a valid value, the subsequent calculation can be entered; and the fixed order is used to eliminate the process branching caused by different parameter combinations, and ensure the uniqueness of the coordinate transformation path.
[0023] Step 22, convert the target pixel position to homogenous coordinates according to the inverse transformation of the perspective deformation parameters and normalize it with the third component. If the perspective deformation parameters are not invertible or the denominator of the normalization is zero, handle it as an identity perspective transformation and keep the target pixel position unchanged. In this step, homogenous coordinates refer to a three-element representation with the third component being 1 based on pixel coordinates, normalization refers to dividing by the third component to recover the two-dimensional coordinates, and identity perspective transformation refers to a perspective transformation rollback strategy that does not change the input coordinates, used for deterministic processing when the perspective inverse transformation is not available or numerically unstable.
[0024] Step 23, convert the homogenous coordinates to the affine normalized position according to the inverse transformation of the affine deformation parameters. If the affine deformation parameters are not invertible, handle it as an identity affine transformation. In this step, affine normalized position refers to an intermediate position after removing linear effects such as translation, rotation, and scaling, and identity affine transformation refers to an affine rollback strategy that keeps the input position unchanged, used for deterministic processing when the affine inverse transformation is not available.
[0025] Step 24, when the free-form deformation parameters are set, use the spline basis function to calculate the basis function weights in ascending order of control point index and sequentially superimpose the control point displacements. When the mesh parameters are set, locate the triangular elements containing the position in the order of top-down and left-to-right, take the element with the smallest index when falling on a common edge or common vertex, and linearly interpolate the texture coordinates according to the three-vertex barycentric coefficients. Limit the resulting texture coordinates within the range of the adapted material texture using boundary truncation, forming a single inverse mapping rule from the target pixel position to the adapted material texture coordinates.
[0026] In this step, the spline basis function refers to a family of basis functions used for free-form deformation control grids, whose weights are determined by the relationship between the current position and the control points. The ascending order of control point index means that the control points are sequentially involved in superposition in ascending order of their fixed index numbers. The triangular element refers to the triangular face element obtained by mesh division. The barycentric coefficient refers to three non-negative coefficients that sum to one, used for linear interpolation of vertex texture coordinates within a triangular element. The boundary truncation method refers to truncating the exceeding component to the boundary value when the texture coordinates exceed the range of the adapted material texture, without using mirroring or circular extension. Through the above sequential processing, a single inverse mapping rule is uniformly output for direct calling by subsequent single sampling and source-in synthesis.
[0027] This embodiment achieves a unique coordinate path by fixing the execution order, ensures numerical stability and value determination through identity rollback and boundary truncation, and finally forms a single inverse mapping rule from the target pixel position to the adapted material texture coordinates through spline basis functions and barycentric coefficient linear interpolation, ensuring stability, reviewability, and reusability in online replacement, cropping, deformation, and rendering links.
[0028] In one embodiment of the present application, the pixel value and transparency are obtained from the adapted material texture in the target pixel region according to a single inverse mapping rule, and the mask parameter is applied to the pixel value and transparency according to a source-in synthesis rule to obtain the cropped layer output, including: Step 31, for each target pixel position in the target pixel region, the adapted material texture coordinate is calculated according to a single inverse mapping rule, and the coordinate is limited in the effective range of the adapted material texture in a boundary truncation manner. The single inverse mapping rule in this step is a unique mapping from the target pixel position to the adapted material texture coordinate.
[0029] Step 32, the pixel value and transparency are obtained by bilinear interpolation at the adapted material texture coordinate, four adjacent pixels participate in the interpolation, the horizontal weight is determined by the horizontal decimal part, the vertical weight is determined by the vertical decimal part, and the calculation is performed horizontally first and then vertically; the color channels are multiplied by the transparency respectively to convert into premultiplied transparency representation. The bilinear interpolation in this step is a deterministic interpolation of weighted summation in two directions on a two-dimensional grid.
[0030] Step 33, the mask parameter is applied according to the source-in synthesis rule in the target pixel region; when the mask parameter is derived from a vector mask, the mask rendering rule of the design file is used to perform scan line rasterization at the resolution of the target pixel region, the non-zero wrap rule is used to determine the pixel coverage, and the coverage is used as the mask parameter; the premultiplied transparency color channels are multiplied by the mask parameter respectively, and the premultiplied transparency is multiplied by the mask parameter. The source-in synthesis rule in this step is to perform pixel-by-pixel multiplication of the premultiplied transparency color and transparency with the mask parameter in the same layer; the scan line rasterization is to convert the vector outline into pixel coverage along the scan line; the non-zero wrap rule is a deterministic rule for determining whether a pixel falls within the outline based on whether the wrap number is zero.
[0031] Step 34, the masked color and the masked transparency are used as the cropped layer output, the cropped layer output is represented by premultiplied transparency, and is saved together with the mask parameter, the blending mode and the target pixel region. The data object output in this step is used for subsequent local synthesis within the cropping group and global synthesis outside the group, and the name and call are consistent.
[0032] This embodiment realizes unique sampling coordinates and determined values by mapping with a single inverse mapping rule and using boundary truncation; realizes one-time sampling in the texture domain and consistent synthesis by bilinear interpolation and premultiplied transparency; finally obtains a structured cropped layer output and seamlessly connects with subsequent synthesis by vector mask scan line rasterization and source-in synthesis rule.
[0033] In one embodiment of the present application, a local composite region is assigned to a clipping group, and the cropped layer outputs are accumulated and superimposed in the original layer order according to the rule of premultiplied transparency to obtain a local composite texture of the clipping group, including: In step 41, for each clipping group, the union of the target pixel regions of the layers in the group is calculated, and the minimum axis-aligned bounding rectangle thereof is taken as the local composite region, and a translation mapping from the main canvas coordinates to the local composite region coordinates is established. In this step, the minimum axis-aligned bounding rectangle refers to the minimum rectangle that envelopes the union of the target pixel regions without rotation in the horizontal and vertical directions; the translation mapping refers to the mapping of the pixel positions in the main canvas coordinate system to the pixel positions in the local composite region with integer pixel displacement, and the coordinate unit is pixel.
[0034] In step 42, a cumulative buffer is set in the local composite region, and the cumulative color is initialized to zero value and the cumulative transparency is initialized to zero value as the only initial state of the layer-by-layer composition. In this step, the zero value refers to the premultiplied transparency representation with zero in the color channel and zero in the transparency; the cumulative buffer is used to sequentially receive the color and transparency updates of the subsequent layers in the same coordinate domain.
[0035] In step 43, the cropped layer outputs are layer-by-layer composed in the local composite region in the original layer order, and the premultiplied transparency is used in the source-on-top composition rule when the blending mode is normal mode, wherein the mode corresponding to the case where the blending mode is normal is defined as normal mode; when the blending mode is not normal mode and exists in the preset blending mode table, the current cumulative color and the current layer color are first de-premultiplied, the source color processed by the mode is obtained according to the pixel-by-pixel calculation rule of the blending mode, and then the cumulative color and the cumulative transparency are updated according to the source-on-top composition rule. In this step, the source-on-top composition rule refers to the premultiplied transparency composition with the current layer as the source and the cumulative buffer as the bottom; the pixel-by-pixel calculation rule refers to the deterministic channel operation corresponding to the blending mode.
[0036] In step 44, the local composite texture of the clipping group is generated in the local composite region, and the local composite region, the cumulative color, the cumulative transparency and the clipping group identifier are saved together, and the translation mapping is saved together, which is used to paste back to the main canvas for global composition outside the group. The local composite texture of the clipping group refers to the color and transparency result set formed by the cumulative buffer within the local composite region, and it is recorded in pairs with the translation mapping for positioning.
[0037] In this embodiment, the determination of the local composite region and the coordinate consistency are realized by the minimum axis-aligned bounding rectangle and the translation mapping; the unified composition of different blending modes is realized by the source-on-top composition of premultiplied transparency and the de-premultiplication fallback; and the final paste back to the main canvas and subsequent reuse are realized by carrying the clipping group identifier and the translation mapping.
[0038] In one embodiment of the present application, the cropped group local synthesis texture is pasted back to the corresponding position of the main canvas, combined with the non-group layer, and merged on the main canvas according to the blending mode, including: Step 51, generating a processing sequence according to the original global layer order of the design file; for each cropped group, determining the pasting position of the main canvas according to the position relationship between the local synthesis region of the cropped group local synthesis texture recorded in the prequel and the main canvas, and the pasting position is a rectangle in the coordinate system of the main canvas; taking the union of all pasting positions and the target pixel region output by all cropped layers as the main canvas processing range, and the coordinate unit is pixel.
[0039] Step 52, initializing the cumulative color and cumulative transparency to zero within the main canvas processing range, and synthesizing element by element according to the processing sequence; when the element is a non-group layer, reading its cropped layer output and blending mode; when the element is a cropped group, reading its cropped group local synthesis texture and the blending mode of the group at the pasting position; when the blending mode is normal mode, using the source-on-top synthesis rule with premultiplied transparency; when the blending mode is not normal mode, first obtaining the mode-processed source color according to the pixel-by-pixel calculation rule of the blending mode, and then updating the main canvas color and transparency according to the source-on-top synthesis rule.
[0040] Step 53, generating the main canvas output within the main canvas processing range, and saving the main canvas output together with the pasting position of the cropped group local synthesis texture, the blending mode of each cropped group, and the blending mode of the non-group layer; the above records and naming remain consistent with the previous step, and are used for direct reference for subsequent incremental rendering and reuse determination.
[0041] The present embodiment realizes spatial consistency of global synthesis through unified definition of processing sequence and main canvas processing range; realizes consistent composition across groups and non-group layers through layered execution of source-on-top synthesis with premultiplied transparency and pixel-by-pixel calculation rule of blending mode; and finally realizes traceability and reusability of main canvas results through joint saving with pasting position and blending mode.
[0042] In one embodiment of the present application, based on the layer dependency graph, the changes of the material are propagated, the dirty rectangle region is determined, and the reuse identifier and texture fingerprint are generated according to the deformation parameter, the single inverse mapping rule and the output size, including: Step 61, establish a layer dependency graph according to the original layer order of the design file and the clipping, masking, blending and group containing relationship; parse the external event into a change set, record the change object, change type and timestamp; the change type includes material content change, mask parameter change, blending mode change, deformation parameter change, single inverse mapping rule change and output size change. The layer dependency graph refers to a directed graph with layer set and clipping group set as nodes, and clipping relationship, masking relationship, blending relationship and group containing relationship as directed edges; the change set refers to a structured entry recorded in the order of object identifier, change type and timestamp.
[0043] Step 62, propagate each change from bottom to top along the layer dependency graph, the target layer takes its target pixel area as the initial impact domain, and the clipping group takes its pasteback position as the initial impact domain; the pasteback position is obtained by applying the inverse mapping of the translation mapping between the main canvas and the local composite area to the local composite area of the clipping group local composite texture; round down by pixel and take the union bounding rectangle as the dirty rectangle area set, overlap or adjacent merge, and sort from top to bottom and left to right. The union bounding rectangle refers to the minimum axis-aligned rectangle that envelopes the union without rotating the coordinate axes, adjacent to the public boundary, and the dirty rectangle area as the minimum recalculation unit for incremental rendering and scheduling.
[0044] Step 63, generate reuse identifier and texture fingerprint for the object entering the recalculation; the reuse identifier is concatenated in the field order of deformation parameter, discrete description of single inverse mapping rule and output size, with floating point fixed decimal place, matrix row priority, output size width first and height last, and determined by hash calculation; the texture fingerprint is read from left to right and top to bottom, and the pixel data of the adapted material texture is determined by hash after being byte-sequenced in channel order and per-channel quantization bit, and registered in the reuse record table. The determined hash refers to the unique digest generated by the input byte sequence under the fixed algorithm and fixed parameters; the discrete description refers to the byte record of the continuous parameter represented with a preset decimal place accuracy.
[0045] Step 64, generate a recalculation queue in units of dirty rectangle area; mark as reuse when the reuse identifier and texture fingerprint are equal to the record in the reuse record table, otherwise mark as recalculation; sort the recalculation queue in ascending order of dirty rectangle area vertical coordinate and horizontal coordinate under the same vertical coordinate; merge the queue items with the same area and affected object; output the dirty rectangle area, recalculation queue and reuse record table. The affected object refers to the target layer or clipping group affected by the change propagation.
[0046] The embodiment realizes fast convergence of the influence domain through the deterministic propagation of the layer dependency graph, realizes incremental positioning and batch scheduling through pixelized merging and sorting of the dirty rectangle region set, and finally realizes reviewable, reusable and minimum recalculation of online rendering through the cooperation of the reuse identifier, texture fingerprint and recalculation queue.
[0047] When the number of rectangles in the dirty rectangle region set exceeds the upper limit, the rectangles in the set are sorted in ascending order of area first. On the premise that the rectangle pairs with intersection and the rectangle pairs adjacent to the common edge exist, the pair with the minimum area increment of the circumscribed rectangle of the union is selected for merging, wherein the area increment is the area of the circumscribed rectangle of the union after merging minus the sum of the areas of the two rectangles. The merging result is the minimum axis-aligned circumscribed rectangle of the union of the two rectangles, and the boundary coordinates after merging are rounded down to pixel integers. If the above rectangle pairs do not exist and the number of rectangles in the set still exceeds the upper limit, a pair is selected in ascending order of the distance between the center points of the rectangles for the same merging. The above process is repeated until the number of rectangles in the set is not greater than the upper limit. The common edge adjacent refers to the existence of a common boundary with a length greater than zero between the two rectangles. The distance between the center points of the rectangles refers to the Euclidean distance between the geometric centers of the two rectangles, and the unit is pixel. The above sorting, selection and rounding rules remain unchanged throughout the process to ensure the uniqueness and reviewability of the merging result.
[0048] The embodiment reduces merging expansion through area ascending order and minimum area increment merging, maintains region continuity through preferential merging of overlapping and common edge adjacent rectangles, and finally improves the scheduling efficiency and stability of incremental rendering through center point distance backtracking to ensure convergence within the number limit.
[0049] In an embodiment of the present application, the main canvas is output, and the local composite texture and metadata of the clipping group are derived, including: Step 71: The main canvas color and main canvas transparency are output in the main canvas processing range from top to bottom and from left to right, using pre-multiplied transparency representation; the byte sequence of the header, color and transparency is subjected to deterministic hash calculation to generate a check digest, and the output path and the check digest are registered. The header refers to fixed-length fields such as pixel format and size; deterministic hash calculation refers to generating a unique digest for the input byte sequence under fixed algorithm and fixed parameters.
[0050] Step 72: The local composite texture and translation mapping of each clipping group are derived, the width and height of the local composite region, the row-priority byte sequence of the color and transparency, and the mapping parameters are recorded, the deterministic hash calculation is performed to generate a check digest, and the clipping group identifier and the check digest are registered. The row-priority byte sequence refers to the pixel data serialized in the order of top-down and left-to-right within the row.
[0051] Step 73: Register and export metadata related to reuse. The metadata includes a reuse identifier and a texture fingerprint. The field order is object identifier, reuse identifier, texture fingerprint, and output size. Generate an export directory and output the main canvas. The reuse identifier is a deterministic hash obtained by combining the deformation parameters, a discretized description of a single inverse mapping rule, and the output size in a fixed order. The texture fingerprint is a digest obtained by deterministic hashing of the byte sequence read from the adapted material texture by channel and bit depth. The export directory refers to the unified registration of the main canvas output, the locally synthesized textures of the clipping group and their translation mappings, the metadata related to reuse, and their respective verification digests.
[0052] This embodiment achieves consistency and verifiability of the main canvas output through fixed pixel traversal and pre-multiplication transparency encoding; it achieves patching positioning and data backtracking through paired export of locally synthesized textures from the cropping group and translation mapping; and it improves the incremental reuse efficiency and cross-stage traceability of the invention through unified registration of reuse identifiers, texture fingerprints, and export directories.
[0053] This invention provides a personalized replacement, clipping, deformation, and rendering system for design files, comprising: The parsing and binding module is used to parse the layer set, crop group set, mask parameters, blending mode, deformation parameters and target pixel area from the design file. Based on the replacement map table, it establishes a one-to-one binding relationship between the external material and the target layer, and generates the adapted material texture. The inverse mapping generation module is used to normalize the replaced layer according to the existence and values of perspective deformation parameters, affine deformation parameters, mesh parameters and free deformation parameters in a predetermined order, forming a single inverse mapping rule from the target pixel position to the texture coordinates of the adapted material. The sampling mask module is used to obtain pixel values and transparency from the adapted material texture within the target pixel area according to a single inverse mapping rule, and apply mask parameters to the pixel values and transparency according to the source compositing rules to obtain the cropped layer output; The in-group compositing module is used to allocate local compositing areas to the cropping group. It accumulates and overlays the cropped layer outputs according to the original layer order and the rule of pre-multiplying the transparency to obtain the local compositing texture of the cropping group. The Paste Back to Composition module is used to paste the local composite texture of the cropped group back to the corresponding position on the main canvas, and combine it with non-group layers, according to the blending mode, on the main canvas; The incremental reuse module is used to propagate changes to materials based on the layer dependency graph, identify dirty rectangular areas, and generate reuse identifiers and texture fingerprints based on deformation parameters, single inverse mapping rules, and output dimensions. The results export module is used to output the main canvas and export the local composite textures of the cropping group as well as metadata.
[0054] It should be noted that the interval and the threshold size are set for the convenience of comparison, wherein the size of the threshold depends on how much sample data and the base number set by the person skilled in the art for each group of sample data, as long as it does not affect the proportional relationship between the parameters and the quantized values. And the above formula is the calculation of the dimensionless value, the formula is obtained by collecting a large amount of data to simulate the formula of the nearest real situation, and the preset parameters in the formula are set by the person skilled in the art according to the actual situation.
[0055] The above describes the embodiments of the present application, but the present application is not limited to the above specific embodiments, and the above specific embodiments are only illustrative but not restrictive, and the person skilled in the art can make many forms under the inspiration of the present embodiment, which all belong to the protection of the present embodiment.
Claims
1. A method for personalized replacement cut deforming rendering towards a design file, characterized in that, The method comprises the following steps: Step 1, obtaining a layer set, a clipping group set, a mask parameter, a blending mode, a deformation parameter and a target pixel region from a design file, establishing a one-to-one binding relationship between an external material and a target layer based on a replacement mapping table, and generating an adapted material texture; Step 2, for the replaced layer, normalizing according to the existence and value of the perspective deformation parameter, the affine deformation parameter, the grid parameter and the free deformation parameter in a predetermined order to form a single inverse mapping rule from the target pixel position to the adapted material texture coordinate; Step 3, obtaining the pixel value and transparency from the adapted material texture according to the single inverse mapping rule in the target pixel region, and applying the mask parameter to the pixel value and transparency according to the source in-synthesis rule to obtain the clipped layer output; Step 4, assigning a local synthesis region to the clipping group, and accumulating and superimposing the clipped layer output in the original layer order using the premultiplied transparency rule to obtain the clipping group local synthesis texture; Step 5, pasting the clipping group local synthesis texture back to the corresponding position of the main canvas, and combining the non-group layer to perform merging on the main canvas according to the blending mode; Step 6, propagating the change of the material based on the layer dependency graph, determining the dirty rectangle region, and generating the reuse identifier and the texture fingerprint according to the deformation parameter, the single inverse mapping rule and the output size; Step 7, outputting the main canvas, and exporting the clipping group local synthesis texture and the metadata.
2. The design file oriented personalized replacement cut deformation rendering method according to claim 1, characterized in that, The method comprises the following steps: Step 1, obtaining a layer set, a clipping group set, a mask parameter, a blending mode, a deformation parameter and a target pixel region from a design file, establishing a one-to-one binding relationship between an external material and a target layer based on a replacement mapping table, and generating an adapted material texture; Step 11, performing structured analysis on the design file to obtain a layer set, a clipping group set, a mask parameter, a blending mode, a deformation parameter and a target pixel region; performing consistency checking on the replacement mapping table and the layer set, retaining only the first binding of each target layer according to the order of entry, and deleting the remaining bindings; Step 12, reading the width and height of the target pixel region as the size reference, and fixing the coordinate system of the target pixel region as a pixel coordinate system with the upper left corner as the origin, the horizontal direction to the right and the vertical direction downward; 3. The design file oriented personalized replacement cut-and-slice morphing rendering method according to claim 1, wherein, Step 13, calculating the ratio of the target pixel region width to the external material width and the ratio of the target pixel region height to the external material height, taking the smaller value as the scaling ratio; the center displacement is composed of a horizontal displacement and a vertical displacement, the horizontal displacement is half of the difference between the target pixel region width and the scaled external material width, and the vertical displacement is half of the difference between the target pixel region height and the scaled external material height; when the scaled size exceeds the target pixel region, the center line is cut, and when it does not exceed, the transparent pixels are filled in the center with the premultiplied transparency, to generate an adapted material texture, and to complete the association binding with the mask parameter, the blending mode, the deformation parameter and the target pixel region. For the replaced layer, normalizing according to the existence and value of the perspective deformation parameter, the affine deformation parameter, the grid parameter and the free deformation parameter in a predetermined order to form a single inverse mapping rule from the target pixel position to the adapted material texture coordinate, comprising: Step 21, existence judgment is performed on the perspective deformation parameters, affine deformation parameters, free-form deformation parameters and mesh parameters of the replaced layer, and the execution order is determined in the fixed order of perspective first, then affine, then free-form deformation, and finally mesh, and the parameters not set are registered as not set; Step 22, the target pixel position is converted into homogenous coordinates according to the inverse transformation of the perspective deformation parameters and is normalized by the third component, and when the perspective deformation parameters are not reversible or the normalized denominator is zero, the target pixel position is kept unchanged by processing according to the identity perspective transformation; Step 23, the homogenous coordinates are converted into the position after affine normalization according to the inverse transformation of the affine deformation parameters, and when the affine deformation parameters are not reversible, the processing is performed according to the identity affine transformation; Step 24, when the free-form deformation parameters are set, the spline basis function is used, the basis function weight is calculated in ascending order of the control point index, and the control point displacement is sequentially superimposed; when the mesh parameters are set, the triangular element containing the position is located in the order of from top to bottom and then from left to right, the obtained texture coordinates are limited in the range of the adapted material texture in a boundary truncation manner, and a single inverse mapping rule from the target pixel position to the adapted material texture coordinate is formed.
4. The design file oriented personalized replacement cut-and-slice morphing rendering method according to claim 1, wherein, According to the single inverse mapping rule, the pixel value and the transparency are obtained from the adapted material texture, and the mask parameters are applied to the pixel value and the transparency, to obtain the cropped layer output, including: Step 31, in the target pixel region, for each target pixel position, the adapted material texture coordinate is calculated according to the single inverse mapping rule, and the coordinate is limited in the effective range of the adapted material texture in a boundary truncation manner; Step 32, the pixel value and the transparency are obtained by bilinear interpolation at the adapted material texture coordinate, four adjacent pixels are involved in the interpolation, the color channels are multiplied by the transparency respectively, and the pre-multiplied transparency representation is converted; Step 33, in the target pixel region, the mask parameters are applied according to the source-in compositing rule, when the mask parameters are from the vector mask, the mask rendering rule of the design file is rasterized by scanning lines with the resolution of the target pixel region, the non-zero wrap rule is used to determine the pixel coverage, and the coverage is used as the mask parameter; the pre-multiplied transparency color channels are multiplied by the mask parameter respectively, and the pre-multiplied transparency is multiplied by the mask parameter; Step 34, the masked color and the masked transparency are taken as the cropped layer output, the cropped layer output adopts the pre-multiplied transparency representation, and is saved together with the mask parameter, the blending mode and the target pixel region.
5. The design file oriented personalized replacement cut-and-slice morphing rendering method according to claim 1, wherein, Local synthesis regions are allocated for the cropped components, and the cropped layer outputs are accumulated and superimposed according to the pre-multiplied transparency rule in the original layer order, to obtain the local synthesis texture of the cropped component, including: Step 41, for each cropped component, the union of the target pixel regions of the layers in the component is calculated, the minimum axis-aligned bounding rectangle thereof is taken as the local synthesis region, and a translation mapping from the main canvas coordinates to the local synthesis region coordinates is established; Step 42, a cumulative buffer is set in the local synthesis region, the accumulated color is initialized to zero value, and the accumulated transparency is initialized to zero value, as the only initial state of layer-by-layer synthesis; Step 43, in the partial synthesis area, the cut layer output is synthesized layer by layer in the original layer order, and when the blending mode is normal mode, the pre-multiplied source-on-top synthesis rule is adopted; when the blending mode is not normal mode, the current accumulated color and the current layer color are first de-pre-multiplied, the mode-processed source color is obtained according to the pixel-by-pixel calculation rule, and then the accumulated color and the accumulated transparency are updated according to the source-on-top synthesis rule; Step 44, a cut group partial synthesis texture is generated in the partial synthesis area, and the partial synthesis area, the accumulated color, the accumulated transparency and the cut group identifier are saved together, and are saved together with the translation mapping, which is used for group-out global synthesis to be pasted back to the main canvas.
6. The design file oriented personalized replacement cut-and-slice morphing rendering method according to claim 1, wherein, The cut group partial synthesis texture is pasted back to the corresponding position of the main canvas, and combined with the non-group layer, the main canvas is merged according to the blending mode, including: Step 51, a processing sequence is generated according to the original global layer order of the design file, for each cut group, the pasting position of the main canvas is determined according to the position relationship between the partial synthesis area of the cut group partial synthesis texture and the main canvas, and the union of all pasting positions and the target pixel area of all cut layer outputs is taken as the main canvas processing range; Step 52, in the main canvas processing range, the accumulated color and the accumulated transparency are initialized to zero, and are synthesized element by element according to the processing sequence, when the element is a non-group layer, the cut layer output and the blending mode thereof are read, when the element is a cut group, the cut group partial synthesis texture and the blending mode of the group are read, when the blending mode is normal mode, the pre-multiplied source-on-top synthesis rule is adopted, and when the blending mode is not normal mode, the mode-processed source color is obtained according to the pixel-by-pixel calculation rule of the blending mode, and then the main canvas color and transparency are updated according to the source-on-top synthesis rule; Step 53, a main canvas output is generated in the main canvas processing range, and the main canvas output, the pasting position of each cut group partial synthesis texture, the blending mode of each cut group and the blending mode of the non-group layer are saved together.
7. The design file oriented personalized replacement cut-and-slice morphing rendering method according to claim 1, wherein, The dirty rectangle area is determined, and the reuse identifier and the texture fingerprint are generated, including: Step 61, a layer dependency graph is established according to the original layer order of the design file and the cut, mask, blending and group containing relationship; external events are parsed into a change set, and the change object, change type and timestamp are recorded; the change type includes material content change, mask parameter change, blending mode change, deformation parameter change, single inverse mapping rule change and output size change; Step 62, each change is propagated from bottom to top along the layer dependency graph, and the target layer takes its target pixel area as the initial influence domain, and the cut group takes its pasting position as the initial influence domain; the pixel is rounded down and the union is taken as the dirty rectangle area set, which is overlapped or adjacent, and is sorted from top to bottom and from left to right; Step 63, generate multiplex identification and texture fingerprint for the object entering the recalculation, the multiplex identification is concatenated in the order of the field of the deformation parameter, the discretized description of the single inverse mapping rule, and the output size, the output size is wide first and high second, and the deterministic hash calculation is performed; the texture fingerprint is read from left to right and from top to bottom, the pixel data of the adapted material texture is determined by the deterministic hash of the byte sequence composed of the channel order and the quantization bit of each channel, and is registered to the multiplex record table; Step 64, generate a recalculation queue in units of dirty rectangular regions; if the multiplex identification and the texture fingerprint are equal to the record time of the multiplex record table, mark as multiplexing, otherwise mark as recalculation; sort the recalculation queue in ascending order of the vertical coordinate of the dirty rectangular region and in ascending order of the horizontal coordinate under the same vertical coordinate; merge the queue items of the same region and the same affected object, output the dirty rectangular region, the recalculation queue and the multiplex record table.
8. The design file oriented personalized replacement cut-and-slice morphing rendering method according to claim 7, characterized in that, When the number of rectangles in the dirty rectangular region set exceeds the upper limit, sort in ascending order of area; when there are intersecting rectangle pairs and rectangle pairs adjacent to the common edge, select the pair with the smallest area increment of the union rectangle, and take the minimum axis-aligned bounding rectangle of the union of the two rectangles as the merging result, and the boundary coordinates are rounded down to pixel integers; if there is no above-mentioned rectangle pair and still exceeds the upper limit, continue to merge in ascending order of the distance between the center points of the rectangles until the number of rectangles is not greater than the upper limit.
9. The design file oriented personalized replacement cut and distort rendering method according to claim 1, wherein, Output the main canvas, and export the cropped group local composite texture and metadata, including: Step 71, output the main canvas color and the main canvas transparency in the main canvas processing range from top to bottom and from left to right, using premultiplied transparency representation; perform deterministic hash calculation on the byte sequence of the head, color and transparency to generate a check digest, and register the output path and the check digest; Step 72, export the cropped group local composite texture and the translation mapping for each cropped group, record the width and height of the local composite region, the row-priority byte sequence of the color and transparency, and the mapping parameters, perform deterministic hash calculation to generate a check digest, and register the cropped group identifier and the check digest; Step 73, register and export the metadata related to multiplexing, the metadata includes multiplex identification and texture fingerprint, the field order is object identification, multiplex identification, texture fingerprint, output size, generate export directory, output main canvas.
10. A design file oriented personalized replacement cut morphing rendering system characterized by, The design file-oriented personalized replacement cropping deformation rendering method comprises: A parsing module is used for parsing the layer set, the cropped group set, the mask parameter, the blending mode, the deformation parameter and the target pixel region from the design file, establishing a one-to-one binding relationship between the external material and the target layer based on the replacement mapping table, and generating an adapted material texture; An inverse mapping generation module is used for normalizing the replaced layer according to the existence and value of the perspective deformation parameter, the affine deformation parameter, the grid parameter and the free-form deformation parameter in a predetermined order to form a single inverse mapping rule from the target pixel position to the coordinate of the adapted material texture; A sampling mask module is used for obtaining pixel values and transparency from the adapted material texture in the target pixel region according to the single inverse mapping rule, and applying the mask parameter to the pixel values and transparency according to the source-in composite rule to obtain the cropped layer output. A group-in synthesis module is configured to assign a local synthesis region to a clipping group, and to accumulate and superimpose the output of the clipped layers in the original layer order according to a rule of premultiplied transparency, to obtain a local synthesis texture of the clipping group; A paste-back synthesis module is configured to paste the local synthesis texture of the clipping group back to a corresponding position of the main canvas, and to combine the non-group layers to perform merging on the main canvas according to a blending mode; An incremental reuse module is configured to propagate changes of the material based on a layer dependency graph, to determine a dirty rectangle region, and to generate a reuse identifier and a texture fingerprint according to a deformation parameter, a single inverse mapping rule and an output size; A result export module is configured to output the main canvas, and to export the local synthesis texture of the clipping group and metadata.
Citation Information
Patent Citations
Multimedia processing device supporting multi-layer special effect and animation mixing
CN112184856A
Picture object texture replacement method and device, computer equipment and storage medium
CN114241076A
Image material rendering method and device, computer equipment and storage medium
CN116820646A
Three-dimensional terrain cutting method, device and equipment based on texture mapping
CN117152329A
Object transformation method and device, equipment and storage medium
CN117635794A
Cited By
Intelligent image generation method and system based on dynamic template
CN121982154A