Method and system for reconstructing micro-surface model of object material

Through the kernel prediction network and microsurface primitive generation form, the microsurface model of object material is restored and reconstructed, which solves the problem that traditional rendering technology is difficult to restore high-frequency material details, and achieves high-quality and physically correct microsurface rendering.

CN114581577BActive Publication Date: 2025-02-28SHANDONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210124528.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-10
Publication Date
2025-02-28
Estimated Expiration
2042-02-10

AI Technical Summary

Technical Problem

Traditional rendering technology is difficult to restore the appearance details of high-frequency materials, resulting in insufficient realism in the rendering results.

Method used

The primitive parameters of the structural microsurface model are restored through the kernel prediction network, and the microsurface primitive generation formula and arrangement function are designed to generate high-resolution normal maps to realize the reconstruction of the microsurface model.

Benefits of technology

The high-quality, physically correct microsurface model reconstruction is achieved, which improves the authenticity and efficiency of rendering results, and reduces the cost of manpower and material resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for reconstructing a micro-surface model of an object material, the method comprising: obtaining an illumination image of the surface of the object material under a light source; converting the illumination image into a tensor; processing the tensor based on a kernel prediction network of a trained reconstruction model to obtain a target vector of the current illumination image; processing the target vector based on a normal map generation module of the trained reconstruction model to determine a normal map of the micro-surface model, thereby obtaining a reconstructed micro-surface model; based on the normal map, re-rendering the micro-surface model using a rendering module of the trained reconstruction model to obtain a rendered image. The highlight shape features are efficiently extracted from the macroscopic illumination image of the material, micro-surface primitive parameters are obtained, the micro-surface is explicitly modeled, and a normal map of the corresponding material that can be directly applied to an existing rendering program is generated as a micro-surface representation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of three-dimensional rendering materials, and in particular to a method and system for reconstructing a micro-surface model of an object material. Background Art

[0002] The statements in this section merely mention background art related to the present invention and do not necessarily constitute prior art.

[0003] In recent years, object micro-surface modeling technology in the field of realistic rendering has received widespread attention. In real life, the surface of an object can reflect light from the surrounding environment. The distribution of reflected light on the surfaces of objects with different structures is different, thus presenting different "textures" and conveying different visual experiences. The bidirectional reflectance distribution function (BRDF) in traditional rendering usually uses a smooth normal distribution function (NDF) to simulate the micro-surface structure of the material, but this method cannot restore the appearance details of high-frequency materials, which greatly reduces the realism of the rendering results. Summary of the invention

[0004] In order to solve the shortcomings of the prior art, the present invention provides a method and system for reconstructing a microsurface model of an object material; the difference in the microsurface primitive structure at the microscopic scale will affect the surface highlight shape of the object at the macroscopic scale. Based on this characteristic of the microsurface, the method uses a kernel prediction network to restore the primitive parameters of the structural microsurface model on the premise of obtaining the object surface rendering picture, and designs a series of microsurface primitive production formulas and arrangement functions, which can generate the corresponding high-resolution normal map, and obtain a high-quality and physically correct microsurface model reconstruction result.

[0005] In a first aspect, the present invention provides a method for reconstructing a micro-surface model of an object material;

[0006] The object material micro-surface model reconstruction method includes:

[0007] Obtain the illumination image of the object material surface under the light source; convert the illumination image into a tensor;

[0008] Based on the kernel prediction network of the trained reconstruction model, the tensor is processed to obtain a target vector of the current illumination image;

[0009] A normal map generation module based on the trained reconstruction model processes the target vector to determine the normal map of the microsurface model, thereby obtaining a reconstructed microsurface model;

[0010] Based on the normal map, the rendering module of the trained reconstruction model is used to re-render the microsurface model to obtain a rendered image; wherein the reconstruction model includes: a kernel prediction network, a normal map generation module and a rendering module connected in sequence.

[0011] In a second aspect, the present invention provides a system for reconstructing a micro-surface model of an object material;

[0012] Object material micro-surface model reconstruction system, including:

[0013] An acquisition module is configured to: acquire an illumination image of a surface of an object material under a light source; and convert the illumination image into a tensor;

