Webpage 3D preview method based on LED virtual shooting digital asset platform
By pre-constructing reflection and observation scenes, a matrix of transparent materials is obtained and these matrices are used for rendering on the web page, the problem of high computational volume when rendering transparent and complex materials is solved, and efficient and smooth 3D rendering effect is achieved.
Patent Information
- Application Number
- CN202411930434.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2044-12-25
AI Technical Summary
The existing 3D preview technology of web pages is computationally expensive when rendering transparent and complex materials, making it difficult to achieve real-time rendering on low-performance devices, resulting in poor performance of digital asset animation performances.
By pre-constructing reflection scenes and observation scenes, obtain the reflection matrix and observation matrix of transparent materials, classify and render transparent materials in digital assets, use preset matrices to render, and reduce the amount of calculation.
Improve rendering efficiency, especially on low-performance devices, improve rendering quality, and provide users with a smoother and realistic 3D interactive experience.
Smart Images

Figure CN119903255A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer vision and virtual reality, and in particular to a web page 3D preview method based on an LED virtual shooting digital asset platform. Background Art
[0002] LED virtual shooting technology has a wide range of applications in film, television, games, virtual reality and other fields, but high-precision digital assets are created. These digital assets usually have complex geometric structures, fine materials and rich animation information, and the file size is huge. The existing web 3D preview technology is mainly based on WebGL. When rendering digital assets through rendering engines such as Three.js and Babylon.js, when rendering complex materials such as transparency and refraction on the web side, it is difficult to display realistic animation effects on low-performance devices due to the large amount of calculation; especially for transparent materials in digital assets, due to the refractive characteristics of the transparent materials, the amount of calculation for rendering the transparent materials is huge, and it is difficult to achieve real-time rendering on the web side, which ultimately leads to poor effects of digital asset animation performances.
[0003] Therefore, when rendering transparent complex materials, for materials with relatively fixed or regular shapes, the existing lighting model is used to pre-calculate and pre-store the regional reflected light intensity matrix and the transparency coefficient matrix. During actual rendering, the similarity between the reflective or transparent material to be rendered and the preset matrix is judged through the eigenvalues. Combined with the frustum visibility and attention mechanism in the rendering process, the preset matrix is used for reflection and transparent rendering for materials with low visibility and low attention, which reduces the amount of rendering calculations and improves the rendering effect. Summary of the invention
[0004] The present invention provides a web page 3D preview method based on an LED virtual shooting digital asset platform to solve the existing problem that the amount of calculation is large when rendering transparent materials in digital assets, and it is difficult to achieve real-time rendering on the web page.
[0005] The webpage 3D preview method based on LED virtual shooting digital asset platform of the present invention adopts the following technical scheme:
[0006] The following steps are involved:
[0007] Pre-build reflection scenes to obtain the reflection matrix of transparent materials; pre-build observation scenes to obtain the observation matrix of transparent materials;
[0008] Classify all transparent materials in the digital asset to obtain the material to be rendered; obtain the matrix to be sampled according to the angle between the light source and the material to be rendered when shooting the digital asset; downsample the matrix to be sampled to obtain the illumination matrix of the material to be rendered;
[0009] According to the angle between the camera and the material to be rendered when shooting the digital asset, the mask matrix of the material to be rendered is obtained; according to the distance between the camera and the material to be rendered when shooting the digital asset, the size of the transformation matrix of the material to be rendered is obtained; according to the size of the transformation matrix of the material to be rendered, combined with the mask matrix of the material to be rendered, the transformation reflection matrix of the material to be rendered is obtained; the transformation reflection matrix of the material to be rendered is scaled to obtain the reflection matrix of the material to be rendered;
[0010] A rendering matrix of the material to be rendered is obtained according to the illumination matrix of the material to be rendered and the reflection matrix of the material to be rendered; and the material to be rendered is rendered according to the rendering matrix of the material to be rendered.
[0011] Preferably, the pre-constructing of the reflection scene and obtaining the reflection matrix of the transparent material comprises the following specific methods:
[0012] Pre-construct an empty reflection scene, add a parallel light source to the reflection scene, preset γ transparent materials with a specification of β×β, where γ and β are the preset number of transparent materials and the transparent material specifications respectively; let the angle between the first transparent material and the parallel light source be Place the first transparent material; let the angle between the second transparent material and the parallel light source be Place the second transparent material; and so on, until the angle between the γth transparent material and the parallel light source is Place the γth transparent material; obtain the reflection matrix of each transparent material in the reflection scene, record the angle between the transparent material corresponding to the reflection matrix and the parallel light source as the incident angle of the reflection matrix, and use the projection direction of the parallel light source on the reflection matrix as the direction of the reflection matrix.
[0013] Preferably, the pre-constructing observation scene and obtaining the observation matrix of the transparent material includes the following specific methods:
[0014] An observation scene is pre-constructed, a transparent material is placed in the observation scene, a parallel light source is set to vertically illuminate the transparent material; an observation distance ε is preset; an observation point is set at ε meters above the center of the transparent material, and an observation matrix of the transparent material is obtained at the observation point; an angle adjustment step μ is preset; the angle of the transparent material is adjusted through the center of the transparent material, and the angle of the transparent material is adjusted μ each time, and the observation matrix of the transparent material at different angles is obtained through the observation point, and the direction from the observation point to the center of the transparent material corresponding to the observation matrix is used as the observation direction of the observation matrix, the angle between the observation direction and the transparent material corresponding to the observation matrix is used as the observation angle of the observation matrix, and the projection direction of the observation direction on the observation matrix is used as the direction of the observation matrix.
[0015] Preferably, the method of obtaining the matrix to be sampled according to the angle between the light source and the material to be rendered when shooting the digital asset includes the following specific methods:
[0016] For any material to be rendered, obtain the direction of light when shooting the digital asset, record the angle between the tangent plane of the center point of the material to be rendered and the direction of light as the incident angle of the material to be rendered, and use the projection direction of the light direction on the material to be rendered as the lighting expression direction of the material to be rendered; use the reflection matrix closest to the material to be rendered in terms of the incident angle as the called reflection matrix; make the center of the called reflection matrix overlap with the center of the material to be rendered, and make the direction of the called reflection matrix overlap with the lighting expression direction of the material to be rendered, so as to obtain the matrix to be sampled of the material to be rendered.
[0017] Preferably, downsampling the matrix to be sampled to obtain the illumination matrix of the material to be rendered includes the following specific methods:
[0018] The distance between the camera and the material to be rendered when shooting the digital asset is recorded as the shooting distance, and two distance thresholds d1 and d2 and three downsampling coefficients k1, k2, and k3 are preset; if the shooting distance is less than or equal to d1, k1 is used as the downsampling coefficient of the LOD grading method to downsample the sampling matrix to be processed; if the shooting distance is greater than d1 and less than or equal to d2, k2 is used as the downsampling coefficient of the LOD grading method to downsample the sampling matrix to be processed; if the shooting distance is greater than d2, k3 is used as the downsampling coefficient of the LOD grading method to downsample the sampling matrix to be processed, so as to obtain the illumination matrix of the material to be rendered.
[0019] Preferably, the method of obtaining the mask matrix of the material to be rendered according to the angle between the camera and the material to be rendered when shooting the digital asset includes the following specific methods:
[0020] For any material to be rendered, the direction from the camera to the center of the material to be rendered when shooting the digital asset is taken as the shooting direction, the material to be rendered shot by the camera is recorded as the shooting matrix of the material to be rendered, and the angle between the tangent plane of the center point of the material to be rendered and the shooting direction is recorded as the observation angle of the material to be rendered; the projection direction of the shooting direction on the material to be rendered is taken as the shooting expression direction of the material to be rendered; the observation matrix closest to the material to be rendered in terms of the observation angle is taken as the calling observation matrix; the center of the calling observation matrix is made to overlap with the center of the material to be rendered, and the direction of the calling observation matrix is made to overlap with the shooting expression direction of the material to be rendered, so as to obtain the mask matrix of the material to be rendered.
[0021] Preferably, the method of obtaining the size of the transformation matrix of the material to be rendered according to the distance between the camera and the material to be rendered when shooting the digital asset includes the following specific methods:
[0022] For any material to be rendered, the distance between the camera and the material to be rendered when shooting the digital asset is recorded as the shooting distance; the ratio between the shooting distance and the preset observation distance ε is recorded as the observation distance ratio; the center of the shooting matrix of the material to be rendered is used as the scaling center, and the observation distance ratio is used as the scaling ratio to scale the shooting matrix of the material to be rendered to obtain the size of the transformation matrix of the material to be rendered.
[0023] Preferably, the method of obtaining the transformation reflection matrix of the material to be rendered according to the size of the transformation matrix of the material to be rendered in combination with the mask matrix of the material to be rendered includes the following specific methods:
[0024] For any material to be rendered, the center of the transformation matrix of the material to be rendered is overlapped with the center of the mask matrix of the material to be rendered; the mask operation parameters of the pixel points of the transformation matrix of the material to be rendered in the mask matrix of the material to be rendered are set to 1, and the values of other pixel points in the mask matrix of the material to be rendered are set to 0, and the mask operation is performed on the mask matrix of the material to be rendered with the size of the transformation matrix of the material to be rendered to obtain the transformation reflection matrix of the material to be rendered.
[0025] Preferably, the step of scaling the transformed reflection matrix of the material to be rendered to obtain the reflection matrix of the material to be rendered includes the following specific methods:
[0026] For any material to be rendered, the reciprocal of the observation distance ratio is used as the scaling ratio to scale the transformation reflection matrix of the material to be rendered to obtain the reflection matrix of the material to be rendered.
[0027] Preferably, the obtaining of the rendering matrix of the material to be rendered according to the illumination matrix of the material to be rendered and the reflection matrix of the material to be rendered comprises the following specific methods:
[0028] For any material to be rendered, obtain the illumination matrix and the reflection matrix of the material to be rendered, standardize all element values in the illumination matrix of the material to be rendered to obtain the standardized illumination matrix of the material to be rendered; multiply the standardized illumination matrix of the material to be rendered by the elements at the same position in the reflection matrix of the material to be rendered to obtain the rendering matrix of the material to be rendered.
[0029] The beneficial effects of the technical solution of the present invention are as follows: the present application obtains the reflection matrix of the transparent material by pre-constructing the reflection scene; pre-constructing the observation scene, and obtaining the observation matrix of the transparent material; reducing the amount of calculation in the actual rendering process, thereby improving the rendering efficiency, especially improving the rendering efficiency on low-performance devices; further analyzing the lighting environment of the material to be rendered in the digital asset, selecting the reflection matrix closest to the lighting environment from the reflection matrix of the transparent material, thereby obtaining the lighting matrix of the material to be rendered; from the perspective of the lighting environment, the lighting matrix of the material to be rendered can simulate the performance of the material to be rendered after being rendered to the maximum extent;
[0030] The shooting angle of the material to be rendered in the digital asset is further analyzed, and the observation matrix closest to the shooting angle is selected from the reflection matrix of the transparent material to obtain the reflection matrix of the material to be rendered. In terms of the observation angle, the reflection matrix of the material to be rendered can simulate and replace the performance of the material to be rendered to the maximum extent; finally, the rendering matrix of the material to be rendered is obtained through the illumination matrix and the reflection matrix of the material to be rendered, and the material to be rendered is rendered according to the rendering matrix. By reducing the amount of calculation and improving the rendering quality, a smoother and more realistic 3D interactive experience is provided to users. By providing a method for quickly applying the reflection intensity of transparent materials in the WebGL environment, the rendering performance of 3D graphics is further optimized. Further combined with the LOD (Level of Detail) mechanism, the rendering details can be automatically adjusted according to the device performance, so that the rendering effect can be optimized on devices with different performances. Through the preset matrix and intelligent rendering strategy, the resource utilization rate of the online preview and interaction of digital assets is improved, the demand for storage and bandwidth is reduced, and the animation performance effect of digital assets is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0032] Figure 1 It is a flow chart of the steps of the web page 3D preview method based on the LED virtual shooting digital asset platform of the present invention;
[0033] Figure 2 It is a schematic diagram of the reflection scene;
[0034] Figure 3 is a schematic diagram of the reflection matrix;
[0035] Figure 4 Schematic diagram of the observation scene;
[0036] Figure 5 This is a schematic diagram of the material to be rendered. DETAILED DESCRIPTION
[0037] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of the webpage 3D preview method based on the LED virtual shooting digital asset platform proposed by the present invention, its specific implementation method, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0038] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0039] The specific scheme of the web page 3D preview method based on the LED virtual shooting digital asset platform provided by the present invention is described in detail below with reference to the accompanying drawings.
[0040] See also Figure 1 , which shows a flowchart of a method for web page 3D preview based on an LED virtual shooting digital asset platform provided by an embodiment of the present invention, the method comprising the following steps:
[0041] Step S001: pre-construct a reflection scene to obtain a reflection matrix of a transparent material; pre-construct an observation scene to obtain an observation matrix of a transparent material.
[0042] It should be noted that since digital assets usually have complex geometric structures, fine materials and rich animation information, that is, the file size of digital assets is usually huge, when rendering transparent materials such as transparency and refraction through the web page, the animation performance will be poor due to the large amount of calculation. Therefore, this embodiment proposes a web 3D preview method based on an LED virtual shooting digital asset platform, by presetting some transparent materials at specific angles to the light source, analyzing the intensity of the refraction and reflection performance of the preset materials and saving them in the form of a matrix; so that when performing actual transparent material rendering, the transparent material to be rendered can be compared with the preset material, the most suitable preset material can be selected, and the pre-stored reflection performance can be directly called, thereby saving the overall rendering time of the material. To this end, it is first necessary to pre-build the performance of transparent materials at different lighting angles.
[0043] Preferably, in a specific embodiment of the present invention, an empty reflection scene is pre-constructed, and a parallel light source is added to the reflection scene; γ transparent materials with a specification of β×β are preset, wherein γ and β are respectively the preset number of transparent materials and the specification of transparent materials, and the specific values of γ and β can be set by oneself in combination with the actual situation. This embodiment does not make a rigid requirement, and in this embodiment, γ=180 and β=200 mm are described; under the premise that each transparent material is not blocked, the angle between the first transparent material and the parallel light source is set to Place the first transparent material; let the angle between the second transparent material and the parallel light source be Place the second transparent material; and so on, until the angle between the γth transparent material and the parallel light source is Place the γth transparent material; Figure 2 As shown, Figure 2 is a schematic diagram of a reflection scene; obtain the reflection matrix of each transparent material in the reflection scene, record the angle between the transparent material corresponding to the reflection matrix and the parallel light source as the incident angle of the reflection matrix, and record the projection direction of the parallel light source on the reflection matrix as the direction of the reflection matrix, such as Figure 3 As shown, Figure 3 Schematic diagram of the reflection matrix.
[0044] Preferably, in a specific embodiment of the present invention, an observation scene is pre-constructed, a transparent material is placed in the observation scene, and a parallel light source is set to vertically illuminate the transparent material; an observation distance ε is preset, and the specific value of ε can be set according to actual conditions. This embodiment does not make a rigid requirement, and ε=10 is used as an example for description in this embodiment; an observation point is set at ε meters above the center of the transparent material, and the observation matrix of the transparent material is obtained at the observation point; an angle adjustment step size μ is preset, and the specific value of μ can be set according to actual conditions. This embodiment does not make a rigid requirement, and μ=1 degree is used as an example for description in this embodiment; the angle of the transparent material is adjusted through the center of the transparent material, and the angle of the transparent material is adjusted to μ each time, and the observation matrix of the transparent material at different angles is obtained through the observation point, such as Figure 4 As shown, Figure 4 It is a schematic diagram of the observation scene. The direction from the observation point to the center of the transparent material corresponding to the observation matrix is taken as the observation direction of the observation matrix. The angle between the observation direction and the transparent material corresponding to the observation matrix is taken as the observation angle of the observation matrix. The projection direction of the observation direction on the observation matrix is taken as the direction of the observation matrix.
[0045] At this point, the reflection matrix and observation matrix of the transparent material are obtained.
[0046] Step S002: Classify all transparent materials in the digital asset to obtain the material to be rendered; obtain the matrix to be sampled according to the angle between the light source and the material to be rendered when shooting the digital asset; downsample the matrix to be sampled to obtain the illumination matrix of the material to be rendered.
[0047] It should be noted that the reflection matrix and observation matrix of the transparent material obtained in step S001 are the performance of the transparent material under lighting conditions. When performing actual transparent material rendering, the pre-stored reflection performance is directly called to save the overall rendering time; but since the transparent materials in the digital assets are not all flat, the reflection matrix and observation matrix of the transparent material obtained in step S001 are the reflection matrix and observation matrix of the flat transparent material. Therefore, in order to make the called performance more consistent with the actual rendering result, all transparent materials in the digital assets need to be divided and multiplied by several flat transparent materials.
[0048] Specifically, the surface curvature of all transparent materials in the digital asset is used as a measurement distance, and the DBSCAN clustering algorithm is used to cluster all transparent materials in the digital asset to obtain a number of flat transparent materials, which are recorded as materials to be rendered. Since the DBSCAN clustering algorithm is a well-known prior art, it will not be described in detail in this embodiment.
[0049] It should be noted that since there are certain differences in the shapes and sizes of the actual transparent materials in the digital assets and the transparent materials in the scene pre-built in step S001, in order to better render the transparent materials in the digital assets, it is also necessary to scale them according to the specific shapes and sizes of the transparent materials in the digital assets in combination with the LOD (Level of Details) mechanism.
[0050] Preferably, in a specific embodiment of the present invention, for any material to be rendered, the direction of light when shooting the digital asset is obtained, the angle between the tangent plane of the center point of the material to be rendered and the direction of light is recorded as the incident angle of the material to be rendered, and the projection direction of the light direction on the material to be rendered is taken as the illumination expression direction of the material to be rendered, such as Figure 5 As shown, Figure 5 is a schematic diagram of a material to be rendered; the reflection matrix closest to the material to be rendered in terms of incident angle is used as the called reflection matrix; the center of the called reflection matrix is overlapped with the center of the material to be rendered, and the direction of the called reflection matrix is overlapped with the illumination expression direction of the material to be rendered, and the called reflection matrix overlapping with the material to be rendered is used to obtain the matrix to be sampled of the material to be rendered;
[0051] Furthermore, the distance between the camera and the material to be rendered when shooting the digital asset is recorded as the shooting distance, and two distance thresholds d1 and d2 and three downsampling coefficients k1, k2, and k3 are preset. The specific values of d1, d2 and k1, k2, and k3 can be set by oneself in combination with actual conditions. This embodiment does not make a rigid requirement. In this embodiment, d1=5, d2=15, k1=1, k2=0.6, and k3=0.3 are used as examples for description; if the shooting distance is less than or equal to d1, k1 is used as the downsampling coefficient of the LOD grading method to downsample the sampling matrix to be treated; if the shooting distance is greater than d1 and less than or equal to d2, k2 is used as the downsampling coefficient of the LOD grading method to downsample the sampling matrix to be treated; if the shooting distance is greater than d2, k3 is used as the downsampling coefficient of the LOD grading method to downsample the sampling matrix to be treated, and the illumination matrix of the material to be rendered is obtained; since the LOD grading method is a well-known prior art, it will not be described in detail in this embodiment.
[0052] It should be noted that calling the reflection matrix represents the image of the transparent material whose lighting environment is closest to the lighting environment to be rendered among all transparent materials in the pre-constructed reflection scene in step S001. However, since there are differences in size and shape between all transparent materials in the pre-constructed reflection scene in step S001 and the actual materials to be rendered, the sampling matrix is adjusted through LOD to obtain the transparent material in the pre-constructed reflection scene that is closest to the material to be rendered under lighting conditions. From the perspective of the lighting environment, the lighting matrix of the material to be rendered can simulate the performance of the material to be rendered after rendering to the greatest extent.
[0053] At this point, the lighting matrix of the material to be rendered is obtained.
[0054] Step S003: Obtain the mask matrix of the material to be rendered according to the angle between the camera and the material to be rendered when shooting the digital asset; obtain the size of the transformation matrix of the material to be rendered according to the distance between the camera and the material to be rendered when shooting the digital asset; obtain the transformation reflection matrix of the material to be rendered according to the size of the transformation matrix of the material to be rendered and the mask matrix of the material to be rendered; scale the transformation reflection matrix of the material to be rendered to obtain the reflection matrix of the material to be rendered.
[0055] It should be noted that the actual performance of transparent materials is related not only to the illumination angle and intensity of the light source, but also to the observation angle of the observer. Therefore, to better render the transparent materials in the digital assets, it is also necessary to consider the influence of different observation angles on the reflection intensity of the materials. In the pre-built observation scene obtained in step S001, the distance between the transparent material and the observation point is fixed, which is always different from the distance between the camera and the transparent material in the actual situation. Therefore, it is necessary to adjust the observation matrix in the observation scene in combination with the actual distance between the camera and the transparent material.
[0056] Preferably, in a specific embodiment of the present invention, for any material to be rendered, the direction from the camera to the center of the material to be rendered when shooting the digital asset is taken as the shooting direction, the material to be rendered shot by the camera is recorded as the shooting matrix of the material to be rendered, and the angle between the tangent plane of the center point of the material to be rendered and the shooting direction is recorded as the observation angle of the material to be rendered; the projection direction of the shooting direction on the material to be rendered is taken as the shooting expression direction of the material to be rendered; the observation matrix closest to the material to be rendered in terms of the observation angle is taken as the calling observation matrix; the center of the calling observation matrix is made to overlap with the center of the material to be rendered, and the direction of the calling observation matrix is made to overlap with the shooting expression direction of the material to be rendered, so as to obtain the mask matrix of the material to be rendered.
[0057] It should be noted that since the observed material size is different when the viewing angle and material distance are different, in order to better render the transparent materials in the digital assets, it is necessary to scale them according to the distance between the camera and the material to be rendered when shooting the digital assets, thereby completing the transformation of the viewing angle distance.
[0058] Preferably, in a specific embodiment of the present invention, for any material to be rendered, the distance between the camera and the material to be rendered when shooting the digital asset is recorded as the shooting distance; the ratio between the shooting distance and the preset observation distance ε is recorded as the observation distance ratio; the center of the shooting matrix of the material to be rendered is used as the scaling center, the shooting matrix of the material to be rendered is scaled using the image pyramid algorithm, and the observation distance ratio is used as the scaling factor in the image pyramid to obtain the size of the transformation matrix of the material to be rendered. Since the image pyramid algorithm is a well-known prior art, it will not be described in detail in this embodiment.
[0059] Furthermore, the center of the transformation matrix of the material to be rendered is overlapped with the center of the mask matrix of the material to be rendered; the mask operation parameters of the pixel points of the transformation matrix of the material to be rendered in the mask matrix of the material to be rendered are set to 1, and the values of other pixel points in the mask matrix of the material to be rendered are set to 0, and the mask matrix of the material to be rendered is subjected to a mask operation with the size of the transformation matrix of the material to be rendered to obtain a transformation reflection matrix of the material to be rendered; that is, in the mask matrix, the transformation matrix is overlapped with the center of the mask matrix, and the mask matrix is subjected to a mask operation with the size of the transformation matrix, and the pixel values of the overlapping pixel points of the transformation matrix and the mask matrix are retained.
[0060] It should be noted that since the transformation reflection matrix of the material to be rendered is scaled according to the distance between the camera and the material to be rendered when shooting the digital asset, the transformation reflection matrix of the material to be rendered is different from the actual size of the rendering material. Therefore, the transformation reflection matrix of the material to be rendered needs to be restored.
[0061] Specifically, for any material to be rendered, the transformed reflection matrix of the material to be rendered is scaled using an image pyramid algorithm, and the inverse of the observation distance ratio is used as a scaling factor in the image pyramid to obtain the reflection matrix of the material to be rendered. Since the image pyramid algorithm is a well-known prior art, it will not be described in detail in this embodiment.
[0062] It should be noted that calling the observation matrix means that step S001 pre-constructs the observation matrix whose observation angle in the observation scene is closest to the observation interpretation of the material to be rendered. Since the distance between the actual camera and the material to be rendered is different from the distance between the observation point and the transparent material in the constructed observation scene, the viewing distance is adjusted by scaling the observation matrix, and finally the reflection matrix of the material to be rendered is obtained. In terms of the observation angle, the reflection matrix of the material to be rendered can simulate the performance of the material to be rendered after rendering to the greatest extent.
[0063] At this point, the reflection matrix of the material to be rendered is obtained.
[0064] Step S004: acquiring a rendering matrix of the material to be rendered according to the illumination matrix of the material to be rendered and the reflection matrix of the material to be rendered; and rendering the material to be rendered according to the rendering matrix of the material to be rendered.
[0065] It should be noted that after obtaining the illumination matrix of the material to be rendered and the reflection matrix of the material to be rendered respectively through step S002 and step S003, the rendering matrix of the material to be rendered can be obtained according to the illumination matrix of the material to be rendered and the reflection matrix of the material to be rendered. Finally, the material to be rendered is rendered using the rendering matrix of the material to be rendered.
[0066] Preferably, in a specific embodiment of the present invention, for any material to be rendered, an illumination matrix of the material to be rendered and a reflection matrix of the material to be rendered are obtained, all element values in the illumination matrix of the material to be rendered are standardized to obtain the standardized illumination matrix of the material to be rendered; the standardized illumination matrix of the material to be rendered is multiplied with the elements at the same position in the reflection matrix of the material to be rendered to obtain the rendering matrix of the material to be rendered.
[0067] For example: the illumination matrix of the material to be rendered after normalization is: The reflection matrix of the material to be rendered is The rendering matrix of the material to be rendered is
[0068] Furthermore, for any material to be rendered, the refractive index of the material to be rendered is obtained; according to the background color of the material to be rendered when the digital asset is photographed, combined with the refractive index of the material to be rendered, the color matrix of the material to be rendered is obtained; the color value of each element in the color matrix is converted into the HSV color gamut space to obtain the brightness matrix of the color matrix;
[0069] Linearly normalize all elements in the rendering matrix of the material to be rendered, and multiply the normalized rendering matrix of the material to be rendered with the elements at the same position in the brightness matrix to obtain the brightness adjustment matrix of the material to be rendered, perform color restoration according to the brightness adjustment matrix of the material to be rendered, and complete the rendering of the material to be rendered.
[0070] At this point, this embodiment is completed.
[0071] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A web page 3D preview method based on an LED virtual shooting digital asset platform, characterized in that: The method comprises the following steps: Pre-build reflection scenes to obtain the reflection matrix of transparent materials; pre-build observation scenes to obtain the observation matrix of transparent materials; Classify all transparent materials in the digital asset to obtain the material to be rendered; obtain the matrix to be sampled according to the angle between the light source and the material to be rendered when shooting the digital asset; downsample the matrix to be sampled to obtain the illumination matrix of the material to be rendered; According to the angle between the camera and the material to be rendered when shooting the digital asset, the mask matrix of the material to be rendered is obtained; according to the distance between the camera and the material to be rendered when shooting the digital asset, the size of the transformation matrix of the material to be rendered is obtained; according to the size of the transformation matrix of the material to be rendered, combined with the mask matrix of the material to be rendered, the transformation reflection matrix of the material to be rendered is obtained; the transformation reflection matrix of the material to be rendered is scaled to obtain the reflection matrix of the material to be rendered; A rendering matrix of the material to be rendered is obtained according to the illumination matrix of the material to be rendered and the reflection matrix of the material to be rendered; and the material to be rendered is rendered according to the rendering matrix of the material to be rendered.
2. The webpage 3D preview method based on LED virtual shooting digital asset platform according to claim 1 is characterized in that: The specific method of pre-building the reflection scene and obtaining the reflection matrix of the transparent material includes: Pre-construct an empty reflection scene, add a parallel light source to the reflection scene, preset γ transparent materials with a specification of β×β, where γ and β are the preset number of transparent materials and the transparent material specifications respectively; let the angle between the first transparent material and the parallel light source be Place the first transparent material; Let the angle between the second transparent material and the parallel light source be Place the second transparent material; and so on, until the angle between the γth transparent material and the parallel light source is Place the γth transparent material; obtain the reflection matrix of each transparent material in the reflection scene, record the angle between the transparent material corresponding to the reflection matrix and the parallel light source as the incident angle of the reflection matrix, and use the projection direction of the parallel light source on the reflection matrix as the direction of the reflection matrix.
3. The webpage 3D preview method based on LED virtual shooting digital asset platform according to claim 1 is characterized in that: The specific method of pre-constructing the observation scene and obtaining the observation matrix of the transparent material includes: An observation scene is pre-constructed, a transparent material is placed in the observation scene, a parallel light source is set to vertically illuminate the transparent material; an observation distance ε is preset; an observation point is set at ε meters above the center of the transparent material, and an observation matrix of the transparent material is obtained at the observation point; an angle adjustment step μ is preset; the angle of the transparent material is adjusted through the center of the transparent material, and the angle of the transparent material is adjusted μ each time, and the observation matrix of the transparent material at different angles is obtained through the observation point, and the direction from the observation point to the center of the transparent material corresponding to the observation matrix is used as the observation direction of the observation matrix, the angle between the observation direction and the transparent material corresponding to the observation matrix is used as the observation angle of the observation matrix, and the projection direction of the observation direction on the observation matrix is used as the direction of the observation matrix.
4. The webpage 3D preview method based on LED virtual shooting digital asset platform according to claim 2 is characterized in that: The specific method of obtaining the matrix to be sampled according to the angle between the light source and the material to be rendered when shooting the digital asset includes: For any material to be rendered, the direction of light when shooting the digital asset is obtained, the angle between the tangent plane of the center point of the material to be rendered and the direction of light is recorded as the incident angle of the material to be rendered, and the projection direction of the light direction on the material to be rendered is taken as the illumination expression direction of the material to be rendered; The reflection matrix closest to the material to be rendered in terms of incident angle is used as the calling reflection matrix; The center of the called reflection matrix is overlapped with the center of the material to be rendered, and the direction of the called reflection matrix is overlapped with the illumination expression direction of the material to be rendered, so as to obtain the matrix to be sampled of the material to be rendered.
5. The webpage 3D preview method based on LED virtual shooting digital asset platform according to claim 4 is characterized in that: The specific method of downsampling the matrix to be sampled to obtain the illumination matrix of the material to be rendered includes: The distance between the camera and the material to be rendered when shooting the digital asset is recorded as the shooting distance, and two distance thresholds d1 and d2 and three downsampling coefficients k1, k2, and k3 are preset; if the shooting distance is less than or equal to d1, k1 is used as the downsampling coefficient of the LOD grading method to downsample the sampling matrix to be processed; if the shooting distance is greater than d1 and less than or equal to d2, k2 is used as the downsampling coefficient of the LOD grading method to downsample the sampling matrix to be processed; if the shooting distance is greater than d2, k3 is used as the downsampling coefficient of the LOD grading method to downsample the sampling matrix to be processed, so as to obtain the illumination matrix of the material to be rendered.
6. The webpage 3D preview method based on LED virtual shooting digital asset platform according to claim 3 is characterized in that: The specific method of obtaining the mask matrix of the material to be rendered according to the angle between the camera and the material to be rendered when shooting the digital asset includes: For any material to be rendered, the direction from the camera to the center of the material to be rendered when shooting the digital asset is taken as the shooting direction, the material to be rendered shot by the camera is recorded as the shooting matrix of the material to be rendered, and the angle between the tangent plane of the center point of the material to be rendered and the shooting direction is recorded as the observation angle of the material to be rendered; the projection direction of the shooting direction on the material to be rendered is taken as the shooting expression direction of the material to be rendered; the observation matrix closest to the material to be rendered in terms of the observation angle is taken as the calling observation matrix; The center of the called observation matrix is overlapped with the center of the material to be rendered, and the direction of the called observation matrix is overlapped with the shooting direction of the material to be rendered, so as to obtain the mask matrix of the material to be rendered.
7. The webpage 3D preview method based on LED virtual shooting digital asset platform according to claim 6 is characterized in that: The specific method of obtaining the size of the transformation matrix of the material to be rendered according to the distance between the camera and the material to be rendered when shooting the digital asset includes: For any material to be rendered, the distance between the camera and the material to be rendered when shooting the digital asset is recorded as the shooting distance; the ratio between the shooting distance and the preset observation distance ε is recorded as the observation distance ratio; The center of the shooting matrix of the material to be rendered is used as the scaling center, and the observation distance ratio is used as the scaling ratio to scale the shooting matrix of the material to be rendered, so as to obtain the size of the transformation matrix of the material to be rendered.
8. The webpage 3D preview method based on LED virtual shooting digital asset platform according to claim 1 is characterized in that: The method of obtaining the transformation reflection matrix of the material to be rendered according to the size of the transformation matrix of the material to be rendered and combining the mask matrix of the material to be rendered includes the following specific methods: For any material to be rendered, the center of the transformation matrix of the material to be rendered is made to overlap with the center of the mask matrix of the material to be rendered; The mask operation parameters of the pixel points of the transformation matrix of the material to be rendered in the mask matrix of the material to be rendered are set to 1, the values of other pixel points in the mask matrix of the material to be rendered are set to 0, and the mask operation is performed on the mask matrix of the material to be rendered with the size of the transformation matrix of the material to be rendered to obtain the transformation reflection matrix of the material to be rendered.
9. The webpage 3D preview method based on LED virtual shooting digital asset platform according to claim 7 is characterized in that: The transformation reflection matrix of the material to be rendered is scaled to obtain the reflection matrix of the material to be rendered, and the specific method includes: For any material to be rendered, the reciprocal of the observation distance ratio is used as the scaling ratio to scale the transformation reflection matrix of the material to be rendered to obtain the reflection matrix of the material to be rendered.
10. The webpage 3D preview method based on LED virtual shooting digital asset platform according to claim 1, characterized in that: The specific method of obtaining the rendering matrix of the material to be rendered according to the illumination matrix of the material to be rendered and the reflection matrix of the material to be rendered includes: For any material to be rendered, obtain the illumination matrix and the reflection matrix of the material to be rendered, standardize all element values in the illumination matrix of the material to be rendered to obtain the standardized illumination matrix of the material to be rendered; multiply the standardized illumination matrix of the material to be rendered by the elements at the same position in the reflection matrix of the material to be rendered to obtain the rendering matrix of the material to be rendered.
Citation Information
Patent Citations
Virtual fluid surface rendering method and device, equipment and storage medium
CN111598986A
System and method for synthesizing data for training statistical models in different imaging modalities including polarized images
CN115428028A
Method for quickly combining and rendering complex neural scene
CN116958367A
Method for measuring the fidelity of warped image layer approximations in a real-time graphics rendering pipeline
US6064393A
Global illumination rendering method on the basis of virtual light source and adaptive sparse matrix reduction
WO2017167084A1