Screen-space ambient occlusion for volume rendering

The final change (VTK!10725) has been merged! :rocket:
This makes SSAO available for volumes, but not with the vtkRenderer::UseSSAOOn() function, you must explicitly set the render passes like this:

 // Render passes setup
  vtkNew<vtkRenderStepsPass> basicPasses;
  vtkNew<vtkSSAOPass> ssao;
  ssao->SetRadius(40);
  ssao->SetKernelSize(128);
  ssao->SetBias(0.01);
  ssao->BlurOn();
  // The depth format must be Fixed32 for the volume mapper to successfully copy the depth texture
  ssao->SetDepthFormat(vtkTextureObject::Fixed32);
  ssao->SetVolumeOpacityThreshold(0.95);
  ssao->SetDelegatePass(basicPasses);

  renderer->SetPass(ssao);

I’ll start working on screenshots and will try to kick off a doc for technical writing.

3 Likes