Microstructure material rendering method and system based on flow matching network

By combining flow matching networks and multilayer perceptron neural networks, the rendering of microstructure materials is decomposed into the product of importance sampling distribution and energy decay, which solves the problems of insufficient rendering accuracy and efficiency in traditional methods and achieves efficient and delicate microstructure material rendering.

CN121120904APending Publication Date: 2025-12-12NANJING UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511290687.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2025-07-31
Filing Date
2025-09-10
Publication Date
2025-12-12

AI Technical Summary

Technical Problem

Traditional BRDF models cannot effectively represent the microscopic arrangement of multi-level scattering, subsurface interference, and anisotropy, making it difficult to solve the bidirectional scattering distribution function for microstructure material rendering. Existing rendering methods are inefficient and lack accuracy.

Method used

A flow matching network is used to learn the importance sampling distribution, and a multilayer perceptron neural network is combined to learn the energy decay term. The rendering process is decomposed into the product of the importance sampling distribution and the energy decay, and the microstructure material is rendered by a pure sampling method.

Benefits of technology

It improves the accuracy and efficiency of microstructure material rendering, resulting in more delicate and realistic rendering results, with a wide range of applications and reduced storage consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121120904A_ABST
    Figure CN121120904A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of computer graphics, and provides a flow matching network-based microstructure material rendering method and system, and the method comprises the steps: carrying out the pure sampling path tracking in a microstructure three-dimensional model, obtaining a plurality of important samples and corresponding sampling weights, carrying out the refusal sampling of the plurality of important samples through employing the sampling weights, and carrying out the refusal sampling of the plurality of important samples; obtaining residual important samples after sampling rejection and a sample survival rate; training a flow matching network model to output importance sampling distribution based on the residual importance samples after sampling rejection, and training a multilayer perceptron neural network model to output an energy attenuation item based on the residual importance samples after sampling rejection and a sample survival rate; and taking a product of an output result of the trained flow matching network model and an output result of the trained multi-layer perceptron neural network model as a final bidirectional reflection distribution function of the microstructure material so as to render the microstructure material. According to the method, rendering can be realized only by performing light sampling among the microstructures.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer graphics technology, specifically relating to a microstructure material rendering method and system based on flow matching networks. Background Technology

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

[0003] In the real world, the visual appearance of many materials is determined not only by their macroscopic shape and surface smoothness but also significantly influenced by their microscopic structure. For example, the luster of silk, the iridescence of feathers, the soft reflection of pearls, and even the delicate texture of fabrics, paper, or skin all originate from the complex microstructures within or on the surface of the materials. To realistically reproduce these appearances in computer graphics, traditional BRDF (Bidirectional Reflectance Distribution Function) models have become insufficient because they typically assume that surfaces are homogeneous at the microscopic scale and cannot represent multi-level scattering, subsurface interference, or anisotropic microscopic arrangements.

[0004] Microstructure material rendering aims to model and simulate the behavior of complex materials under illumination from both geometric and optical perspectives. This field encompasses everything from physically accurate microsurface models (such as microfacets, microscales, and fiber structures) to multilayered media with hierarchical structures (such as coatings + substrates, thin films + volume scattering, etc.). Meanwhile, with the improvement of computing power and the integration of machine learning techniques, researchers have recently begun to explore how to accelerate the fitting and rendering of microstructure appearances through neural networks or data-driven methods.

[0005] Rendering microstructure materials not only challenges the accuracy and efficiency of ray transmission simulation, but also places higher demands on modeling, sampling strategies, and perceptual consistency. The research results have not only advanced physically realistic rendering in computer graphics, but have also been widely applied in fields such as film special effects, game engines, virtual reality, and digital artifact restoration.

[0006] When rendering materials, it is necessary to solve the bidirectional scattering distribution function of the material. However, this function requires bidirectional Monte Carlo estimation when rendering microstructure materials, which is difficult to solve using traditional rendering methods. Summary of the Invention

[0007] To address the aforementioned issues, this invention proposes a microstructure material rendering method and system based on a flow matching network. This invention uses a flow matching network to learn the importance sampling distribution and a multilayer perceptron neural network to learn the energy decay term. By combining the two, the rendering of microstructure materials can be achieved, resulting in realistic microstructure material images.

