A design scheme confirmation method and system based on 3D model
By combining virtual lighting model and AR virtual reality technology, efficient real-time rendering and user interaction of three-dimensional furniture models are achieved, solving the problems of slow rendering speed and inability to achieve real-time interaction in the existing technology, and significantly improving the confirmation efficiency and visual accuracy of the design scheme.
Patent Information
- Application Number
- CN202411210953.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-30
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2044-08-30
AI Technical Summary
The prior art has shortcomings in the rendering and user interaction of three-dimensional furniture models, which cannot fully reflect the real effect of furniture in different lighting conditions and environments, and the rendering speed is slow, so real-time interaction with users cannot be achieved.
By collecting users' preference data for furniture design, two-dimensional hand-drawn drawings are generated, and image recognition technology is used to identify two-dimensional hand-drawn drawings to generate three-dimensional furniture models. Real-time rendering is performed in combination with virtual lighting models, and the three-dimensional furniture model is combined with the user's room real-life picture through AR virtual reality technology, and the three-dimensional furniture model is automatically updated based on user feedback.
It realizes efficient real-time rendering in complex environments, and can dynamically simulate the lighting conditions and material reflection effects in the user's room, making the rendering effect of the three-dimensional furniture model more realistic, significantly improving the confirmation efficiency and visual accuracy of the design plan, and meeting the personalized needs of users.
Smart Images

