Chaos
Architecture

Industry solutions

Explore our ecosystem

Products

Media & Entertainment

Industry solutions

Explore our ecosystem

Products

Product & E-Commerce

Industry solutions

Explore our ecosystem

Products

Education & CommunityHelp

Chaos Help Center


What are you looking for?

Scene by Marko Dabrovic
Scene by Marko Dabrovic

Path Guiding with Intel® Open PGL in V-Ray


Overview 

One of the new innovative features of V-Ray 6.1 is an initial experimental implementation of Intel’s Open Path Guiding Library. In this blog, we provide some more details about path guiding and the collaboration between Intel and Chaos in this integration. Portions of this blog post were contributed by Sebastian Herholz, an expert ray-tracing software engineer from Intel.


What is path guiding?

One of the most widely used techniques for producing photorealistic images in modern renderers is unidirectional path tracing. In a simplified description of this method, the renderer traces rays from the camera position through the pixels of the image into the scene.
These rays estimate a solution for the scene’s light transport defining the value/color of a pixel. At each intersection of a ray with the scene geometry, the renderer computes direct illumination from scene light sources and bounces those rays off surfaces to compute global illumination, reflections, and refractions.


Path_Guiding-1410x800-1.jpg
Dian Nikolov

In a scene with a complex lighting situation and uniform path tracing, only some paths reach the lit areas and contribute meaningfully to the image. This leads to a very noisy result. 


The resulting images are very convincing but may contain noise. This noise requires sufficient samples per pixel to reduce to a desired level. The noise generally depends on how well the renderer can explore the light transport in a scene, i.e., if it is able to shoot/direct rays into regions of the scene that significantly contribute to the value of a pixel (e.g., light sources or objects reflecting direct or indirect light). The “difficulty/complexity” of the lighting situation plays a big role — scenes with uniform illumination need fewer samples to achieve a desired noise level compared to scenes with complex indirect illumination like a small bright patch illuminated by sunlight, for example. While path tracers are good at handling direct illumination coming from the scene light sources, indirect illumination from brightly lit surfaces may take many more samples to clean up. This is because the renderer has no information about the indirect illumination and must typically rely on the reflection characteristics of the local material to explore it. 


Path_Guiding-1410x800-2.jpg
Dian Nikolov

With path guiding, more paths reach the lit areas of the scene and contribute to the final result which leads to a less noisy image. 


Path guiding is a method to improve the rendering quality by helping the renderer to overcome its limitation of not having any information about the indirect illumination of a scene. Path guiding learns an approximation of indirect illumination of the scene in a rendering prepass or online during rendering iterations. During rendering, when the renderer needs to decide in which direction to shoot the next ray, the approximation of the indirect illumination is used to guide rays into important directions (e.g., toward brighter regions of the scene). This ‘guiding’ of rays leads to a significant noise reduction and cleaning up images faster, especially in scenes with complex lighting situations that are not covered by other rendering optimizations such as the adaptive dome light sampling in V-Ray and Corona or one-click caustics

Why V-Ray uses

Path guiding is the result of decades of research. However, production rendering adoption just started recently (reference: Path guiding in production | ACM SIGGRAPH 2019 course) [0].
Unfortunately, there does not exist ‘the one’ path guiding approach that is robust and efficient enough to be widely adopted across the industry. This is why Intel created the open-source Intel Open PGL project to develop, together with the rendering community, a path-guiding framework that is robust and efficient enough to be used in daily production. Intel aims to make the Intel Open PGL project the premier solution for path guiding in the rendering community, just as Intel® Embree (embree.org/) is for ray tracing/intersection kernels.

Chaos chose to implement Open PGL because it demonstrated promising results and provided an API that allowed it to be integrated relatively easily into production renderers like Corona and V-Ray. Further on, the previous experience with the Embree project demonstrated the clear advantages of a community-driven solution — a robust and performant library with contributors from various industries.


How Intel Open PGL is developed

Sebastian Herholz and Addis Dittebrandt, another Intel ray tracing engineer, lead the main development work. Contributions are provided from the Blender community and now also the Chaos community.


Technical details and how it works

Intel's Open PGL approximates the scene's light distribution to guide the sampling decisions at ray intersection into directions of high importance (i.e., with strong indirect illumination). The approximation of the scene's light distribution is either learned online during rendering or, as in the case of the V-Ray integration, in a rendering pre-pass. 

To represent the approximation of the high-dimensional light distribution (i.e., light field) of the entire scene, the spatial domain of the scene is first subdivided into smaller regions, where each region stores an approximation of the local incoming light distribution. These approximations are similar to light probes, valid for positions across their corresponding region.

During rendering, whenever a new direction is sampled, the light distribution at the current intersection point is queried and used to guide paths in important directions with a high contribution to the rendered image ([3],[4]). By guiding paths that interact with surfaces and volumes, Intel Open PGL increases the sampling quality in complex indirect illumination scenarios such as multi-bounce diffuse illumination, multi-scattered volumetric illumination, and even simpler direct and indirect caustic effects.


Implementation of Intel Open PGL in V-Ray 6.1

V-Ray 6.1 implements an initial experimental version of Open PGL for the CPU version of V-Ray. For the moment the training samples are generated during V-Ray’s light cache building pass so the path guiding option can be found in the light cache settings:

Path_Guiding-1410x800-3-white.jpg

This allows path guiding to be used both for progressive and bucket rendering modes once the light cache has been computed. Both diffuse reflections (GI) and glossy reflections can be made more photorealistic by the path guiding, as well as sampling of indirect illumination in volumes. The aim is to reduce the noise from such effects in order to achieve faster render times. Path guiding is supported for the VRayMtl material, the VRayEnvironmentFog atmospheric effect, and the VRayVolumeGrid.

Because the path guiding library is trained during the light cache calculation phase, increasing the light cache subdivs typically leads to faster final render times since the guiding engine has more data to work with.


Results

The path guiding implementation is still experimental and in development. As such, the results are very scene-dependent - in some scenes, it can improve render times significantly while in others it doesn't help too much. The best results we have seen are in situations in which large portions of the scene are lit through indirect lighting. Below are some examples of scenes where path guiding improves render times quite a bit.


Example 1

Path_Guiding-1410x800-4.jpg

Render with V-Ray adaptive dome light and path guiding through OpenPGL