[0008] According to some embodiments, the first solution of the present invention provides a microstructure material rendering method based on a flow matching network, which adopts the following technical solution: A microstructure material rendering method based on a flow matching network includes: Modeling the microstructure yields a three-dimensional model of the microstructure. Pure sampling path tracing is performed inside the microstructure 3D model to obtain multiple important samples and their corresponding sampling weights. The sampling weights are then used to reject multiple important samples to obtain the remaining important samples and the sample survival rate after rejection. The important samples remaining after rejection sampling are used to train a flow matching network model to output the importance sampling distribution. The important samples remaining after rejection sampling and the sample survival rate are used to train a multilayer perceptron neural network model to output the energy decay term. Based on any given incident direction, the product of the output of the trained flow matching network model and the output of the trained multilayer perceptron neural network model is used as the final bidirectional reflection distribution function of the microstructure material for rendering the microstructure material.

[0009] Furthermore, the step of performing pure sampling path tracing within the microstructure 3D model to obtain multiple important samples and their corresponding sampling weights specifically involves: Sampling locations are uniformly and randomly selected within the three-dimensional model of the microstructure. Light rays are emitted from a uniformly and randomly selected direction as the incident direction in the normal hemisphere. The emitted light rays are traced within the 3D model of the microstructure, and it is determined whether the light rays have left the microstructure. If the light rays have not left, the tracing continues. If the light ray leaves, the direction in which the last light ray leaves is taken as the outgoing direction. The outgoing direction and the incoming direction are taken as an importance sample, and the importance sample and its corresponding sampling weight are saved. The above process is iterated and repeated until the maximum set number of iterations is reached, completing the iteration and obtaining multiple important samples and their corresponding sampling weights.

[0010] Furthermore, the step of using sampling weights to reject multiple important samples to obtain the remaining important samples and sample survival rate after rejection is specifically as follows: The sampling weight is used as the acceptance probability of each important sample; For each important sample, generate a random number between 0 and 1. If the random number is less than the corresponding acceptance probability, retain the important sample; otherwise, delete the important sample. After rejecting samples for each important sample, the remaining important samples are obtained. The survival rate is determined by the number of important samples and the number of samples of importance remaining after rejection sampling.

[0011] Furthermore, the importance sampling distribution output by the flow matching network model trained based on the remaining importance samples after rejection sampling is specifically as follows: The neural map is trained based on the remaining importance samples after rejection sampling, and a trained neural map is obtained. Read the neural codes of the trained neural maps and the corresponding importance samples remaining after rejection sampling to train the stream matching network model; During training, a conditional flow matching loss function is selected until the conditional flow matching loss function converges, resulting in the trained flow matching network model and the importance sampling distribution of its output.

[0012] Furthermore, the conditional flow matching loss function Specifically:

[0013] in, It is a flow matching network in In position As the velocity field predicted by the conditional time-flow matching network and These are the target distribution and the basic distribution for flow matching, respectively. The target distribution for flow matching is the importance sampling distribution; the basic distribution is a Gaussian distribution with a mean of 0 and a variance of 1. The interpolation time is randomly selected.

[0014] Furthermore, based on any given incident direction, the product of the output of the trained flow matching network model and the output of the trained multilayer perceptron neural network model is used as the final bidirectional reflection distribution function of the microstructure material for microstructure material rendering, specifically: Get any given incident direction and its corresponding rendering coordinates; Based on the rendering coordinates, query the neural code at the corresponding position in the trained neural map; The given incident direction and the corresponding neural code are input into the trained flow matching network model and the trained multilayer perceptron neural network model to obtain the outgoing direction, importance sampling distribution and energy decay term; Multiplying the importance sampling distribution and the energy attenuation term yields the final bidirectional reflection distribution function of the microstructure material; Microstructure material rendering is performed using the given incident direction, exit direction, and final bidirectional reflection distribution function.

