Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

URP Color Curves Post-Processing Blending Issue

Discussion in 'Universal Render Pipeline' started by YeolD, Apr 22, 2020.

  1. YeolD

    YeolD

    Joined:
    Apr 22, 2020
    Posts:
    3
    Hello, I'm having some issues with the URP post-proc volume blending. Basically, it doesn't seem to work for the color curves override and will just switch from one volume to another immediately instead of doing a smooth blend as other overrides do.

    I've poked around a bit in the SRP github repo and it seems curve interpolation isn't implemented for volumes (see here) so it just falls back to the default on/off implementation (I might be wrong; I don't know that codebase and haven't spent much time looking). This is a problem for out artists as they were rather eager to use color curves for post-proc.

    So, assuming it's not an issue on my side, is there any ETA for a fix for this?
     
  2. Shaunyowns

    Shaunyowns

    Joined:
    Nov 4, 2019
    Posts:
    328
    Hey @YeolD, I'll chase this post up for you to see if we can help!
     
  3. YeolD

    YeolD

    Joined:
    Apr 22, 2020
    Posts:
    3
    Appreciate it, thanks.
     
  4. Joshdbb

    Joshdbb

    Joined:
    Oct 28, 2014
    Posts:
    50
    Hey, I am having the same issue. Not being able to blend the colour curve is a blocker for me.

    Has there been any movement on this?

    Is there anyway that I could add this functionality on my end?
     
  5. unity_gXMf6CYoIQUZJw

    unity_gXMf6CYoIQUZJw

    Joined:
    Jun 5, 2020
    Posts:
    1
    Hello, same issue here.
    Is there a chance it will be fixed in next version?
     
  6. YeolD

    YeolD

    Joined:
    Apr 22, 2020
    Posts:
    3
    You could probably fork the render-pipelines.core package and implement the curve interpolation function in Runtime/Volume/VolumeParameter.cs at the very end of the file. No promises, that's just from a quick reading of the code a little while back and I haven't tried it since the issue isn't (yet) a blocker for me.
     
  7. Silverlode

    Silverlode

    Joined:
    Apr 9, 2013
    Posts:
    41
    @Shaunyowns And update on this? I'm having this issue too. (Unity 2019.4.9f1 & URP 7.5.1)
     
  8. AlgolStar

    AlgolStar

    Joined:
    Mar 15, 2020
    Posts:
    9
    Hi, I got the same issue and I paid lots of time to rewrite cacheData and keyframe, none of the effects. Seems there still has no func to lerp curves. (Used Unity2019.4.17f1)
     
  9. gmodarelli

    gmodarelli

    Joined:
    Feb 18, 2017
    Posts:
    5
  10. coutlass-supreme

    coutlass-supreme

    Joined:
    Feb 21, 2014
    Posts:
    22
    bump.

    Im usng Unity 2020.3.12f1, does anyone know if this was solved in later versions?
     
    Last edited: Aug 23, 2021
  11. SonicCane11

    SonicCane11

    Joined:
    Feb 20, 2019
    Posts:
    4
    I seem to be having this issue, too. Unity 2021.1.21f1. Is there a workaround or a solution?
     
  12. DavidNLN

    DavidNLN

    Joined:
    Sep 27, 2018
    Posts:
    90
    Still not working, Any updates please? been over 3 years now
     
  13. Jsigvard

    Jsigvard

    Joined:
    Oct 17, 2014
    Posts:
    1
    I too would like to hear if any progress has been made on this over the last three years?
     
  14. BeAnotherLab

    BeAnotherLab

    Joined:
    Dec 11, 2015
    Posts:
    1
    I was able to find a work around for this in URP. Basically it stores every point in the curve you want to apply and then increases the amplitude as the volume weight is increased. I guess it's not perfect as it's not linear and will tend to accumulate faster towards the end but it did the job for me

    Code (CSharp):
    1. using UnityEditor;
    2. using UnityEngine;
    3. using UnityEngine.Rendering;
    4. using UnityEngine.Rendering.Universal;
    5.  
    6. public class ModifyColorTuning : MonoBehaviour //tracks the volume weight so that the color curves can be applied progressively
    7. {
    8.     [SerializeField] private Volume _volume;
    9.     private ColorCurves _colorCurvesEffect;
    10.  
    11.     [SerializeField]
    12.     private AnimationCurve _initialCurve;
    13.      
    14.     private void Start()
    15.     {
    16.         _volume.profile.TryGet(typeof(ColorCurves), out _colorCurvesEffect);
    17.      
    18.         for (int i = 0; i <= _colorCurvesEffect.hueVsSat.value.length; i++)
    19.         {
    20.             Debug.Log("key " + i + " time " +  _colorCurvesEffect.hueVsSat.value[i].time + " value " + _colorCurvesEffect.hueVsSat.value[i].value);
    21.             Debug.Log("key " + i + " time " +  _colorCurvesEffect.hueVsSat.value[i].time + " value " + _colorCurvesEffect.hueVsSat.value[i].value);
    22.             _initialCurve.AddKey(_colorCurvesEffect.hueVsSat.value[i].time, _colorCurvesEffect.hueVsSat.value[i].value);
    23.         }
    24.     }
    25.  
    26.     private void Update()
    27.     {
    28.         _colorCurvesEffect.SetDirty();
    29.         for (int i = 0; i < _initialCurve.length; i++)
    30.         {
    31.             _colorCurvesEffect.hueVsSat.value.MoveKey(i,  new Keyframe(_initialCurve[i].time, (_initialCurve[i].value  - 0.5f ) * _volume.weight + 0.5f ));
    32.         }
    33.     }
    34.  
    35. }
    36.  
     
    Lars-Steenhoff likes this.