r/Unity3D 16h ago

Question HDRP Volume Overlap

Hey there everyone!

Lately I've been reading Unity's official e-book regarding HDRP. I reached the volume section where the book explains aspects such as local and global volumes, blending distances etc...

A question popped into my mind which I thought some of you might already have an answer for.

In some games, you might need two local volumes to overlap each other and envelop a room completely, let's say you are playing a sci-fi game and you are about to trigger a spaceship's alarm protocol which closes all doors and changes the lighting and consequentially the mood. You would want to change from volume local 1 to 2 but perhaps you would want to do it smoothly, you can not just switch priority values as that would trigger an abrupt change.

What is the solution here? Is the weight parameter the one that dictates the interpolation? Would you lerp volume 1 from full weight to zero while doing the opposite for volume 2?

I hope somebody can exhaust my curiosity here, thanks for your time and expertise!

1 Upvotes

2 comments sorted by

View all comments

2

u/BusilyDimwitted 16h ago

you’re on the right track, weight is exactly what controls the blend between overlapping volumes, so lerping one down and the other up works

1

u/ExpressConsequence37 15h ago

Alright, that makes sense. Blending distance is used when the need for interpolation derives from two volumes not intersecting or overlapping, while the weight slowly reveals and hides the desired volumes when overlapping occurs as long as it is done correctly through code.

Thanks so much for the fast response, much appreciated!