This article describes the V-Ray global illumination (GI) system.

 

General

V-Ray implementation requirements

Shader requirements

Light requirements

 

General

The global illumination system in V-Ray is split into several modules dealing with different components of the GI solution:

V-Ray does not provide methods for sampling glossy illumination - this must be handled by shaders, typically by brute-force integration over the hemisphere.

 

V-Ray can use different methods for computing indirect illumination:

Which methods will be used depends on the V-Ray parameters in the sequence data. For more information, consult the V-Ray user manual.

V-Ray implementation requirements

Typically, the only thing that a V-Ray implementation must provide is an instance of class VRayDirectLightManager. This must be provided as a pointer in the sequence data structure. The default GI engine will call different methods of this class to calculate the GI successfully.

 

The most important method is the VRayDirectLightManager::eval() method. This computes the amount of direct light hitting a surface and reflected towards the viewer.

 

Although not required in general, the additional EXT_PHOTON_LIGHT_MANAGER and EXT_CAUSTICS_PHOTON_LIGHT_MANAGER must be supported by the direct light manager, if you want to be able to compute caustics and use the photon map as a GI engine.

 

An example direct light manager supporting the photon extensions is provided with the sample renderer in the SDK. It simply passes the respective calls to the scene lights and accumulates the result.

 

If you want to use an alternative global illumination engine, you can replace the default one used by V-Ray by setting the appropritate member in the sequence data structure.

Shader requirements

V-Ray has no specific requirements to shaders with respect to GI, in the sense that the same shaders are used for normal rendering, direct light evaluation and GI. However, there are some considerations to be made so that the behaviour is what the user expects:

Light requirements

There are also some considerations when writing lights: