View independent ray tracing by joint rendering

The Multiview Reflected Radiance Cache (MRRC) system addresses the limitations of existing ray tracing techniques by using a device neural network with weights from a server neural network to predict indirect illumination, achieving efficient and accurate global illumination rendering on edge devices.

WO2025065118A1PCT designated stage expired Publication Date: 2025-04-03HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/117249
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-09-19
Publication Date
2025-04-03

AI Technical Summary

Technical Problem

Existing ray tracing techniques, such as Neural Radiance Cache (NRC), face challenges including high computational requirements, limited viewing range, and artifacts due to axis-aligned biases and discrete directional encodings, making them unsuitable for real-time rendering on edge devices.

Method used

The proposed solution involves a Multiview Reflected Radiance Cache (MRRC) system that uses a device neural network to predict indirect illumination by obtaining weights from a server neural network trained on indirect illumination data from multiple viewpoints. This approach reduces computational load on edge devices and avoids the need for path tracing and denoising.

Benefits of technology

MRRC achieves efficient and accurate rendering of global illumination by reducing computational requirements, eliminating artifacts, and supporting dynamic content and specular reflections, making it suitable for real-time applications on edge devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023117249_03042025_PF_FP_ABST
    Figure CN2023117249_03042025_PF_FP_ABST
Patent Text Reader

Abstract

Described is a method (1500) for ray tracing on a device (801) comprising a device neural network (1205), the method (1500) comprising: at the device (801) : (1501) obtaining a virtual scene (204); (1502) emitting one or more rays (206, 207) from a single camera (201) at a single viewpoint (202) of the virtual scene (204); (1503) determining a position (1101) of a primary bounce (206) of each of the one or more rays (206, 207); (1504) computing a direct illumination of each of the one or more rays (206, 207) at the position of the primary bounce (206); (1505) obtaining weights of a server (802) neural network, the server (802) neural network being trained to inference the indirect illumination of each of the one or more rays (206, 207), the weights being obtained from the server (802); (1506) predicting an indirect illumination of each of the one or more rays (206, 207) at the position of the primary bounce (206) by inputting the weights into a device neural network (1205); and (1507) rendering a frame (1402) of the virtual scene from the direct illumination and the indirect illumination of each of the one or more rays (206, 207). Using the weights of the neural network (1205) to predict the indirect illumination can reduce the computational load on the device.
Need to check novelty before this filing date? Find Prior Art

Description

VIEW INDEPENDENT RAY TRACING BY JOINT RENDERINGFIELD OF THE INVENTION

[0001] This invention relates to an apparatus and method for ray tracing.BACKGROUND

[0002] As technology advances, the demand for high-quality graphics in video games continues to increase. One of the ways to achieve superior graphics is through the use of ray tracing to obtain global illumination. The difference between standard direct illumination and global illumination can be seen in Figure 1. Figure 1 shows a comparison of direct and global illumination. The global illumination image 102 shows the reflections from the walls in the cube’s sides, whereas the direct illumination image 101 does not.

[0003] Figure 2 schematically illustrates a path tracing example of the prior art. Ray tracing is a rendering technique used in computer graphics to create realistic global illumination images by simulating the behaviour of light in a virtual environment 204. To run the algorithm, a virtual camera 201 is placed in the scene and rays of light 206, 207 are shot from the camera into the scene. These rays are traced as they bounce off objects 204 and interact with the environment until they reach a light source 203, are absorbed by the surface or are terminated by a specific rule. In every bounce a shadow ray 205 is cast from the surface intersection to the light sources 203 to measure the direct illumination. Upon the termination of a path, all radiance at every bounce is back traced and accumulated until it reaches the camera 201 origin. This iterative process effectively converts global illumination from a single bounce to indirect illumination for previous bounces. To ensure accurate accumulation, radiance is attenuated at each bounce based on the surface material of the intersection and the incident ray orientation relative to the surface normal. This procedure approximates the light transport equation using a limited number of ray samples per bounce. Path tracing employs only one ray per bounce, while ray tracing utilizes multiple rays per bounce.

[0004] The path tracing example in Figure 2 shows where a ray 206, 207 bounces few times before hitting a light source 203. Solid arrows denote the path trajectory 206, 207 and dashed lines the shadow rays 205 that compute the direct light at every bounce.

[0005] To approximate correctly global illumination path tracing may require significant computing power, which is not always available on an edge device, i.e., a mobile device.

[0006] There are a number of techniques that approximate and bake global illumination to render better looking images in real-time, such as lightmaps and light probes. These techniques can be fast, but may have limitations with dynamic content, may require a lot of memory to store high resolution textures and can exhibit artifacts, such as light leaks, due to bad automatic probe placement.

[0007] Lightmaps are precomputed textures that store light hitting the surfaces in a scene and are mostly used in static content. During the baking process, the 3D scene is rendered from multiple angles and the lighting information is stored in the lightmap texture. This texture is then applied to the scene's surfaces, providing realistic lighting without the need for real-time calculations.

[0008] Light probes work by placing small spheres or cubes in various locations throughout the scene, in empty spaces, and capturing the lighting information at each location. This information is then used to create texture maps that can be interpolated in every world-space location to simulate the effects of global illumination. These probes can be updated dynamically, but mostly target diffuse content because storing specular would require a significant amount of memory and path tracing compute. Moreover, its placement may be crucial because errors in this stage can cause visible light leaks. These happen when light probes from locations with different lighting are blended together and results with unusual artifacts appearing.

[0009] A recent technique that stores radiance content in a neural network is called Neural Radiance Cache (NRC) . Figure 3 schematically illustrates a pipeline of an NRC system of the prior art. This technique may be capable of effectively managing dynamic content, while also naturally eliminating interpolation issues like light leaks. It supports diffuse and specular lighting, although its capacity to handle specular lighting may be limited. NRC may train a small Neural Network (NN) to approximate the outgoing radiance from the surfaces in a scene. In every frame the cache may be updated by focusing only on a single user’s viewing angle and using few data samples. One of the main differences between NRC and previously mentioned traditional approaches is that NRC may require path tracing at rendering time. The primary objective of NRC may be to enhance the efficiency of the path tracing by terminating certain paths prematurely at secondary bounces through the utilization of the neural cache. To terminate the paths and query NRC a specific terminating heuristic needs to be met to avoid displaying major inaccuracies from the cache. By querying NRC the algorithm may reuse previous spatio-temporal data to approximate the surface radiance at that position and thus reducing the variance of the path tracer estimate. A visual example of this path terminating procedure can be seen in the paths 207 in Figure 4.

[0010] Figure 4 schematically illustrates a path tracing example of the NRC system of the prior art. Figure 4 shows terminating a path 207 after a few bounces in NRC. The top two paths 207 are regular long paths that terminate, in this case, either in a window 203 or in a light source 203. The bottom two paths 207 are shorter, terminated at a terminating position 401 due the NRC 402 terminating heuristic, and are approximated by NRC 402.