[0015] According to some embodiments, the second aspect of the present invention provides a microstructure material rendering system based on a flow matching network, employing the following technical solution: A microstructure material rendering system based on a flow matching network, comprising: The microstructure modeling module is configured to model microstructures and obtain three-dimensional models of the microstructures. The sampling module is configured to perform pure sampling path tracing within the microstructure 3D model to obtain multiple important samples and their corresponding sampling weights. The sampling weights are then used to reject multiple important samples to obtain the remaining important samples after rejection and the sample survival rate. The model training module is configured to train the flow matching network model to output the importance sampling distribution based on the remaining importance samples after rejection sampling, and to train the multilayer perceptron neural network model to output the energy decay term based on the remaining importance samples after rejection sampling and the sample survival rate. The rendering module is configured to use the product of the output of the trained flow matching network model and the output of the trained multilayer perceptron neural network model as the final bidirectional reflection distribution function of the microstructure material for rendering, based on any given incident direction.

[0016] According to some embodiments, a third aspect of the present invention provides a computer-readable storage medium.

[0017] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in a microstructure material rendering method based on a flow matching network as described in the first embodiment above.

[0018] According to some embodiments, a fourth aspect of the present invention provides a computer device.

[0019] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the microstructure material rendering method based on a flow matching network as described in the first embodiment above.

[0020] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention decomposes microstructure material rendering into the product of importance sampling distribution and energy attenuation, and generates samples using a pure sampling method. This avoids the difficult evaluation of the bidirectional reflection distribution function in traditional microstructure material rendering methods, and can be applied to rendering any microstructure material, making it more convenient and widely applicable.

[0021] This invention uses a flow matching network to learn how incident rays interact with microstructure materials and how they are distributed in various outgoing directions. It also innovatively uses neural maps in combination with the flow matching network to learn the spatial changes of microstructure materials. Compared with traditional probabilistic models, it has stronger fitting accuracy and the rendered multi-layer material images are more delicate and realistic.

[0022] This invention directly learns the appearance of microstructure materials from small microstructure material samples, which has higher rendering accuracy compared to directly expressing microstructure materials as analytical methods, and lower storage consumption and higher rendering efficiency compared to directly rendering microstructure models. Attached Figure Description

[0023] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0024] Figure 1 This is a flowchart of a microstructure material rendering method based on a flow matching network in an embodiment of the present invention; Figure 2 These are examples of three-dimensional models of microstructures under different modeling methods in the embodiments of the present invention; Figure 3 This is a detailed flowchart of the microstructure material path tracing sampling in an embodiment of the present invention; Figure 4 This is a schematic diagram of the flow matching network in an embodiment of the present invention; Figure 5 This is a detailed flowchart of the microstructure material rendering process in an embodiment of the present invention. Detailed Implementation

[0025] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0026] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, 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 pertains.

[0027] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0028] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.

[0029] Example 1 like Figure 1 As shown, this embodiment provides a microstructure material rendering method based on a stream matching network. This embodiment uses the application of this method to a server as an example for illustration. It is understood that this method can also be applied to terminals, and can also be applied to systems including terminals, servers, and other components, and can be implemented through interaction between the terminal and the server. The server can be an independent physical server, a server cluster composed of multiple physical servers, or a distributed system. It can also be a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network servers, cloud communication, middleware services, domain name services, CDN security services, and big data and artificial intelligence platforms. The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. The terminal and server can be directly or indirectly connected via wired or wireless communication, which is not limited herein. In this embodiment, the method includes the following steps: Modeling the microstructure yields a three-dimensional model of the microstructure. Pure sampling path tracing is performed inside the microstructure 3D model to obtain multiple important samples and their corresponding sampling weights. The sampling weights are then used to reject multiple important samples to obtain the remaining important samples and the sample survival rate after rejection. The important samples remaining after rejection sampling are used to train a flow matching network model to output the importance sampling distribution. The important samples remaining after rejection sampling and the sample survival rate are used to train a multilayer perceptron neural network model to output the energy decay term. Based on any given incident direction, the product of the output of the trained flow matching network model and the output of the trained multilayer perceptron neural network model is used as the final bidirectional reflection distribution function of the microstructure material for rendering the microstructure material.