[0014] A vector generation module is configured to: process the tensor based on a kernel prediction network of a trained reconstruction model to obtain a target vector of a current illumination image;

[0015] A normal map generation module, which is configured to: process the target vector based on the normal map generation module of the trained reconstruction model, determine the normal map of the microsurface model, and then obtain the reconstructed microsurface model;

[0016] A re-rendering module is configured to: based on the normal map, use the rendering module of the trained reconstruction model to re-render the microsurface model to obtain a rendered image; wherein the reconstruction model includes: a kernel prediction network, a normal map generation module and a rendering module connected in sequence.

[0017] In a third aspect, the present invention further provides an electronic device, comprising:

[0018] a memory for non-transitory storage of computer-readable instructions; and

[0019] a processor for executing the computer readable instructions,

[0020] When the computer-readable instructions are executed by the processor, the method described in the first aspect is executed.

[0021] In a fourth aspect, the present invention further provides a storage medium that non-temporarily stores computer-readable instructions, wherein when the non-temporary computer-readable instructions are executed by a computer, the instructions of the method described in the first aspect are executed.

[0022] In a fifth aspect, the present invention further provides a computer program product, comprising a computer program, wherein the computer program is used to implement the method described in the first aspect when running on one or more processors.

[0023] Compared with the prior art, the present invention has the following beneficial effects:

[0024] The present invention provides a method for reconstructing the microsurface model of an object material based on a kernel prediction network, which can be applied to structured microsurface materials, can efficiently extract the highlight shape features from the macroscopic illumination image of the material, obtain the microsurface primitive parameters, explicitly model the microsurface, and generate the normal map of the corresponding material that can be directly applied to the existing rendering program as a microsurface representation. There is no need to use additional equipment to collect from the real world, which reduces the material cost of microsurface reconstruction.

[0025] The present invention provides a series of microsurface primitive production formulas and arrangement functions based on physics. These functions are designed strictly in accordance with real-world geometric rules and can be applied to microsurface primitives of different structures. The microsurface primitive parameters learned by the network are used as input to determine the primitive structure type, size, arrangement mode and other elements, automatically model the entire microsurface, and generate a normal map. While ensuring the physical correctness of the microsurface model, this method avoids the inefficiency of manual design by traditional artists, reduces the trial and error cost of map design, and reduces the labor cost of material map design.

[0026] The present invention provides a lightweight differentiable rendering program based on normal maps. The rendering program can be embedded in a neural network loss calculation module, and re-rendering is performed using a generated normal map, which fully utilizes the parallel computing capability of a GPU, quickly obtains a re-rendered image for calculating a mean absolute error, accelerates network convergence, and obtains a correct microsurface reconstruction result. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0028] Figure 1 It is a flow chart of a method for reconstructing a micro-surface model of an object material based on a convolution kernel prediction network provided in the first embodiment of the present invention;

[0029] Figure 2 is a convolution kernel prediction network structure diagram provided by the first embodiment of the present invention;

[0030] Figure 3(a)-Figure 3(p) is a schematic diagram of a normal map of a microsurface primitive generation formula provided in the first embodiment of the present invention;

[0031] Figure 4 is a flow chart of reconstructing a micro-surface model based on parameters provided in the first embodiment of the present invention;

[0032] Figure 5 is a schematic diagram of querying texture information corresponding to a shading point provided in the first embodiment of the present invention;

[0033] Figure 6 Schematic diagram of a method for calculating a normal contribution value within a texture block provided in Embodiment 1 of the present invention;

[0034] Figure 7(a)-Figure 7(l) This is a micro-surface reconstruction result diagram provided by the first embodiment of the present invention. DETAILED DESCRIPTION

[0035] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0036] It should be noted that the terms used herein are only for describing specific embodiments, and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that the terms "include" and "have" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0037] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.

[0038] In this embodiment, all data is obtained in compliance with laws and regulations and based on the user's consent, and is used legally.