[0011] The running process 300 for the NRC involves several steps. First 301, a set of rays 206, 207 are shot from the user’s camera 201 viewpoint. Second, after a few bounces some rays 206, 207 are terminated at specific 3D positions 401. Third 302, NRC 402 is applied at these specific terminated 3D positions 401 to predict their corresponding radiances. After terminating all the remaining paths through path tracing, for every bounce the algorithm back traces all the approximated radiances -the ones coming from the path tracing and the other ones from NRC -to generate a noisy rendered image. Fourth 303, a small percentage of the terminated rays are extended to train the cache, shown in Figure 5. Figure 5 schematically illustrates an extended path tracing example of the NRC system of the prior art. This extension is achieved by reactivating a subset of the terminated 3D positions 401 and performing a few more bounces till an extended 3D position 501 is reached. At the extended terminated 3D positions 501 NRC 402 is queried to better approximate the radiance at the surface positions. This procedure of training with neural network predictions in called self-training. Finally, NRC makes a final prediction at these extended 3D positions 501, and this data is processed to generate the training radiances that will be used to update NRC for the next frame. All these steps are repeated for every frame at rendering runtime.

[0012] Figure 6 schematically illustrates an architecture of the NRC system of the prior art. The neural network architecture from NRC 402 comprises in an MLP (multilayer perceptron) 604 with 5 hidden layers with ReLU (rectified linear unit) activations in between and 64 channels in each layer. The inputs of the neural network may include:

[0013] ● The 3D positions x: The exact 3D locations in the surface expressed in world-space coordinates.

[0014] ● Scattered directional vector w: The outgoing directional angles at the 3D position x expressed in world-space coordinates.

[0015] ● Normals n: The normals for each 3D position expressed in world-space coordinates.

[0016] ● Roughness r: The roughness of the material for each 3D position.

[0017] ● Diffuse albedo α: The base color for the diffuse component for each 3D position.

[0018] ● Specular reflectance β: The base color for the specular component for each 3D position.

[0019] An important part of the NRC solution may be how it represents the input data so it is more linear with respect to the output radiance. By doing this the neural network can find correlations more easily and quickly. To do this the authors proposed to use the well-known fourier features 601 as positional encodings for x and the one-blob encodings 602 for the directions w, normals n and roughness r. The diffuse and specular reflectances are considered linear enough, so they are fed directly to the NN.

[0020] To further reduce the complexity of the problem, NRC authors also proposed a reflectance factorization technique. The method may include adding up the diffuse albedo α and the specular reflectance β and multiplying 605 the result by the output 606 of NRC. The goal is to avoid learning the base colour textures and thus making the task of the NN simpler. In summary, initially the secondary bounce data is sent to NRC. Secondly the inputs x, w, n, r are encoded. Finally, α and β are provided straight away as input and also used for the reflectance factorization.

[0021] The prior art may include the following disadvantages:

[0022] Need for a path tracer and a denoiser at rendering time. To be able to dynamically update quickly and avoid artifacts, NRC may only query the NN at secondary bounces, thus it requires a path tracer and a denoiser during rendering time. Therefore, due to the limited ray tracing capability on edges devices, the solution cannot be used on them.

[0023] Self-training. Because path tracing rays may not be terminated synchronously, and querying a NN may have a cost, doing self-training for numerous rays may add latency and a computational overhead. This is may not be significant for the current NRC setup, but it could be if more training samples were needed.

[0024] It can only be used in a limited viewing range. NRC may be trained with single view data, so when it’s queried from a different angle, a high percentage of the radiance estimates are not correct. This can be the case for areas that have not been sampled correctly with one viewpoint, such as specular content, highly detailed diffuse content and occluded regions from the viewpoint. Nevertheless, this may also be exaggerated because the fourier feature positional encodings tend to over emphasize interpolation errors in out of distribution data. Moreover, even if multiview training data is provided, because the NN encodings may not be designed for view dependent materials, the quality of the cache may still be lacking for specular content.

[0025] Positional encodings. Unless the cache is trained with a significant amount of data, using fourier features as positional encodings generate many axis-aligned artifacts when querying NRC at first bounce. This is because the network may be biased to learn better axis aligned frequencies. An image from the original paper querying at first non-specular bounces. Figure 7 shows an example of axis aligned artifacts 700. More noticeable perceptual artifacts can be found in areas that require more samples due to high variation in directional and spatial content, such as specular vertices or detailed shadows.

[0026] One-blob encodings for specular content. The one-blob encodings may discretize the scattered directional vector w in several bins, limiting its abilities to capture specular content. Glossy specular content varies at every angle, therefore having a discrete representation of this value constrains the NN abilities.

[0027] Outgoing directional w as input for specular content. Specular content contains a lot of information because the radiance can change in every outgoing directional w. This means that even slight changes in the outgoing direction w can generate large changes in the output radiance. Therefore, can be important to find an input variable that correlates well with the output radiance and thus, allows easy interpolation between input and output values. Feeding straight away the outgoing direction w to the NN may not be the best approach for specular content.

[0028] Difficulty in capturing small shadows at primary vertex. Due to the extreme sparse path tracing data used to train NRC, which is usually between 2-3%of all the total paths, the network may have difficulties in approximating small details, like tiny shadows, at primary vertex. These shadows can be important for approximating GI and achieving a good perceptual quality of the final 3D scene.

[0029] It is desirable to develop an apparatus and method that overcomes the above problems.SUMMARY

[0030] According to a first aspect, there is provided a method for ray tracing on a device comprising a device neural network, the method comprising: at the device: obtaining a virtual scene; emitting one or more rays from a single camera at a single viewpoint of the virtual scene; determining a position of a primary bounce of each of the one or more rays; computing a direct illumination of each of the one or more rays at the position of the primary bounce; obtaining weights of a server neural network, the server neural network being trained to inference the indirect illumination of each of the one or more rays, the weights being obtained from the server; predicting an indirect illumination of each of the one or more rays at the position of the primary bounce by inputting the weights into the device neural network; and rendering a frame of the virtual scene from the direct illumination and the indirect illumination of each of the one or more rays. In this way, the computational load on the device may be reduced.

[0031] In some implementations, the position of the primary bounce of each of the one or more rays may be determined by means of rasterization. In this way, the position may be determined more efficiently.

[0032] In some implementations, predicting the indirect illumination of each of the one or more rays may comprise inputting one or more ambient occlusion maps at the primary bounces into the device neural network and predicting the indirect illumination using the device neural network. In this way, the indirect illumination may be more accurately determined.

[0033] In some implementations, predicting the indirect illumination of each of the one or more rays may comprise inputting the positions of the primary bounce into the device neural network and predicting the indirect illumination using the device neural network. In this way, the indirect illumination may be more accurately determined.

[0034] In some implementations, rendering the frame of the virtual scene from the direct illumination and the indirect illumination of each of the one or more rays may comprise merging the direct illumination and the indirect illumination of each of the one or more rays. In this way, an accurate rendering may be produced.

[0035] According to a second aspect, there is provided a method for generating weights of a server neural network for use in ray tracing by a device, the method comprising: at the server: training the server neural network to inference indirect illumination of one or more rays; and outputting the weights of the server neural network to the device, the device being configured to use the weights of the server neural network in ray tracing. In this way, the computational load on the device may be reduced.

[0036] In some implementations, the server neural network may be generated and trained offline based on data from a bounded scene or data from a voxel as an input and based on data from a training camera arrangement comprising a plurality of training cameras arranged at different viewpoints. In this way, the server neural network may be trained to predict indirect illumination from a plurality of viewpoints.

