Dynamic Desaturation in Specific Areas

Hey Guys!

Normally I wouldn’t post without having tried a few possible routes first,
but in this case, it’s more a case of finding out which is the better before I start.

Basically, I would love to be able to have a volume that could make the textures within be desaturated.
Whether this is achieved via post process, or vertex painting, etc, is the question.

**Vertex Painting:
**
I don’t particularly fancy the Vertex Paint & Lerp style, as it can look bad and not fade correctly.
You either need perfect normals on the mesh, or have a high poly count.
So I want to avoid this as much as possible.

Post Process:

For the volume idea, I wouldn’t want the entire mesh to become gray scale.
Only the part in the volume.

I had considered maybe looking into combining the volume with post process,
but even if that were possible (since the camera would never be in the volume),
it would probably make everything visible behind the bounds of the volume desaturated as well.

Basically, I would love an opinion on what would be best.
Or even better, if someone had an alternative method! xD

Thanks again guys!

-

There are various ways of doing this. I’d probably go for a post process since it’s easy to implement and won’t require to mess around with editing the materials for all your meshes inside the volume.

Here’s what I’ve come up with after a quick try. The material basically compares the world position of each pixel with the bounds of a volume to get a black/white mask for a Lerp node. The volume transition for this one is hard due to the If node but it’s also possible to get a smooth transition.

Think of the VolumeMin and VolumeMax as the lower left and upper right corner of a box volume in world space. If your volume is dynamic it would be a good idea to automatically pass these values from a blueprint to the material. Otherwise this should do it.

Hey !

No matter how much I learn, there’s always someone who can blow me away! xD
It’s actually a perfect match to what I imagined!

Thank you so much! :3

Notes:
For this to work properly I have to set it to “Before Tonemapping”
Otherwise it just appears as black :confused:

I wouldn’t mind the performance hit so much, but it makes my GPU particles disappear. :frowning:
I don’t see how that’s even possible, unless it’s overriding that render pass.

Any way around this?? :3

Edit:
I found the problem!
Just changed “Scene Color” to “PostProcessInput0” and voila!

-

**Hey !
**
Just wondering, since the current system only allows for a volume that hasn’t been rotated.
How would I go about masking an area in the 3D space.

I have access to the volume points, have the material being dynamically setup and assigned,
but I can’t quite work out the math in the material editor.

Would you know how to go about this?

-

Hi, I’m not comlpetely sure what you are asking about exactly.
So you have a large/unbound post process volume with the desaturation ‘volume’ inside and you want the latter one to be rotated? Which means you are looking for some shader math to calculate new corner points that define the desaturation area?