Implicit Volume Rendering¶
Eddy supports direct rendering of implicit volumes. An implicit volume is one that has not necessarily been voxelized, instead it is defined by an Eddy compositing network. Because the volume is not stored as voxels, it does not use any memory and so can be arbitrarily large and infinitely detailed.
Rendering performance¶
When rendering implicit volumes there are several performance considerations to be aware of:
The renderer will typically sample the volume billions of times during a render. If the compositing graph is expensive to evaluate then this can have a big impact on the rendering performance. Some things in particular to watch out for are using large numbers of octaves in the NoiseRefLabel node, or a large number of trace steps in the DistortRefLabel node.
Tracking integrators are often better than raymarching integrators for implicit volumes, as the tracking integrators generally take less samples.
Large implicit volumes can be slow to render, simply because the rays can have a much longer distance to traverse. This applies mainly to raymarching integrators, using tracking integrators together with supervoxels will usually alleviate this issue.
Enabling supervoxels in the volume settings is recommended (and is enabled by default). Supervoxels will allow skipping of empty space in the implicit volume and also allow tracking integrators to take less samples.
Raymarching with implicit volumes¶
Raymarching integrators work by stepping along the ray, one small step at a time. For volumes based on voxels, the step size is chosen to be the same as the voxel size. For implicit volumes however, there may not be a way to determine the step size automatically. If the compositing network used voxelized volumes as its initial inputs, then Eddy will attempt to calculate an appropriate step size based on the nodes in the compositing network. For other implicit volumes it may not be possible to calculate a step size, and if raymarching has been requested Eddy will abort the render with an error message.
The simplest fix is to just use tracking integrators instead of raymarching integrators. However if raymarching is still desired, the step size can be specified manually with the ‘Raymarch step size override’ option in the volume settings. Note that if the step size specified is larger than the details in the volume, then the raymarching integrator will step over and miss these details, blurring them in the final render.
Rasterizing¶
If the performance impact of rendering an implicit volume is too great, then it can be rasterized into a voxel grid instead. Rasterizing will likely improve rendering speed as sampling the voxels will usually be faster than sampling the compositing graph.
To convert an implicit volume into a standard voxelized volume, the RasterizeFieldRefLabel node can be used. This has controls to specify the size of the voxels to use, and it will allocate memory for the voxels and then sample the implicit volume into these voxels. The voxel size must be chosen carefully to balance the memory usage while still being small enough to retain enough detail.