[0039] In order to obtain more realistic visual effects, in the application of realistic rendering, we introduce the micro-surface model, regard the tiny mirror with special geometric structure as a primitive, and represent the microscopic surface of the object as a collection of primitives with different orientations. However, the acquisition cost of the micro-surface of objects in the real world is high, and the accuracy is difficult to meet the requirements of high-resolution material rendering. Some methods (for example, the mirror micro-geometry generation method based on adversarial networks) can simulate the normal distribution function of the high-frequency material surface on the basis of avoiding micro-surface modeling, and obtain relatively correct visual rendering results, but it is impossible to verify whether the model exists in the real world, that is, its physical correctness cannot be guaranteed. How to better extract the micro-surface structure that ensures physical correctness is one of the problems that need to be solved urgently.

[0040] Embodiment 1

[0041] This embodiment provides a method for reconstructing a micro-surface model of an object material;

[0042] like Figure 1 As shown, the object material micro-surface model reconstruction method includes:

[0043] S101: Obtaining a lighting image of the surface of an object material under a light source; converting the lighting image into a tensor;

[0044] S102: Based on the trained kernel prediction network of the reconstruction model, the tensor is processed to obtain a target vector of the current illumination image;

[0045] S103: Based on the trained normal map generation module of the reconstructed model, the target vector is processed to determine the normal map of the microsurface model, thereby obtaining the reconstructed microsurface model;

[0046] S104: Based on the normal map, re-render the microsurface model using a rendering module of a trained reconstruction model to obtain a rendered image;

[0047] The reconstruction model includes: a core prediction network, a normal map generation module and a rendering module which are connected in sequence.

[0048] Furthermore, the S101: obtaining an illumination image of the surface of the object material under the light source; specifically refers to:

[0049] Get the illumination image of a single material surface under a point light source with a coordinate position of (0,0,1) and a light intensity of 100.

[0050] The resolution of the illumination image is 128*128.

[0051] Furthermore, the S101: converting the illumination image into a tensor specifically includes:

[0052] Through normalization calculation, the illumination image is converted into a standardized tensor with a tensor value range between [0,1], and the formula is as follows:

[0053]

[0054] Among them, x * is a tensor value, x is the image RGB value, max and min represent the maximum and minimum RGB values ​​of the image respectively.

[0055] Furthermore, the S102: based on the trained kernel prediction network of the reconstruction model, the tensor is processed to obtain a target vector of the current illumination image; wherein the kernel prediction network includes:

[0056] The input layer, convolution layer c1, convolution layer c2, convolution layer c3, pooling layer, convolution layer c4, fully connected layer f1 and fully connected layer f2 are connected in sequence.

[0057] Figure 2 The specific structure of the kernel prediction network is shown. The input layer outputs a (128*128*3) tensor, the convolution layer c1 outputs a (42*42*32) kernel, the convolution layer c2 outputs a (19*19*64) kernel, the convolution layer c3 outputs a (9*9*128) kernel, the pooling layer outputs a (3*3*256) kernel, the convolution layer c4 outputs a (1*1*128) kernel, the fully connected layer f1 outputs a (64*1*1) tensor, and the fully connected layer f2 outputs a (4*1*1) tensor.

[0058] Furthermore, the working principle of the core prediction network includes:

[0059] Using the constructed kernel prediction network, the tensor is input into the kernel prediction network to extract the features of the input image, and the input image is downsampled by filtering layer by layer through alternating convolutional layers and pooling layers, and the input image is mapped to the hidden layer feature space to generate a feature matrix;

[0060] The feature matrix is ​​input into the fully connected layer, the feature information is integrated through the fully connected layer, the feature distribution representation learned by the upper network is mapped to the sample label space, and a low-dimensional target vector that can represent the micro-surface structure parameters is generated.

[0061] The tensor of the illumination image of the material surface is input into the kernel prediction network, and the target vector is generated through layer-by-layer convolution kernel filtering.

[0062] The four-dimensional data of the target vector obtained represent the physical information of the microsurface primitive in four different dimensions: the shape of the primitive geometry (such as prism, prism, inclined plane, plane, etc.), tilt angle, height, and bottom size. It can describe the object characteristics of the structured microsurface primitive concisely and accurately. Figure 3(a)-Figure 3(p) As shown, based on this target vector, this example can use it as the input of the primitive production formula, parse the primitive appearance it represents, and construct the corresponding primitive model, further reducing the storage cost of the microsurface information.

