Lighting

Directional Light

Your main shadow-casting directional light. It is usually set up automatically.

Expand Shadowmap

This parameter controls the area covered by the custom directional shadowmap. The shadowmap is used to evaluate direct lighting and shadowing at hit points of world-space rays. It is centered around the voxelization bound, and its size is adaptively scaled to ensure it covers the entire bound. However, in some cases, it may be important for the shadowmap to capture objects beyond the voxelization bounds to avoid light leaks. For example, in a very tall interior where the voxelization bound doesn’t reach the roof, expanding the shadowmap may help capture the roof geometry (even if the voxelization itself doesn’t), ensuring that no sunlight or skylight is visible for world-space rays

Avoid expanding the shadowmap unless necessary, as it has a fixed resolution; expanding it too much can increase visible shadow-mapping artifacts. You can inspect the shadowmap in the Debug dropdown

Light Cluster

HTrace WSGI uses a spatial structure called a Light Cluster to store punctual lights in world space and speed up lighting evaluation on hit points. It subdivides the voxelized area into virtual cells and stores a certain number of lights in each cell intersected by these lights.. It's very similar to Unity's Light Cluster used for ray tracing.

To add a punctual light to the Light Cluster, attach the HPunctual Light script to it. To check if a light is registered in the system, use the Light Cluster Color debug view, which highlights cluster cells in colors matching the emission colors of the registered lights. Lighting and shadows from all registered punctual lights should also be visible in the Voxelized Lighting debug view.

Evaluate Punctual Lights

Enables evaluation of Spot and Point lights and their shadow maps for world-space rays, allowing these light types to fully participate in global illumination.

All punctual lights are picked up by screen-space tracing automatically.

Cell Light Count

Defines the maximum number of lights that can be stored in a single cell of the Light Cluster. Use the Light Cluster Heatmap debug view to inspect the current level of cell occupancy. If the heatmap shows a fully red cell, it means the number of lights whose ranges intersect this cell is equal to or exceeds the limit set by this parameter - consider increasing it in such cases.

Cell Density

Defines the maximum number of cells in the cluster along each axis. Higher values lead to a more refined Light Cluster, which can be beneficial when there’s a large number of intersecting punctual lights in the scene.

Last updated