Figure CN119129019B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of furniture design generation, and in particular to a design scheme confirmation method and system based on a 3D model. Background Art
[0002] With the popularization of digital design tools, the furniture industry has gradually entered a new era with computer-aided design (CAD) as the core. Traditional furniture design methods rely on manual drawings and the display of actual samples, which is inefficient and difficult to meet the needs of modern users for personalization and real-time feedback. In recent years, the introduction of three-dimensional furniture models has enabled stores to present the structure and appearance of furniture more intuitively, significantly improving the accuracy of the design. However, existing rendering technologies often only stay at the generation of static images and cannot fully reflect the real effects of furniture under different lighting conditions and environments. In addition, these technologies usually require a lot of computing resources, have slow rendering speeds, and cannot achieve real-time interaction with users. These limitations make it difficult for users to fully understand the final effect of the design plan during the design confirmation process, thereby affecting user decision-making and satisfaction. Summary of the invention
[0003] In view of the problems existing in the above-mentioned existing design solution confirmation method and system based on 3D model, the present invention is proposed.
[0004] Therefore, the problem to be solved by the present invention is that the prior art still has many deficiencies in the rendering and user interaction of three-dimensional furniture models.
[0005] To solve the above technical problems, the present invention provides the following technical solutions: a design scheme confirmation method based on 3D models, which includes collecting user preference data on furniture design to generate a two-dimensional hand-drawn picture, identifying the two-dimensional hand-drawn picture through image recognition technology and generating a three-dimensional furniture model; rendering the three-dimensional furniture model and modifying it in real time according to user feedback to generate a rendering, and generating a color scheme for the furniture according to the user preference data; combining the three-dimensional furniture model with the user's room real-life picture through AR virtual reality technology to display the effect, and automatically updating the three-dimensional furniture model according to the user's feedback data to obtain the final furniture design scheme.
[0006] As a preferred solution of the design scheme confirmation method based on 3D model described in the present invention, wherein: the collecting of user preference data on furniture design to generate a two-dimensional hand-drawn drawing refers to collecting user preference data on furniture size, furniture style and material type, and producing a two-dimensional hand-drawn drawing for furniture design according to the user's preference data.
[0007] As a preferred solution of the design scheme confirmation method based on 3D model of the present invention, wherein: the recognition of the two-dimensional hand drawing by image recognition technology and the generation of the three-dimensional furniture model refers to obtaining the generated two-dimensional hand drawing, preprocessing the image, and using the Canny edge detection algorithm to calculate the horizontal and vertical gradients of the image;
[0008] Extract closed contours in the image based on edge detection results, perform shape recognition on the extracted contours, preliminarily classify the contours based on the characteristics of geometric elements in the image, identify the structural relationship between geometric elements, and subdivide the geometric elements based on their spatial positions and connection methods;
[0009] Confirm the structural relationship between geometric elements and connect the two-dimensional elements into a complete geometric image through line segment connection technology;
[0010] Map the plane coordinate system in the 2D drawing to the 3D space coordinate system:
[0011] Discretize the two-dimensional region Q to form a series of discrete two-dimensional points (x i ,y i ), where i represents the index of the point;
[0012] For every two-dimensional point (x i ,y i ), use the height mapping formula to calculate the corresponding height value z i :
[0013]
[0014] Where z0 is the reference height, Δl i is a two-dimensional point (x i ,y i ) corresponding to the length value, L is the standard length in the drawing, and H is the corresponding height value;
[0015] For each discrete point, the two-dimensional point and the calculated height are combined to generate a three-dimensional coordinate point (x i ,y i ,z i ):
[0016]
[0017] The three-dimensional coordinate point cloud data is triangulated to generate a surface mesh, and the curves and complex surfaces are converted into smooth surfaces through the surface generation algorithm. The gaps between the point clouds are filled to obtain the three-dimensional furniture model M (x, y, z).
[0018] As a preferred solution of the design scheme confirmation method based on 3D model of the present invention, wherein: the rendering of the three-dimensional furniture model and real-time modification according to user feedback to generate the effect diagram refers to collecting background images of the furniture installation environment uploaded by the user, including images of different angles of the room where the furniture will be installed, graying the uploaded environment images after pre-processing the images, converting the color images into grayscale images, using the Sobel operator to calculate the brightness gradient of each pixel, and generating a brightness gradient map;
[0019] Calculate the gradient direction and gradient intensity of each pixel according to the calculated brightness gradient ▽I(X,Y);
[0020] Perform cluster analysis on the gradient directions of all pixels, and for each cluster center, calculate the incident angle θ relative to the object position:
[0021]
[0022] Where θ is the incident angle of the light source, (x'0, y'0) is the coordinate of the object, (x' s ,y' s ) are the coordinates of the light source;
[0023] The average gradient intensity of the pixels in the pixel area of each cluster center is counted to calculate the light source intensity R:
[0024]
[0025] In the formula, G(X C ,Y C ) is the gradient strength of the Cth pixel, and M' represents the total number of pixels;
[0026] Construct a virtual lighting model K(x,y,z) based on the calculated light intensity and direction:
[0027]
[0028] In the formula, R J is the intensity of the Jth light source, θ J is the incident angle of the Jth light source, U is the total number of light sources identified in the environment, and D J is the distance from the light source to the object;
[0029] The three-dimensional coordinates (x0, y0, z0) of the virtual lighting model are calculated by the known position (x0, y0, z0) of the object, the direction of the light source, and the distance from the light source to the object. d ,y d ,z d );
[0030] Align the spatial coordinate system of the lighting model and the 3D furniture model, simulate the propagation path of light on the model surface through ray tracing technology, trace each ray, calculate the incident angle on the model surface, and generate preliminary light and shadow effects by combining the light source intensity and surface reflection characteristics:
[0031]
[0032] Where F(x,y,z) represents the light and shadow effect on the model surface, θ and φ are the angles of the incident light, cos(θ) is the cosine of the incident angle, and r o (θ, φ) is the reflection result of the oth sampling, Ω is the integration area, N' is the number of samplings, d'θ and d'φ represent the operations of differentiation and integration of angles θ and φ, and M(x, y, z) is the three-dimensional furniture model;
[0033] Detect the light blocking area and calculate the shadow cast by the light on the model surface:
[0034]
[0035] In the formula, S(x,y,z) represents the shadow intensity, D'(x,y,z) represents the light blocking distance, and d' max is the maximum occlusion distance;
[0036] Calculate the highlights and reflections on the surface of a 3D furniture model:
[0037]
[0038] Where W(x,y,z) represents the intensity of the highlight;
[0039] According to the calculated shadow intensity and highlight intensity, the preliminary light and shadow effect is optimized to obtain the final overall light and shadow effect O(x,y,z):
[0040] O(x,y,z)=F(x,y,z)+W(x,y,z)×S(x,y,z),
[0041] Select material texture maps and normal maps according to user preference data, generate UV mapping coordinates according to the geometric shape of the three-dimensional furniture model, map the two-dimensional texture map to the surface of the three-dimensional furniture model, align the normal map and the UV mapping coordinates of the three-dimensional furniture model, adjust the intensity of the normal map according to the geometric details of the three-dimensional furniture model, coordinate the overall light and shadow effects of the three-dimensional furniture model according to the position and intensity of the light source in the lighting model, generate the final three-dimensional furniture model rendering image after completing texture mapping and light and shadow optimization, generate rendering images of different perspectives according to user needs and output them for user viewing, collect user feedback data on the rendering image, make real-time adjustments to the three-dimensional furniture model and update the rendering image.
[0042] As a preferred solution of the design scheme confirmation method based on 3D model described in the present invention, wherein: the generation of furniture color scheme based on user preference data refers to collecting user preference data for furniture color matching, generating a preliminary color scheme based on the color matching preference data selected by the user and performing real-time extraction, each color matching selection contains corresponding parameters, including the RGB value of the color, the glossiness, reflectivity and texture type of the material, mapping each data parameter in the color scheme to each part of the three-dimensional furniture model, updating the display effect of the three-dimensional furniture model in real time on the user interface, and instantly presenting the mapped color and material effects to the user.
[0043] As a preferred solution of the design scheme confirmation method based on 3D model described in the present invention, the effect display of combining the three-dimensional furniture model with the real-life picture of the user's room through AR virtual reality technology refers to collecting the real-life image of the room where the user currently installs furniture, identifying the main objects in the image, and replacing the display background of the three-dimensional furniture model with the real-life image of the room uploaded by the user. In the AR display, the user adjusts the specific position and angle of the three-dimensional furniture model in the room through the touch screen, and automatically calculates the light and shadow effects according to the light and shadow data of the user at different positions in the room and adjusts the light and shadow effects on the three-dimensional furniture model in real time. After the user completes the placement, position and angle of the three-dimensional furniture model, a snapshot of the AR display effect is generated, and the design scheme is stored and displayed after the user authorizes it.
[0044] As a preferred solution of the design scheme confirmation method based on 3D model described in the present invention, wherein: the automatic updating of the three-dimensional furniture model according to the user's feedback data to obtain the final furniture design scheme means that if the user is not satisfied with the generated three-dimensional furniture model, the three-dimensional furniture model is dynamically adjusted according to the user's feedback data; if the user is satisfied with the generated three-dimensional furniture model, an electronic confirmation form is generated and transmitted to the factory's production system for order production.
[0045] Another object of the present invention is to provide a design scheme confirmation system based on a 3D model, which comprises:
[0046] An image generation module, used to collect user preference data and generate a two-dimensional hand-drawn image;
[0047] The 3D furniture model generation module is used to identify and extract the 2D hand-drawn picture and generate a preliminary 3D furniture model;
[0048] The model rendering module is used to collect the background image of the user's room and generate a lighting model, combine the lighting model with the three-dimensional furniture model, render the three-dimensional furniture model in real time and generate the corresponding rendering effect diagram;
[0049] A color scheme module is used to map color matching data to a three-dimensional furniture model for effect display according to the user's color matching preference data;
[0050] Combined with the display module, it is used to combine the 3D furniture model with the real-life picture of the room, and adjust the light and shadow effects according to the different positions of the 3D furniture;
[0051] The production confirmation module is used to transmit the corresponding design solution content to the factory for order production after the user confirms the solution content.
[0052] A computer device comprises: a memory and a processor; the memory stores a computer program, and the processor implements the steps of a design scheme confirmation method based on a 3D model when executing the computer program.
[0053] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a design solution confirmation method based on a 3D model.
[0054] The beneficial effects of the present invention are as follows: the present invention realizes efficient real-time rendering in a complex environment by combining a three-dimensional furniture model and a virtual lighting model, and can dynamically simulate the lighting conditions and material reflection effects in the user's room, making the rendering effect of the three-dimensional furniture model more realistic, and can significantly improve the confirmation efficiency and visual accuracy of the design solution, meet the personalized needs of users, and improve the real-time response speed to user needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0056] Figure 1 A flowchart of the design solution confirmation method based on a 3D model.
[0057] Figure 2 Schematic diagram of the implementation of the design solution confirmation method based on 3D model.
[0058] Figure 3 Confirm the structural diagram of the system for the design solution based on the 3D model. DETAILED DESCRIPTION
[0059] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.
[0060] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0061] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor is it a separate or selective embodiment that is mutually exclusive with other embodiments.
[0062] Example 1, reference Figure 1 and Figure 2 , which is the first embodiment of the present invention, and which provides a design scheme confirmation method based on a 3D model. The design scheme confirmation method based on a 3D model includes:
[0063] S1. Collect user preference data on furniture design to generate a two-dimensional hand-drawn picture, recognize the two-dimensional hand-drawn picture through image recognition technology and generate a three-dimensional furniture model;
[0064] Specifically, collecting user preference data on furniture design and generating a two-dimensional hand-drawn picture means collecting user preference data on furniture size, furniture style and material type, and producing a two-dimensional hand-drawn picture for furniture design based on the user's preference data.
[0065] By systematically collecting preference data on furniture size, style and material type, highly personalized furniture design is achieved. Design sketches that meet user needs can be quickly generated in the early stages of the design process, and accurate basic data can be provided for subsequent 3D modeling and production. Through this method, stores can better understand user needs, improve design efficiency, and meet the market demand for personalized customized furniture.
[0066] Further, recognizing the two-dimensional hand-drawn picture by image recognition technology and generating the three-dimensional furniture model refers to obtaining the generated two-dimensional hand-drawn picture and preprocessing the image, including removing noise and improving contrast, using the Canny edge detection algorithm to perform edge detection on the preprocessed two-dimensional hand-drawn picture, calculating the horizontal and vertical gradients of the image, identifying the strong edge area in the image, retaining the local maximum value in the edge, setting two high and low thresholds, identifying strong edge elements and weak edge elements, marking the strong edge elements as edge points and retaining them in the final edge image, checking each weak edge pixel, if the weak edge pixel is connected to one or more strong edge pixels, then marking the weak edge pixel as an edge point, if the weak edge pixel is not connected to the strong edge, then treating it as noise and discarding it;
[0067] Extract closed contours (rectangles, circles) in the image based on the edge detection results, perform shape recognition on the extracted contours, classify the closed contours into basic geometric elements such as rectangles, circles, and polygons, and preliminarily classify the contours based on the characteristics of the geometric elements including the number of sides, symmetry, and angles (recognize rectangles as walls and furniture theme frames, and recognize circles as supporting feet and decorative elements), further identify the structural relationship between the geometric elements, and subdivide the geometric elements into walls, door frames, furniture bodies, and decorative elements based on their spatial positions and connection methods;
[0068] Confirm the structural relationship between geometric elements and connect the two-dimensional elements into a complete geometric image through line segment connection technology. For rectangular elements identified as walls, they are upgraded to cuboids in three-dimensional space based on the height information and default height value in the image. For circular elements identified as supporting feet and decorative elements, they are upgraded to cylinders and spheres. For complex polygonal elements, the corresponding polyhedron structure is generated according to the height information of each vertex. For complex curves and arc structures, surface fitting technology is used to generate surface geometric bodies, and the two-dimensional curves are converted into surfaces in three-dimensional space through the B-spline curve generation method.
[0069] Map the plane coordinate system in the 2D drawing to the 3D space coordinate system:
[0070] Discretize the two-dimensional region Q to form a series of discrete two-dimensional points (x i ,y i ), where i represents the index of the point;
[0071] For every two-dimensional point (x i ,y i ), use the height mapping formula to calculate the corresponding height value z i :
[0072]
[0073] Where z0 is the reference height (usually 0, or set according to the drawing), Δl i is a two-dimensional point (x i ,y i ) corresponding to the length value, L is the standard length in the drawing, and H is the corresponding height value;
[0074] For each discrete point, the two-dimensional point and the calculated height are combined to generate a three-dimensional coordinate point (x i ,y i ,z i ):
[0075]
[0076] Generate surface mesh from 3D coordinate point cloud data through triangulation:
[0077] Based on the properties of the Voronoi diagram, the nearest neighbor set of each point constitutes the polygon of the Voronoi diagram. By connecting the vertices of the Voronoi diagram, a Delaunay triangulation can be obtained. A set of discrete point sets P = {p1, p2, ..., pn} is selected, and the point set is triangulated so that each triangle satisfies the Delaunay property. The generated triangular mesh is used to construct a three-dimensional surface. For curves or complex surfaces, the system generates smooth surfaces through surface generation algorithms (such as NURBS or B-splines) to fill the gaps between point clouds:
[0078]
[0079] Where S(u,v) is the coordinate of the point on the surface, usually expressed as (x(u,v),y(u,v),z(u,v)), B a,p (u) is the ath B-spline basis function under parameter u, with order p, B b,q (v) is the b-th B-spline basis function with parameter v, order q, P a,b is the control point matrix, which represents the coordinates of the control points (x c ,y c ,z c ),
[0080] Get the 3D furniture model M(x,y,z).
[0081] By removing noise and improving image contrast, the image can be clearer, and the subsequent edge detection and shape recognition process will be more accurate. The Canny edge detection algorithm further enhances this effect, ensuring that the edge areas in the image are accurately identified. Through shape recognition technology, the extracted closed contours are classified into basic geometric elements such as rectangles, circles and polygons, and the structural relationships between them are further identified, which can automatically identify different components in furniture design, such as walls, door frames, support legs and decorative elements. This automated recognition and classification not only reduces the workload of the store, but also makes the preliminary modeling of complex furniture designs faster and more efficient. By mapping two-dimensional points to a three-dimensional space coordinate system and combining the height mapping formula, the basic shape of the three-dimensional furniture model can be accurately generated. For complex polygonal and curved elements, smooth surfaces are generated through surface fitting technology, so that the final model can more accurately reflect the actual design. This highly automated model generation process reduces human intervention and improves the efficiency and accuracy of the design. The discrete point set is triangulated using Voronoi diagrams and Delaunay triangulation techniques to generate the surface mesh of the three-dimensional furniture model. This method ensures that the generated mesh structure is stable and conforms to the geometric characteristics of the three-dimensional furniture model. Especially when dealing with complex surfaces, smooth surfaces are generated through B-spline curves, filling the gaps between point clouds, and finally generating smooth and continuous three-dimensional surfaces. The application of this technology makes the three-dimensional furniture model more refined and suitable for high-precision furniture design.
[0082] S2, rendering the 3D furniture model and modifying it in real time according to user feedback to generate a rendering, and generating a color scheme for the furniture according to user preference data;
[0083] Specifically, rendering the 3D furniture model and making real-time modifications based on user feedback to generate the renderings means collecting background images of the furniture installation environment uploaded by users, including images of different angles of the room where the furniture will be installed, graying the uploaded environment images after preprocessing the images, converting the color images into grayscale images, and using the Sobel operator to calculate the brightness gradient of each pixel to generate a brightness gradient map:
[0084]
[0085] Where ▽I(X,Y) represents the brightness gradient of each pixel in the image I(X,Y). and Respectively represent the brightness change rate of the image in the X and Y directions;
[0086] The gradient direction and gradient intensity of each pixel are calculated based on the calculated brightness gradient ▽I(X,Y). The gradient direction indicates the direction of brightness change, that is, the direction of light source illumination. The gradient intensity indicates the magnitude of brightness change. The greater the intensity, the stronger the influence of the light source at that position.
[0087] The gradient strength G(X,Y) is:
[0088] The gradient direction φ(X,Y) is: In the formula, arctan is the mathematical symbol of the inverse tangent function, which means the inverse tangent value of a certain angle;
[0089] Perform cluster analysis on the gradient directions of all pixels, and identify multiple regions with similar directions through the K-means clustering algorithm. These regions represent possible light source directions. After clustering, select the N cluster centers with the largest proportion as the main light source directions.
[0090] For each cluster center, the incident angle θ relative to the object position is calculated:
[0091]
[0092] Where θ is the incident angle of the light source in degrees, (x'0, y'0) is the coordinate of the object, (x' s ,y' s ) are the coordinates of the light source in units of length;
[0093] The incident angle of light is calculated through the relative position of the object coordinates and the light source coordinates, which is used to determine the incident angle of light at each pixel point on the surface of the furniture model, thereby affecting the reflection path of light and the final light and shadow effect. By accurately calculating the incident angle, the system can generate more realistic light and shadow changes, ensuring that the performance of the model in the virtual environment is consistent with the actual environment.
[0094] Count the average gradient intensity of the pixels in the pixel area of each cluster center and calculate the light source intensity:
[0095]
[0096] In the formula, G(X C ,Y C ) is the gradient strength of the Cth pixel, and M' represents the total number of pixels;
[0097] By counting the gradient intensity of the pixel area, the influence of the light source in the area is evaluated. The gradient intensity of all pixel points is considered to provide an accurate estimate of the light source intensity. In the overall rendering process, the light source intensity determines the light and dark performance of the model and the naturalness of the light and shadow transition, ensuring that the performance of the furniture model is always authentic under different lighting conditions, providing users with the best design effect;
[0098] Construct a virtual lighting model K(x,y,z) based on the calculated light intensity and direction:
[0099]
[0100] In the formula, R J is the intensity of the Jth light source, θ J is the incident angle of the Jth light source, U is the total number of light sources identified in the environment, and D J is the distance from the light source to the object, calculated using the Euclidean distance formula;
[0101] A virtual lighting model is constructed by considering multiple factors such as light source intensity, incident angle and distance. The inverse square relationship of distance is introduced to make the influence of distant and near light sources more realistic, simulating realistic lighting effects. The number and intensity of light sources can be dynamically adjusted to meet the lighting requirements of different scenes, greatly improving the flexibility of the lighting model. It can simulate the model performance under various lighting environments, making the rendering results closer to the real scene.
[0102] The three-dimensional coordinates (x0, y0, z0) of the virtual lighting model are calculated by the known position (x0, y0, z0) of the object, the direction of the light source, and the distance from the light source to the object. d ,y d ,z d ):
[0103] x d =x0+D J cos(θ),
[0104] y d =y0+D J sin(θ),
[0105] z d =z0+H,
[0106] In the formula, x d ,y d and z d They represent the three-dimensional coordinates of the light source, x0, y0 and z0 are the known positions of the object, and D J is the horizontal distance, H is the height of the object;
[0107] Align the spatial coordinate system of the illumination model and the 3D furniture model, simulate the propagation path of light on the model surface through ray tracing technology, calculate the incident point, reflection path and shadow area of light on the furniture surface according to the position and intensity of the light source in the light source model, trace each ray, calculate the incident angle on the model surface and generate preliminary light and shadow effects by combining the light source intensity and surface reflection characteristics:
[0108]
[0109] Where F(x,y,z) represents the light and shadow effect on the model surface, θ and φ are the angles of the incident light, cos(θ) is the cosine of the incident angle of the light, which is used to consider the angle between the light and the surface normal, and r o (θ, φ) is the reflection result of the oth sampling, the average reflection value calculated by random sampling using the Monte Carlo method, Ω is the integration area, representing all possible incident angles, N' is the number of samplings, representing the total number of samples in the Monte Carlo method, d'θ and d'φ represent the operations of differentiation and integration of angles θ and φ, and M(x, y, z) is the three-dimensional furniture model;
[0110] Ray tracing technology is used to simulate the reflection path of light on the surface of the furniture model to generate realistic light and shadow effects. The Monte Carlo method is introduced to make the simulation of the reflection path more accurate, which can truly reproduce the light reflection on complex surfaces, ensuring the delicate and natural light and shadow effects, providing strong support for the final rendering effect, allowing users to intuitively see the real performance of furniture under different lighting conditions;
[0111] Detect the light blocking area and calculate the shadow cast by the light on the model surface:
[0112]
[0113] In the formula, S(x,y,z) represents the shadow intensity, D'(x,y,z) represents the light blocking distance, and d' max is the maximum occlusion distance;
[0114] By calculating the light blocking distance, accurate shadow effects can be generated to enhance the three-dimensional sense of the model. The maximum blocking distance is taken into account to ensure that the shadow effect is not too strong or too light, making the shadow more natural. Shadows are an indispensable part of rendering. The existence of shadows makes the model more deep and layered. Generate realistic shadow effects during the rendering process to ensure that the furniture model is always three-dimensional and natural under different light sources, which improves the final visual effect;
[0115] Calculate the highlights and reflections on the surface of a 3D furniture model:
[0116]
[0117] Where W(x,y,z) represents the intensity of the highlight;
[0118] By calculating the highlight intensity, the brightness enhancement effect of the smooth area of the furniture surface can be simulated, so that the model shows realistic highlight reflection under the light source. In rendering, the highlight effect determines the brightness of the furniture surface and directly affects the realism of the model. It can simulate delicate highlight effects, making the model more realistic in the virtual environment and enhancing the user's visual experience.
[0119] According to the calculated shadow intensity and highlight intensity, the preliminary light and shadow effect is optimized to obtain the final overall light and shadow effect O(x,y,z):
[0120] O(x,y,z)=F(x,y,z)+W(x,y,z)×S(x,y,z),
[0121] Select material texture maps and normal maps according to user preference data, generate UV mapping coordinates according to the geometric shape of the 3D furniture model, map the 2D texture map to the surface of the 3D furniture model and fine-tune the scale, rotation and position of the texture map;
[0122] The light and shadow, shadow and highlight effects are integrated to achieve comprehensive light and shadow effect optimization. The final light and shadow effect is generated through fine adjustment of each part, making the model more natural and realistic. The final rendering result is generated by integrating light and shadow, shadow and highlight effects, ensuring that the final output furniture model can show delicate light and shadow changes and natural visual effects under different lighting conditions, greatly improving the visualization effect and user experience of the design solution;
[0123] Load the normal map onto the surface of the 3D furniture model, align the normal map with the UV mapping coordinates of the 3D furniture model, apply the normal map in combination with the normal direction of the surface of the 3D furniture model, and adjust the strength of the normal map according to the geometric details of the 3D furniture model;
[0124] Normal maps enhance the details of the furniture model surface, making the material effect more realistic, especially when the lighting changes, showing a more three-dimensional texture effect;
[0125] According to the position and intensity of the light source in the lighting model, the shadow depth of the surface of the 3D furniture model with basic texture mapping and normal mapping is adjusted, and the shadow of the concave part of the 3D furniture model is deepened to enhance the three-dimensional sense. For the smooth part of the surface of the 3D furniture model, the intensity and direction of the highlight reflection are increased according to the position of the light source. The overall light and shadow effects of the 3D furniture model are coordinated to ensure that the transition between shadows, highlights, and reflection effects is natural and avoid abrupt light and shadow changes. Through light and shadow optimization, the furniture model not only has a real material effect, but also can show delicate light and shadow changes under different lighting conditions, making the model more three-dimensional and realistic.
[0126] After completing texture mapping and light and shadow optimization, the final 3D furniture model rendering image is generated. According to user needs, rendering images of different perspectives are generated and output for users to view. User feedback data on the rendering image is collected to make real-time adjustments to the 3D furniture model and update the rendering image.
[0127] By using the Sobel operator to calculate the brightness gradient, the system can identify the direction and intensity of the light source in the furniture installation environment, thereby building a realistic lighting model. Combined with the K-means clustering algorithm, the system can determine the direction of the main light source to ensure that the furniture model performs realistically and naturally under different lighting conditions. Not only does it make the lighting effect more accurate, but it can also adjust the position and intensity of the light source based on user feedback to achieve more personalized lighting optimization. When generating light and shadow effects, the system uses ray tracing technology to calculate the propagation path of light on the model surface, detect shadow areas, and adjust the light source intensity and reflection path. Random sampling is performed using the Monte Carlo method to ensure the delicacy and naturalness of the light and shadow effects. The resulting light and shadow effects can be updated in real time as the user adjusts, ensuring that the user can always see the true performance of the furniture under different lighting conditions during the design process. When rendering the three-dimensional furniture model, the system generates UV mapping coordinates based on the material preferences selected by the user, and maps the two-dimensional texture map to the surface of the three-dimensional furniture model. By introducing normal maps, the details of the model surface are enhanced, especially when the lighting changes, the model can present a more three-dimensional texture effect. This detail enhancement technology makes the performance of furniture models in virtual environments closer to reality, improving the authenticity of the design and user experience. After completing texture mapping and light and shadow optimization, the system can generate rendering images from different perspectives for users to view. Users can make further adjustments to the furniture model based on these views, and the system will update the model in real time based on user feedback and re-render new renderings. This multi-angle view generation and real-time adjustment mechanism enables the design plan to better meet the personalized needs of users and reduce the cost and time of design modifications. By calculating highlight and shadow effects, it ensures that the furniture model performs realistically and naturally under different light sources. Especially when dealing with smooth surfaces and recessed areas, the system can accurately calculate the reflection path of light and the depth of shadows, making the model more delicate. The final light and shadow effects are optimized to avoid abrupt light and shadow changes and ensure a natural transition. This optimization process significantly improves the visual effect of the three-dimensional furniture model, making it more realistic and three-dimensional.
[0128] Furthermore, generating a color scheme for furniture based on user preference data refers to collecting user preference data for furniture color matching, generating a preliminary color scheme based on the color preference data selected by the user and performing real-time extraction, wherein each color selection contains corresponding parameters, including the RGB value of the color, the glossiness, reflectivity and texture type of the material, mapping each data parameter in the color scheme to each part of the three-dimensional furniture model, updating the display effect of the three-dimensional furniture model in real time on the user interface, and instantly presenting the mapped color and material effects to the user.
[0129] The system collects user preference data on furniture color matching, which can fully reflect the user's personal preferences and aesthetic needs. Compared with traditional template design, users have a stronger sense of participation and higher satisfaction. At the same time, the preliminary color scheme provides users with a design reference, reduces the user's confusion in a large number of color choices, and provides a simpler design process. By defining the detailed parameters of each color selection, the system can more accurately control the design effect. The combination of the RGB value of the color, the glossiness of the material, the reflectivity and the texture type determines the overall visual performance and texture of the furniture. This mapping technology reduces the error of the design scheme in the three-dimensional environment, ensuring that the design can be seamlessly transitioned to actual production. The display effect of the three-dimensional furniture model is updated in real time in the user interface, allowing users to instantly see the effect of each adjustment. This instant feedback mechanism enhances the interactivity of the design process. Users no longer need to wait for a long rendering time or multiple adjustments to intuitively see the impact of each change on the overall design. This not only improves the user experience, but also significantly improves design efficiency.
[0130] S3. Combine the 3D furniture model with the user's room real-life picture through AR virtual reality technology to display the effect, and automatically update the 3D furniture model according to the user's feedback data to obtain the final furniture design plan;
[0131] Specifically, combining the three-dimensional furniture model with the real-life picture of the user's room through AR virtual reality technology for effect display means collecting the real-life image of the room where the user currently installs furniture, identifying the main objects in the image, including walls, floors and windows, and replacing the display background of the three-dimensional furniture model with the real-life image of the room uploaded by the user. In the AR display, the user adjusts the specific position and angle of the three-dimensional furniture model in the room through the touch screen, and automatically calculates the light and shadow effects according to the light and shadow data of the user at different positions in the room and adjusts the light and shadow effects on the three-dimensional furniture model in real time. After the user completes the placement, position and angle of the three-dimensional furniture model, a snapshot of the AR display effect is generated. After the user authorizes, the design plan is stored and displayed, and other users rate the design plans for their likeability, and the design plans are displayed in descending order according to the likeability scores.
[0132] By collecting real-life room images uploaded by users, the system is able to create a virtual display platform that matches the real scene based on the actual environment. Users can view the effects of furniture models in an existing living environment, rather than simply relying on abstract backgrounds or blank scenes. This process not only increases the personalization of furniture design solutions, but also reduces users' concerns about the mismatch of the final product. By accurately extracting the main objects in the room (such as walls, floors, and windows) through image recognition technology, the system can ensure that the three-dimensional furniture model is seamlessly integrated with the real environment. This not only improves the authenticity of the display, but also enables users to accurately adjust the position of furniture to avoid conflicts with other objects in the room. The touch screen allows users to freely adjust the placement and angle of furniture models, a feature that enhances the user's interactivity and sense of control. Users can make adjustments based on their actual needs to find the most ideal way to place furniture. This real-time adjustment function reduces the communication cost between stores and customers and makes the design process more efficient. The system automatically calculates and adjusts the light and shadow effects on the three-dimensional furniture model based on the light and shadow data in the user's room, so that the furniture in the virtual display is more in line with the actual lighting conditions. This feature ensures that the furniture appears more realistic under different lighting conditions, helping users evaluate the visual effects of the furniture and avoid dissatisfaction caused by changes in lighting. By rating the design schemes for their likeability, the system can provide references for other users and display them in descending order based on the scores. This not only helps users discover popular design schemes, but also stimulates interaction between users, thereby increasing the activity and participation of the entire design platform.
[0133] Furthermore, the three-dimensional furniture model is automatically updated according to the user's feedback data to obtain the final furniture design solution. If the user is not satisfied with the generated three-dimensional furniture model, the three-dimensional furniture model is dynamically adjusted according to the user's feedback data. If the user is satisfied with the generated three-dimensional furniture model, an electronic confirmation form is generated and transmitted to the factory's production system for order production.
[0134] Automatically collecting and analyzing user feedback data can significantly improve the efficiency of the design process. Traditional design feedback often requires multiple manual communications and modifications, while automated feedback collection and analysis reduces the communication costs between stores and users and shortens the design cycle. Automated data collection can also ensure that every piece of feedback is accurately recorded, avoiding human omissions and misunderstandings. The dynamic adjustment function makes the modification process of the design plan more flexible and efficient. The system can automatically adjust the model according to user feedback, reducing the time for manual intervention. This automated process not only improves design efficiency, but also ensures the accuracy and timeliness of the design plan. Through real-time adjustments, users can immediately see the effect of the modification, which improves the design interaction experience. The generation of electronic confirmation sheets ensures that the design plan cannot be tampered with after user confirmation, ensuring the accuracy of the production process. By directly transmitting the electronic confirmation sheet to the factory's production system, seamless connection between design and production is achieved.
[0135] Example 2, reference Figure 3 , which is the second embodiment of the present invention, and which is different from the previous embodiment, provides a design scheme confirmation system based on a 3D model, which includes:
[0136] An image generation module, used to collect user preference data and generate a two-dimensional hand-drawn image;
[0137] The 3D furniture model generation module is used to identify and extract the 2D hand-drawn picture and generate a preliminary 3D furniture model;
[0138] The model rendering module is used to collect the background image of the user's room and generate a lighting model, combine the lighting model with the three-dimensional furniture model, render the three-dimensional furniture model in real time and generate the corresponding rendering effect diagram;
[0139] A color scheme module is used to map color matching data to a three-dimensional furniture model for effect display according to the user's color matching preference data;
[0140] Combined with the display module, it is used to combine the 3D furniture model with the real-life picture of the room, and adjust the light and shadow effects according to the different positions of the 3D furniture;
[0141] The production confirmation module is used to transmit the corresponding design solution content to the factory for order production after the user confirms the solution content.
[0142] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program codes.
[0143] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.
[0144] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0145] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, a plurality of steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
Claims
1. A design scheme confirmation method based on a 3D model, characterized in that: include, Collect user preference data on furniture design to generate two-dimensional hand-drawn pictures, and use image recognition technology to identify the two-dimensional hand-drawn pictures and generate three-dimensional furniture models; Render the 3D furniture model and modify it in real time based on user feedback to generate renderings, and generate furniture color schemes based on user preference data; The 3D furniture model is combined with the user's room real scene through AR virtual reality technology to display the effect, and the 3D furniture model is automatically updated according to the user's feedback data to obtain the final furniture design plan; The rendering of the three-dimensional furniture model and real-time modification based on user feedback to generate the effect map refers to collecting background images of the furniture installation environment uploaded by the user, including images of different angles of the room where the furniture will be installed, graying the uploaded environment images after pre-processing the images, converting the color images into grayscale images, using the Sobel operator to calculate the brightness gradient of each pixel, and generating a brightness gradient map; calculating the gradient direction and gradient intensity of each pixel point according to the calculated brightness gradient ▽I(X,Y); Perform cluster analysis on the gradient directions of all pixels, and for each cluster center, calculate the incident angle θ relative to the object position: Where θ is the incident angle of the light source, (x'0, y'0) is the coordinate of the object, (x' s ,y' s ) are the coordinates of the light source; The average gradient intensity of the pixels in the pixel area of each cluster center is counted to calculate the light source intensity R: In the formula, G(X C ,Y C ) is the gradient strength of the Cth pixel, and M' represents the total number of pixels; Construct a virtual lighting model K(x,y,z) based on the calculated light intensity and direction: In the formula, R J is the intensity of the Jth light source, θ J is the incident angle of the Jth light source, U is the total number of light sources identified in the environment, and D J is the distance from the light source to the object; The three-dimensional coordinates (x0, y0, z0) of the virtual lighting model are calculated by the known position (x0, y0, z0) of the object, the direction of the light source, and the distance from the light source to the object. d ,y d ,z d ); Align the spatial coordinate system of the lighting model and the 3D furniture model, simulate the propagation path of light on the model surface through ray tracing technology, trace each ray, calculate the incident angle on the model surface, and generate preliminary light and shadow effects by combining the light source intensity and surface reflection characteristics: Where F(x,y,z) represents the light and shadow effect on the model surface, θ and φ are the angles of the incident light, cos(θ) is the cosine of the incident angle, and r o (θ, φ) is the reflection result of the oth sampling, Ω is the integration area, N' is the number of samplings, d'θ and d'φ represent the operations of differentiation and integration of angles θ and φ, and M(x, y, z) is the three-dimensional furniture model; Detect the light blocking area and calculate the shadow cast by the light on the model surface: In the formula, S(x,y,z) represents the shadow intensity, D'(x,y,z) represents the light blocking distance, and d' max is the maximum occlusion distance; Calculate the highlights and reflections on the surface of a 3D furniture model: Where W(x,y,z) represents the intensity of the highlight; According to the calculated shadow intensity and highlight intensity, the preliminary light and shadow effect is optimized to obtain the final overall light and shadow effect O(x,y,z): O(x,y,z)=F(x,y,z)+W(x,y,z)×S(x,y,z), Select material texture maps and normal maps according to user preference data, generate UV mapping coordinates according to the geometric shape of the three-dimensional furniture model, map the two-dimensional texture map to the surface of the three-dimensional furniture model, align the normal map and the UV mapping coordinates of the three-dimensional furniture model, adjust the intensity of the normal map according to the geometric details of the three-dimensional furniture model, coordinate the overall light and shadow effects of the three-dimensional furniture model according to the position and intensity of the light source in the lighting model, generate the final three-dimensional furniture model rendering image after completing texture mapping and light and shadow optimization, generate rendering images of different perspectives according to user needs and output them for user viewing, collect user feedback data on the rendering image, make real-time adjustments to the three-dimensional furniture model and update the rendering image.
2. The design scheme confirmation method based on 3D model according to claim 1, characterized in that: The collecting of user preference data on furniture design to generate a two-dimensional hand-drawn picture refers to collecting user preference data on furniture size, furniture style and material type, and producing a two-dimensional hand-drawn picture for furniture design based on the user's preference data.
3. The design scheme confirmation method based on 3D model according to claim 2, characterized in that: The method of recognizing the two-dimensional hand-drawn picture by image recognition technology and generating the three-dimensional furniture model refers to obtaining the generated two-dimensional hand-drawn picture, preprocessing the image, and calculating the horizontal and vertical gradients of the image using the Canny edge detection algorithm; Extract closed contours in the image based on edge detection results, perform shape recognition on the extracted contours, preliminarily classify the contours based on the characteristics of geometric elements in the image, identify the structural relationship between geometric elements, and subdivide the geometric elements based on their spatial positions and connection methods; Confirm the structural relationship between geometric elements and connect the two-dimensional elements into a complete geometric image through line segment connection technology; Map the plane coordinate system in the 2D drawing to the 3D space coordinate system: Discretize the two-dimensional region Q to form a series of discrete two-dimensional points (x i ,y i ), where i represents the index of the point; For every two-dimensional point (x i ,y i ), use the height mapping formula to calculate the corresponding height value z i : Where z0 is the reference height, Δl i is a two-dimensional point (x i ,y i ) corresponding to the length value, L is the standard length in the drawing, and H is the corresponding height value; For each discrete point, the two-dimensional point and the calculated height are combined to generate a three-dimensional coordinate point (x i ,y i ,z i ): The three-dimensional coordinate point cloud data is triangulated to generate a surface mesh, and the curves and complex surfaces are converted into smooth surfaces through the surface generation algorithm. The gaps between the point clouds are filled to obtain the three-dimensional furniture model M (x, y, z).
4. The design scheme confirmation method based on 3D model according to claim 3, characterized in that: Generating a furniture color scheme based on user preference data refers to collecting user preference data for furniture color matching, generating a preliminary color scheme based on the color preference data selected by the user and performing real-time extraction, each color selection contains corresponding parameters, including the RGB value of the color, the glossiness, reflectivity and texture type of the material, mapping each data parameter in the color scheme to each part of the three-dimensional furniture model, updating the display effect of the three-dimensional furniture model in real time on the user interface, and instantly presenting the mapped color and material effects to the user.
5. The design scheme confirmation method based on 3D model according to claim 4, characterized in that: The use of AR virtual reality technology to combine the three-dimensional furniture model with the real-life image of the user's room for effect display refers to collecting the real-life image of the room where the user currently installs furniture, identifying the main objects in the image, replacing the display background of the three-dimensional furniture model with the real-life image of the room uploaded by the user, and the user adjusting the specific position and angle of the three-dimensional furniture model in the room through the touch screen in the AR display, automatically calculating the light and shadow effects according to the light and shadow data of the user at different positions in the room and adjusting the light and shadow effects on the three-dimensional furniture model in real time, generating a snapshot of the AR display effect after the user completes the placement, position and angle of the three-dimensional furniture model, and storing and displaying the design plan after the user authorizes it.
6. The design scheme confirmation method based on 3D model according to claim 5, characterized in that: The automatic updating of the three-dimensional furniture model according to the user's feedback data to obtain the final furniture design plan means that if the user is not satisfied with the generated three-dimensional furniture model, the three-dimensional furniture model is dynamically adjusted according to the user's feedback data; if the user is satisfied with the generated three-dimensional furniture model, an electronic confirmation form is generated and transmitted to the factory's production system for order production.
7. A 3D model-based design solution confirmation system based on the 3D model-based design solution confirmation method according to any one of claims 1 to 6, characterized in that: include, An image generation module, used to collect user preference data and generate a two-dimensional hand-drawn image; The 3D furniture model generation module is used to identify and extract the 2D hand-drawn picture and generate a preliminary 3D furniture model; The model rendering module is used to collect the background image of the user's room and generate a lighting model, combine the lighting model with the three-dimensional furniture model, render the three-dimensional furniture model in real time and generate the corresponding rendering effect diagram; A color scheme module is used to map color matching data to a three-dimensional furniture model for effect display according to the user's color matching preference data; Combined with the display module, it is used to combine the 3D furniture model with the real-life picture of the room, and adjust the light and shadow effects according to the different positions of the 3D furniture; The production confirmation module is used to transmit the corresponding design solution content to the factory for order production after the user confirms the solution content.
8. A computer device comprising: Memory and processor; The memory stores a computer program, characterized in that: when the processor executes the computer program, the steps of the design solution confirmation method based on a 3D model described in any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the design solution confirmation method based on a 3D model described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Furniture design rendering method and system based on user requirements
CN118071911A