[0037] In some implementations, the server neural network may be further trained online based on data from a virtual scene as an input and based on a single camera arranged at a single viewpoint, the virtual scene and the single camera arranged at the single viewpoint being the same as those used on the device. In this way, the server neural network may be further trained to predict indirect illumination tailored to the virtual scene.

[0038] In some implementations, the server neural network may be further trained online based on data from the bounded scene or data from the voxel as an input and based on data from the training camera arrangement comprising the plurality of training cameras arranged at different viewpoints. In this way, the server neural network may be further trained to predict indirect illumination from a plurality of viewpoints.

[0039] In some implementations, an optimal training camera arrangement may be determined based on an optimisation algorithm, the optimisation algorithm being configured to optimise the training camera arrangement based on a path tracing ray budget. In this way, an improved training arrangement may be generated to maximise the quality of the training whilst reducing the computational load.

[0040] In some implementations, the server neural network may be generated and trained by: emitting one or more rays from each of the training cameras at the respective viewpoints; determining the position of the primary bounce of each of the one or more rays from each of the training cameras; and predicting the indirect illumination of each of the one or more rays from each of the training cameras. In this way, the server neural network may be trained through the prediction of the indirect illumination.

[0041] In some implementations, the server neural network may be further trained by predicting the indirect illumination of the virtual scene and updating the weights of the server neural network for the indirect illumination based on the indirect illumination of the virtual scene. In this way, the updated weights may be used by the device.

[0042] In some implementations, the weights of the server neural network for the indirect illumination may be updated in dependence on the difference between the one or more values of the indirect illumination of the virtual scene and the corresponding values of the indirect illumination of the server neural network being above a threshold value. In this way, the weights used by the device may be tailored to the virtual scene.

[0043] In some implementations, the indirect illumination of the virtual scene is predicted using random Fourier features as positional encodings inputs to the server neural network. In some implementations, the indirect illumination of the virtual scene is predicted using spherical harmonics as directional encodings and reflected view inputs to the server neural network. In some implementations, the indirect illumination of the virtual scene is predicted using an ambient occlusion factorization map as input to the server neural network. In some implementations, the indirect illumination of the virtual scene is predicted using an ambient occlusion factorization map to multiply the output of the server neural network. In this way, the prediction of the server neural network may be improved.

[0044] According to a third aspect, there is provided a device for ray tracing, the device comprising a device neural network and one or more processors and a memory storing program code executable by the one or more processors, wherein the program code is executable by the one or more processors so that the device is configured to: obtain a virtual scene; emit one or more rays from a single camera at a single viewpoint of the virtual scene; determine a position of a primary bounce of each of the one or more rays; compute a direct illumination of each of the one or more rays at the position of the primary bounce; obtain weights of a server neural network, the server neural network being trained to inference the indirect illumination of each of the one or more rays, the weights being obtained from the server; predict an indirect illumination of each of the one or more rays at the position of the primary bounce by inputting the weights into the device neural network; and render a frame of the virtual scene from the direct illumination and the indirect illumination of each of the one or more rays.

[0045] According to a fourth aspect, there is provided a server for generating weights of a server neural network for use in ray tracing by a device, the server comprising one or more processors and a memory storing program code executable by the one or more processors, wherein the program code is executable by the one or more processors so that the server is configured to: train the server neural network to inference indirect illumination of one or more rays; and output the weights of the server neural network to the device, the device being configured to use the weights of the server neural network in ray tracing.

[0046] According to a fifth aspect, there is provided a computing apparatus comprising the device and the server. In this way, the device and the server may be used to form a computing system.

[0047] BRIEF DESCRIPTION OF THE FIGURES

[0048] The present invention will now be described by way of example with reference to the accompanying drawings. In the drawings:

[0049] Figure 1 shows a comparison of direct and global illumination.

[0050] Figure 2 schematically illustrates a path tracing example of the prior art.

[0051] Figure 3 schematically illustrates a pipeline of an NRC system of the prior art.

[0052] Figure 4 schematically illustrates a path tracing example of the NRC system of the prior art.

[0053] Figure 5 schematically illustrates an extended path tracing example of the NRC system of the prior art.

[0054] Figure 6 schematically illustrates an architecture of the NRC system of the prior art.

[0055] Figure 7 shows an example of axis aligned artifacts.

[0056] Figure 8 schematically illustrates a pipeline of a system of the present application.

[0057] Figure 9 schematically illustrates a training camera arrangement of the present application.

[0058] Figure 10 schematically illustrates a training path tracing example of the present application.

[0059] Figure 11 schematically illustrates a rendering path tracing example of the present application.

[0060] Figure 12 schematically illustrates an architecture of the present application.

[0061] Figure 13 shows an example of a reflected directional vector.

[0062] Figure 14 shows a comparison a rendered frame of the NRC prior art system and the present application.

[0063] Figure 15 shows an example of a computer implemented method for ray tracing.

[0064] Figures 16A and 16B show an example of an apparatus configured to perform the methods described herein.DETAILED DESCRIPTION

[0065] The apparatuses and methods described herein concern ray tracing.

[0066] Embodiments of the present system may tackle one or more of the problems previously mentioned by obtaining weights of a neural network trained to inference the indirect illumination of each of the one or more rays from a server and using the weights of the neural network to predict the indirect illumination. In this way, the computational load on the device may be reduced.

[0067] To overcome the issues with the prior art, the present system may carry out precomputing and compressing part of the global illumination in a server and then send it to an edge device as a practical joint rendering solution. The present system may bake the indirect illumination on a server in a set of NN weights, send the NN weights to the device, compute the direct illumination on device, retrieve the indirect illumination from the NN weights on device, and combine the result to obtain the final image on device.

[0068] The present system may approximate the radiance at surface-level, similar to lightmaps, but through Neural Networks. This may achieve a much higher compression rate, thus may allow the system to bake the indirect illumination at primary bounce and approximate it from every angle and surface position efficiently and effectively. This may generate a Multiview Reflected Radiance Cache (MRRC) . This solution may not suffer from light leaks, may be suitable for dynamic content and may be shared by every user in the scene for diffuse and specular content.

[0069] The neural network architecture used in MRRC differs from NRC. Both approaches may target different scenarios, because NRC focuses on single view content, stores global illumination, queries the NN at secondary bounces, relies on self-training and depends on a path tracer and a denoiser during rendering time. Whereas MRRC may focus on a multiview cache, may store the indirect illumination, queries the NN at primary bounces, may not rely on self-training and may not need a path tracer nor a denoiser to generate the final image. All these features may make MRRC suitable for real-time baking the indirect illumination radiance in a joint rendering server-device solution.

[0070] The present system may have the following advantages:

[0071] Avoiding the path tracer at rendering time using a NN as a View Independent Cache.

[0072] By querying the NN at primary bounces the system may avoid the path tracer dependency on an edge device. The reason is that the system may leverage computationally inexpensive technologies, such as rasterization, to efficiently obtain primary vertex information on edge devices, while also circumventing any potential neural network image quality artifacts at primary bounces.

[0073] Avoiding artifacts at primary bounces with quick dynamic updates.

[0074] This may be achieved by two ideas:

[0075] Using randomised fourier features encodings instead of standard fourier features as positional encodings. Standard fourier features can be described by Equation 1:

[0076] where j goes from 0 to m-1, v is the input vector and σ is a hyperparameter. This method uses log-linear spaced frequencies to separate each dimension, but all frequencies may be centred on the same axis, which may bias the NN to learn better those frequencies, and may cause visible artifacts as seen in Figure 7. By switching these encodings to random fourier features as in Equation 2:

[0077] where v is the input vector with dimension d, and B is a random matrix with dimension m x d sampled from an isotropic Gaussian distribution N (0, σ) where σ is a hyperparameter. Because B is a random matrix and there’s a linear combination between B and v, the frequencies may be better distributed across the spectrum and the bias towards certain frequencies may be reduced, which may remove the visible axis-aligned artifacts generated by the NN.

[0078] By assuming that multiple users train and query the same NN, therefore using multiview data to train the model instead of single view data. This data may better cover the world-space and may provide less uncertainty for the model, thus less artifacts are generated.

[0079] Achieving a high quality specular content using a NN as a View Independent Cache.

[0080] In multiplayer games, several players share the same 3D content from different viewing angles. By storing diffuse and specular content in one single NN the system may define a View Independent Cache. This cache may store all the views from any material, and can be queried from every position and viewing angle in the scene.

[0081] NRC may use one-blob encodings that discretise the scattered directional vector w limiting its abilities to capture specular content. In this approach the present system may encode this directional vector using spherical harmonics. These are a set of orthonormal basis functions that are defined on the surface of a sphere. Because the directional vector w is a 3D vector these encodings allow to represent the data more linearly with respect to the output radiance, so the NN interpolation task is easier.

[0082] Also, instead of providing the outgoing directional vector w, the system may convert this vector to the reflected directional vector w_r by using the normal n vector at that point. This conversion can be achieved by this formula: w_r=2 (w·n) n-w . The result can be visualized in the next Figure 13. Figure 13 shows an example of a reflected directional vector. This change may make the interpolation for the specular content much easier, because small changes in w_r may be directly related to the highest density areas of the incoming light.

[0083] These two changes may allow the NN to approximate correctly and easily the specular content and thus achieve a high quality cache.

[0084] Fast NN adaptation to dynamic content using a NN as a View Independent Cache.

[0085] Updating the specular content frame by frame may require a significant amount of ray tracing compute, usually not available at rendering time. That’s why previous View Independent Caches may only target diffuse content, that by definition is constant across views and only require a sparse path tracing sampling of the 3D scene.

[0086] In the present system the scenario may differ from regular single view frameworks, because there’s the assumption that multiple users query and train the same NN. Therefore, more path tracing resources are allocated by default to cover the 3D scene from multiple angles and it’s easier to collect the specular content. Moreover, the system may define a smart camera placement algorithm, a high quality multiview pretraining stage and an adaptive scene sampling to efficiently reduce the real-time path tracing ray budget.

[0087] These ideas combined with the random fourier features, the reflected directional vector w_r, and the spherical harmonics encodings, may allow MRRC to interpolate the specular radiance content with fewer samples than previous approaches.

[0088] Improving the neural approximation by only storing indirect illumination.

[0089] By decoupling direct from indirect illumination, the system may reduce noticeable the amount of information that the NN needs to learn. In Figure 2 the dashed lines 205 are rays shot to light sources that compute the direct illumination, also known as shadow rays. Indirect illumination comes from the solid lines after the first bounce.

[0090] Indirect illumination typically contains significantly less high frequencies than direct illumination because more bounces are required. Having less high frequencies allows the system to update MRRC frame by frame faster. This is because Neural Networks converge initially to the low frequency content and require more time to learn the high frequency components.

[0091] Direct illumination coming from point and directional lights can be computed cheaply in an edge device, which is why the present system may avoid storing it on the each device.

[0092] Avoiding a denoiser at rendering time using a NN as a View Independent Cache.

[0093] Due to our present systems NN encodings and the multiview training, the quality level of the approximated radiance in MRRC may be high. This may allow querying the NN at primary bounces to generate the indirect illumination without displaying any artefacts. Querying at primary bounces can avoid rendering a noisy image. Other neural approaches like NRC may not generate the indirect illumination at primary bounces straight away. They may query the global illumination at secondary bounces and accumulate it at primary bounces with the path tracer. Due to the inherent stochasticity of the path tracer when shooting rays, the final image may be noisy and it may require a denoiser at rendering time.

[0094] Improving the neural approximation with Ambient Occlusion maps.

[0095] Shading accurately 3D models is vital to recreate depth perception of objects. For this matter the present system may employ an Ambient Occlusion (AO) map to guide MRRC in two-ways:

[0096] By feeding the AO map as inputs of the NN. This contribution allows MRRC to identify easily the shadow areas, especially the small ones that are difficult to sample properly.

[0097] By performing AO factorization, which refers to multiplying the MRRC output with the AO map. Even though AO is a rough GI approximation, this factorization increases the perceptual quality noticeably and decreases the reconstruction error.

[0098] The term radiance may be defined as the amount of light energy that is emitted, reflected, or transmitted by a surface in a particular direction. It may be a measure of the brightness of light that is emitted or reflected by a surface, and is typically measured in units of watts per square meter per steradian (W / m2 / sr) .

[0099] The term path tracing may be defined as computer graphics rendering technique used to simulate the behaviour of light in a virtual scene. It may work by tracing the path of light rays as they bounce around the scene, interacting with objects and surfaces, until they reach the light sources, are absorbed by a surface or are terminated by a heuristic. Path tracing may approximate ray tracing where only one ray is shot per bounce.

[0100] The term light transport equation may be defined as a mathematical equation that describes how light travels through a medium, such as air, water, or a solid object. The light transport equation may consider the interactions  of light with the medium, including absorption, scattering, and emission. It may be the equation that path tracing aims to approximate.

[0101] The term diffuse light may be defined as light that is scattered in many different directions, rather than being focused in a single beam or direction. This light may be view independent because it reflects the same radiance in every outgoing viewing direction in a given surface position.

[0102] The term specular light may be defined as the reflection of light off of a smooth surface, such as a mirror or a polished metal object. This type of reflection may create a bright, focused highlight that appears as a mirror image of the light source. This light may be view dependent because it can reflect different radiance values in every outgoing viewing direction in a given surface position.

[0103] The term direct illumination may be defined as light that directly hits a surface from a light source. This may be the light component that the majority of mobile videogames can only afford to render in real-time on an edge device.

[0104] The term indirect illumination may be defined as light that bounces at least once from a light source before hitting a surface. By definition, the light may arrive at surfaces from everything except light sources. It can be significantly expensive to compute and needs to be approximated and precomputed in most videogames.

[0105] The term global illumination may be defined as all light coming from direct and indirect illumination.

[0106] The term neural network may be defined as a type of machine learning algorithm that approximates a continuous function using a specific differentiable architecture. The network may be trained on a set of data, and the goal is to update the weights of the architecture to minimize the error between the predicted output and the ground-truth output.

[0107] The term view independent cache may be defined as 'view independent' due to its ability to store the radiance from all viewing angles for all surface positions of a scene, and using the same data structure.

[0108] The term primary bounces may be defined by rays that are shot from a camera, primary bounces refer to the initial surface hits that are intersected by these rays.

[0109] The term secondary bounces may be defined by rays that are shot from a camera, secondary bounces refer to all the surface hits that are intersected after the primary bounces.

[0110] The term self-training may be defined as using neural networks predictions as ground-truth for training neural networks. This is especially convenient when a single ground-truth value can be created using a mixture of real ground-truth values and few neural network predictions.

[0111] The Multiview Reflected Radiance Cache (MRRC) may be a Neural Network focused on caching the indirect radiance from all viewing angles for diffuse and specular content. It may approximate the radiance values at surface level, similar to lightmaps, and may handle dynamic content efficiently. Moreover, in a joint rendering scenario, where MRRC is trained on a server and its NN weights are sent to a device, it the MRRC may not require a path tracer nor a denoiser on the device side. This is because the NN may always be called at primary bounces.

[0112] The purpose of MRRC is to be a View Independent Cache, so that for a sole bounded scene or a voxel in a large scene a single NN can be shared from every viewing angle by multiple users. Previous dynamic view independent caches are limited to diffuse content only, as the real-time computational and memory costs required to incorporate specular content can be significantly high. Nonetheless, because MRRC may assume multiple view data by default, utilize a smart camera placement algorithm, start from a pretrained starting checkpoint, apply an adaptive scene sampling, use NN encodings devised for specular content and its architecture assumes AO factorization, these costs may be noticeably reduced.

[0113] Figure 8 schematically illustrates a pipeline 800 of a system of the present application. Pipeline 800 may comprise three stages.

[0114] The first stage may comprise offline initialisation of the MRRC. The first stage may be carried out on a server 802. The Offline MRRC Initialization stage may assume a bounded scene or a voxel as input with an indirect illumination complexity that can be suitably approximated by the MRRC neural network capacity. Within this 3D environment, a set of cameras may be strategically positioned through the smart camera placement algorithm to effectively capture the radiance field. Subsequently, a high-quality path tracer is applied to each camera, and the MRRC model is pre-trained with this data at primary bounces until convergence.

[0115] The second stage may comprise online finetuning of the MRRC. The second stage may be carried out on the server 802. During game execution time, the Online MRRC Finetunning stage may continuously adapt the NN to the lighting changes of every frame. The adaptive scene sampling procedure may assign a ray budget for each of the multiple predefined cameras while keeping the total limited real-time path tracing ray budget fixed. Each camera may have the task of generating their view dependent indirect illumination at the primary bounces. Depending on the complexity of the scene multiple GPUs can be used simultaneously to run independent cameras. As a result of utilizing cameras that shoot a predetermined quantity of rays, the computation of primary bounces may be executed efficiently through rasterization. After that, secondary bounces and their corresponding radiance values may be path traced with their allocated ray budget and optionally approximated by any pre-existing global illumination estimation technology. Once the training data is ready, MRRC weights may be updated doing a limited number of training steps.

[0116] The two stages, namely the Offline MRRC Initialization and the Online MRRC Finetuning, may be executed on the server 802 with the objective of generating the MRRC NN weights to be transmitted to multiple devices 801. Once the NN weights are received on the device, the rendering of a frame with global illumination may begin.

[0117] The third stage may comprise rendering a frame with the MRRC. The third stage may be carried out on a device 801. The MRRC may comprise a neural network. The neural network may be trained in the first stage. The neural network may be further trained in the second stage. The neural network may be used to render the frame in the third stage. The server 802 may generate and / or train the neural network to inference the indirect illumination of each of the one or more rays emitted by the single camera 201 (as described herein) .

[0118] The first stage may comprise a step of smart camera placement 803. Figure 9 schematically illustrates a training camera arrangement 900 of the present application. Before initiating the real-time rendering, an offline mode may be utilized to conduct a thorough scan of each bounded scene 204 or voxel, with the aim of determining the most optimal camera 201 placement for intelligently covering the most significant areas in terms of indirect illumination.

[0119] This process is defined as a resource allocation optimization algorithm, which takes into account the limited real-time path tracing ray budget allocated per scene, as well as the estimated amount of radiance details from each surface. The outcome of this algorithm is a set of camera 201 positions with varying resolutions, which effectively minimize the expected mean error between a brute force camera placement algorithm with a very high path tracing ray budget and a manually specified limited real-time path tracing ray budget.

[0120] The server 802 may obtain the bounded scene or voxel. As shown in Figure 9, a plurality of training cameras 201a-e may be arranged at different viewpoints View1-N. The training cameras 201a-e may be dispersed amongst a plurality of GPUs 901a-c. For example, as shown in Figure 9, each GPU 901a-c may comprise one or more of the training cameras 201a-e. Alternatively, a single GPU 901 may comprise all of the training cameras 201a-e. The server 802 may determine the optimal training camera 201a-e arrangement. The server 802 may determine the optimal training camera 201a-e arrangement based on an optimisation algorithm. The optimisation algorithm may be configured to optimise the training camera arrangement based on a path tracing ray budget. The optimisation algorithm may try to minimize the expected mean error between a brute force camera placement algorithm with a very high path tracing ray budget and a manually specified limited real-time path tracing ray budget. The path tracing ray budget may be predetermined. The path tracing ray budget may be set depending on the computational requirements on the server. The path tracing ray budget may depend on the scene content. When the path tracing ray budget is high, the cameras may be placed more uniformly, and a higher number of rays may be allocated to each camera. This scenario may resemble the brute force approach or an approach where specific areas are not prioritised. When the path tracing budget is low, the number of cameras may be significantly reduced. Few cameras may be placed in the centre to capture the whole scene in a global low-resolution way, and then a sparse set of cameras may target specific high frequency areas (i.e. with a lot of detail) or specular areas (i.e. with view dependent content) . Depending on the amount of detail of each surface, more or less rays may be shot from each camera.

[0121] The first stage may comprise a step of high-quality path tracing 804. Upon having defined the cameras 201a-e and while still in the offline mode, a pre-trained MRRC model may be generated through the utilization of a standard path tracer with a significantly high number of samples per pixel. This approach may ensure a robust starting checkpoint for the neural network and may be particularly advantageous in generating superior quality details for static areas while minimizing adaptation times for dynamic areas.

[0122] The server 802 may emit one or more rays 206 from each of the training cameras 201a-e at their respective viewpoints View1-N. The server 802 may determine the position of the primary bounce of each of the one or more rays 206 from each of the training cameras 901a-e. The position of the primary bounce may be a 3D position. The position of the primary bounce may be located on an object 204 in the bounded scene or voxel.

[0123] In this training phase, the server 802 may predict the indirect illumination of each of the one or more rays 206 from each of the training cameras 201a-e. The server 802 may predict the indirect illumination of each of the one or more rays 206 by any suitable means described in the prior art. The server 802 may be configured to predict the indirect illumination using random Fourier features as positional encodings inputs to the neural network. This may avoid visual artifacts when adapting the neural network with few path tracing samples. The server 802 may be configured to predict the indirect illumination using spherical harmonics as directional encodings and reflected view inputs to the neural network. This may allow the neural network to approximate and interpolate easier between specular content. The server 802 may be configured to predict the indirect illumination using an ambient occlusion factorization map as input to the neural network. The server 802 may be configured to predict the  indirect illumination using an ambient occlusion factorization map to multiply the output of the neural network. This may reduce the complexity of the problem, improve perceptual quality and decrease reconstruction error.