[0063] Furthermore, the training process of the reconstructed model after training includes:

[0064] Constructing a training set, wherein the training set is a lighting image of a known rendered image;

[0065] Input the training set into the reconstruction model to train the reconstruction model.

[0066] Calculate the mixed error loss of the rendered image and the illumination image input to the neural network to complete the loop feedback;

[0067] When the rendering loss function value of the reconstructed model no longer decreases, the training is stopped to obtain the trained reconstructed model.

[0068] Since the reconstruction model includes: a core prediction network, a normal map generation module and a rendering module connected in sequence, the trained reconstruction model is obtained, and the core prediction network of the trained reconstruction model, the normal map generation module of the trained reconstruction model and the rendering module of the trained reconstruction model are also obtained.

[0069] The obtained re-rendered image is subjected to the mean absolute error loss function (L1 Loss) to obtain the average value of the absolute difference between the predicted value re-rendered image and the target value network input illumination image. The formula is as follows:

[0070]

[0071] Where f(x i ) represents the pixel value of the target image, Represents the pixel value of the predicted image, and n represents the number of image pixels involved in the calculation.

[0072] In this embodiment, the TensorFlow 2.0 framework, Xavier initialization and Adam optimizer are used, the initial learning rate is 0.004, and 300 generations are trained each time.

[0073] The dataset for this example is obtained from a unit disk scene with camera viewpoint coordinates (0,0,1) and light source position coordinates (0,0,1), light intensity of 100, and object radius of 1. There are 5024 images in total, 3200 for training and 1824 for testing. Each batch of training sets contains 32 images, the first 31 for training, and the last one for verification.

[0074] The graphics processor is NVIDIA GeForce RTX 2080Ti, and the video memory is 12GB. The average training time of the material recovery method in this embodiment is 8.54s, which can be divided into four time-consuming parts: network feature extraction and kernel prediction to extract the target vector (0.5s), restore the normal map from the target vector and preprocess it (0.7s), obtain the re-rendering result (7.3s) and calculate the loss function (0.04s).

[0075] Further, S103: based on the trained reconstructed model normal map generation module, the target vector is processed to determine the normal map of the microsurface model, thereby obtaining the reconstructed microsurface model; specifically comprising:

[0076] The target vector is used as the input of the microsurface primitive generation formula and the primitive arrangement function to generate the normal map of the microsurface model.

[0077] Among them, the normal map generation module refers to the microsurface primitive generation formula, the formula is as follows:

[0078]

[0079] Among them, H(i,j) is the RGB value of the current pixel, A, B, C are arbitrary real numbers used to represent the inclined surface position information of different types of microsurface primitives, i, j are the horizontal and vertical position subscripts of the current pixel, and α is the inclination angle of the microsurface primitive.

[0080] Further, S103: based on the trained reconstructed model normal map generation module, the target vector is processed to determine the normal map of the microsurface model, thereby obtaining the reconstructed microsurface model; specifically comprising:

[0081] S1031: Using the target vector as the input of the microsurface primitive production formula, the height of each microsurface primitive pixel position is calculated according to the geometric parameters of the primitive, and a height map is generated. For any point H(i,j) on the height map, two vectors are obtained along the x and y directions:

[0082] S(i,j)=<1,0,aH(i+1,j)-aH(i-1,j)> (1)

[0083] T(i,j)=<0,1,aH(i,j+1)-aH(i,j-1)> (2)

[0084] Among them, i and j are the horizontal and vertical position subscripts of the current pixel, S(i,j) and T(i,j) represent the vectors of the pixel point (i,j) in the x and y directions respectively, a is an arbitrary constant in the range of [0,1], and H(i,j) represents the RGB value of the pixel point. The vector product of the two vectors is calculated to obtain the normal vector of the point, and the formula is as follows:

[0085]

[0086] Among them, i and j are the horizontal and vertical position subscripts of the current pixel, S(i,j) and T(i,j) represent the vectors of the pixel point (i,j) in the x and y directions respectively, S Z ,T Z It represents the projection of S and T in the z direction, and N(i,j) represents the normal vector of the point, that is, the RGB value of the normal map.