[0030] In material rendering, it is necessary to solve the bidirectional scattering distribution function of the material. However, this function requires bidirectional Monte Carlo estimation in microstructure material rendering, which is difficult to solve using traditional rendering methods. Therefore, based on a flow matching network, this embodiment designs a pure material sampling method, decomposing the method for solving the bidirectional reflection distribution function in microstructure material rendering into solving the product of importance sampling distribution and energy attenuation:

[0031]

[0032] in, It is the final bidirectional reflection distribution function of the microstructured material, describing a given incident direction. How does the irradiance on the surface affect a given outgoing direction? The emissivity on the surface. It is the importance sampling distribution, which describes how incident light rays are distributed in various outgoing directions after being reflected by a certain surface. The energy attenuation term describes the attenuation effect of the microstructure material on incident light.

[0033] By designing this pure material sampling method, the solution... The bidirectional Monte Carlo estimation is transformed into solving for a given In the case of One-way Monte Carlo estimation and given A constant value under certain conditions This transforms a bidirectional estimation problem into a pure sampling method that only requires light sampling between microstructures.

[0034] Based on the above analysis, the microstructure material rendering method based on flow matching network in this embodiment is as follows: Step S1: Model the microstructure to obtain a three-dimensional model of the microstructure, specifically as follows: Modeling microstructures can be done by arranging simple models using different distribution methods, such as arranging simple geometric shapes (e.g., spheres, ellipsoids, triangular pyramids, etc.) using uniform or Poisson distributions to form a three-dimensional microstructure model; it can also be done by manually modeling complex three-dimensional models. In addition, multi-layered or multi-scattering microstructures can be used to obtain a three-dimensional microstructure model.

[0035] After repeated experiments and verifications, the optimal size of the microstructure 3D model generated using the method of this embodiment is 100mm x 100mm, with a thickness not exceeding 10mm, and the gaps between models should be minimized. Figure 2 As shown, examples of three-dimensional models of microstructures under several different modeling methods are given, namely a sphere with Poisson distribution, a triangular pyramid with uniform arrangement, and an ellipsoid with manually adjusted arrangement direction.

[0036] Step S2: As Figure 3 As shown, pure sampling path tracing is performed within the 3D model of the microstructure to obtain multiple important samples and their corresponding sampling weights. These sampling weights are then used to reject multiple important samples, yielding the remaining important samples and their survival rate. Specifically: Step S2.1: Using the microstructure 3D model, first uniformly and randomly select a location within a 100mm x 100mm area as the sampling location; Step S2.2: Randomly select a direction uniformly and randomly as the incident direction to emit light rays; Step S2.3: The emitted light rays are traced within the 3D model of the microstructure, and it is determined whether the light rays have left the microstructure. If the light rays have not left, the tracing continues; if the light rays have left, proceed to step S2.4. Specifically, if the light does not leave the microstructure, then whenever the light intersects the microstructure, the importance of the light hitting the surface material in the current step path is sampled to select the light emission direction in the next step path, and the process is repeated until the light leaves the microstructure. It should be noted that all materials have a two-way scattering distribution function on their surface, which determines the scattering direction of light after interaction with the surface. The two-way scattering distribution function referred to here is the two-way scattering distribution function of the micro-elements (such as spheres, ellipsoids, and micro-surfaces) that make up the microstructure; this function is known. However, the goal of the method in this embodiment is to obtain the two-way scattering distribution function of the material represented by the interaction between a small piece of material aggregated from the microstructure itself and light (e.g., how light interacts with a small piece of material composed of spheres). This is unknown and difficult to solve.

[0037] Step S2.4: Take the direction in which the last ray leaves as the emission direction, and take the emission direction and the incident direction obtained in step S2.1 as an importance sample, and save the importance sample and the corresponding sampling weight; Step S2.5: Iterate through steps S2.2 to S2.4 until the maximum set number of iterations is reached, complete the iteration, and obtain multiple important samples and their corresponding sampling weights; Step S2.6: Reject sampling from multiple important samples using sampling weights to obtain the remaining important samples after rejection sampling, specifically: The sampling weight is used as the acceptance probability of each important sample; For each important sample, generate a random number between 0 and 1. If the random number is less than the corresponding acceptance probability, retain the important sample; otherwise, delete the important sample. After rejecting each important sample, the remaining important samples are obtained. After rejecting the samples using the sampling weights, the sampling weights of the remaining samples will become 1. The sample survival rate is determined based on the number of important samples remaining after rejection sampling and the number of important samples. Step S2.7: Save the remaining important samples after rejection sampling, their corresponding sampling weights, and sample survival rates.

