The global photon map is somewhat similar to the irradiance map. It is also used to represent the lighting in the scene, and it is a collection of points in 3D space (a point cloud). However, the photon map is built in a different way. It is built by tracing particles (photons) emitted by the scene lights. Those photons bounce around the scene and hit various surfaces. The hit points are stored in the photon map.

Reconstructing the illumination from the photon map is also different from the irradiance map. With the irradiance map, a simple interpolation is used to blend the nearby GI samples. With the photon map, we need to estimate the photon density at a given point. The idea of density estimation is central to the photon map. VRAYforC4D can use several methods for density estimation, each with its own advantages and disadvantages. Usually these methods are based on looking for the photons that are nearest to the shaded point.

Note that in general, the photon map provides a less accurate approximation of the scene illumination than the irradiance map, especially when it comes to small details. The irradiance map is built adaptively, whereas the photon map is not. Also a major disadvantage of the photon map is the boundary bias. This unwanted effect is mostly visible around corners and object edges, which appear darker than they should be. The irradiance map can also exhibit boundary bias, however its adaptive nature allows one to decrease the effect greatly. Another disadvantage of the photon map is that it cannot simulate illumination from skylight. This is because the photons need an actual surface to be emitted from. The skylight, at least inVRAYforC4D, is not a surface actually present in the scene.

On the other hand, the photon map is view-independent and can be computed relatively quickly. This makes it ideal for approximating the scene illumination when used together with more accurate methods like direct computation or the irradiance map.

Note that the building of the photon map is also controlled by the photon settings of individual lights in the scene. See the Light settings dialog for more information in Common Tab and Area light Tab of Lights Tag.


Bounces – this parameter controls the number of light bounces approximated by the photon map. More bounces produce a more realistic result, but take more time and memory.

Prefilter – his will cause VRAYforC4D to precomputed the irradiance at the photon hit points stored in the photon map. This allows fewer photons to be used when interpolated the irradiance during rendering, while keeping the result relatively smooth. It is important to note that the resulting map stores irradiance, but is not the same as the irradiance cache used by VRAYforC4D for primary diffuse bounces.

Inter. samples – this controls how many irradiance samples will be taken from the photon map once it is converted to an irradiance map. Larger values produce smoother results, but may be slower; smaller values produces more noisy results but rendering is faster.

Auto search distance – when this is on, VRAYforC4D will try to compute a suitable distance within which to search for photons. Sometimes the computed distance is ok, in other cases it might be too big (which will slow down the rendering) or too small (which will produce a more noisy result).

Convex hull area estimate – when this is off, VRAYforC4D will use a simplified algorithm for computing the area, covered by a number of photons (by only taking the distance to the farthest photon). This algorithm may cause corners to be darker. Using the convex hull area estimate avoids the dark corners problem, but is slower and not as robust.

Search distance – this option is only available when Auto search dist is off. It allows you to specify the photon search distance manually. Keep in mind that this value depends on the size of your scene. Lower values will speed up the rendering but may produce more noisy results. Larger values will slow down the rendering but may produce smoother results.

Max photons – this option specifies how many photons will be taken into consideration when approximating the irradiance at the shaded point. More photons mean a smoother (and more blurry) result and may also slow down the rendering. Smaller values mean a more noisy result but will render faster. When this value is 0, VRAYforC4D will use all the photons in the given search range.

Max density – this parameter allows you to limit the resolution (and thus the memory) of the photon map. Whenever VRAYforC4D needs to store a new photon in the photon map, it will first look if there are any other photons within a distance specified by Max density. If there is already a suitable photon in the map, VRAYforC4D will just add the energy of the new photon to the one in the map. Otherwise, VRAYforC4D will store the new photon in the photon map. Using this options allows you to shoot many photons (and thus get smoother results) while keeping the size of the photon map manageable.

Multiplier – this allows you to control the brightness of the photon map.

Store direct light – when this is on, VRAYforC4D will store direct illumination in the photon map as well. This may speed up the irradiance map or brute force GI, when used as a primary engine, and there are lots of lights in the scene. When this is off, direct lighting will be computed always by tracing the necessary rays. This may slow things down if there are lots of lights in the scene.

Show calc. phase – when this is on, VRAYforC4D will visualize the calculation phase of the photons during rendering.

Retrace threshold – when this is greater than 0.0, VRAYforC4D will use brute force GI near corners, instead of the photon map, in order to obtain a more accurate result and to avoid splotches in these areas. This may slow down the rendering. When this is 0.0, the photon map will be used always, which will be faster, but may produce artifacts near corners or in places where objects are close to each other.

Retrace bounces – controls how many bounces will be made when retracing corners. If Retrace threshold is 0.0, then this parameter is ignored. Typically this should be equal to the Bounces parameter.

Mode – determines the rendering mode of the light cache:

  • Progressive path tracing – in this mode, the light cache algorithm is used to sample the final image progressively. For a discussion of this mode see the tutorial.
  • Single frame – this will compute a new light cache for each frame of an animation.
  • Fly-through – this will compute a light cache for an entire fly-through animation, assuming that the camera position/orientation is the only thing that changes. The movement of the camera in the active time segment only is taken in consideration. Note that it may be better to use World Scale for fly-through animations. The light cache is computed only at the first rendered frame and is reused without changes for subsequent frames.
  • From file – in this mode the light cache is loaded from a file. The light cache file does not include the prefiltering of the light cache; prefiltering is performed after the light cache is loaded, so that you can adjust it without the need to recompute the light cache.
  • Load file – specifies the file name to load the photon map from, when the Mode is set to From file.

On render end

This group of controls determine what happens with the photon map after rendering is complete.

Don’t delete map – when on (the default), the photon map remains in memory after the rendering. Turn this option off to automatically delete the photon map (and thus save memory).

Auto save – when on, the photon map will be automatically written to the specified file. Note that the photon map will be written as soon as it is calculated, rather than at the actual end of the rendering.

Auto save file – when on, after the rendering is complete, the photon map Mode will be automatically set to From file and the name of the auto-saved photon map file will be copied to the File parameter.

The photon map is mostly useful for interior scenes with artificial lighting or relatively small windows.