[0087] S1032: Tiling the normal map of a single primitive to obtain a high-resolution (8000*8000) normal map. The specific process of the above steps is as follows: Figure 4 shown.

[0088] Further, S104: based on the normal map, the microsurface model is re-rendered using a rendering module of the trained reconstruction model to obtain a rendered image; specifically comprising:

[0089] S1041: preprocessing the normal map, using discretized four-dimensional Gaussian lobes to describe the micro-surface structure, sampling the normal map, and calculating the four-dimensional Gaussian lobe corresponding to each sampling point;

[0090] Among them, the properties of the Gaussian lobe include: the two-dimensional position u of the lobe in the texture, the two-dimensional normal information s at position u, the two-dimensional standard deviation σ h , the 2*2 Jacobian determinant J used to represent the curvature of the plane;

[0091] S1042: Obtaining the shading point footprint; the shading point footprint refers to: the area where the normal map corresponding to the shading point is queried, and extracting the texture information of the current area according to the size of the footprint corresponding to the current shading point. The process is as follows: Figure 5 shown.

[0092] S1043: Traverse each normal in the current area to search for normals that meet the half-vector search range condition. If the angle between the half-vector corresponding to the shading point and the normal of the Gaussian lobe is less than 0.5, then it meets the condition. Otherwise, it does not meet the condition. The process is as follows: Figure 5 shown.

[0093] Among them, the half vector refers to the middle vector between the light source direction and the viewing angle direction;

[0094] The half-vector search range refers to the angle between the half-vector corresponding to the shading point and the Gaussian lobe normal.

[0095] S1044: Figure 6 As shown, all normals that meet the query conditions are weighted and summed according to formula (4) to obtain the total contribution value of the screened Gaussian lobes, and then the normal distribution function term is obtained:

[0096]

[0097] Among them, L i represents the queried Gaussian lobes, which are used to simulate complex normal distribution functions, and their number is denoted by τ. It is the Gaussian distribution function about the position u, which is used to represent the range of the footprint corresponding to the shading point. It's a footprint Query the normal distribution function term with half vector s, which is used to represent the energy distribution of the material in different directions.

[0098] S1045: Substitute the normal distribution function term into the Cook-Torrance illumination model of formula (5), calculate the RGB value of the illumination of the shading point, and obtain an illumination image.

[0099]

[0100] F schlick (vih)=c spec +(1-c spec )(1-(v·h) 5 ) (6)

[0101]

[0102] Among them, l represents the light source vector, v represents the viewpoint vector, h represents the half vector, F schlick (v,h) is the Fresnel term approximation, c spec The basic reflectivity of the plane is shown, and it takes different values ​​depending on the material. In this embodiment, it is fixed to (0.96, 0.96, 0.97). SchlickGGX (n,v,k) is an approximate representation of the geometric masking term; represents the normal distribution term, which is calculated using the above formula (4). The value of k in formula (7) is (α is the surface roughness, which is fixed at 0.05 in this example).

[0103] The rendering module refers to formula (4).

[0104] Using the GPU-based parallel rendering program built on the python+numba framework, basic operations such as light traversal, scene coordinate mapping, image rasterization, and output of rendering results can be implemented to quickly obtain basic rendering results of the material surface for subsequent network training.

[0105] The present invention uses a kernel prediction network to restore a structured microsurface model of an object material in an illuminated image; by re-rendering the restored primitive parameters to determine the correctness of the parameters, the visual correctness of the restored microsurface model is ensured compared with the prior art; by designing a series of structured primitive functions to perform microsurface modeling at the geometric level, the problems of high labor cost and low production efficiency in traditional artificial microsurface normal map generation are solved, and the physical correctness of the restored microsurface model is ensured compared with the prior art. Figure 7(a)-Figure 7(l) The reconstruction results of this example are shown.

[0106] Embodiment 2

[0107] This embodiment provides a system for reconstructing a micro-surface model of an object material;

[0108] Object material micro-surface model reconstruction system, including:

[0109] An acquisition module is configured to: acquire an illumination image of a surface of an object material under a light source; and convert the illumination image into a tensor;

[0110] A vector generation module is configured to: process the tensor based on a kernel prediction network of a trained reconstruction model to obtain a target vector of a current illumination image;