[0038] Step S3: Train a flow matching network model based on the remaining importance samples after rejection sampling to output the importance sampling distribution. Train a multilayer perceptron neural network model based on the remaining importance samples after rejection sampling and the sample survival rate to output the energy decay term, including: Step S3.1: Train the flow matching network model based on the remaining importance samples after rejection sampling, and output the importance sampling distribution, including: Step S3.1.1: Train the neural map based on the remaining importance samples after rejection sampling to obtain the trained neural map, specifically as follows: Based on the remaining important samples after rejection sampling, a 256x256 resolution neural map is used to learn the spatial variation features of microstructure materials, resulting in a trained neural map.

[0039] Step S3.1.2: Read the neural encoding of the trained neural map and the corresponding importance samples remaining after rejection sampling to train the flow matching network model; Step S3.1.3: Select the conditional flow matching loss function during training until the conditional flow matching loss function converges, and obtain the trained flow matching network model and the importance sampling distribution of its output.

[0040] like Figure 4 As shown, a five-layer flow matching network with 128 neurons per layer is used to learn the outgoing direction distribution of the remaining importance samples after rejection sampling obtained in step S2. The loss function is selected as Conditional Flow Matching Loss. The details are as follows:

[0041] in, It is a flow matching network in In position As the velocity field predicted by the conditional time-flow matching network and These are the target distribution and the basic distribution for flow matching, respectively. The target distribution for flow matching is the importance sampling distribution; the basic distribution is a Gaussian distribution with a mean of 0 and a variance of 1. The linear interpolation coefficients are randomly selected. These are the network weights and biases in the neural network model. Conditional flow matching loss allows the model to learn a continuous flow direction field that smoothly transforms towards the target distribution, given certain conditions. An ordinary differential equation (ODE) solver is used to call the flow matching network model to solve for the neural encoding of the trained neural map and the corresponding importance samples remaining after rejection sampling, thus obtaining the importance sampling distribution. The flow matching network stores a vector field, which the ODE solver reads to solve the problem. When in use, the flow matching network transforms the basic distribution into the target distribution through an ordinary differential equation (ODE) solver, thereby achieving high-quality, conditionally dependent sampling and generation.

[0042] After training, a trained flow matching network model is obtained, with input conditions... It is the neural encoding and incident direction of the trained neural map. The ODE solver is used to call the trained flow matching network model to solve it, and the final output-importance sampling distribution is obtained, that is, the outgoing direction and the probability density function of the current path sampling. Step S3.2: Based on the remaining important samples after rejection sampling and the sample survival rate, train the multilayer perceptron neural network model to output the energy decay term, specifically: A multilayer perceptron neural network model was trained using the remaining important samples after rejection sampling and the sample survival rate. During training, mean squared error loss is selected until the mean squared error loss function converges, resulting in a trained multilayer perceptron neural network model and its output energy decay term.

[0043] Furthermore, a multilayer perceptron neural network with three layers and 32 neurons per layer was used to learn the survival rate of rejected samples in step S2, and the mean squared error loss function was chosen. Used to assess the difference between real data and predicted results:

[0044] in, It is the number of samples. It is the predicted energy decay term (sample survival rate). It is the actual energy decay term (sample survival rate).

[0045] After training, a trained multilayer perceptron neural network model is obtained.

[0046] For a multilayer perceptron neural network that has learned energy decay, the neural codes stored in the trained neural map are directly used as input conditions. Therefore, using the neural codes of the trained neural map, the incident direction, and the sampling survival rate as input, the energy decay term is output after processing by the trained multilayer perceptron neural network model.

