A method and system for dynamic rendering of textures and materials of virtual clothing
By identifying the shadows and reflections of virtual clothing and adjusting the distribution of light and shadow, the problem of insufficient lighting and shadow effects in virtual clothing was solved, thus improving the realism and lighting and shadow effects of virtual clothing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHIYI TECH
- Filing Date
- 2026-01-16
- Publication Date
- 2026-05-05
AI Technical Summary
The lack of lighting and shadow effects in existing virtual clothing technology results in poor display quality and affects its reference value.
By identifying the shadow areas and reflection points of the fabric, the distribution of light and shadow is determined, and an interference image is generated to enhance the reflection and perspective effects. The lighting and shadow rendering method is adjusted in combination with the characteristics of the fabric material and type.
It improves the lighting and realism of virtual clothing, enhancing the display quality of clothing under different lighting conditions.
Smart Images

Figure CN121527221B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of virtual clothing, and in particular to a method and system for dynamically rendering the texture and material of virtual clothing. Background Technology
[0002] Virtual clothing refers to the technology of creating, simulating, and displaying clothing that does not exist in the physical world using digital technology. Virtual clothing can simulate the appearance, materials, dynamic effects, and interactive behaviors of real clothing.
[0003] In the current technology, the pace of change in consumer preferences in the apparel market is accelerating, resulting in a surge of personalized customization demands. Virtual clothing technology is generally used to preview the display effect of personalized customization. Virtual clothing technology covers the fabric in the original image according to the information such as fabric texture, color and style in the personalized requirements, thereby forming the appearance of the personalized customized clothing.
[0004] Clothing displays differently under different lighting conditions. When the generated virtual clothing lacks lighting effects, it can easily result in a poor overall appearance and thus lower reference value. Summary of the Invention
[0005] To improve the realism of virtual clothing and enhance its lighting and shadow effects, this invention provides a method and system for dynamically rendering the texture and material of virtual clothing.
[0006] In a first aspect, the present invention provides a method for dynamically rendering the texture and material of virtual clothing, employing the following technical solution:
[0007] A method for dynamically rendering the textures and materials of virtual clothing, comprising:
[0008] Step 100: Collect template images and fabric requirements;
[0009] Step 101: Identify the shadow area from the template image and determine the fabric material according to the fabric requirements;
[0010] Step 102: Determine the reflection point in response to the fabric material;
[0011] Step 103: Determine the reflection area based on the reflection point;
[0012] Step 104: Determine the light and shadow distribution by combining the shadow area and the reflection area;
[0013] Step 105: Generate an interference image based on the light and shadow distribution, template image, and fabric requirements;
[0014] Step 106: In response to the generation of the interference image, dynamically rendered information is displayed.
[0015] By employing the above technical solution, the rendered fabric material is retrieved, thereby identifying the fabric's reflection characteristics. Then, the locations with stronger reflections are selected to add reflection effects, thus enabling the virtual clothing to display the appearance of the fabric after reflecting light, increasing the lighting and shadow effects of the virtual clothing, and enhancing the realism of the virtual clothing.
[0016] Optionally, the method for determining the reflective area includes:
[0017] Step 107: Determine the reflectivity based on the reflection point;
[0018] Step 108: Determine the halo diameter from the reflectivity;
[0019] Step 109: Generate a halo region in response to the halo diameter and reflection point;
[0020] Step 110: Correct the reflection area according to the halo area.
[0021] By adopting the above technical solution, different materials have different reflection intensities. By extracting the reflectivity of various materials in the fabric, a suitable range of reflection effect can be selected according to the magnitude of the reflectivity, thereby improving the realism of the reflection effect.
[0022] Optionally, the method for determining the reflective area further includes:
[0023] Step 111: Determine the type of fabric based on the fabric requirements;
[0024] Step 112: Determine the anisotropy coefficient in response to the fabric type;
[0025] Step 113: Generate anisotropic regions based on the anisotropic coefficients and halo regions;
[0026] Step 114: Correct the reflection region according to the anisotropic region.
[0027] By adopting the above technical solution, the reflection of the fabric is affected by the type and orientation of the fabric. When the fibers of the fabric are oriented, the reflected light is easily driven to converge in a directional manner. The distribution direction of the reflection effect is corrected according to the type and orientation of the fabric, thereby improving the realism of the reflection effect.
[0028] Optionally, it also includes a garment perspective method, which includes:
[0029] Step 200: Determine the light transmittance based on the fabric material;
[0030] Step 201: When the light transmittance is greater than the preset transparency threshold, identify the template garment from the template image;
[0031] Step 202: In response to the template garment, determine the inner garment and determine the light-transmitting area based on the light transmittance;
[0032] Step 203: Determine the image of the inner garment by combining the inner garment and the light-transmitting area;
[0033] Step 204: Update the interference image in response to the inner layer image and the light-transmitting area.
[0034] By adopting the above technical solution, when the light transmittance of the fabric is high, it is easy to observe the inner garment through the outer fabric. Select a suitable inner garment according to the type of clothing in the template, and then crop the inner garment image from the light-transmitting area of the fabric with high light transmittance. The inner garment image is then overlaid on the light-transmitting area to create a perspective effect of the clothing. This allows the virtual clothing to display the appearance of the fabric after light passes through it, increases the light and shadow effect of the virtual clothing, and improves the realism of the virtual clothing.
[0035] Optionally, the clothing perspective method further includes:
[0036] Step 205: When the light transmittance is greater than the preset transparency threshold, determine the degree of blurring based on the light transmittance, and identify the clothing gaps from the template clothing based on the light-transmitting area;
[0037] Step 206: Determine the porosity coefficient in response to the garment porosity;
[0038] Step 207: Determine the fuzzy radius by combining the gap coefficient and the degree of fuzziness;
[0039] Step 208: Generate a blurred image based on the inner layer image and the blur radius;
[0040] Step 209: Update the interference image in response to the blurred image and the transparent region.
[0041] By adopting the above technical solution, different fabrics have different light transmittance, and the higher the light transmittance, the clearer the inner garment is when viewed from the outer fabric. The inner layer image is given a blurring effect according to the light transmittance of the fabric and the gap between the outer fabric and the inner garment, thereby improving the realism of the perspective effect.
[0042] Optionally, the clothing perspective method further includes:
[0043] Step 210: When the light transmittance is greater than the preset transparency threshold, determine the scattering distance according to the fabric material;
[0044] Step 211: Determine the transition area by combining the scattering distance and the light-transmitting area, and retrieve the inner layer color;
[0045] Step 212: Determine the required color and scattering intensity based on the fabric requirements;
[0046] Step 213: Determine the transition color in response to the inner color, required color, and scattering intensity;
[0047] Step 214: Generate a transition image by combining the transition region and the transition color;
[0048] Step 215: Update the interference image based on the transition image and the transition region.
[0049] By adopting the above technical solution, when the light transmittance of the fabric is high, light can easily pass through the outer fabric and shine on the inner garment, which will cause the scattered light to be affected by the color of the inner garment. By combining the scattering of the fabric and the light transmittance, a suitable scattering range and scattering color are selected, thereby forming a scattering transition area around the light-transmitting area, thereby improving the realism of the see-through effect.
[0050] Optionally, a wrinkle rendering method is also included, the wrinkle rendering method comprising:
[0051] Step 300: Identify the wrinkle locations from the template image;
[0052] Step 301: Determine the stretching area based on the location of the folds;
[0053] Step 302: Identify the stretching range from the template image based on the stretching area;
[0054] Step 303: Determine the stretching factor in response to the stretching amplitude;
[0055] Step 304: Update the transmittance based on the stretching coefficient.
[0056] By adopting the above technical solution, when there are wrinkles on the clothing, the fabric at the wrinkle is easily stretched, which affects the light transmission performance of the fabric at that point. The stretching of the fabric at the wrinkle can be identified from the template, and the light transmission of the fabric can be corrected according to the stretching, thereby improving the realism of the see-through effect.
[0057] Optionally, the wrinkle rendering method further includes:
[0058] Step 305: Determine the folded area based on the folded location;
[0059] Step 306: Identify the normal direction from the wrinkled region;
[0060] Step 307: Generate a normal region based on the normal direction and the anisotropic region, and identify the plane curvature from the folded region;
[0061] Step 308: Determine the width coefficient in response to the plane curvature;
[0062] Step 309: Generate the highlight region by combining the width coefficient and the normal region;
[0063] Step 310: Correct the reflection area based on the highlight area.
[0064] By adopting the above technical solution, when there are wrinkles on the clothing, the reflective effect on the clothing is easily affected by the curvature of the clothing after the wrinkles. The direction and thickness of the reflective effect can be adjusted according to the curvature of the clothing, thereby improving the realism of the reflective effect.
[0065] Optionally, the wrinkle rendering method further includes:
[0066] Step 311: When the light transmittance is greater than the preset perspective threshold, determine the overlapping area based on the fold position;
[0067] Step 312: Determine the number of overlapping layers based on the overlapping area, and identify the overlapping height from the template image based on the overlapping area;
[0068] Step 313: Determine the obstruction coefficient by combining the number of overlapping layers and the overlapping height;
[0069] Step 314: Update the transmittance based on the impedance coefficient.
[0070] By adopting the above technical solution, when there are wrinkles on the clothing, it is easy to cause multiple layers of fabric to overlap, which will reduce the light transmittance of the fabric. By reducing the light transmittance according to the number of overlapping layers and the overlapping height, the situation where the fabric with high light transmittance is difficult to see through after being overlapped can be identified, thereby improving the realism of the see-through effect.
[0071] Secondly, this application provides a dynamic rendering system for the texture and materials of virtual clothing, employing the following technical solution:
[0072] A dynamic rendering system for the textures and materials of virtual clothing, comprising:
[0073] The acquisition module is used to acquire template images and fabric requirements;
[0074] The memory is used to store the program for the dynamic rendering method of textures and materials of any of the above-mentioned virtual clothing.
[0075] The processor is the unit of memory that allows programs to be loaded and executed by the processor.
[0076] By employing the above technical solution, the rendered fabric material is retrieved, thereby identifying the fabric's reflection characteristics. Then, the locations with stronger reflections are selected to add reflection effects, thus enabling the virtual clothing to display the appearance of the fabric after reflecting light, increasing the lighting and shadow effects of the virtual clothing, and enhancing the realism of the virtual clothing.
[0077] In summary, this application includes at least one of the following beneficial technical effects:
[0078] 1. Retrieve the rendered fabric material to identify its reflection properties, and select areas with strong reflections to add reflection effects. This allows the virtual clothing to display the appearance of the fabric after reflecting light, enhancing the lighting and shadow effects of the virtual clothing and improving its realism.
[0079] 2. Different materials have different reflectivity. By obtaining the reflectivity of various materials in the fabric, a suitable range of reflection effect can be selected according to the magnitude of the reflectivity, thereby improving the realism of the reflection effect.
[0080] 3. The reflectivity of fabric is affected by the type and orientation of the fabric. When the fibers of the fabric are oriented in a specific direction, the reflected light is more likely to converge in a specific direction. The distribution direction of the reflection effect is corrected according to the type and orientation of the fabric, thereby improving the realism of the reflection effect. Attached Figure Description
[0081] Figure 1 This is a flowchart of a method for dynamically rendering the textures and materials of virtual clothing;
[0082] Figure 2 This is a flowchart of the clothing perspective method;
[0083] Figure 3 This is a flowchart of the wrinkle rendering method. Detailed Implementation
[0084] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0085] Reference Figure 1 A method for dynamically rendering the textures and materials of virtual clothing, comprising:
[0086] Step 100: Collect template images and fabric requirements.
[0087] Template images refer to images used for rendering, i.e., images containing the style of the virtual clothing to be generated. Fabric requirements refer to the fabric numbers that need to be rendered, i.e., the numbers corresponding to the fabrics of the virtual clothing to be generated. Each fabric requirement corresponds one-to-one with a fabric. Template images and fabric requirements can be pre-input by staff. The methods for collecting template images and fabric requirements are selected by staff according to the actual situation, and will not be elaborated here.
[0088] Step 101: Identify the shadow area from the template image and determine the fabric material according to the fabric requirements.
[0089] The shadow area refers to the area in the template image where there is a shadow. The shadow area can be identified by image recognition technology. The method for identifying the shadow area is common knowledge to those in the field and will not be elaborated here.
[0090] Fabric material refers to the distribution of materials such as cotton, silk, linen, and metal on the required fabric. In other words, it is the type of material at each location on the fabric. The corresponding fabric material can be found in the material correspondence table, which is a data table that records different fabric requirements and their corresponding fabric materials.
[0091] Step 102: Determine the reflection point in response to the fabric material.
[0092] A reflection point refers to a location in the fabric material that produces a noticeable reflective effect. The reflectivity of each location in the fabric material can be found in the reflection correspondence table. Then, the location with a reflectivity greater than the reflection threshold is taken as the reflection point. The reflection correspondence table is a data table that records the reflectivity corresponding to different materials. The reflection threshold is the minimum reflectivity that produces a noticeable reflective effect. The reflection threshold is selected by the staff according to the actual situation, and will not be elaborated here.
[0093] Step 103: Determine the reflection area based on the reflection point.
[0094] The reflection area refers to the area formed after adding a reflection effect to the reflection point. The reflection effect is the highlight area formed on the image by the reflection of light at the reflection point. Generally, a circular halo with a diameter equal to the reflection diameter is used as the reflection effect. The reflection diameter is selected by the staff according to the actual situation, which will not be elaborated here.
[0095] Step 104: Determine the light and shadow distribution by combining the shadow area and the reflection area.
[0096] Light and shadow distribution refers to the distribution of light and shadow formed after the reflection area interferes with the shadow area, that is, the distribution range of highlights and the distribution range of shadows. When the shadow area and the reflection area overlap, the overlapping area is defined as the reflection area.
[0097] Step 105: Generate an interference image based on the light and shadow distribution, template image, and fabric requirements.
[0098] An interference image is an image formed by applying a reflection effect to a virtual garment. That is, after generating a virtual garment without a reflection effect according to the template image and fabric requirements, the highlights and shadows are added to the virtual garment according to the light and shadow distribution to form an image. The method of generating interference images is common knowledge to those in the field and will not be described in detail here.
[0099] Step 106: In response to the generation of the interference image, dynamically rendered information is displayed.
[0100] Dynamic rendering information refers to the information displayed to staff to show interference images. The method for generating dynamic rendering information is common knowledge in the field and will not be elaborated here.
[0101] The rendering material of the fabric is retrieved to identify its reflectivity. Areas with strong reflectivity are selected to add reflective effects, thereby making the virtual clothing display the appearance of the fabric after reflecting light, increasing the lighting and shadow effects of the virtual clothing, and improving the realism of the virtual clothing.
[0102] Methods for determining the reflective area include:
[0103] Step 107: Determine the reflectivity based on the reflection point.
[0104] Reflectivity is a numerical value that shows the intensity of reflection at a reflection point. You can first look up the reflective material of the reflection point in the fabric material list, and then look up the reflectivity corresponding to the reflective material in the reflection correspondence table.
[0105] Step 108: Determine the halo diameter from the reflectivity.
[0106] The halo diameter refers to the diameter of the highlight formed after the fabric is reflected. The greater the reflectivity, the larger the halo diameter. The halo diameter corresponding to the reflectivity can be found in the diameter correspondence table, which is a data table that records different reflectivities and their corresponding halo diameters.
[0107] Step 109: Generate a halo region in response to the halo diameter and reflection point.
[0108] The halo region is the range of highlight distribution formed after adding a highlight with a halo diameter to the reflection point. The method of generating the halo region is common knowledge to those in the field and will not be elaborated here.
[0109] Step 110: Correct the reflection area according to the halo area.
[0110] Different materials have different reflectivity. By taking the reflectivity of various materials in the fabric, a suitable range of reflection effect can be selected according to the magnitude of the reflectivity, thereby improving the realism of the reflection effect.
[0111] Methods for determining the reflective area also include:
[0112] Step 111: Determine the type of fabric based on the fabric requirements.
[0113] Fabric type refers to the distribution of fabric types such as cotton, silk, and satin on the overall fabric, that is, the location of fabric types that make up the whole fabric. You can look up the fabric type corresponding to your fabric needs in the type correspondence table. The type correspondence table is a data table that records different fabric needs and their corresponding fabric types.
[0114] Step 112: Determine the anisotropy coefficient in response to the fabric type.
[0115] The anisotropy coefficient is a numerical value used to show the anisotropy of a fabric's reflectivity. If the fibers are randomly arranged (such as cotton), the reflected light diffuses evenly in all directions, resulting in a smaller anisotropy coefficient. If the fibers are oriented (such as silk or satin), the reflected light is concentrated only in the direction of the fabric type, resulting in a larger anisotropy coefficient. The anisotropy coefficient corresponding to a fabric type can be found in the anisotropy correspondence table, which is a data table that records different fabric types and their corresponding anisotropy coefficients.
[0116] Step 113: Generate the anisotropic region based on the anisotropic coefficient and the halo region.
[0117] The anisotropic region refers to the halo region after adjustment according to the anisotropic coefficient. The smaller the anisotropic coefficient, the more "circular / elliptical" (isotropic) the highlight trail appears, and the larger the anisotropic coefficient, the more "narrow and elongated" (anisotropic) the highlight trail appears. The ellipticity corresponding to the anisotropic coefficient can be found in the ellipticity correspondence table, and then the halo region can be adjusted according to the ellipticity to obtain the anisotropic region.
[0118] Step 114: Correct the reflection region according to the anisotropic region.
[0119] The reflectivity of fabric is affected by the type and orientation of the fabric. When the fibers of the fabric are oriented in a specific direction, the reflected light is more likely to converge in a specific direction. The distribution direction of the reflection effect is corrected according to the type and orientation of the fabric, thereby improving the realism of the reflection effect.
[0120] Reference Figure 2 Methods of using perspective in clothing include:
[0121] Step 200: Determine the light transmittance based on the fabric material.
[0122] Light transmittance refers to the distribution of light transmittance on a fabric, that is, the light transmittance at various locations on the fabric. The light transmittance corresponding to a fabric material can be found in a light transmittance correspondence table, which is a data table that records different fabric materials and their corresponding light transmittance.
[0123] Step 201: When the light transmittance is greater than the preset perspective threshold, the template garment is identified from the template image.
[0124] The perspective threshold refers to the minimum light transmittance required to produce a clear perspective effect. The perspective threshold is selected by the staff based on the actual situation and will not be elaborated upon here. Light transmittance greater than the perspective threshold means that the fabric can produce a perspective effect, meaning that the inner garment can be observed from the outer layer of fabric. Template garments refer to the types of clothing in template images, such as coats, down jackets, and blazers. Template images can be identified using image recognition technology. The methods for identifying template garments are common knowledge in the field and will not be elaborated upon here.
[0125] Step 202: In response to the template garment, determine the inner garment and determine the light-transmitting area based on the light transmittance.
[0126] Inner garments refer to the types of clothing worn under template garments. For example, when the template garment is a down jacket, a sweater is used as an inner garment. The inner garment corresponding to the template garment can be found in the inner garment correspondence table, which is a data table that records different template garments and their corresponding inner garments.
[0127] The light-transmitting area is the range where the light transmittance is greater than the perspective threshold. The method for determining the light-transmitting area is common knowledge to those in the field and will not be elaborated here.
[0128] Step 203: Determine the inner garment image by combining the inner garment and the light-transmitting area.
[0129] An inner layer image is an image on the inner garment located in the translucent area. The method for determining the inner layer image is common knowledge to those in the field and will not be elaborated here.
[0130] Step 204: Update the interference image in response to the inner layer image and the light-transmitting area.
[0131] When the fabric has a high light transmittance, it is easy to see the inner garment through the outer fabric. Select a suitable inner garment according to the type of clothing in the template, and then crop the inner garment image from the light-transmitting area of the fabric with a high light transmittance. This inner garment image is then overlaid on the light-transmitting area to create a perspective effect of the clothing. This allows the virtual clothing to show the appearance of the fabric after light passes through it, increases the light and shadow effects of the virtual clothing, and improves the realism of the virtual clothing.
[0132] Other methods of clothing perspective include:
[0133] Step 205: When the light transmittance is greater than the preset transparency threshold, the degree of blur is determined according to the light transmittance, and the gaps in the garment are identified from the template garment based on the light-transmitting area.
[0134] Blur level refers to a value used to show the effect of light transmittance on the observation of inner clothing through template clothing. The lower the light transmittance, the greater the blur level. The blur level corresponding to the light transmittance can be found in the blur correspondence table, which is a data table that records different light transmittances and their corresponding blur levels.
[0135] The garment gap refers to the distance between the template garment and the inner garment. The garment gap can be predicted based on the bulging of the template garment. Generally, image recognition technology is used to identify the bulging thickness of the template garment as the garment gap. The method for identifying the garment gap is common knowledge to those in the field and will not be elaborated here.
[0136] Step 206: Determine the porosity coefficient in response to the garment porosity.
[0137] The gap coefficient is a numerical value used to show the degree of influence of clothing gaps on the observation of inner clothing through the template clothing. The larger the clothing gap, the more blurred the observed inner clothing, and the larger the gap coefficient. The gap coefficient corresponding to the clothing gap can be found in the gap correspondence table, which is a data table that records different clothing gaps and their corresponding gap coefficients.
[0138] Step 207: Determine the fuzzy radius by combining the gap coefficient and the degree of fuzziness.
[0139] The blur radius is a numerical value used to show the blurriness of the inner garment when viewed through the template garment. The larger the gap coefficient, the greater the blurriness, and the more blurred the inner garment is, and the larger the blur radius is. The blur radius corresponding to the gap coefficient and blurriness can be found in the blur correspondence table, which is a data table that records different gap coefficients, blurriness levels and their corresponding blur radii.
[0140] Step 208: Generate a blurred image based on the inner layer image and the blur radius.
[0141] A blurred image is an image formed by blurring an inner image according to a blur radius. Generally, image processing techniques are used to transform the inner image to obtain a blurred image. The method of generating blurred images is common knowledge to those in the field and will not be elaborated here.
[0142] Step 209: Update the interference image in response to the blurred image and the transparent region.
[0143] Different fabrics have different light transmittance, and the higher the light transmittance, the clearer the inner garment is when viewed from the outer fabric. By applying a blurring effect to the inner garment image according to the light transmittance of the fabric and the gap between the outer fabric and the inner garment, the realism of the perspective effect can be improved.
[0144] Other methods of clothing perspective include:
[0145] Step 210: When the light transmittance is greater than the preset transparency threshold, determine the scattering distance according to the fabric material.
[0146] Scattering distance refers to the distance that light travels after being scattered inside the fabric and its energy decays to the initial value 1 / e (≈37%). The scattering distance corresponding to the fabric material can be found in the scattering correspondence table, which is a data table that records different fabric materials and their corresponding scattering distances and scattering intensities.
[0147] Step 211: Determine the transition area by combining the scattering distance and the light transmission area, and retrieve the inner color.
[0148] The transition region refers to the annular area surrounding the light-transmitting area with a width equal to the scattering distance. The method for determining the transition region is common knowledge to those skilled in the art and will not be elaborated here.
[0149] The inner layer color refers to the color of the inner garment. The default inner layer color is white, but staff can freely select the inner layer color. The method for selecting the inner layer color will not be elaborated here.
[0150] Step 212: Determine the required color and scattering intensity based on the fabric requirements.
[0151] Required color refers to the distribution of fabric color, that is, the fabric color in different locations. The required color corresponding to the fabric requirement can be found in the color correspondence table. The color correspondence table is a data table that records different fabric requirements and their corresponding required colors. Scattering intensity refers to the proportion of scattered light to incident light. The scattering intensity corresponding to the fabric material can be found in the scattering correspondence table.
[0152] Step 213: Determine the transition color in response to the inner color, required color, and scattering intensity.
[0153] Transition color refers to the color of light in the transition area after scattering. It can be calculated using the formula: Transition color = Inner color * Scattering intensity + Required color * (1 - Scattering intensity).
[0154] Step 214: Generate a transition image by combining the transition region and the transition color.
[0155] A transition image is an image in which the transition color gradually fades from the edge of the light-transmitting area to the direction away from the edge of the light-transmitting area in the transition region. The method of generating transition images is common knowledge to those in the art and will not be described in detail here.
[0156] Step 215: Update the interference image based on the transition image and the transition region.
[0157] When the fabric has a high light transmittance, light can easily pass through the outer fabric and reach the inner garment. As a result, the scattered light is affected by the color of the inner garment. By combining the fabric's scattering properties and light transmittance, a suitable scattering range and scattering color can be selected to create a scattering transition area around the light-transmitting area, thereby improving the realism of the see-through effect.
[0158] Reference Figure 3 The methods for rendering wrinkles include:
[0159] Step 300: Identify the wrinkle locations from the template image.
[0160] The location of a fold refers to the position of a fold in the template garment. The location of a fold can be determined by image recognition technology. The method for determining the location of a fold is common knowledge to those in the field and will not be elaborated here.
[0161] Step 301: Determine the stretching area based on the location of the folds.
[0162] The stretching area refers to the area of fabric in the template garment that is stretched by folds. The degree of fabric deformation can be identified through image recognition technology, and the range where the degree of deformation is greater than the stretching threshold is selected as the stretching area. The degree of deformation refers to the value used to show the deformation of the fabric, which can be determined according to the deformation of the fibers. The stretching threshold is the minimum degree of deformation that affects the light transmission performance of the fabric. The stretching threshold is selected by the staff according to the actual situation, and will not be elaborated here.
[0163] Step 302: Identify the stretching range from the template image based on the stretching area.
[0164] The stretching range is the degree of deformation in the stretching area. The method for determining the stretching range is common knowledge to those in the field and will not be elaborated here.
[0165] Step 303: Determine the stretching factor in response to the stretching amplitude.
[0166] The stretch factor is a value used to show the degree of influence of stretching on the light transmittance of fabric. The greater the stretching, the smaller the stretch factor. Generally, the product of the stretch factor and the original light transmittance is calculated as the new light transmittance. The stretch factor corresponding to the stretching range can be found in the stretching correspondence table.
[0167] Step 304: Update the transmittance based on the stretching coefficient.
[0168] When there are wrinkles in clothing, the fabric at the wrinkles is easily stretched, which affects the light transmission of the fabric at that point. The template identifies the stretching of the fabric at the wrinkles and corrects the light transmission of the fabric according to the stretching, thereby improving the realism of the see-through effect.
[0169] Wrinkle rendering methods also include:
[0170] Step 305: Determine the fold region based on the fold location.
[0171] The wrinkled area refers to the area on the template garment where there are wrinkles. The wrinkled area can be identified by image recognition technology. The method for identifying the wrinkled area is common knowledge to those in the field and will not be elaborated here.
[0172] Step 306: Identify the normal direction from the wrinkled region.
[0173] The normal direction refers to the spatial distribution of the normal direction of the fabric in the folded area. The normal direction can be determined by image recognition technology. The method for determining the normal direction is common knowledge to those in the field and will not be elaborated here.
[0174] Step 307: Generate a normal region based on the normal direction and the anisotropic region, and identify the plane curvature from the folded region.
[0175] The normal region refers to the highlight range after correcting the irregular area according to the normal direction. On a smooth garment surface, the normal direction is consistent, and the highlight trajectory is a continuous band. At folds (especially creases), the normal direction is abruptly turned (it can change abruptly from 0 degrees to 180 degrees), causing the direction of reflected light to change synchronously. The highlight trajectory "follows the turn" or "breaks" with the normal direction. The normal region can be determined by image processing technology. The method for determining the normal region is common knowledge to those in the field and will not be elaborated here.
[0176] Planar curvature refers to the spatial distribution of the curvature of fabric in the folded area. Planar curvature can be determined by image recognition technology. The method for determining planar curvature is common knowledge in the field and will not be elaborated here.
[0177] Step 308: Determine the width coefficient in response to the plane curvature.
[0178] The width factor is a value used to show the effect of plane curvature on the width of the highlight. The greater the plane curvature, the more prominent the wrinkles, the more concentrated the reflected light, and the narrower the highlight trail. The smaller the width factor, the more likely the plane curvature will be. The width factor corresponding to the plane curvature can be found in the width correspondence table, which is a data table that records different plane curvatures and their corresponding width factors.
[0179] Step 309: Combine the width coefficient and normal region to generate the highlight region.
[0180] The highlight region is the highlight range obtained after correcting the normal region according to the width factor. The method of generating the highlight region is common knowledge to those in the field and will not be elaborated here.
[0181] Step 310: Correct the reflection area based on the highlight area.
[0182] When there are wrinkles in clothing, the reflective effect is easily affected by the curvature of the clothing after the wrinkles. Adjusting the direction and thickness of the reflective effect according to the curvature of the clothing can improve the realism of the reflective effect.
[0183] Wrinkle rendering methods also include:
[0184] Step 311: When the light transmittance is greater than the preset perspective threshold, determine the overlapping area based on the fold position.
[0185] The overlapping area refers to the area where the fabric is folded, that is, the area where the folds cover the fabric. The overlapping area can be determined by image recognition technology. The method for determining the overlapping area is common knowledge to those in the field and will not be elaborated here.
[0186] Step 312: Determine the number of overlapping layers based on the overlapping area, and identify the overlapping height from the template image based on the overlapping area.
[0187] The number of overlapping layers refers to the number of fabric layers that overlap in the overlapping area. The number of overlapping layers can be determined by image recognition technology. The method for determining the number of overlapping layers is common knowledge to those in the field and will not be elaborated here.
[0188] Overlap height refers to the distance between the fabric closest to the outside and the fabric furthest from the outside in the overlapping area. Overlap height can be determined by image recognition technology. The method for determining overlap height is common knowledge to those in the field and will not be elaborated here.
[0189] Step 313: Determine the obstruction coefficient by combining the number of overlapping layers and the overlapping height.
[0190] The obstruction coefficient is a numerical value used to show the impact of overlap on light transmittance. The greater the number of overlapping layers and the greater the overlap height, the greater the impact of overlap on light transmittance, and the greater the obstruction coefficient. The obstruction coefficient corresponding to the number of overlapping layers and the overlap height can be found in the obstruction correspondence table. Generally, the product of the obstruction coefficient and the original light transmittance is calculated as the new light transmittance. The obstruction correspondence table is a data table that records different numbers of overlapping layers and overlap heights and their corresponding obstruction coefficients.
[0191] Step 314: Update the transmittance based on the impedance coefficient.
[0192] When there are wrinkles in clothing, multiple layers of fabric are easily overlapped, which reduces the light transmittance of the fabric. By reducing the light transmittance according to the number and height of the overlapping layers, it is possible to identify situations where fabrics with high light transmittance are difficult to see through after being overlapped, thereby improving the realism of the see-through effect.
[0193] Based on the same inventive concept, embodiments of the present invention provide a dynamic rendering system for the texture and material of virtual clothing, comprising:
[0194] The acquisition module is used to acquire template images and fabric requirements;
[0195] The memory is used to store the program for the dynamic rendering method of textures and materials of any of the above-mentioned virtual clothing.
[0196] The processor is the unit of memory that allows programs to be loaded and executed by the processor.
[0197] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional modules is used as an example. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device, and unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0198] The above description is merely a preferred embodiment of the present invention. The scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.
Claims
1. A method for dynamically rendering the texture and material of virtual clothing, characterized in that, include: Step 100: Collect template images and fabric requirements; Step 101: Identify the shadow area from the template image and determine the fabric material according to the fabric requirements; Step 102: Determine the reflection point in response to the fabric material; Step 103: Determine the reflection area based on the reflection point; Step 104: Determine the light and shadow distribution by combining the shadow area and the reflection area; Step 105: Generate an interference image based on the light and shadow distribution, template image, and fabric requirements; Step 106: In response to the interference image, generate and display dynamic rendering information; The method for determining the reflective region includes: Step 107: Determine the reflectivity based on the reflection point; Step 108: Determine the halo diameter from the reflectivity; Step 109: Generate a halo region in response to the halo diameter and reflection point; Step 110: Correct the reflection area according to the halo area; The method for determining the reflective region also includes: Step 111: Determine the type of fabric based on the fabric requirements; Step 112: Determine the anisotropy coefficient in response to the fabric type; Step 113: Generate anisotropic regions based on the anisotropic coefficients and halo regions; Step 114: Correct the reflection region according to the anisotropic region.
2. The method for dynamically rendering textures and materials of virtual clothing according to claim 1, characterized in that, It also includes methods for observing clothing perspective, which include: Step 200: Determine the light transmittance based on the fabric material; Step 201: When the light transmittance is greater than the preset transparency threshold, identify the template garment from the template image; Step 202: In response to the template garment, determine the inner garment and determine the light-transmitting area based on the light transmittance; Step 203: Determine the image of the inner garment by combining the inner garment and the light-transmitting area; Step 204: Update the interference image in response to the inner layer image and the light-transmitting area.
3. The method for dynamically rendering the texture and material of virtual clothing according to claim 2, characterized in that, The clothing perspective method also includes: Step 205: When the light transmittance is greater than the preset transparency threshold, determine the degree of blurring based on the light transmittance, and identify the clothing gaps from the template clothing based on the light-transmitting area; Step 206: Determine the porosity coefficient in response to the garment porosity; Step 207: Determine the fuzzy radius by combining the gap coefficient and the degree of fuzziness; Step 208: Generate a blurred image based on the inner layer image and the blur radius; Step 209: Update the interference image in response to the blurred image and the transparent region.
4. The method for dynamically rendering the texture and material of virtual clothing according to claim 3, characterized in that, The clothing perspective method also includes: Step 210: When the light transmittance is greater than the preset transparency threshold, determine the scattering distance according to the fabric material; Step 211: Determine the transition area by combining the scattering distance and the light-transmitting area, and retrieve the inner layer color; Step 212: Determine the required color and scattering intensity based on the fabric requirements; Step 213: Determine the transition color in response to the inner color, required color, and scattering intensity; Step 214: Generate a transition image by combining the transition region and the transition color; Step 215: Update the interference image based on the transition image and the transition region.
5. The method for dynamically rendering textures and materials of virtual clothing according to claim 4, characterized in that, It also includes a wrinkle rendering method, which includes: Step 300: Identify the wrinkle locations from the template image; Step 301: Determine the stretching area based on the location of the folds; Step 302: Identify the stretching range from the template image based on the stretching area; Step 303: Determine the stretching factor in response to the stretching amplitude; Step 304: Update the transmittance based on the stretching coefficient.
6. The method for dynamically rendering the texture and material of virtual clothing according to claim 5, characterized in that, The wrinkle rendering method also includes: Step 305: Determine the folded area based on the folded location; Step 306: Identify the normal direction from the wrinkled region; Step 307: Generate a normal region based on the normal direction and the anisotropic region, and identify the plane curvature from the folded region; Step 308: Determine the width coefficient in response to the plane curvature; Step 309: Generate the highlight region by combining the width coefficient and the normal region; Step 310: Correct the reflection area based on the highlight area.
7. The method for dynamically rendering the texture and material of virtual clothing according to claim 6, characterized in that, The wrinkle rendering method also includes: Step 311: When the light transmittance is greater than the preset perspective threshold, determine the overlapping area based on the fold position; Step 312: Determine the number of overlapping layers based on the overlapping area, and identify the overlapping height from the template image based on the overlapping area; Step 313: Determine the obstruction coefficient by combining the number of overlapping layers and the overlapping height; Step 314: Update the transmittance based on the impedance coefficient.
8. A dynamic rendering system for the texture and material of virtual clothing, characterized in that, include: The acquisition module is used to acquire template images and fabric requirements; A memory for storing a program for a method of dynamically rendering the texture and materials of a virtual garment as described in any one of claims 1 to 7; The processor is the unit of memory that allows programs to be loaded and executed by the processor.
Citation Information
Patent Citations
Rendering processing method and device, computer equipment and storage medium
CN118570358A
Clothing fabric dynamic simulation method and system based on neural network
CN119514324A