[0124] The server 802 may generate and train the neural network based on data from the bounded scene, or data from the voxel, as an input. The server 802 may train the neural network based on data from the training camera arrangement 201a-e. The server 802 may use the predicted indirect illumination of each of the one or more rays 206 emitted from the training cameras 201a-e to generate and train the neural network. By training the neural network based on indirect illumination from a range of viewpoints View1-N, the neural network may be later used to inference the indirect illumination from a range of viewpoints. In this way, the neural network may be viewpoint independent. The server 802 may train the neural network until convergence. The server 802 may generate the weights of the neural network during training.

[0125] The second stage may comprise a step of adaptive scene sampling 806. Once the real-time rendering starts, the MRRC needs to be updated to adapt to radiance changes frame by frame. Multiple training cameras 201a-e may perform path tracing simultaneously with several GPUs 901a-c with a limited real-time ray budget per GPU. For every timestamp, the radiance may be initially prestored and accumulated spatio-temporally by means of an explicit voxel hash grid in the world-space coordinate system. Due to having this spatio-temporal hash grid cache, it may not be possible to measure the difference at which radiance values change the most temporally and spatially in the scene. The adaptive scene sampling algorithm may use this difference information two-fold:

[0126] To guide the path tracing algorithm temporally by assigning the ray budget to each camera 201a-e dynamically.

[0127] To only select the radiance values with the highest differences to update MRRC and thus accelerate its convergence time.

[0128] The second stage may comprise a step of efficient path tracing 807. The server 802 may emit rays from each of the training cameras 201a-e. The server 802 may perform path tracing for every camera 201a-e using the allocated ray budget. In this further training phase, the server 802 may predict the indirect illumination of each of the one or more rays 206 from each of the training cameras 201a-e. The server 802 may predict the indirect illumination of each of the one or more rays 206 by any suitable means described in the prior art. The server 802 may be configured to predict the indirect illumination using random Fourier features as positional encodings inputs to the neural network. This may avoid visual artifacts when adapting the neural network with few path tracing samples. The server 802 may be configured to predict the indirect illumination using spherical harmonics as directional encodings and reflected view inputs to the neural network. This may allow the neural network to approximate and interpolate easier between specular content. The server 802 may be configured to predict the indirect illumination using an ambient occlusion factorization map as input to the neural network. The server 802 may be configured to predict the indirect illumination using an ambient occlusion factorization map to multiply the output of the neural network. This may reduce the complexity of the problem, improve perceptual quality and decrease reconstruction error.

[0129] The second stage may comprise a step of MRRC finetuning 808. The server 802 may further train the neural network based on data from the virtual scene received by the device (as described herein) . The server 802 may further train the neural network based on data from the single camera 201 arranged at the single viewpoint (as described herein) . The server 802 may use the predicted indirect illumination of each of the one or more rays 206 emitted from the single camera 201 at the single viewpoint (as described herein) . By further training the neural network based on indirect illumination from the single camera viewpoint, the neural network may be used for the specific user’s camera 201 at the single viewpoint. In this way, the neural network may be tailored for the specific  user’s camera 201 at the single viewpoint. The server 802 may further train the neural network until convergence. The server 802 may generate the update weights of the neural network during further training.

[0130] The server 802 may further train the neural network by predicting the indirect illumination of the virtual scene (as described herein) , and update the weights of the neural network for the indirect illumination based on the indirect illumination of the virtual scene. In other words, the neural network may be trained each time it predicts the indirect illumination of the virtual scene, based on information in the virtual scene. In this way, the inference of the indirect illumination of the virtual scene by the neural network may be improved. The server 802 may update the weights of the neural network for the indirect illumination in dependence on the difference between the one or more values of the indirect illumination of the virtual scene and the corresponding values of the indirect illumination of the neural network being above a threshold value. In other words, the weights may only be updated if there is a significant change in the indirect illumination between frames. In this way, the computation required may be reduced.

[0131] The server 802 may further train the neural network based on data from the bounded scene, or data from the voxel, as an input. The server 802 may further train the neural network based on data from the training camera arrangement 201a-e. The server 802 may use the predicted indirect illumination of each of the one or more rays 206 emitted from the training cameras 201a-e to further train the neural network. By further training the neural network based on indirect illumination from a range of viewpoints View1-N, the neural network may be later used to inference the indirect illumination from a range of viewpoints. In this way, the neural network may be viewpoint independent. The server 802 may further train the neural network until convergence. The server 802 may generate the update weights of the neural network during further training.

[0132] Figure 10 schematically illustrates a training path tracing example 1000 of the present application. The training path tracing example 1000 may be used in either or both of the generating and training, and the further training, steps described herein. Taking one of the training cameras 201a-e at a time, one or more rays 206, 207 may be emitted from the camera 201. The first bounces 206 may be determined as described herein. The second bounces 207 may be determined as described herein. The indirect illumination may be determined from the second bounces 207 as described herein.

[0133] The process of generating a frame on the device 801 may comprise several steps. Firstly, rasterization may be utilized to acquire the 3D positions at primary bounces. Afterwards, a required set of graphic data (normals, roughness, and reflectances) may be retrieved based on these 3D positions, and Direct Illumination and Ambient Occlusion (AO) maps may be computed on the device. Simultaneously, MRRC may be executed at these 3D positions to predict the indirect illumination. Finally, the rendered frame may be produced by merging the direct and indirect illumination.

[0134] Figure 11 schematically illustrates a rendering path tracing example 1100 of the present application.

[0135] The third stage may comprise a step of on device rendering 809. The device 801 may obtain a virtual scene 204. The virtual scene 204 may be obtained from the server 802. For example, if the device 801 is a user device 801 playing a game, the device 801 may receive the virtual scene of the game from the server 802. The virtual scene 204 may include one or more objects 204 (as shown in Figure 2) .

[0136] The device 801 may emit one or more rays 206, 207 from a single camera 201. The camera 201 may be at a single viewpoint 202. The rays 206, 207 may contact one of the one or more objects 204. The rays 206, 207 may contact the object 204 at a position 1101 of the primary bounce 206. The device 801 may determine the position 1101 of the primary bounce 206. The device 801 may determine the position 1101 of the primary bounce 206 for all of the rays 206, 207 that have been emitted. The device may determine the position 1101 of the primary bounce 206 by means of rasterization. In this way, the computation level on the device 101 may be reduced. The position 1101 of the primary bounce 206 may be a 3D position.

[0137] The device 801 may compute the direct illumination of each of the one or more rays 206, 207 at the position 1101 of the primary bounce 206. The device 801 may compute the direct illumination by any suitable means of the prior art.

[0138] The device 801 may compute one or more ambient occlusion maps AO at the primary bounces. The device 801 may compute the ambient occlusion maps AO by any suitable means of the prior art.

[0139] As shown in Figure 11, the device 801 may comprise the MRRC 1102. The device 801 may input the positions 1101 of the primary bounces 206 into the MRRC 1102.

