Masking some areas of Depthkit Studio volumetric clip in Unity

Hi Dephtkit,

It’s pretty often we need to mask some objects inside Studio clips - let’s say some large chunks of noise that can’t be removed with refinement or some minor objects that we don’t like. It cannot be cut with boundaries because it’s not on the edge of the clip. So there’s an idea to mask it with a primitive 3D object and apply a shader to it so it would hide a part of Studio clip that is inside this primitive and make it overall transparent. So that all objects behind are visible.

Please advise what shader and settings would you recommend applying to this masking primitive? Currently, it’s needed for URP project but in the future may be for built-in RP as well.

Thanks a lot.

Hi Nikita,

This would be a great feature, unfortunately it is not currently supported out of the box, and would require some shader modifications in order to achieve this.

At a high level, I would recommend modifying the GetSDFCamContribution function within the\Runtime\Resources\Shaders\DataSource\GenerateVolume.compute file. You should be able check if the position being processed is within a masking primitive there and return from the function early.

If you’re up for it let me know and I can advise further.

Hi Tim,
Yes, I’d love to try this method. Would you like to arrange a call to implement it in real time or provide step-by-step written guidance?

Hi Nikita,
For bespoke 1-on-1 support requests like this which involve new features or custom coding, we offer hourly paid support. If that’s something you’re interested in pursuing please email and we can take it from there.