[0111] A normal map generation module, which is configured to: process the target vector based on the normal map generation module of the trained reconstruction model, determine the normal map of the microsurface model, and then obtain the reconstructed microsurface model;

[0112] A re-rendering module is configured to: based on the normal map, use the rendering module of the trained reconstruction model to re-render the microsurface model to obtain a rendered image; wherein the reconstruction model includes: a kernel prediction network, a normal map generation module and a rendering module connected in sequence.

[0113] It should be noted that the acquisition module, vector generation module, normal map generation module and re-rendering module described above correspond to steps S101 to S104 in Embodiment 1, and the examples and application scenarios implemented by the modules and corresponding steps are the same, but are not limited to the contents disclosed in Embodiment 1 described above. It should be noted that the modules described above as part of the system can be executed in a computer system such as a set of computer executable instructions.

[0114] The description of each embodiment in the above embodiments has different emphases. For parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0115] The proposed system can be implemented in other ways. For example, the system embodiment described above is only illustrative, and the division of the modules is only a logical function division. In actual implementation, there may be other division methods, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed.

[0116] Embodiment 3

[0117] This embodiment also provides an electronic device, including: one or more processors, one or more memories, and one or more computer programs; wherein the processor is connected to the memory, and the one or more computer programs are stored in the memory. When the electronic device is running, the processor executes the one or more computer programs stored in the memory so that the electronic device executes the method described in the above embodiment one.

[0118] It should be understood that in this embodiment, the processor may be a central processing unit CPU, and the processor may also be other general-purpose processors, digital signal processors DSP, application-specific integrated circuits ASIC, off-the-shelf programmable gate arrays FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0119] The memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. A portion of the memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.

[0120] In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in a processor or an instruction in the form of software.

[0121] The method in the first embodiment can be directly embodied as a hardware processor, or a combination of hardware and software modules in the processor. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware. To avoid repetition, it will not be described in detail here.

[0122] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with this embodiment can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0123] Embodiment 4

[0124] This embodiment further provides a computer-readable storage medium for storing computer instructions. When the computer instructions are executed by a processor, the method described in the first embodiment is completed.

[0125] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for reconstructing a micro-surface model of an object material, characterized in that: include: Get the illumination image of the object material surface under the light source; Convert the illumination image into a tensor; Based on the kernel prediction network of the trained reconstruction model, the tensor is processed to obtain a target vector of the current illumination image; The normal map generation module based on the trained reconstruction model processes the target vector to determine the normal map of the microsurface model, thereby obtaining the reconstructed microsurface model, specifically including: The target vector is used as the input of the microsurface primitive production formula, and the height of each microsurface primitive pixel position is calculated according to the geometric parameters of the primitive to generate a height map. For any point on the height map, two vectors are obtained along the x and y directions; The primitive is a tiny mirror with a special geometric structure; The microsurface primitive production formula is: in, is the RGB value of the current pixel, is an arbitrary real number used to represent the tilt position information of different types of microsurface primitives. is the horizontal and vertical position subscript of the current pixel, is the tilt angle of the microsurface primitive; Calculate the vector product of the two vectors to get the normal vector of the point: the RGB value of the normal map; Tiling the normal map of a single primitive to get a high-resolution normal map; Based on the normal map, the rendering module of the trained reconstruction model is used to re-render the microsurface model to obtain a rendered image; wherein the reconstruction model includes: a kernel prediction network, a normal map generation module and a rendering module connected in sequence.

2. The object material micro-surface model reconstruction method according to claim 1, characterized in that: Convert the illumination image into a tensor; specifically: Through normalization calculation, the illumination image is converted into a standardized tensor with a tensor value range between [0, 1].

3. The object material micro-surface model reconstruction method according to claim 1, characterized in that: Based on the trained core prediction network of the reconstruction model, the tensor is processed to obtain a target vector of the current illumination image; wherein the core prediction network includes: The input layer, convolution layer c1, convolution layer c2, convolution layer c3, pooling layer, convolution layer c4, fully connected layer f1 and fully connected layer f2 are connected in sequence.

