Then I tried blend several Sky and fog Volumes and by changing their weights. However this results in small glitch (when new volume is getting higher priority I believe).
So how is it possible to animate parameters of Sky and Fog Volume in HDRP?
Thank you
I’m not sure but maybe (as a hack) this way can work:
create two game objects, each one with needed fog & sky volume parameters.
set each volume from “Global” to “Local” and make them large enough to cover area were player/camera travels.
animate position for each volume game object with fog & sky volume parameters (move needed volume closer to the player simultaneously moving second volume further from the player).
This may work if parameters will be smoothly interpolated depending on distance from volume game object to the player.
Interesting. Thank you for your suggestion @Lex4art . Unfortunately I think this hack would not work for my use-case. I am working on VR environment, so I need the volume to be global, all around the player whose movement I can not predict. Also, Sky and Fog Volume should not change in space but in time, as the story evolves.
One way to do it would be using Animation Curves in the inspector to animate the parameter. Create a public or [SerializeField] private AnimationCurve variable. Then you can use the inspector to edit the curve as you want. Then use the AnimationCurve.Evaluate method and set the parameter you want to animate with the AnimationCurve to the result of that method.
There are a lot of online tutorials for this that explain it in greater depth if you’re not already familiar with it. Here’s one