(scene purchased from Turbosquid: http://www.turbosquid.com/3d-models/scenes-loft-3d-model/685003)

Compared to a non-adaptive render, both the path guiding and the V-Ray adaptive dome light help to reduce render times significantly. Each provides a substantial speed boost on its own but they also combine nicely to produce the fastest result. In the table below, the VRaySampleRate render element is shown along with the render times for different combinations of settings. The scene is set to render with a maximum of 40 AA subdivs per pixel (i.e. 1600 samples per pixel). The light cache was set to 3000 subdivs (i.e. 9 million image samples). With the non-adaptive result in the top-left corner, even that many samples are not enough to completely reach the desired (variance-based) noise threshold in some parts of the image (i.e. the parts that are colored in red).


Path_Guiding-1410x800-5.jpg

The renders below show the effect of the light cache subdivs on the efficiency of the path guiding. More light cache subdivs give more training samples to the path guiding library so it is better able to guide the rays during the final rendering. 

Path_Guiding-1410x800-6-white_new.jpg

Example 2 

cathedral-1410x800.jpg
Scene by Marko Dabrovic

Render with adaptive dome light and path guiding through Open PGL
(Sibenik cathedral scene from the Radiosity Competition: (http://hdri.cgtechniques.com/~sibenik2/)

In this example, both path guiding and adaptive dome light help to reduce the render times although in this lighting situation the path guiding has a much larger impact - this is because a large part of the environment is blocked due to geometry outside the interior. The scene is set to render with 30 AA subdivs (maximum of 900 samples per pixel) and a noise threshold of 0.03. Path guiding helps to reduce the number of required samples significantly in order to achieve the same noise level. The light cache was set to use 3000 subdivs (i.e. 9 million image samples).


Path_Guiding-1410x800-7.jpg


For this scene, using the default light cache subdivs value of 1000 does not really allow the path guiding to improve the rendering much. However, using more subdivs results in better path guiding as more information about the scene is available. 

Path_Guiding-1410x800-8-white.jpg

Future developments

While this initial implementation has already proven helpful in some situations, more work that will be completed in the near future:

  • Improve the performance of the path guiding so that it is useful for a wider variety of scenes. At the moment, there is overhead to using path guiding so it’s not handy on scenes where GI/reflections are not the main source of noise.
  • Extend support for more material types — already being worked on, for example VRayScannedMtl material, glossy refractions, and others.
  • Continue learning during progressive rendering to significantly improve the results.
  • Enable path guiding for brute-force GI as an “adaptive prepass” option.


Additional Advanced Ray Tracing Technologies

Learn more about other advanced ray tracing software in the Intel® oneAPI Rendering Toolkit, including Academy Award-winning Intel Embree, Intel® Open Image Denoise (used in The Addams Family 2), Intel® Open Volume Kernel Library, and more. All libraries are available from Intel and in open source (GitHub).


Further information and more about V-Ray 6.1

For more information also consider listening to the new podcast called “Ray Tracing, Path Tracing & Path Guiding - Finding the Light (efficiently) with Chaos and Open PGL” which is part of Intel’s “Code Together” podcast series. The podcast can be found anywhere podcasts are found, such as Spotify or Apple Podcasts, or you can also listen to it directly at these links:

https://connectedsocialmedia.com/20299/ray-tracing-path-tracing-path-guiding-finding-the-light-efficiently-with-chaos-and-openpgl/

V-Ray 6.1 includes many other improvements as well. For more details visit www.chaos.com/vray/3ds-max/whats-new and the full changelog is available at docs.chaos.com/display/VMAX/V-Ray+6


References

[0] Path Guiding in Production (https://dl.acm.org/doi/10.1145/3305366.3328091)

[1] Robust fitting of parallax-aware mixtures for path guiding (https://dl.acm.org/doi/10.1145/3386569.3392421)

[2] Practical Path Guiding for Efficient Light-Transport Simulation (https://dl.acm.org/doi/10.1111/cgf.13227)

[3] Volume Path Guiding Based on Zero-Variance Random Walk Theory (https://dl.acm.org/doi/abs/10.1145/3230635)

https://cgg.mff.cuni.cz/~jaroslav/papers/2019-volume-path-guiding/index.html

[4] Product Importance Sampling for Light Transport Path Guiding (https://dl.acm.org/doi/10.5555/3071773.3071781)

https://cgg.mff.cuni.cz/~jaroslav/papers/2016-productis/


speakers-vlado.jpg
About the author

Vladimir Koylazov

Vlado is the head of innovation and co-founder of Chaos. He is an expert in rendering theory and an avid supporter of the 3D community. When he is not writing code, he is often participating in forum discussions and helping users solve their rendering challenges. Vlado is the driving force behind V-Ray, and in 2017 he was awarded a Sci-Tech Academy Award for helping to make ray tracing an essential part of film VFX. A few years later, he accepted an Engineering Emmy for playing a significant role in advancing the use of fully ray-traced rendering.

Originally published: May 22, 2023.
© Škoda Design

Subscribe to our blog.

Get the latest news, artist spotlight stories, tips and tricks delivered to your inbox.

By submitting your information you are agreeing to receive marketing messages from Chaos. You can opt-out at any time. Privacy Policy.

Chaos
© 2024 Chaos Software EOOD. All Rights reserved. Chaos®, V-Ray® and Phoenix FD® are registered trademarks of Chaos Software EOOD in Bulgaria and/or other countries.