[0047] Step S4: Based on any given incident direction, the product of the output of the trained flow matching network model and the output of the trained multilayer perceptron neural network model is used as the final bidirectional reflection distribution function of the microstructure material for microstructure material rendering. Specifically: Get any given incident direction and its corresponding rendering coordinates; Based on the rendering coordinates, query the neural code at the corresponding position in the trained neural map; The given incident direction and the corresponding neural code are input into the trained flow matching network model and the trained multilayer perceptron neural network model to obtain the outgoing direction, importance sampling distribution and energy decay term; Multiplying the importance sampling distribution and the energy attenuation term yields the final bidirectional reflection distribution function of the microstructure material; Microstructure material rendering is performed using the given incident direction, exit direction, and final bidirectional reflection distribution function.

[0048] During rendering, the product of the trained flow matching network and the multilayer perceptron neural network is used as the final bidirectional reflection distribution function of the microstructure material.

[0049] like Figure 5 As shown, when rendering an image, the renderer does not directly calculate the final bidirectional reflection distribution function of the microstructure material. Instead, it calls the flow matching network and the multilayer perceptron neural network respectively to obtain the probability density and energy decay of the importance sampling distribution, and multiplies the two as the final bidirectional reflection distribution function of the microstructure material. Based on the final bidirectional reflection distribution function, any renderer can be used to render the microstructure material. Here, rendering based on existing technology is sufficient and will not be elaborated further.

[0050] Example 2 This embodiment provides a microstructure material rendering system based on a flow matching network, including: The microstructure modeling module is configured to model microstructures and obtain three-dimensional models of the microstructures. The sampling module is configured to perform pure sampling path tracing within the microstructure 3D model to obtain multiple important samples and their corresponding sampling weights. The sampling weights are then used to reject multiple important samples to obtain the remaining important samples after rejection and the sample survival rate. The model training module is configured to train the flow matching network model to output the importance sampling distribution based on the remaining importance samples after rejection sampling, and to train the multilayer perceptron neural network model to output the energy decay term based on the remaining importance samples after rejection sampling and the sample survival rate. The rendering module is configured to use the product of the output of the trained flow matching network model and the output of the trained multilayer perceptron neural network model as the final bidirectional reflection distribution function of the microstructure material for rendering, based on any given incident direction.

[0051] The examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the content disclosed in Embodiment 1 above. It should be noted that the above modules, as part of the system, can be executed in a computer system such as a set of computer-executable instructions.

[0052] The descriptions of each embodiment in the above embodiments have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.

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

[0054] Example 3 This embodiment provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps in the microstructure material rendering method based on a flow matching network as described in Embodiment 1 above.

[0055] Example 4 This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the microstructure material rendering method based on a flow matching network as described in Embodiment 1 above.

[0056] Those skilled in the art will understand that embodiments of the present invention can provide methods, systems, or computer program products. Therefore, the present invention can take the form of hardware embodiments, software embodiments, or embodiments combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.

[0057] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, as well as combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart. Figure 1 One or more processes and / or boxes Figure 1A device that provides the functions specified in one or more boxes.

[0058] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0059] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0060] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0061] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.

Claims

1. A microstructure material rendering method based on flow matching networks, characterized in that, include: Modeling the microstructure yields a three-dimensional model of the microstructure. Pure sampling path tracing is performed inside the microstructure 3D model to obtain multiple important samples and their corresponding sampling weights. The sampling weights are then used to reject multiple important samples to obtain the remaining important samples and the sample survival rate after rejection. The important samples remaining after rejection sampling are used to train a flow matching network model to output the importance sampling distribution. The important samples remaining after rejection sampling and the sample survival rate are used to train a multilayer perceptron neural network model to output the energy decay term. Based on any given incident direction, the product of the output of the trained flow matching network model and the output of the trained multilayer perceptron neural network model is used as the final bidirectional reflection distribution function of the microstructure material for rendering the microstructure material.

2. The microstructure material rendering method based on flow matching network as described in claim 1, characterized in that, The process of performing pure sampling path tracing within the 3D model of the microstructure to obtain multiple important samples and their corresponding sampling weights is as follows: Sampling locations are uniformly and randomly selected within the three-dimensional model of the microstructure. Light rays are emitted from a uniformly and randomly selected direction as the incident direction in the normal hemisphere. The emitted light rays are traced within the 3D model of the microstructure, and it is determined whether the light rays have left the microstructure. If the light rays have not left, the tracing continues. If the light ray leaves, the direction in which the last light ray leaves is taken as the outgoing direction. The outgoing direction and the incoming direction are taken as an importance sample, and the importance sample and its corresponding sampling weight are saved. The above process is iterated and repeated until the maximum set number of iterations is reached, completing the iteration and obtaining multiple important samples and their corresponding sampling weights.