[0140] The third stage may comprise a step of MRRC inference 810. The device 801 may obtain weights of a neural network trained to inference indirect illumination of each of the one or more rays. The device 801 may obtain the weights from the server 802. The weights may have been determined by the server 802 as described herein. The device 801 may receive the weights from the server 802 at each frame. The device 801 may receive the weights from the server 802 and predefined intervals. The device 801 may receive the weights from the server 802 in dependence on whether the weights have been updated since the last frame. The server 802 may output the weights. The server 802 may output the weights to the device 801. The server 802 may output the weights to a plurality of devices 801. The server 802 may output the weights to a plurality of devices 801 each of which share the same bounded scene or voxel. In this way, the weights may be used for multiple users using the same bounded scene or voxel.

[0141] The device 801 may predict the indirect illumination of each of the one or more rays 206, 207. The device 801 may predict the indirect illumination by means of the MRRC 1102.

[0142] Figure 12 schematically illustrates an MRRC architecture 1102 of the present application. The MRRC architecture 1102 has been built upon the NRC architecture. The MLP component has been modified to incorporate only two hidden layers, each with 128 channels. This change has been implemented to maintain comparable training and inference latency, while simultaneously enhancing the accuracy of the light transport approximation. The input variables to the NN remain largely unchanged as in NRC, with the exception of the type of training data, which is limited to primary bounce data, and the ambient occlusion maps that are used as input variables and as output guidance. Additionally, completely distinct NN encodings may be employed to encourage learning specular content from multiview data.

[0143] The MRRC 1102 may obtain the primary bounce data 1102. The primary bounce data 1102 may be inputted into a reflected view 1201. Subsequently the output of the reflected view 1201 may be inputted into the spherical encodings 1203. The primary bounce data may be inputted into a random fourier features encodings 1202. As a result, inputs 1204 x, w, n, r are encoded.

[0144] The MRRC may comprise a neural network 1205. The neural network 1205 may be configured to predict the indirect illumination of each of the one or more rays 206, 207. The neural network 1205 may predict the indirect illumination of each of the one or more rays 206, 207 at the position of the primary bounce 206. The device 801 may use the neural network 1205 to predict the indirect illumination.

[0145] The inputs 1204 may be inputted to the neural network 1205. Inputs 1204 x, w, n, r and inputs α and β and AO may be inputted into the neural network 1205. The positions 1101 of the primary bounce 206 may be inputted into the neural network 1205. The device 801 may predict the indirect illumination by inputting the positions 1101 of the primary bounce 206 into the neural network 1205 and predicting the indirect illumination using the neural network 1205. The ambient occlusion maps AO may be inputted into the neural network 1205. The device 801 may predict the indirect illumination by inputting ambient occlusion maps AO at the primary bounces 206 into the neural network 1205 and predicting the indirect illumination using the neural network 1205. The neural network 1205 may be configured to predict the indirect illumination using spherical harmonics as directional encodings and reflected view inputs to the neural network. This may allow the neural network to approximate and interpolate easier between specular content. The neural network 1205 may be configured to predict the indirect illumination using an ambient occlusion factorization map as input to the neural network 1205. The neural network 1205 may be configured to predict the indirect illumination using an ambient occlusion factorization map to multiply the output of the neural network 1205. This may reduce the complexity of the problem, improve perceptual quality and decrease reconstruction error.

[0146] To recover the indirect illumination, L_i, MRRC may train in a differential end to end manner with Equation 3: Li (x, w) =MRRC (x, w, n, r, α, β, AO) · (α+ β) ·AO    (3)

[0147] The third stage may comprise a step of global illumination image 811. The device 801 may render a frame of the virtual scene 204 from the direct illumination and the indirect illumination of each of the one or more rays 206, 207. The device 801 may be configured to render the frame 1402 from the direct illumination and the indirect illumination of each of the one or more rays 206, 207 by merging the direct illumination and the indirect illumination of each of the one or more rays 206, 207. The merging of the direct illumination and the indirect illumination may be represented by the light transport equation. The light transport equation has been linearly decomposed into its direct component Ld and its indirect component Li in Equation 4: L (x, w) =Ld (x, w) +Li (x, w)      (4)

[0148] Figure 14 shows a comparison a rendered frame of the NRC prior art system 1401 and the present application 1402. Figure 14 shows the quantitative and qualitative results between multiview NRC and MRRC. The same training data and protocol was used in both scenarios.

[0149] To directly compare the benefits of the architectural changes between MRRC and a multiview NRC queried at primary vertex, different experiments have been performed with a variety of public bounded scenes. In all scenarios the same training protocol has been used with the same amount of training data. Results have been generated by querying the NN randomly from different viewpoints at primary bounces and comparing the predicted indirect illumination with a denoised groundtruth. An average difference of +0.11 points in SSIM scores has been found, with a 0.82 and a 0.93 SSIM respectively for NRC and MRRC. Because SSIM behaves non-linearly, this can translate to significant perceptual quality improvements for the MRRC architecture.

[0150] A visual comparison between a multiview NRC and MRRC in the public Japanese Classroom scene can be seen in Figure 14. Only indirect illumination is depicted.

[0151] Figure 15 summarises an example of a method 1500 for ray tracing. At step 1501, the method 1500 comprises obtaining a virtual scene. At step 1502, the method 1500 comprises emitting one or more rays from a single camera at a single viewpoint of the virtual scene. At step 1503, the method 1500 comprises determining a position of a primary bounce of each of the one or more rays. At step 1504, the method 1500 comprises computing the direct illumination of each of the one or more rays at the position of the primary bounce. At step 1505, the method 1500 comprises obtaining weights of a server neural network, the server neural network being trained to inference the indirect illumination of each of the one or more rays, the weights being obtained from a server. At step 1506, the method 1500 comprises predicting the indirect illumination of each of the one or more rays by inputting the weights into a device neural network. At step 1507, the method 1500 comprises rendering a frame of the virtual scene from the direct illumination and the indirect illumination of each of the one or more rays.

[0152] An example of an apparatus 1600 configured to implement the method 1500 is schematically illustrated in Figure 16A. The apparatus 1600 may implement any of the method described here. The apparatus 1600 may be implemented on the device 801. The apparatus 1600 may be implemented on the server 802. Figure 16B shows the interaction between the device 801 and the server 802. The device 801 and the server 802 may be connected by means of a wireless network 1604. The wireless network 1604 may comprise the internet. The device 801 may be a mobile device 801. The mobile device 801 may be a mobile phone, a laptop, a computer, or a TV. The device 801 may be implemented on a chip.

[0153] There may be a plurality of devices 801. Each of the devices 801 may be configured to carry out any of the device 801 steps described herein. Each device 801 may belong to a different user. Each device may belong to a different user playing in a game. Each device 801 may be configured to emit one or more rays from a different single camera 201 viewpoint 202. The combination of the one or more devices 801 and the server 802 may provide a computing system 1603. Each of the devices 801 may be connected to the server 802 by the wireless network 1604.

[0154] The apparatus 1600 comprises a processor 1601 configured to process the datasets in the manner described herein. For example, the processor 1601 may be implemented as a computer program running on a programmable device such as a Central Processing Unit (CPU) . The apparatus 1600 comprises a memory 1602 which is arranged to communicate with the processor 1601. Memory 1602 may be a non-volatile memory. The processor 1601 may also comprise a cache (not shown in Figure 16) , which may be used to temporarily store data from memory 1602. The apparatus may comprise more than one processor and more than one memory. The memory may store data that is executable by the processor. The processor may be configured to operate in accordance with a computer program stored in non-transitory form on a machine-readable storage medium. The computer program may store instructions for causing the processor to perform its methods in the manner described herein. The method steps described herein may be carried out by a computer-readable storage medium. The method steps described herein may be carried out by a computer program product.

