# SSAO peculiar effect with translucent geometry

**URL:** https://discourse.vtk.org/t/ssao-peculiar-effect-with-translucent-geometry/4410
**Category:** Support
**Created:** [October 13, 2020, 1:44pm UTC](https://discourse.vtk.org/t/ssao-peculiar-effect-with-translucent-geometry/4410 "2020-10-13T13:44:47Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Michael](https://discourse.vtk.org/user_avatar/discourse.vtk.org/michael/32/16_2.png) [@Michael](https://discourse.vtk.org/u/Michael)
#### Post date: [October 14, 2020, 9:22am UTC](https://discourse.vtk.org/t/ssao-peculiar-effect-with-translucent-geometry/4410/2 "2020-10-14T09:22:26Z")

</div>

The odd color behavior is related to an internal color buffer that you are not supposed to see.  
Note that you will be able to enable SSAO without render passes in VTK 9.1.

In the mean time, you can try something equivalent to [F3D render passes](https://gitlab.kitware.com/f3d/f3d/-/blob/master/src/vtkF3DRenderPass.cxx#L125):

```python
    lightsP = vtk.vtkLightsPass()
    opaqueP = vtk.vtkOpaquePass()
    translucentP = vtk.vtkTranslucentPass()
    volumeP = vtk.vtkVolumetricPass()

    collection = vtk.vtkRenderPassCollection()
    collection.AddItem(lightsP)

    # opaque passes
    ssaoCamP = vtk.vtkCameraPass()
    ssaoCamP.SetDelegatePass(opaqueP)

    ssaoP = vtk.vtkSSAOPass()
    ssaoP.SetRadius(30)
    ssaoP.SetDelegatePass(ssaoCamP)
    ssaoP.SetBias(0.1)
    ssaoP.SetBlur(True)
    ssaoP.SetKernelSize(32)

    collection.AddItem(ssaoP);

    # translucent and volumic passes
    ddpP = vtk.vtkDualDepthPeelingPass()
    ddpP.SetTranslucentPass(translucentP)
    ddpP.SetVolumetricPass(volumeP)
    collection.AddItem(ddpP)

    sequence = vtk.vtkSequencePass()
    sequence.SetPasses(collection)

    camP = vtk.vtkCameraPass()
    camP.SetDelegatePass(sequence)

    ren.SetPass(camP)

```

---

_[View the full topic](https://discourse.vtk.org/t/ssao-peculiar-effect-with-translucent-geometry/4410)._