3. The microstructure material rendering method based on flow matching network as described in claim 1, characterized in that, The method of using sampling weights to reject multiple important samples, and obtaining the remaining important samples and sample survival rate after rejection, is as follows: The sampling weight is used as the acceptance probability of each important sample; For each important sample, generate a random number between 0 and 1. If the random number is less than the corresponding acceptance probability, then retain the important sample. Conversely, delete the sample of importance. After rejecting samples for each important sample, the remaining important samples are obtained. The survival rate is determined by the number of important samples and the number of samples of importance remaining after rejection sampling.

4. The microstructure material rendering method based on flow matching network as described in claim 1, characterized in that, The importance sampling distribution output by the stream matching network model trained based on the remaining importance samples after rejection sampling is as follows: The neural map is trained based on the remaining importance samples after rejection sampling, and a trained neural map is obtained. Read the neural codes of the trained neural maps and the corresponding importance samples remaining after rejection sampling to train the stream matching network model; During training, a conditional flow matching loss function is selected until the conditional flow matching loss function converges, resulting in the trained flow matching network model and the importance sampling distribution of its output.

5. The microstructure material rendering method based on a flow matching network as described in claim 4, characterized in that, The conditional flow matching loss function Specifically: in, It is a flow matching network in In position As the velocity field predicted by the conditional time-flow matching network and These are the target distribution and the basic distribution for flow matching, respectively. The target distribution for flow matching is the importance sampling distribution; the basic distribution is a Gaussian distribution with a mean of 0 and a variance of 1. The interpolation time is randomly selected.

6. The microstructure material rendering method based on flow matching network as described in claim 1, characterized in that, The multilayer perceptron neural network model is trained based on the remaining important samples after rejection sampling and the sample survival rate, outputting an energy decay term, specifically: A multilayer perceptron neural network model was trained using the remaining important samples after rejection sampling and the sample survival rate. During training, mean squared error loss is selected until the mean squared error loss function converges, resulting in a trained multilayer perceptron neural network model and its output energy decay term.

7. The microstructure material rendering method based on flow matching network as described in claim 1, characterized in that, Based on an arbitrary given incident direction, the product of the output of the trained flow matching network model and the output of the trained multilayer perceptron neural network model is used as the final bidirectional reflection distribution function of the microstructure material for rendering the microstructure material. Specifically: Get any given incident direction and its corresponding rendering coordinates; Based on the rendering coordinates, query the neural code at the corresponding position in the trained neural map; The given incident direction and the corresponding neural code are input into the trained flow matching network model and the trained multilayer perceptron neural network model to obtain the outgoing direction, importance sampling distribution and energy decay term; Multiplying the importance sampling distribution and the energy attenuation term yields the final bidirectional reflection distribution function of the microstructure material; Microstructure material rendering is performed using the given incident direction, exit direction, and final bidirectional reflection distribution function.

8. A microstructure material rendering system based on a flow matching network, characterized in that, include: The microstructure modeling module is configured to model microstructures and obtain three-dimensional models of the microstructures. The sampling module is configured to perform pure sampling path tracing within the microstructure 3D model to obtain multiple important samples and their corresponding sampling weights. The sampling weights are then used to reject multiple important samples to obtain the remaining important samples after rejection and the sample survival rate. The model training module is configured to train the flow matching network model to output the importance sampling distribution based on the remaining importance samples after rejection sampling, and to train the multilayer perceptron neural network model to output the energy decay term based on the remaining importance samples after rejection sampling and the sample survival rate. The rendering module is configured to use the product of the output of the trained flow matching network model and the output of the trained multilayer perceptron neural network model as the final bidirectional reflection distribution function of the microstructure material for rendering, based on any given incident direction.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the microstructure material rendering method based on a flow matching network as described in any one of claims 1-7.

10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the microstructure material rendering method based on a flow matching network as described in any one of claims 1-7.