[0155] The applicant hereby discloses in isolation each individual feature described herein and any combination of two or more such features, to the extent that such features or combinations are capable of being carried out based on the present specification as a whole in the light of the common general knowledge of a person skilled in the art, irrespective of whether such features or combinations of features solve any problems disclosed herein, and without limitation to the scope of the claims. The applicant indicates that aspects of the present invention may consist of  any such individual feature or combination of features. In view of the foregoing description, it will be evident to a person skilled in the art that various modifications may be made within the scope of the invention.

Claims

1.A method (1500) for ray tracing on a device (801) comprising a device neural network (1205) , the method (1500) comprising:at the device (801) :(1501) obtaining a virtual scene (204) ;(1502) emitting one or more rays (206, 207) from a single camera (201) at a single viewpoint (202) of the virtual scene (204) ;(1503) determining a position (1101) of a primary bounce (206) of each of the one or more rays (206, 207) ;(1504) computing a direct illumination of each of the one or more rays (206, 207) at the position of the primary bounce (206) ;(1505) obtaining weights of a server (802) neural network, the server (802) neural network being trained to inference the indirect illumination of each of the one or more rays (206, 207) , the weights being obtained from the server (802) ;(1506) predicting an indirect illumination of each of the one or more rays (206, 207) at the position of the primary bounce (206) by inputting the weights into the device neural network (1205) ; and(1507) rendering a frame (1402) of the virtual scene from the direct illumination and the indirect illumination of each of the one or more rays (206, 207) .2.The method according to claim 1, wherein the position of the primary bounce (206) of each of the one or more rays (206, 207) is determined by means of rasterization.3.The method according to claim 1 or 2, wherein predicting the indirect illumination of each of the one or more rays (206, 207) comprises inputting one or more ambient occlusion maps (AO) at the primary bounces (206) into the device neural network (1205) and predicting the indirect illumination using the device neural network (1205) , and / or wherein predicting the indirect illumination of each of the one or more rays (206, 207) composites inputting the positions (1101) of the primary bounce (206) into the device neural network (1205) and predicting the indirect illumination using the device neural network (1205) .4.The method according to any preceding claim, wherein rendering the frame (1402) of the virtual scene from the direct illumination and the indirect illumination of each of the one or more rays (206, 207) comprises merging the direct illumination and the indirect illumination of each of the one or more rays (206, 207) .5.A method for generating weights of a server (802) neural network for use in ray tracing by a device (801) , the method comprising:at the server (802) :training the server (802) neural network to inference indirect illumination of one or more rays (206, 207) ; andoutputting the weights of the server (802) neural network to the device (801) , the device (801) being configured to use the weights of the server (802) neural network in ray tracing.6.The method according to claim 5, wherein the server (802) neural network is generated and trained offline based on data from a bounded scene or data from a voxel as an input (1204) and based on data from a  training camera arrangement (201a-e) comprising a plurality of training cameras arranged at different viewpoints (View1-N) .7.The method according to claim 5 or 6, wherein:the server (802) neural network is further trained online based on data from a virtual scene as an input (1204) and based on a single camera arranged at a single viewpoint (View1-N) , the virtual scene (204) and the single camera (201) arranged at the single viewpoint (202) being the same as those used on the device (801) ; and / orwhen dependent on claim 6, the server (802) neural network is further trained online based on data from the bounded scene or data from the voxel as an input (1204) and based on data from the training camera arrangement (201a-e) comprising the plurality of training cameras arranged at different viewpoints (View1-N) .8.The method according to claim 6 or 7, wherein an optimal training camera arrangement (201a-e) is determined based on an optimisation algorithm, the optimisation algorithm being configured to optimise the training camera arrangement (201a-e) based on a path tracing ray budget.9.The method according to any of claims 6 to 8, wherein the server (802) neural network is generated and trained by:emitting one or more rays (206, 207) from each of the training cameras at the respective viewpoints (View1-N) ;determining the position (1101) of the primary bounce (206) of each of the one or more rays (206, 207) from each of the training cameras (201a-e) ; andpredicting the indirect illumination of each of the one or more rays (206, 207) from each of the training cameras (201a-e) .10.The method according to any of claims 7 to 9, wherein the server (802) neural network is further trained by predicting the indirect illumination of the virtual scene (204) and updating the weights of the server (802) neural network for the indirect illumination based on the indirect illumination of the virtual scene (204) .11.The method according to claim 10, wherein the weights of the server (802) neural network for the indirect illumination are updated in dependence on the difference between the one or more values of the indirect illumination of the virtual scene (204) and the corresponding values of the indirect illumination of the server (802) neural network being above a threshold value.12.The method according to any of claims 9 to 11, wherein the indirect illumination of the virtual scene (204) is predicted by means of one or more of:using random Fourier features as positional encodings (x) inputs (1204) to the server neural network (1205) ;using spherical harmonics as directional encodings and reflected view inputs (1204) to the server (802) neural network;using an ambient occlusion factorization map (AO) as input (1204) to the server (802) neural network; andusing an ambient occlusion factorization map (AO) to multiply the output (1207) of the server (802) neural network.13.A device (801) for ray tracing, the device (801) comprising a device neural network (1205) and one or more processors (1601) and a memory (1602) storing program code executable by the one or more processors (1601) , wherein the program code is executable by the one or more processors (1601) so that the device (801) is configured to:obtain a virtual scene (204) ;emit one or more rays (206, 207) from a single camera at a single viewpoint (202) of the virtual scene (204) ;determine a position (1101) of a primary bounce (206) of each of the one or more rays (206, 207) ;compute a direct illumination of each of the one or more rays (206, 207) at the position of the primary bounce (206) ;obtain weights of a server (802) neural network, the server (802) neural network being trained to inference the indirect illumination of each of the one or more rays (206, 207) , the weights being obtained from the server (802) ;predict an indirect illumination of each of the one or more rays (206, 207) at the position of the primary bounce (206) by inputting the weights into the device neural network (1205) ; andrender a frame (1402) of the virtual scene from the direct illumination and the indirect illumination of each of the one or more rays (206, 207) .14.A server (801) for generating weights of a server (802) neural network for use in ray tracing by a device (801) , the server (802) comprising one or more processors (1601) and a memory (1602) storing program code executable by the one or more processors (1601) , wherein the program code is executable by the one or more processors (1601) so that the server (802) is configured to:train the server (802) neural network to inference indirect illumination of one or more rays (206, 207) ; andoutput the weights of the server (802) neural network to the device (801) , the device (801) being configured to use the weights of the server (802) neural network in ray tracing.15.A computing system (1603) comprising the device (801) of claim 13 and the server of claim 14.

Citation Information

Patent Citations

  • A client device configured with a neural network, a system and a server system

    CN105447498A

  • Deployment method of AI model file and storage medium

    CN114239804A

  • Image rendering method and device

    CN115205439A

  • Transfer learning for neural networks

    US20210089921A1

  • Neural 3D Video Synthesis

    US20220239844A1