Desaturate parts of the scene

Let’s say I have a scene like this: Babylon.js Playground

I would like to programmatically desaturate all elements except the sphere. Here are the options that come to mind:

  • Desaturate the colors for all materials other than the sphere. In my actual project, there are a lot more meshes than just two though, I feel like this would be a very slow solution.
  • I saw that the NME has a desaturate block, but that goes for the whole scene. Is there a way to exclude one mesh from the desaturation?

Any other ideas?

You can have your sphere in a different scene as well and then use image processing (for desaturation on the main scene)

You can also use NME to create specific materials with desaturation and use that materials for all meshes but the sphere

1 Like

Thank you, that helps a lot!