4. The object material micro-surface model reconstruction method according to claim 3, characterized in that: The working principle of the kernel prediction network includes: Input the tensor into the kernel prediction network, extract the features of the input image, perform downsampling operation on the input image through layer-by-layer filtering of alternatingly distributed convolutional layers and pooling layers, map the input image to the hidden layer feature space, and generate a feature matrix; The feature matrix is ​​input into the fully connected layer, the feature information is integrated through the fully connected layer, the feature distribution representation learned by the upper network is mapped to the sample label space, and a low-dimensional target vector that can represent the micro-surface structure parameters is generated.

5. The object material micro-surface model reconstruction method according to claim 1, characterized in that: The reconstructed model after training. The training process includes: Constructing a training set, wherein the training set is a lighting image of a known rendered image; Input the training set into the reconstruction model to train the reconstruction model. Calculate the mixed error loss of the rendered image and the illumination image input to the neural network to complete the loop feedback; When the rendering loss function value of the reconstructed model no longer decreases, the training is stopped to obtain the trained reconstructed model.

6. The object material micro-surface model reconstruction method according to claim 1, characterized in that: Based on the normal map, the microsurface model is re-rendered using a rendering module of a trained reconstruction model to obtain a rendered image; specifically comprising: Preprocess the normal map, use discretized four-dimensional Gaussian lobes to describe the micro-surface structure, sample the normal map, and calculate the four-dimensional Gaussian lobe corresponding to each sampling point; Obtaining a shading point footprint; the shading point footprint refers to: an area where the normal map corresponding to the shading point is queried, and extracting texture information of the current area according to the size of the footprint corresponding to the current shading point; Traverse each normal in the current area and query the normal that meets the half-vector search range condition. If the angle between the half-vector corresponding to the shading point and the normal of the Gaussian lobe is less than 0.5, it meets the condition, otherwise it does not meet the condition. Perform weighted summation on all normals that meet the query conditions to obtain the total contribution value of the screened Gaussian lobes, and then obtain the normal distribution function term; Substitute the normal distribution function term into the lighting model, calculate the RGB value of the lighting at the shading point, and obtain the lighting image.

7. Object material micro-surface model reconstruction system, characterized by: include: An acquisition module is configured to: acquire an illumination image of a surface of an object material under a light source; Convert the illumination image into a tensor; A vector generation module is configured to: process the tensor based on a kernel prediction network of a trained reconstruction model to obtain a target vector of a current illumination image; The normal map generation module is configured to: process the target vector based on the normal map generation module of the trained reconstruction model, determine the normal map of the microsurface model, and then obtain the reconstructed microsurface model, specifically including: The target vector is used as the input of the microsurface primitive production formula, and the height of each microsurface primitive pixel position is calculated according to the geometric parameters of the primitive to generate a height map. For any point on the height map, two vectors are obtained along the x and y directions; The primitive is a tiny mirror with a special geometric structure; The microsurface primitive production formula is: in, is the RGB value of the current pixel, is an arbitrary real number used to represent the tilt position information of different types of microsurface primitives. is the horizontal and vertical position subscript of the current pixel, is the tilt angle of the microsurface primitive; Calculate the vector product of the two vectors to get the normal vector of the point: the RGB value of the normal map; Tiling the normal map of a single primitive to get a high-resolution normal map; A re-rendering module is configured to: based on the normal map, use the rendering module of the trained reconstruction model to re-render the microsurface model to obtain a rendered image; wherein the reconstruction model includes: a kernel prediction network, a normal map generation module and a rendering module connected in sequence.

8. An electronic device, comprising: a memory for non-transitory storage of computer readable instructions; as well as a processor for executing the computer readable instructions, Wherein, when the computer-readable instructions are executed by the processor, the method described in any one of claims 1 to 6 is executed.

9. A storage medium, characterized in that it non-temporarily stores computer-readable instructions, wherein: When the non-transitory computer-readable instructions are executed by a computer, the instructions of the method according to any one of claims 1 to 6 are executed.

Citation Information

Patent Citations

  • High-frequency material rendering method and system based on micro-surface theory

    CN111784816A

  • Object surface reflection attribute extraction method, device and equipment and storage medium

    CN111951292A