Drawing method of three-dimensional virtual costume and related device
By combining eye movement, head movement, gesture, and semantic data to determine user interest values, the rendering precision of virtual clothing is dynamically adjusted, solving the problem of high computational overhead in virtual reality technology. This achieves a balance between visual realism and system performance, improving the smoothness and realism of virtual clothing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUNAN HAPPLY SUNSHINE INTERACTIVE ENTERTAINMENT MEDIA CO LTD
- Filing Date
- 2026-03-27
- Publication Date
- 2026-04-24
AI Technical Summary
In existing virtual reality technology, the high-precision simulation of 3D virtual clothing results in high computational overhead, affecting the system's real-time performance and smoothness, making it difficult to achieve a balance between visual realism and system performance.
By integrating eye-tracking, head-movement, gesture, and semantic data to determine user interest values, the rendering precision of virtual clothing is dynamically adjusted, and computational resources are concentrated on the user's attention area. Explicit finite element method, position dynamics method, and mass-spring system are used to render areas with different precision.
It achieves a balance between visual realism and high system performance by reducing overall computational overhead while maintaining visual realism, enabling virtual clothing to run smoothly on consumer-grade virtual reality devices.
Smart Images

Figure CN121921475A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of virtual reality technology, and in particular to a method and apparatus for drawing three-dimensional virtual clothing. Background Technology
[0002] In virtual reality (VR) virtual try-on systems, to achieve a realistic physical representation of clothing, a high-precision physical simulation of the entire garment model is usually required. However, this global high-precision simulation leads to huge computational overhead, severely impacting the system's real-time performance and smoothness.
[0003] Existing solutions typically employ two approaches: one is to globally reduce simulation accuracy, but this sacrifices detail and fails to provide sufficiently realistic physical effects when users are focused on clothing details; the other is to use static local optimization, which pre-defines certain areas as high-precision regions. However, this approach is inflexible and cannot dynamically adapt to the user's actual focus. When the user does not focus on these preset areas, it wastes computational resources, while when the user focuses on non-preset areas, it fails to meet their demand for realistic detail. Therefore, existing technologies struggle to achieve an effective balance between ensuring visual realism and maintaining high system performance. Summary of the Invention
[0004] In view of the above problems, this application provides a method and related apparatus for drawing three-dimensional virtual clothing, so as to achieve an effective balance between ensuring visual realism and maintaining high system performance. The specific solution is as follows:
[0005] The first aspect of this application provides a method for drawing three-dimensional virtual clothing, including:
[0006] Multi-dimensional data is obtained from virtual reality devices, including eye-tracking data, head posture data, gesture interaction data, and semantic context data.
[0007] The user's screen gaze point is determined based on the eye-tracking data, and the screen gaze point is converted into a 3D world ray. The user's gaze area is determined based on the intersection point of the 3D world ray and the 3D virtual clothing currently displayed by the virtual reality device.
[0008] The user's interest value in the gaze area is determined based on the multi-dimensional data.
[0009] The drawing accuracy of the gaze region is determined based on the interest value;
[0010] The gaze region is drawn based on the stated drawing accuracy.
[0011] In one possible implementation, determining the user's gaze area based on the intersection point of the three-dimensional world ray and the three-dimensional virtual clothing currently displayed by the virtual reality device includes:
[0012] Determine the coordinates of the intersection point between the three-dimensional world ray and the three-dimensional virtual clothing currently displayed by the virtual reality device;
[0013] Determine the three-dimensional spatial distance between each vertex in the mesh corresponding to the three-dimensional virtual clothing and the intersection point, and determine the UV spatial distance between each vertex in the mesh corresponding to the three-dimensional virtual clothing and the intersection point;
[0014] The combined distances between the vertex and the intersection point are determined based on the three-dimensional spatial distance and the UV spatial distance;
[0015] The local mesh formed by the vertices whose overall distance is less than a preset threshold is determined, and the clothing area corresponding to the local mesh is determined as the user's gaze area.
[0016] In one possible implementation, if the drawing precision of the gaze region determined based on the interest value is high precision, then drawing the gaze region based on the drawing precision includes:
[0017] Calculate the surface shortest path distance from each vertex in the local mesh of the viewing region to the intersection point, where the surface shortest path distance is the shortest path distance from the vertex along the surface of the local mesh to the intersection point;
[0018] The weight of each vertex in the local mesh is determined based on the shortest path distance of each vertex in the local mesh and the preset maximum influence radius, wherein the preset maximum influence radius is preset according to the material of the viewing region;
[0019] The drawing precision of vertices in the gaze region whose weight is greater than the preset weight is determined to be high precision, and the drawing precision of vertices in the gaze region whose weight is not greater than the preset weight is determined to be non-high precision.
[0020] Based on the determined drawing precision, the regions within the grid formed by each vertex in the gaze region are drawn respectively.
[0021] In one possible implementation, the method further includes:
[0022] If the rendering accuracy of the gaze region determined based on the interest value is high, then each vertex in the mesh of the gaze region is processed as follows:
[0023] Obtain the local vertex positions determined by the high-precision rendering method, the global vertex positions determined by the non-high-precision rendering method, and the smoothing correction vector;
[0024] The final position of the vertex is determined based on the local vertex position, the global vertex position, and the smoothing correction vector.
[0025] In one possible implementation, after drawing the gaze region based on the drawing precision, the method further includes:
[0026] If the user's latest interest value for the gaze region is lower than the preset interest value, then the weight of each vertex is subjected to exponential decay over time.
[0027] If the average weight of each vertex after the exponential decay process is lower than the preset weight, then the gaze region will no longer be drawn with high precision.
[0028] In one possible implementation, the step of drawing the regions within the grid formed by each vertex in the gaze region based on the determined drawing precision includes:
[0029] If the determined drawing accuracy is high, then the explicit finite element method is used to draw the region within the mesh formed by each vertex in the gaze region.
[0030] If the determined drawing accuracy is medium accuracy, then the position dynamics method is used to draw the region within the grid formed by each vertex in the gaze region;
[0031] If the determined drawing precision is low, then a mass spring system is used to draw the region within the grid formed by the vertices of the gaze region.
[0032] A second aspect of this application provides a device for drawing three-dimensional virtual clothing, comprising:
[0033] The data acquisition unit is configured to perform the following: obtain multi-dimensional data from the virtual reality device, the multi-dimensional data including: eye-tracking data, head posture data, gesture interaction data, and semantic context data;
[0034] The region determination unit is configured to perform: determining the user's screen gaze point based on the eye-tracking data, converting the screen gaze point into a 3D world ray, and determining the user's gaze region based on the intersection point of the 3D world ray and the 3D virtual clothing currently displayed by the virtual reality device;
[0035] The interest determination unit is configured to perform: determining the user's interest value for the gaze region based on the multi-dimensional data;
[0036] The accuracy determination unit is configured to perform: determining the rendering accuracy of the gaze region based on the interest value;
[0037] The drawing unit is configured to perform: drawing the gaze region based on the drawing precision.
[0038] A third aspect of this application provides a computer program product, including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement the three-dimensional virtual clothing drawing method of the first aspect or any implementation thereof.
[0039] A fourth aspect of this application provides an electronic device, including at least one processor and a memory connected to the processor, wherein:
[0040] The memory is used to store computer programs;
[0041] The processor is used to execute the computer program so that the electronic device can implement the three-dimensional virtual clothing drawing method of the first aspect or any implementation thereof.
[0042] The fifth aspect of this application provides a computer storage medium carrying one or more computer programs, which, when executed by an electronic device, enable the electronic device to implement the three-dimensional virtual clothing drawing method described in the first aspect or any implementation thereof.
[0043] By employing the above technical solutions, the three-dimensional virtual clothing rendering method and related apparatus provided in this application can determine the user's interest value by integrating multi-dimensional data such as eye movement, head movement, gestures, and semantics, and dynamically adjust the rendering accuracy of the virtual clothing accordingly. This concentrates computing resources on the areas that the user is truly interested in, significantly reducing the overall computing overhead. This enables high-fidelity clothing physics simulation to run smoothly on consumer-grade virtual reality devices, achieving an effective balance between ensuring visual realism and maintaining high system performance. Attached Figure Description
[0044] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0045] Figure 1 A flowchart illustrating a method for drawing three-dimensional virtual clothing provided in this application;
[0046] Figure 2A schematic diagram illustrating the process of determining the user's gaze area based on the intersection point of a 3D world ray and the 3D virtual clothing currently displayed by the virtual reality device, as provided in this application;
[0047] Figure 3 A schematic diagram illustrating the process of drawing the gaze region based on drawing precision provided in this application;
[0048] Figure 4 A schematic diagram illustrating the process of determining the final position of a vertex as provided in this application;
[0049] Figure 5 A schematic diagram of a three-dimensional virtual clothing rendering device provided in this application;
[0050] Figure 6 A schematic diagram of an electronic device provided in this application. Detailed Implementation
[0051] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.
[0052] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.
[0053] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.
[0054] Reference Figure 1 , Figure 1 This is a flowchart illustrating a method for drawing three-dimensional virtual clothing provided in an embodiment of this application. This method aims to achieve a dynamic balance between visual realism and system performance by sensing the user's focus of attention in real time and drawing the local areas of clothing that the user is interested in with high precision and high detail, while using low-resource-consumption drawing methods for other non-interested areas. Figure 1As shown in the embodiment of this application, a data processing method may include steps 101 to 105, which are described in detail below.
[0055] 101. Obtain multi-dimensional data from virtual reality devices, including eye-tracking data, head posture data, gesture interaction data, and semantic context data.
[0056] Multi-dimensional data refers to various types of data acquired from virtual reality (VR) devices and their environments that reflect the user's state and intentions. In this invention, these preferably include, but are not limited to: the user's eye-tracking data, head posture data, gesture interaction data, and semantic context data related to virtual objects. These data collectively form the basis for determining the user's attention.
[0057] The user's eye-tracking data can include screen gaze coordinates, gaze duration, and pupil diameter changes obtained through the eye-tracking sensors built into the headset. Eye-tracking data is the most direct basis for determining the user's visual focus. Head posture data can include head rotation and position information obtained through the headset's inertial measurement unit (IMU), which helps determine the user's natural observation posture. Gesture interaction data can include hand position and pointing obtained through controllers or hand tracking technology; a user's explicit gesture pointing is a strong attention signal. Semantic context data can include semantic tags and visual importance weights pre-set by artists from the clothing model asset file. For example, during modeling, the embroidery area is labeled "Right Sleeve Embroidery_Gold Thread," and a visual importance weight of 0.9 (out of 1.0) is set. Semantic context data is metadata pre-embedded by artists or designers when creating 3D clothing models. Semantic tags can include material type, suggested physical parameters, etc. When a virtual reality device displays 3D clothing, the virtual reality device can read the metadata pre-embedded in the 3D clothing model, which is then obtained by the device executing this method.
[0058] The user's eye movement data can be represented by an eye movement stability score. This application can calculate the eye movement stability score using the following formula:
[0059] ;
[0060] in: The eye-tracking stability score is a dimensionless score that quantifies the stability of a user's gaze behavior. A higher value indicates more stable gaze and a stronger user attentional intent. It's the natural exponential function, meaning an exponential function with the natural constant e as its base. Its function is to map the input value to a positive number, with an output of 1 when the input is 0, an output between 0 and 1 when the input is negative, and an output greater than 1 when the input is positive. However, since the input is negative here, the output is between 0 and 1. It represents the variance of the fixation point on the two-dimensional plane of the screen. It indicates the degree of dispersion of the fixation point coordinates on the screen within a statistical time window (e.g., the past 5 seconds). The larger the variance, the more dispersed the fixation point is and the worse the stability; the smaller the variance, the more concentrated the fixation point is and the better the stability. This is the variance normalization parameter, which can be a constant, such as 0.01. Its function is to normalize the variance, making the range of values for the exponential part reasonable. is the continuous gaze duration, measured in seconds. It represents the length of time a user continuously gazes at a specific area. C is the time normalization parameter, which can be 5 seconds. It represents the minimum gaze duration reference required to trigger a local high-precision simulation.
[0061] The above formula can transform the discrete "whether to gaze for C seconds" into a continuous confidence score. Even if the gaze time is slightly less than C seconds, a high score can still be obtained as long as it is stable enough.
[0062] Head posture data can be the angle between the line of sight and the head orientation. This application can calculate the angle between the line of sight and the head orientation using the following formula. :
[0063] ;
[0064] in, It is the vector of the line of sight; This refers to the head orientation vector. Specifically, when a user naturally observes the cuff, their head will tilt slightly downwards, and the angle between their line of sight and the direction their head is facing is typically within 30°. >0.5. If only the eyeballs move while the head remains still, the angle may exceed 60°. A negative value indicates that this is not a natural observation behavior.
[0065] Gesture interaction data can be the intensity of gesture intent, which can be calculated using the following formula. :
[0066] ;
[0067] Where Angle() calculates the angle between two direction vectors. ); This is the gesture intent strength, a scalar value between 0 and 1, representing the level of attention a user expresses through a gesture. The closer the value is to 1, the more accurate the gesture and the stronger the user's intent. `max()` is the maximum value function, ensuring the result is not less than 0. When the calculated value is less than 0, it is set to 0. The 0 in the formula is the lower limit to ensure the strength is non-negative. The 1 in the formula is the theoretical maximum value; the strength is 1 when the gesture is perfectly aligned with the target direction (angle is 0). It is the direction vector of the user's gesture. For example, the direction the user is pointing with a controller or finger. It is the direction vector from the user's hand position to the target area (such as embroidery), that is, the vector from the hand to the target point. This is the tolerance angle threshold. When the included angle is less than or equal to... When the gesture is in effect, it is considered valid; when it exceeds this time, it is considered valid. The intensity decreases linearly, and when the included angle reaches or exceeds... When the degree is zero, the intensity is 0 (because subtracting a fraction greater than or equal to 1 from the formula results in 1 minus a number greater than or equal to 1, then taking the maximum value of 0). Among these, It can be 15 degrees.
[0068] Semantic context data can be semantic matching degree, which can be calculated using the following formula. :
[0069] ;
[0070] in, This refers to semantic matching, used in multi-source attention fusion to consider the semantic importance and user preference of clothing areas. `EmbroideryImportance` is the importance weight, referring to the predefined importance weight of a certain area on the clothing (such as the embroidery area), with a value ranging from 0 to 1. `UserPreferenceFactor` is the user preference factor, reflecting the degree of a user's personal preference for a certain type of element, with a value ranging from 0 to 1. Optionally, different importance weights can be set for different areas; for example, the importance weight of the embroidery area can be set to 0.9, and the importance weight of the ordinary fabric area can be set to 0.3. The user preference factor can be calculated based on the user's historical behavior; if a user frequently views embroidery details, the value of this factor will be higher.
[0071] 102. Determine the user's screen gaze point based on eye-tracking data, convert the screen gaze point into a 3D world ray, and determine the user's gaze area based on the intersection point of the 3D world ray and the 3D virtual clothing currently displayed by the virtual reality device;
[0072] A 3D world ray is a virtual ray that originates from a virtual camera (usually representing the user's eye position) and passes through the user's gaze point on a 2D screen in a 3D virtual space. This ray is used to determine the user's gaze direction and potential gaze target in the 3D world, serving as a bridge connecting the user's 2D visual input with the 3D virtual scene.
[0073] The gaze area refers to a localized region on a 3D virtual garment that is the focus of the user's attention, determined by the user's gaze point. This region is the primary object for subsequent high-precision rendering or physical simulation. In a preferred embodiment of the invention, this region is represented as a local mesh composed of multiple vertices.
[0074] The goal of step 102 is to precisely map a point on the 2D screen to a specific area on the 3D virtual clothing model. First, using standard inverse projection transformation, the coordinates of the 2D screen gaze point are converted into a 3D ray emanating from the virtual camera (the user's eye). Then, collision detection between the ray and the 3D clothing model is used to find the first intersection point between the ray and the model's surface. This intersection point is the user's core gaze point. Centered on this core gaze point, a specific area is extended across the clothing surface; this area is defined as the user's gaze region.
[0075] Optionally, step 102 can convert the screen gaze point into a 3D world ray using the following inverse projection transformation formula:
[0076] ;
[0077] in, It is a three-dimensional world ray, pointing from the camera position to a point in three-dimensional space; These are screen space coordinates; It is the value of the depth buffer, which can be found using screen space coordinates. It represents the distance (i.e., depth) from the camera to the corresponding pixel on the screen. It is the inverse projection matrix of the virtual camera, used to perform coordinate system transformations to determine points in the three-dimensional space in front of the camera based on screen space coordinates and depth.
[0078] In practical applications, the specific process of determining the user's gaze area in step 102 based on the intersection point of the 3D world ray and the 3D virtual clothing currently displayed by the virtual reality device may include:
[0079] The system detects whether the 3D world ray intersects with the bounding box of the 3D virtual clothing currently displayed on the virtual reality device. If they intersect, it detects whether the 3D world ray intersects with the bounding box of a pre-defined region of interest on the 3D virtual clothing. If they intersect, the region of interest corresponding to the intersecting bounding box is determined as the user's gaze area.
[0080] Directly performing ray intersection detection on a high-precision clothing mesh (which may contain tens of thousands of triangles) is inefficient. Bounding boxes, on the other hand, have a simple structure (typically a cube), resulting in minimal computational complexity and high efficiency during ray intersection detection. Furthermore, by first performing intersection detection based on the bounding boxes of the 3D virtual clothing, and then further performing intersection detection based on the bounding boxes of pre-defined regions of interest, the system can quickly locate intersections while adhering to visual focus.
[0081] 103. Determine the user's interest value for the gaze area based on multi-dimensional data;
[0082] Interest score is a quantifiable numerical value used to assess the degree of attention or intensity of intent a user has towards a specific gaze area. This value is calculated using a pre-defined weighted model based on one or more dimensions of user data (such as eye-tracking stability, head-eye coordination, gesture directionality, semantic importance, etc.), and its value directly impacts subsequent rendering strategies. For example, if a user gazes steadily and for a long time at an area (eye-tracking data), while their head naturally faces that area (head posture data), or even points at it (gesture interaction data), and that area is marked as an important design detail (semantic context data), then the calculated interest score will be very high. Conversely, if the user's gaze merely sweeps across the area quickly, or if their body posture is inconsistent with their gaze, the interest score will be low. This fusion of multi-source information is far more reliable and accurate than relying solely on eye-tracking data.
[0083] Optionally, this application can calculate the user's interest value for the gaze region using the following formula. :
[0084] ;
[0085] in, , , , They are respectively , , , The weight, , , , The sum is 1. Optional. , , , The values can be 0.4, 0.3, 0.2, and 0.1.
[0086] In practical applications, the weighting coefficients in the formula can be adjusted according to different clothing types. For high-end custom-made clothing (such as wedding dresses), the semantic matching weight can be increased. (e.g., change to 0.2); for fast fashion try-on, increase the weight of eye-tracking stability. (For example, change it to 0.5).
[0087] 104. Determine the drawing precision of the gaze area based on the interest value;
[0088] Optionally, this application can set multiple thresholds and determine the rendering accuracy of the gaze region based on the comparison between the interest value and the threshold. For example: when the interest value... When the value is ≥0.75, it confirms that the user has a strong intention to observe, triggering a local high-precision simulation; when 0.6 ≤ the value of interest... When the value is less than 0.75, it enters a preparatory state, loads resources but does not start immediately; when the interest value... When the value is less than 0.6, maintain the global low-precision mode.
[0089] Rendering precision refers to the level of detail or computational resource investment used to render virtual objects (such as clothing). High precision typically means finer model details, more complex shader effects, and more realistic physics simulations, while low precision, on the contrary, primarily aims to save computational resources. This invention aims to dynamically adjust the rendering precision of different regions based on the value of interest.
[0090] Step 104 translates the quantified interest values into specific rendering strategies. Specifically, one or more interest value thresholds can be set. For example, when the interest value is above a high threshold, the system determines that the user is carefully observing the area, and therefore sets its rendering precision to high. When the interest value is below a low threshold, it is set to low precision. Interest values between the thresholds can correspond to medium precision. This mapping relationship directly links the allocation of computing resources to the user's level of attention.
[0091] 105. Draw the gaze area based on the drawing accuracy.
[0092] Step 105 can employ different techniques to handle regions of varying precision. For example, for gaze regions identified as high-precision, more complex physical simulation algorithms, higher-resolution textures, finer geometric models (e.g., through surface subdivision), and more computationally intensive lighting and shading models can be used to render rich details. Conversely, for low-precision regions, simplified models and algorithms are employed to maintain basic visual presentation with minimal computational overhead. In this way, this method concentrates limited computational power on the regions most relevant to the user, achieving a balance between overall performance and local realism.
[0093] Traditional methods for determining the gaze area based on three-dimensional spatial distance have a significant drawback: when there are wrinkles on the surface of clothing, a pattern that is continuous in texture (such as a complete piece of embroidery) may become distorted in three-dimensional space, and the vertices of its different parts may be spatially distant. If the gaze area is delineated solely based on three-dimensional spatial distance, it is likely that only a portion of the pattern can be selected, resulting in a visually fragmented and incomplete local mesh, severely affecting the integrity of the artistic expression. To solve this problem, such as... Figure 2 As shown, this embodiment proposes a dual-constraint method that combines three-dimensional space and UV space.
[0094] like Figure 2 As shown, Figure 1 In step 102, determining the user's gaze area based on the intersection point of the 3D world ray and the 3D virtual clothing currently displayed by the virtual reality device can specifically include:
[0095] 201. Determine the coordinates of the intersection point between the 3D world ray and the 3D virtual clothing currently displayed by the virtual reality device;
[0096] 202. Determine the 3D spatial distance between each vertex in the mesh corresponding to the 3D virtual clothing and the intersection point, and determine the UV spatial distance between each vertex in the mesh corresponding to the 3D virtual clothing and the intersection point;
[0097] In UV space, a two-dimensional texture coordinate system is used to map two-dimensional images (texture maps) onto the surface of a three-dimensional model. Distances in UV space represent distances on the texture map, reflecting the continuity of patterns or textures on the model's surface. This is crucial for ensuring the visual integrity of local areas.
[0098] Step 202 enables the method to consider not only the spatial relationships on the 3D model but also the texture continuity on the UV map when determining the gaze region.
[0099] 203. Determine the combined distances between the vertices and their intersection points based on the 3D spatial distance and the UV spatial distance;
[0100] Specifically, step 203 can calculate the 3D spatial distance and the UV spatial distance using a preset weighted formula, thereby obtaining a comprehensive distance between each vertex and its intersection point. An exemplary, but non-limiting, calculation formula is as follows:
[0101] ;
[0102] in, Represents vertices The overall distance; and These are the vertices 3D coordinates and UV coordinates; and These are the 3D coordinates and UV coordinates of the intersection point; and These are the preset 3D influence radius and UV influence radius, used to normalize the distance; and These are balanced weights. For example, they can be set to 0.6 and 0.4 respectively, indicating that when determining a region, both spatial proximity and texture continuity need to be considered, with spatial proximity having a slightly higher weight.
[0103] According to this formula, even if a vertex is slightly farther from the foveation point in 3D space due to wrinkles, its combined distance can still be very small as long as it is close to the foveation point on the UV map (i.e., belongs to the same continuous pattern).
[0104] Among them, the preset three-dimensional influence radius Adjustments can be made based on the fabric material using the following formula:
[0105] ;
[0106] MaterialSoftness is a parameter set in the material sphere. For example, if the material is silk, then MaterialSoftness=0.7; if the material is cotton, then MaterialSoftness=0.3; if the material is denim, then MaterialSoftness=-0.2.
[0107] Preset UV influence radius Adjustments can be made based on pattern importance using the following formula:
[0108] .
[0109] 204. Determine the local mesh formed by vertices whose overall distance is less than a preset threshold, and determine the clothing area corresponding to the local mesh as the user's gaze area.
[0110] Step 204 identifies all vertices whose combined distance is less than a preset threshold (e.g., 1.0), and defines the local mesh formed by these vertices as the user's gaze region. This gaze region, extracted through a dual-constraint method, ensures both spatial locality and textural continuity, thus providing a visually accurate and natural computational domain for subsequent high-precision rendering. This significantly enhances the artistic effect and realism of local detail simulation.
[0111] Furthermore, in another preferred embodiment, the implementation method of high-precision rendering is refined. After determining the rendering precision of the gaze region to be high-precision based on the interest value, simply applying high-precision simulation uniformly to the entire region is still insufficiently precise and cannot achieve a smooth visual transition. To address this issue, this embodiment introduces a hierarchical weighted field construction method based on geodesic distance.
[0112] like Figure 3 As shown, if the rendering accuracy of the gaze region determined in step 104 based on the interest value is high, then Figure 1 Step 105, shown, involves drawing the gaze area based on drawing precision, which may specifically include:
[0113] 301. Calculate the shortest path distance from each vertex in the local mesh of the viewing region to the intersection point on the surface. The shortest path distance on the surface is the shortest path distance from the vertex to the intersection point along the surface of the local mesh.
[0114] Surface shortest path distance (geodetic distance): refers to the length of the shortest path connecting two vertices on the surface of a 3D model mesh. Unlike the straight-line (Euclidean) distance through the interior of the model, it more realistically reflects how forces, deformations, or influences propagate on curved surfaces, making it an ideal metric for constructing smooth weighted fields.
[0115] The reason for using geodesic distance instead of simple three-dimensional Euclidean distance is that geodesic distance propagates along the surface of the clothing mesh, which can more realistically reflect the transmission path of physical influences (such as force and deformation) on the fabric, thus constructing a more natural weight field.
[0116] 302. Determine the weight of each vertex in the local mesh based on the shortest path distance of each vertex and the preset maximum influence radius, wherein the preset maximum influence radius is preset according to the material of the viewing area;
[0117] 303. Define the drawing precision of vertices in the gaze region whose weight is greater than the preset weight as high precision, and define the drawing precision of vertices in the gaze region whose weight is not greater than the preset weight as non-high precision;
[0118] 304. Based on the determined drawing precision, draw the regions within the grid formed by each vertex in the gaze region.
[0119] After calculating the geodesic distance of each vertex Then, it is necessary to determine the distance and a preset maximum influence radius. To determine the weight of the vertex. This maximum radius of influence It's not fixed; it can be preset based on the material of the clothing in the area being viewed. For example, for soft materials like silk, which have a wide range of deformation, a larger setting can be set. For stiff materials like denim, which are prone to localized deformation, a smaller [specific element] is set. An example weight calculation function (smooth step function) is as follows:
[0120] ;
[0121] when hour, .in, It is the vertex The weights range from 0 to 1; It is the vertex Geodesic distance to the point of fixation; This is the maximum influence radius. This function ensures that the weight is 1 at the center of the fixation point and smoothly decays to 0 at the maximum influence radius.
[0122] After obtaining the weight of each vertex, the gaze region can be further subdivided based on the weight value. For example, the region formed by vertices with a weight greater than a preset weight (e.g., 0.7) is defined as the high-precision core region, the region formed by vertices with a weight between 0.3 and 0.7 is defined as the medium-precision transition region, and the region formed by vertices with a weight no greater than 0.3 is defined as the low-precision edge region. Finally, based on this multi-level rendering precision, the regions within the mesh formed by each vertex in the gaze region are rendered separately. For example, the high-precision core region uses the most computationally intensive finite element physical simulation, the medium-precision transition region uses positional dynamics simulation, and the low-precision edge region uses the simplest mass-spring model. This hierarchical processing not only achieves fine-grained on-demand allocation of computing resources, but more importantly, it ensures a seamless transition of visual effects between different precision regions through a smooth weight field, avoiding abrupt breaks at the edges of "highlight areas".
[0123] Among them, the maximum radius of influence This is not a fixed value; it can be dynamically adjusted based on the fabric material using the following formula:
[0124] ;
[0125] MaterialStiffness is a parameter set in the material sphere, which allows different materials to have different maximum influence radii. For example, silk... ≈0.13m; cotton cloth ≈0.10m; Cowboy's ≈0.08m. Thus, the deformation of soft fabrics spreads over a wide range and requires a larger radius of influence; the deformation of hard fabrics is localized and requires a smaller radius of influence.
[0126] Optionally, step 304 may specifically include:
[0127] If the determined rendering precision is high precision, then the explicit finite element method (Explicit FEM) is used to render the region within the mesh formed by each vertex in the gaze region.
[0128] If the determined drawing accuracy is medium accuracy, then the position dynamics method is used to draw the region within the grid formed by each vertex in the gaze region;
[0129] If the determined rendering precision is low, then a mass spring system is used to render the region within the grid formed by the vertices of the viewing region.
[0130] Specifically, the explicit finite element method can use the following linear elastic model:
[0131] ;
[0132] Where: M is the mass matrix; C is the damping matrix; K is the stiffness matrix, determined based on the Young's modulus and Poisson's ratio set in the material sphere; It is an external force (such as gravity, wind force, collision force). It is an inertial force term, which is proportional to acceleration; It is the damping force term, which is proportional to the velocity; It is the elastic restoring force term, which is proportional to the displacement.
[0133] When using the position dynamics method for drawing, the constraints can be solved iteratively as follows:
[0134] ;
[0135] in, It is the position correction amount. These are the constraint strength coefficients, and M is the mass matrix. These are constraint functions (such as distance constraints and bending constraints).
[0136] The spring force of a point mass spring system can be calculated using the following formula:
[0137] ;
[0138] Where k is the spring stiffness. F ij x is the force exerted by particle j on particle i, or the force exerted on particle i by the spring between them. Typically, this is a vector. i x is the position vector of point i. j It is the position vector of particle j. It is the Euclidean distance between particles i and j, which is the current length of the spring. It is the original length (natural length) of the spring, that is, the length of the spring when it is not under any force. It is the unit vector (direction vector) pointing from particle j to particle i.
[0139] The formula for calculating spring force indicates that the magnitude of the spring force is directly proportional to the spring's elongation (the difference between the current length and the natural length), and the direction is along the spring's direction. The negative sign indicates that the force is a restoring force: if the current length is greater than the natural length, the force is negative (attractive, pointing towards the other side); if the current length is less than the natural length, the force is positive (repulsive, pushing away).
[0140] Building upon the above embodiments, a practical application issue to consider is how the system should smoothly exit high-precision rendering mode when a user loses interest in a certain area. Abruptly switching back to low-precision mode would create a visual jarring and unnatural experience. Therefore, this application provides a smooth exit mechanism.
[0141] exist Figure 3 Based on the method shown, another method for drawing three-dimensional virtual clothing provided in this embodiment of the invention, after drawing the gaze area based on the drawing accuracy, may further include:
[0142] Step 1: If the user's latest interest value for the gaze area is lower than the preset interest value, then the weight of each vertex is subjected to exponential decay over time.
[0143] Step 2: If the average weight of each vertex after exponential decay is lower than the preset weight, then the gaze area will no longer be drawn with high precision.
[0144] Understandably, in practical applications, Figure 1Each step shown needs to be executed multiple times to adapt the rendering to changes in the user's gaze area. After completing one rendering, if the latest interest value determined in steps 101 to 103 is lower than the preset interest value, it indicates that the user's gaze area may have changed. In this case, this application does not immediately end the high-precision rendering of the gaze area before the change, but gradually reduces the number of vertices rendered with high precision by progressively decaying the weight of each vertex, achieving a gradual transition of the gaze area from generally high-precision rendering to generally non-high-precision rendering, without visual jumps. That is, after performing exponential decay processing on the weight of each vertex over time, it returns to step 303 and subsequent steps.
[0145] Furthermore, when the average weight of each vertex after exponential decay is lower than the preset weight, it indicates that the user's gaze region has changed. Based on the aforementioned exponential decay of the weight of each vertex over time, the gaze region gradually transitions from generally high-precision rendering to generally non-high-precision rendering. In this case, this application can directly stop high-precision rendering of the gaze region without needing to do so. This reduces the computational resources required to render regions that the user is no longer interested in.
[0146] Steps one and two above are executed sequentially. As the weight of each vertex undergoes exponential decay over time, the average weight of each vertex after exponential decay will inevitably fall below the preset weight, thus triggering step two. Through steps one and two, this application achieves the following: when the latest interest value is lower than the preset interest value, the gaze area is first gradually transitioned from general high-precision rendering to general non-high-precision rendering over a period of time, and then high-precision rendering of the gaze area is directly stopped.
[0147] Specifically, an exemplary formula for exponentially decaying the weights over time is as follows:
[0148] ;
[0149] in, Vertex V i The dynamic weight at the current time t; These are the original weights before the decay is triggered; It is the starting point when the interest value falls below the threshold; It is a time decay constant, such as 0.5 seconds, which controls the rate at which the weights decay. This means that in the initial stage after the user looks away, the effect of the high-precision rendering will gradually and smoothly weaken, rather than abruptly stop.
[0150] The system continuously calculates the average weight of all vertices within the gaze region after exponential decay processing. If this average weight falls below a preset minimum weight (e.g., 0.01), the system determines that the impact of the high-precision simulation is negligible. Only then does it officially stop rendering the gaze region with high precision and release related computing resources (e.g., unloading the high-precision model, stopping the independent physics solver). This smooth exit mechanism with inertia ensures the continuity and naturalness of the user experience and avoids interference caused by sudden changes in system state.
[0151] In another preferred embodiment, also for the implementation of high-precision rendering, this application provides a different technical approach that focuses more on how to seamlessly integrate local high-precision physical simulation results with global low-precision simulation results. For example... Figure 4 As shown, if the drawing accuracy of the gaze region determined based on the interest value is high, then each vertex in the grid of the gaze region can be processed as follows to determine its final position.
[0152] 401. Obtain the local vertex positions determined by the high-precision rendering method, the global vertex positions determined by the non-high-precision rendering method, and the smoothing correction vector;
[0153] 402. Determine the final position of the vertex based on the local vertex position, the global vertex position, and the smoothing correction vector.
[0154] The smoothing correction vector is a correction vector used to adjust the position of a vertex. Its calculation is based on the motion trends of other vertices in the vertex's neighborhood. Its main function is to smooth the boundaries of regions with different simulation accuracies, so as to avoid visual discontinuities or tears caused by inconsistencies between local high-precision simulations and global low-precision simulations.
[0155] First, three key pieces of location information need to be obtained. The first is the local high-precision location. The first is the vertex position, calculated independently by applying high-precision rendering techniques (e.g., high-iteration finite element method or position dynamics) to the local mesh of the viewing region. The second is the global low-precision position. This is the base position of the vertex calculated by applying a uniform, computationally inefficient, non-high-precision rendering method (e.g., a low-iteration point spring system) to the entire 3D virtual costume. The third is the smoothing correction vector. This is an additional correction calculated to eliminate potential tearing or discontinuity at the boundaries of high and low precision regions.
[0156] Then, based on these three location pieces of information, the final position of the vertex is determined through a weighted blending calculation. This calculation process uses vertex weights calculated based on geodesic distances. An exemplary, but non-limiting, blending formula is as follows:
[0157] ;
[0158] in, Vertex V i The final position; It is the weight of that vertex; It is a local high-precision position; It is a global low-precision position; It is a smoothing correction vector; It is a smoothing coefficient. The physical meaning of this formula is: for core region vertices with a weight of 1, their final position is mainly determined by high-precision local simulation; for edge region vertices with a weight of 0, their final position is mainly determined by low-precision global simulation; and for transition region vertices with a weight between 0 and 1, their final position is a linear interpolation of high and low precision results, with an additional smoothing correction factor.
[0159] The advantage of this method lies in its ability to seamlessly "stitch together" two physical simulation results with different precisions and potentially completely different algorithms through a unified mathematical framework. The existence of the smoothing correction vector acts as a "lubricant," further ensuring that the movement of vertices is continuous and coordinated at the boundaries between different precision regions. This makes the entire virtual costume appear as a complete, unified, and dynamic whole, so that even if the user's gaze moves between different regions, no trace of switching simulation precision will be noticeable.
[0160] Smoothing correction vector It can be calculated using the following formula:
[0161] ;
[0162] in: It is the smooth displacement vector of vertex i. It is an increment that represents the additional displacement that needs to be added to make the movement of vertex i smoother.
[0163] It is the position vector of the adjacent vertex j in the previous frame (or the previous time step).
[0164] It is the position vector of the adjacent vertex j in the current frame (or the current time step).
[0165] This is the position change vector of the adjacent vertex j from the previous frame to the current frame. Note that this is a negative velocity (if divided by the time step). This difference reflects the motion of vertex j.
[0166] It is the Euclidean distance between vertex i and vertex j.
[0167] The smoothing radius is a parameter that controls the rate of weight decay. The farther a vertex is from vertex i, the smaller its influence.
[0168] It is a Gaussian decay function used to assign weights based on distance. When the distance is 0, the weight is 1; as the distance increases, the weight gradually decreases.
[0169] The above calculation of the smoothing correction vector The formula can calculate the positional changes between adjacent vertices and propagate them using Gaussian decay. This ensures that even with weights... The changes are dramatic, but the positional changes are also smooth.
[0170] In practical applications, this application can also use the following formula to determine the boundary vertices (weights) of the local mesh. (Close to 0 but greater than 0), add extra constraints to prevent tearing:
[0171] ;
[0172] in, It is the final boundary vertex position; It refers to the location of the local boundary vertex; This refers to the position of the global lower bound vertex. This formula ensures that the boundary vertex is more aligned with the global position, avoiding the tearing caused by the "pulling" of the clothing by local simulations.
[0173] To better understand the complete workflow of this invention and the synergistic effect of its various technical features, a specific application scenario will be used as an example to illustrate an embodiment that integrates all the aforementioned preferred technical features. Assume a user is in a virtual reality fitting room, trying on a silk cheongsam adorned with exquisite gold thread embroidery. This embodiment will fully demonstrate the entire process from the user's gaze at the embroidery to the system's response.
[0174] First, the user wears the VR device, their gaze falling on the gold thread embroidery on the right sleeve of the cheongsam. The system starts, and the data acquisition module begins working, acquiring multi-dimensional data from the VR device: the eye-tracking module captures the user's gaze remaining stably (with low jitter variance) on the sleeve area for a prolonged period (e.g., more than 2 seconds); IMU data shows that the user's head also naturally turns and tilts slightly downwards for easier observation; hand tracking shows the user raises their hand, with virtual fingers pointing in the general direction of the embroidery; simultaneously, the system reads from the clothing assets that the embroidery area has been pre-defined by the artist with a semantic label of visual importance as high as 0.9.
[0175] Next, the interest value calculation module performs fusion calculations on this data. Based on a preset weighting formula (e.g., ...), ... ), calculated comprehensive interest value The accuracy reached 0.8, far exceeding the high-precision trigger threshold of 0.75. The system determined that the user had a strong intention to observe and sent a trigger signal for high-precision drawing to subsequent modules.
[0176] The gaze region determination module receives the trigger signal and initial gaze point coordinates. It immediately performs a double-constraint distance calculation on the complete mesh of the cheongsam. For each vertex around the cuff, the module calculates its 3D spatial distance and UV spatial distance to the gaze point, and synthesizes them into a composite distance according to weights (e.g., 0.6 and 0.4). Since the embroidery is continuous on the UV map, even if some threads are far from the gaze point in the 3D model due to sleeve folds, their composite distance is still small. Finally, all vertices with a composite distance less than the threshold are extracted to form a local mesh that contains the complete embroidery pattern and is relatively concentrated in space, serving as the gaze region.
[0177] Subsequently, the rendering accuracy determination module begins constructing a hierarchical weight field on this local mesh. Using the gaze point as the source, it calculates the geodesic distances along the mesh surface for all other vertices within the local mesh using Dijkstra's algorithm. Simultaneously, based on the preset softness parameters of the cheongsam's "silk" material, a relatively large maximum influence radius is dynamically calculated. Then, using a smooth step function, the weight of each vertex is calculated. In this way, a weight field centered on the gaze point and with weights smoothly decreasing from 1 to 0 is constructed, forming a high-precision core region, a medium-precision transition region, and a low-precision edge region.
[0178] Finally, the vertex position calculation module and the rendering engine take over the work. The vertex position calculation module performs two simulations in parallel: one is a fast but coarse global low-precision simulation of the entire cheongsam to obtain the global low-precision positions of all vertices. Another approach is to perform a fine-grained, high-precision local simulation only on the local mesh of the region being observed, thereby obtaining the local high-precision positions of the vertices within that region. Then, for each vertex, the module calculates its weights. Using a weighted mixing formula, and The mixture is then applied and superimposed with a smoothing correction vector calculated based on the neighborhood motion. Finally, the final position of the vertex is calculated. The rendering engine uses these final positions to draw the cheongsam, allowing users to see in VR the extremely delicate and realistic flow of light and shadow and physical deformation of the gold thread embroidered on the cuffs as the arm moves slightly, while the rest of the cheongsam maintains a natural and smooth overall dynamic.
[0179] When the user finishes observing the embroidery and looks away, the interest value... The weights decrease rapidly. The system triggers a smooth exit mechanism, gradually reducing the weight values of all vertices in the weight field over approximately 0.5 seconds using an exponential decay function. During this process, the final vertex position calculation increasingly relies on the results of the global low-precision simulation, while the influence of the high-precision simulation fades out smoothly. When the average weight falls below a threshold, the local high-precision simulator is completely shut down, releasing computational resources. The entire process is imperceptible to the user. This embodiment, by combining all the above technical features, achieves a significant reduction in average computational load while providing an extremely detailed and realistic experience, making a high-quality virtual clothing experience possible on ordinary VR devices.
[0180] The above describes a method for drawing three-dimensional virtual clothing according to an embodiment of this application. The following describes the apparatus for performing the above-described method for drawing three-dimensional virtual clothing.
[0181] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of a three-dimensional virtual clothing rendering device provided in an embodiment of this application. Figure 5 As shown, the rendering device for the three-dimensional virtual clothing may include:
[0182] The data acquisition unit 501 is configured to perform the following: obtain multi-dimensional data from the virtual reality device, the multi-dimensional data including: eye tracking data, head posture data, gesture interaction data, and semantic context data;
[0183] The region determination unit 502 is configured to perform: determine the user's screen gaze point based on the eye-tracking data, convert the screen gaze point into a three-dimensional world ray, and determine the user's gaze region based on the intersection point of the three-dimensional world ray and the three-dimensional virtual clothing currently displayed by the virtual reality device;
[0184] Interest determination unit 503 is configured to perform: determining the user's interest value for the gaze region based on the multi-dimensional data;
[0185] The accuracy determination unit 504 is configured to perform: determining the drawing accuracy of the gaze region based on the interest value;
[0186] The drawing unit 505 is configured to perform: drawing the gaze region based on the drawing precision.
[0187] In one possible implementation, the region determination unit 502 determines the user's gaze region based on the intersection point of the three-dimensional world ray and the three-dimensional virtual clothing currently displayed by the virtual reality device, and is specifically configured to perform:
[0188] The coordinates of the intersection point between the 3D world ray and the 3D virtual clothing currently displayed by the virtual reality device are determined; the 3D spatial distance between each vertex in the mesh corresponding to the 3D virtual clothing and the intersection point is determined; the UV spatial distance between each vertex in the mesh corresponding to the 3D virtual clothing and the intersection point is determined; the combined distance between each vertex and the intersection point is determined based on the 3D spatial distance and the UV spatial distance; the local mesh formed by each vertex whose combined distance is less than a preset threshold is determined, and the clothing area corresponding to the local mesh is determined as the user's gaze area.
[0189] In one possible implementation, the rendering unit 505 is configured to perform the following: if the rendering precision of the gaze region determined according to the interest value is high precision, calculate the surface shortest path distance from each vertex in the local mesh of the gaze region to the intersection point, wherein the surface shortest path distance is the shortest path distance from the vertex along the surface of the local mesh to the intersection point; determine the weight of each vertex in the local mesh based on the shortest path distance of each vertex in the local mesh and a preset maximum influence radius, wherein the preset maximum influence radius is preset according to the material of the gaze region; determine the rendering precision of vertices in the gaze region whose weight is greater than the preset weight as high precision, and determine the rendering precision of vertices in the gaze region whose weight is not greater than the preset weight as non-high precision; and render the region within the mesh formed by each vertex in the gaze region based on the determined rendering precision.
[0190] In one possible implementation, Figure 5 The apparatus further includes a position determination unit configured to perform the following processing on each vertex of the grid in the gaze region if the drawing accuracy of the gaze region determined based on the interest value is high accuracy:
[0191] Obtain the local vertex positions determined by the high-precision rendering method, the global vertex positions determined by the non-high-precision rendering method, and the smoothing correction vector; determine the final position of the vertex based on the local vertex positions, the global vertex positions, and the smoothing correction vector.
[0192] In one possible implementation, Figure 5 The apparatus further includes a decay unit configured to perform the following: after the drawing unit 505 draws the gaze region based on the drawing precision, if the user's latest interest value for the gaze region is lower than a preset interest value, then the weight of each vertex is subjected to exponential decay processing over time; if the average weight of each vertex after the exponential decay processing is lower than a preset weight, then the gaze region is no longer drawn with high precision.
[0193] In one possible implementation, the drawing unit 505 draws the regions within the mesh formed by each vertex in the gaze region based on the determined drawing precision, and is specifically configured to perform:
[0194] If the determined drawing accuracy is high, then the explicit finite element method is used to draw the region within the grid formed by each vertex in the gaze region; if the determined drawing accuracy is medium, then the position dynamics method is used to draw the region within the grid formed by each vertex in the gaze region; if the determined drawing accuracy is low, then a mass-spring system is used to draw the region within the grid formed by each vertex in the gaze region.
[0195] This application also provides an electronic device in its embodiments. (See reference...) Figure 6 The diagram illustrates a structural schematic of an electronic device suitable for implementing the three-dimensional virtual clothing rendering method in the embodiments of this application. The electronic device in the embodiments of this application may include, but is not limited to, fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, virtual reality devices, etc. Figure 6 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0196] like Figure 6As shown, the electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. When the electronic device is powered on, the RAM 603 also stores various programs and data required for the operation of the electronic device. The processing unit 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.
[0197] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, memory cards, hard drives, etc.; and communication devices 609. Communication device 609 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.
[0198] This application also provides a computer program product including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the three-dimensional virtual clothing drawing methods provided in this application.
[0199] This application also provides a computer-readable storage medium that carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any of the three-dimensional virtual clothing drawing methods provided in this application.
[0200] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.
[0201] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0202] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.
[0203] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
Claims
1. A method for drawing three-dimensional virtual clothing, characterized in that, include: Multi-dimensional data is obtained from virtual reality devices, including eye-tracking data, head posture data, gesture interaction data, and semantic context data. The user's screen gaze point is determined based on the eye-tracking data, and the screen gaze point is converted into a 3D world ray. The user's gaze area is determined based on the intersection point of the 3D world ray and the 3D virtual clothing currently displayed by the virtual reality device. The user's interest value in the gaze area is determined based on the multi-dimensional data. The drawing accuracy of the gaze region is determined based on the interest value; The gaze region is drawn based on the stated drawing accuracy.
2. The method according to claim 1, characterized in that, Determining the user's gaze area based on the intersection point of the three-dimensional world ray and the three-dimensional virtual clothing currently displayed by the virtual reality device includes: Determine the coordinates of the intersection point between the three-dimensional world ray and the three-dimensional virtual clothing currently displayed by the virtual reality device; Determine the three-dimensional spatial distance between each vertex in the mesh corresponding to the three-dimensional virtual clothing and the intersection point, and determine the UV spatial distance between each vertex in the mesh corresponding to the three-dimensional virtual clothing and the intersection point; The combined distances between the vertex and the intersection point are determined based on the three-dimensional spatial distance and the UV spatial distance; The local mesh formed by the vertices whose overall distance is less than a preset threshold is determined, and the clothing area corresponding to the local mesh is determined as the user's gaze area.
3. The method according to claim 1, characterized in that, If the drawing precision of the gaze region determined based on the interest value is high precision, then drawing the gaze region based on the drawing precision includes: Calculate the surface shortest path distance from each vertex in the local mesh of the viewing region to the intersection point, where the surface shortest path distance is the shortest path distance from the vertex along the surface of the local mesh to the intersection point; The weight of each vertex in the local mesh is determined based on the shortest path distance of each vertex in the local mesh and the preset maximum influence radius, wherein the preset maximum influence radius is preset according to the material of the viewing region; The drawing precision of vertices in the gaze region whose weight is greater than the preset weight is determined to be high precision, and the drawing precision of vertices in the gaze region whose weight is not greater than the preset weight is determined to be non-high precision. Based on the determined drawing precision, the regions within the grid formed by each vertex in the gaze region are drawn respectively.
4. The method according to claim 1, characterized in that, The method further includes: If the rendering accuracy of the gaze region determined based on the interest value is high, then each vertex in the mesh of the gaze region is processed as follows: Obtain the local vertex positions determined by the high-precision rendering method, the global vertex positions determined by the non-high-precision rendering method, and the smoothing correction vector; The final position of the vertex is determined based on the local vertex position, the global vertex position, and the smoothing correction vector.
5. The method according to claim 3, characterized in that, After drawing the gaze region based on the stated drawing precision, the method further includes: If the user's latest interest value for the gaze region is lower than the preset interest value, then the weight of each vertex is subjected to exponential decay over time. If the average weight of each vertex after the exponential decay process is lower than the preset weight, then the gaze region will no longer be drawn with high precision.
6. The method according to claim 3, characterized in that, The process of drawing the regions within the grid formed by each vertex in the gaze region based on the determined drawing precision includes: If the determined drawing accuracy is high, then the explicit finite element method is used to draw the region within the mesh formed by each vertex in the gaze region. If the determined drawing accuracy is medium accuracy, then the position dynamics method is used to draw the region within the grid formed by each vertex in the gaze region; If the determined drawing precision is low, then a mass spring system is used to draw the region within the grid formed by the vertices of the gaze region.
7. A device for drawing three-dimensional virtual clothing, characterized in that, include: The data acquisition unit is configured to perform the following: obtain multi-dimensional data from the virtual reality device, the multi-dimensional data including: eye-tracking data, head posture data, gesture interaction data, and semantic context data; The region determination unit is configured to perform: determining the user's screen gaze point based on the eye-tracking data, converting the screen gaze point into a 3D world ray, and determining the user's gaze region based on the intersection point of the 3D world ray and the 3D virtual clothing currently displayed by the virtual reality device; The interest determination unit is configured to perform: determining the user's interest value for the gaze region based on the multi-dimensional data; The accuracy determination unit is configured to perform: determining the rendering accuracy of the gaze region based on the interest value; The drawing unit is configured to perform: drawing the gaze region based on the drawing precision.
8. A computer program product, characterized in that, It includes computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the method for drawing three-dimensional virtual clothing as described in any one of claims 1 to 6.
9. An electronic device, characterized in that, It includes at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program to enable the electronic device to implement the method for drawing three-dimensional virtual clothing as described in any one of claims 1 to 6.
10. A computer storage medium, characterized in that, The storage medium carries one or more computer programs that, when executed by an electronic device, enable the electronic device to implement the method for drawing three-dimensional virtual clothing as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Rendering method, device and system based on fixation point information and display equipment
CN110378914A
Display processing method of virtual reality scene and virtual reality equipment
CN115509345A
Dynamic rendering method and system of virtual reality, storage medium and electronic equipment
CN121661223A
Smart culture guide system based on AR and knowledge graph
CN121724797A
System and method for ai-driven multi-modal content generation and immersive interaction experiences
US20250352907A1