Search Unity

Official New Post-processing Stack (Pre-Release)

Discussion in 'Image Effects' started by Chman, Oct 10, 2016.

  1. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,825
    Add the legacy Contrast Enhance effect to the camera.
     
    imDanOush likes this.
  2. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    397
    Hmm, I've left a picture long time ago and afaik never got a reply on a problem. Well, have you guys experienced this? SSR produces very bad artifacts on gazing angles. It's as if it's a NaN, but doesn't look like it.
     

    Attached Files:

  3. CGDever

    CGDever

    Joined:
    Dec 17, 2014
    Posts:
    156
    Hi Chman.
    I'm confused in the license for Post Processing Stack v2.
    I found the type of Postprocessing license: Unity Companion License ("License").
    But I still can not understand whether it is paid or not?
     
  4. matheusfaria

    matheusfaria

    Joined:
    Mar 11, 2016
    Posts:
    2
    It is not, you can download for free at assets store and view the code at github
     
  5. luekio

    luekio

    Joined:
    Jan 23, 2018
    Posts:
    24
    PPS is broken with the new unity beta.
     
  6. sebas77

    sebas77

    Joined:
    Nov 4, 2011
    Posts:
    1,642
    Hi,

    I am trying to figure out how to disable FX in run-time via script. For example, what is the best way to disable all the ColorGrading FX from all the post volume in the scene?
    This is the case of FXs being enabled/disabled via in-game menu as the user desires.
    should I iterate over all the ActiveVolumes and actually remove the setting? If so how should I put it back? Looking for best practices here, thanks.
     
  7. WiedemannD

    WiedemannD

    Joined:
    Mar 4, 2015
    Posts:
    19
    Hi there,

    I'm working on a custom PPS v2 effect and I'm struggling with how shader/effect properties are handled or should be declared.

    I understood that special overridable properties like FloatParameter, well ... will be overriden by blending. That's really fine and helpful, but how can I add a NON-overridable property, which also works with the new PostProcessEffectSettings or at least PostProcessEffectEditor classes?

    I tried using a normal public float in the PostProcessEffectSettings class and wanted to adjust it via SerializedProperty & EditorGUILayout.PropertyField() in a custom PostProcessEffectEditor. I can see and use the custom editor controls and the values are serialized too, but the PostProcessEffectSettings object does NOT get altered by them somehow. Instead the shader only gets the default values of those properties.
    EDIT: At least now, I do know why this approach doesn't work: serializedObject is set to internal so I can't trigger serializedObject.Update(); and serializedObject.ApplyModifiedProperties(); on my own.

    I'm sure I'm missing something obvious here, a little help in the right direction would be greatly appreciated!

    Cheers

    PS: What I'm trying to achieve: Adjust several shader properties in the editor, but blend only a single master blend property.
     
    Last edited: Jun 5, 2018
  8. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,241
    I've been using SSAO Pro, which really improves the look of grass. I just tried switching to the Post-Processing Stack v2 and its AO effect doesn't add any AO to grass whatsoever....unless I enable "Ambient Only" BUT uncheck the button to the right of that option (and I don't understand what that does). Then I get some AO in the grass, but it's not very pretty, its fairly low-rez and crude looking. Quite possibly I'm just doing it wrong -- any suggestions from anyone?

    thanks
    Dave

    grassAO.jpg
     
    Last edited: Jun 9, 2018
  9. IgnisIncendio

    IgnisIncendio

    Joined:
    Aug 16, 2017
    Posts:
    223
    In the Post Processing docs, it describes tweening a volume's weight to transition smoothly in code. Then it says:
    How do I tween the individual effect properties? For example, I have a global volume with color grading's saturation set to 0.5 for aesthetics. I now want to use scripting to tween the saturation from 0.5 to -1 as the player's health drops. However, the script controls multiple effects separately, so I can't just use volume.weight. How do I tween the saturation only, from the default to the new one?

    One solution I found was to simply create multiple volumes, one for each one I want to tween separately, but the docs mention that you can tween properties individually; that would be a much better solution, if it is possible.
     
  10. Devil_Inside

    Devil_Inside

    Joined:
    Nov 19, 2012
    Posts:
    1,119
    Switched to v2 from v1 and while I was expecting a performance boost, my FPS actually dropped from 47 to 38 on mobile.
    I'm also getting "Tiled GPU perf. warning" every frame when running in the editor with a mobile build target.
    This is pretty disappointing.
     
    Garrettec likes this.
  11. Zwer99

    Zwer99

    Joined:
    Oct 24, 2013
    Posts:
    24
    For my project post-processing doesn't work at all. Neither v1 nor v2.

    I'm using Unity 2018.1.0f2 and installed the Lightweight Render Pipeline as well as the Post-processing packages from the Package Manager.
    Those are the steps I executed:
    • Attaching a Post Process Layer - Script to the main camera
    • Set the volume blending layer to "Camera"
    • Add an empty object "GlobalPostProcessingVolume"
    • Set its layer to "Camera"
    • Attach a Post Process Volume - Script to the empty object
    • Set it to global
    • Create a new Post Process Profile to the project
    • Reference that profile to the volume
    • Add Bloom-Effect or any other effect
    • Overwrite some settings
    I can't see any effects in the game window. Did I miss something?
     
  12. IgnisIncendio

    IgnisIncendio

    Joined:
    Aug 16, 2017
    Posts:
    223
    The default values for the post processing don't do anything, like the default intensities are normally 0, so you have to edit that. Did you change the intensity?
     
  13. Zwer99

    Zwer99

    Joined:
    Oct 24, 2013
    Posts:
    24
    Thank you very much, but yes, I've changed the settings of the effects (including intensity).

    I just got a step further: until I enabled global HDR in the LightweightRendering.asset the post-processing effects are working in the scene view, but my game view now shows a completely black screen!
    I searched a little bit and found out that it's a Unity bug (?) when using 2 cameras - one for rendering the level, the other one for rendering the UI. When I disable the UI-camera the scene within the game window suddenly appears again.

    Here's the guy who had/has the same issue: https://forum.unity.com/threads/multiple-camera-deferred-hdr-black-screen.462324/
     
    IgnisIncendio likes this.
  14. itsnottme

    itsnottme

    Joined:
    Mar 8, 2017
    Posts:
    129
    Is there a way of copying the Volume or effect when creating a new instance?
    For example, a method like QuickVolume() or ScriptableObject.CreateInstance<T>() to create an instance but copied from an existing one.
     
  15. cfree

    cfree

    Joined:
    Sep 30, 2014
    Posts:
    72
    Hi guys!
    PLEASE, can anyone share a tip on aliviate the "flashing glow" i see when applying BLOOM and the scene has rough / specular surface (specially when moving)? It really breaks the immersion.... sometimes even non-rough surfaces emmit this strange "flashing glow" artifact when Bloom is enabled.

    Unity PPSV2 is really good but this problem is very annoying :(
    Thanks!
     

    Attached Files:

    • glow.png
      glow.png
      File size:
      787.4 KB
      Views:
      1,018
    Last edited: Jun 19, 2018
  16. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    What is your problem? Is that is "flashing", interrupted and flashing? Also, Antialiasing is not helping? There was an asset on the asset store for that. But do not remember the name. I think more in the Antialiasing section.

    If the problem is the "glow", then try in photoshop to level down the white areas of the texture toward a grey2 tone.
     
  17. cfree

    cfree

    Joined:
    Sep 30, 2014
    Posts:
    72
    The image attached does not show the whole problem... I will try to make a gif... but yes, the problem is the "flashing" when bloom is enabled. It is almost like white sparks.
    I will try the same assets with the configuration of the nearly released book of the dead - environments.
     
  18. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
  19. iriguchi

    iriguchi

    Joined:
    Feb 1, 2016
    Posts:
    46
    I have same problem.
    I'd like to make the option too.

    Thanks
     
    cecarlsen likes this.
  20. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    And did you try the 2017 Creating Believable Visuals?
     
  21. lusho_games

    lusho_games

    Joined:
    Jun 4, 2011
    Posts:
    63
    Has anyone been able to port their v1.0 to v2.0?
    I tried copying and pasting parameters but it doesn't work.

    I have a bunch of post processing files made for my project, with v 1.0, recreating them manually for 2.0 seems to be the only solution, which is kind of... eh?.
     
  22. itsnottme

    itsnottme

    Joined:
    Mar 8, 2017
    Posts:
    129
    Some of the variables are actually different from v1 as will, so you will have to test each one after changing. As far as I know, that's the only way.
     
  23. itsnottme

    itsnottme

    Joined:
    Mar 8, 2017
    Posts:
    129
    Any help guys?
     
  24. AlanMattano

    AlanMattano

    Joined:
    Aug 22, 2013
    Posts:
    1,501
    I do not know if there is an automatic way. I disable all effects and enable one by bone. I try to get the same values for each post process effect manually one by one to compare them. I have the 2 games side by side. And some other example that uses v2. Then in this process, since there are not so many values and is it fun, I pick up the ocation, to try making a better or more performer result. Via scripting in my case was more complex. Changing multiple cameras is complex, I start coping some v2 effect setting form my main camera.
     
  25. jRocket

    jRocket

    Joined:
    Jul 12, 2012
    Posts:
    700
    I am having jittering issues on another image effect when using Temporal AA. The effect renders outlines around certain objects, but they are very jittery. For part of the effect I am using command buffers and CommandBuffer.DrawRenderer, but the jittering persists even if set the command buffer to BeforeImageEffects or AfterImageEffects. Is there a way to get TAA to play nicely with other effects? I'm on 5.6.6

    @Chman
     
  26. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    330
    In v2, how do you segregate lights using just Bloom from other objects that has a global Post-processing effect? I can't seem to separate my lights from other white objects and they all take the bloom effect.

    I tried having one Post-Processing Volume script (Is Global) attached to an empty GameObject that specifies anti-aliasing effect and then has a Post-Processing Layer script attached to my main player camera that has Player tag selected in the Layers. I then made another Post-Processing Volume (Local) attached to another empty GameObject that then specifies the bloom effect and another Post Processing Volume attached to the Light GameObject which has the Light tag. In total, I've set up 4 Post-Processing scripts. But the Bloom effect is still present in the whole screen and affects all bright objects. I've checked the Wiki but couldn't find a good example on how to do this. Would appreciate any help. Thanks in advance!
     
  27. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    330
    I think I might have figured this out. I just attached a Collider to all the GameObjects that has a Post Process Volume and added/configured the effects that I want it to have. Then created a Layer Tag for it grouped by similar effects. Afterwards, I saved the Profile for each Post Process Volume, configured the Collider's Radius (e.g. lights to only cover limited range) of those that has a non global set up. Lastly, to make the effects be seen, my Camera has an attached single Post Process Layer script which defines all the affected Layers.
     
  28. micro-

    micro-

    Joined:
    Oct 20, 2016
    Posts:
    2
    When the camera move to some area, the screen change to dark slowly, refer the attachment.
    post process version 2.0.7. unity 2018.1.4f1

    if anti-aliasing == TAA then it happen
     

    Attached Files:

    • bug.png
      bug.png
      File size:
      215.8 KB
      Views:
      1,010
    Last edited: Jul 1, 2018
  29. tweedie

    tweedie

    Joined:
    Apr 24, 2013
    Posts:
    311
    Motion blur doesn't seem to be playing well with Orthographic cameras. Translating the camera produces the expected effect, but adjusting the orthographic size or rotating the camera will cause that frame to show with full blur, meaning you're unable to zoom without a major visual hiccup.

    Using 2.0.7 installed through package manager on 2018.1.1f1.

    Loving all the work on and additions to the Post Stack, such a joy to work with :)
     
  30. FerryvD

    FerryvD

    Joined:
    Sep 9, 2016
    Posts:
    25
    I need to add the postprocessing on runtime in my project and apparently you have to init the PostProcessLayer like this
    Code (csharp):
    1.  
    2. var pplayer = gameObject.AddComponent<PostProcessLayer>();
    3. pplayer.Init(resources);
    4.  
    but i can't figure out how i set the PostProcessResources (resources), can't find it anywhere.

    Could anyone please help me out?
     
  31. IGameArt

    IGameArt

    Joined:
    Aug 30, 2013
    Posts:
    7
    Am I the only person having a problem with custom effects not serializing. Any time I reboot Unity my custom effect is removed from the stack.
     
    mirostraka likes this.
  32. WiedemannD

    WiedemannD

    Joined:
    Mar 4, 2015
    Posts:
    19
    Nope serializing works fine for me.
     
  33. WiedemannD

    WiedemannD

    Joined:
    Mar 4, 2015
    Posts:
    19
    No one here knows, how this is supposed to work??? A little nudge in the right direction would be greatly appreciated!

    Cheers
     
  34. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,913
    Will the Depth of Field effect be getting reworked any time soon? There seems to be no way to blur something in the distance only. It always blurs the middle distance too.

    Edit: I found one in the Legacy Image Effects asset. It's DepthOfFieldDeprecated.
     
    Last edited: Jul 29, 2018
  35. TooManySugar

    TooManySugar

    Joined:
    Aug 2, 2015
    Posts:
    864
    Hi. I'm using 2018.2.0f2 and all fx work but SSR. I can´t manage to make it work, is not that it has artifacts but it does not show up at all :\. ANyone got it working with this version?
     
  36. CGDever

    CGDever

    Joined:
    Dec 17, 2014
    Posts:
    156
    Hello everybody!
    I've been looking for a long time how to find out that the player's camera hit a certain Volume. Is this possible?
    Probably I need to dig in the HasActiveEffects() direction.
    But,
    Code (CSharp):
    1. bool hasBeforeStackEffects = HasActiveEffects(PostProcessEvent.BeforeStack, context);
    2. bool hasAfterStackEffects = HasActiveEffects(PostProcessEvent.AfterStack, context) && !breakBeforeColorGrading;
    always return False.
    Is it possible to know in the script that the camera is in some Volume?
     
  37. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Isn't it enough to add a box collider ( as trigger ) to the volume and listen to the "OnTriggerEnter" event ( or camera with collider ) which is triggered when your controller gets into it, or i miss understand your question !?

    I am able to swap post processing volumes this way !
     
  38. CGDever

    CGDever

    Joined:
    Dec 17, 2014
    Posts:
    156
    No, you did not understand correctly. The standard effects activation way works well. I need to know in the script that the camera is in the volume.

    I make the effect of immersion in water and I need to turn on the sound of water only when the camera is in the water, but not when the player touches the water with his feet.

    For this, I need to know when the camera hit the volume.
     
  39. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    I see, well you have a few possibilities:

    1. add a small sphere collider to the camera and detect it. You may set it to "Player" layer and just test if the collider which touched the volume is the same tag and of type "Sphere" - i wouldn't prefer such method but it will work just fine.

    2. get the volume position and size and create a new "Bounds" variable in script and just use the "Contains" method with the camera position to see if it is inside the bounds. I even think the collider has "bounds" variable and you can just call its "Contains()" method with the camera position

    3. find a BBox class somewhere from internet which has "Contains(Vector3 point)" method and use that method

    Every one of these methods should be able to tell you when you are in the post processing volume !
     
  40. a-chambriat

    a-chambriat

    Joined:
    Apr 27, 2014
    Posts:
    26
  41. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    TooManySugar likes this.
  42. ifurkend

    ifurkend

    Joined:
    Sep 4, 2012
    Posts:
    350
    I posted my question about downsampling the RT on Github but there doesn't seem to be the right place to ask noob questions. So far I am able to get my first pass downsampled, but I still can't figure out a way to pass down the first pass result to blit with the full-resolution source in the second pass.

    Code (CSharp):
    1. public override void Render(PostProcessRenderContext context) {
    2.     var sheet = context.propertySheets.Get(Shader.Find("Hidden/Custom/Whatever"));
    3.     var cmd = context.command;
    4.     int tw = Mathf.FloorToInt(context.screenWidth / settings.downsampling);
    5.     int th = Mathf.FloorToInt(context.screenHeight / settings.downsampling);
    6.     int mipDown = Shader.PropertyToID("_MainTex");
    7.     context.GetScreenSpaceTemporaryRT(cmd, mipDown, 0, context.sourceFormat, RenderTextureReadWrite.Default, FilterMode.Bilinear, tw, th);
    8.     cmd.BlitFullscreenTriangle(context.source, mipDown, sheet, 0);
    9.     cmd.BlitFullscreenTriangle(mipDown, context.destination, sheet, 1);
    10.     cmd.ReleaseTemporaryRT(mipDown);
    11. }

    I really am struggling about it, not least because the way to handle downsampling with Graphic.Blit just doesn't apply on PPS v2. I tried to look at the codes of the builtin effects, but their uber structure makes it super hard for newbie like me to skim through. Thank you.
     
  43. ItsJayD

    ItsJayD

    Joined:
    Mar 20, 2015
    Posts:
    6
    Hi,
    I used to use a simple solution to avoid having UI rendered with the PostProcessing stack, so to avoid UI elements getting blurred by effects like Depth of Field, I actually found it on the unity fourms:
    vivaldi_2018-08-30_13-38-07.png

    Anyways, since using the HD Render pipeline and the new V2 Post Processing stack, this solution doesnt work anymore, removing any previously applied effects from the image, even though I have the "UI camera" set to only render gameobjects with the UI Layer applied This this is an example of the issue, as I enable the UI camera.

    upload_2018-8-30_13-55-33.png upload_2018-8-30_13-56-47.png These are also pictures of the main camera, taken from the first person character example.

    Has anyone dealt with/know why this could be happening?
    Thanks
     
  44. cecarlsen

    cecarlsen

    Joined:
    Jun 30, 2006
    Posts:
    862
    The newest version of Post-processing (v. 2.0.11) still does not support alternative projection matrices. Unity have not responded to this ... I wonder if they are aware of the problem at all.

    EDIT: I have created an issue on the github page.
    https://github.com/Unity-Technologies/PostProcessing/issues/648
     
    Last edited: Aug 31, 2018
  45. zetingq

    zetingq

    Joined:
    Dec 8, 2016
    Posts:
    26
    Post-processing v2 Ripple appears after joining the camera

    upload_2018-9-10_16-58-15.png
    Post-processing v2 ripples after joining the camera,Zooming in is obvious, affecting the vision when you look at the details,Turn off Post-processing and the ripple will disappear, Post-processing v2 2.0.12 now in use

    What is the problem with this?
    How to make these ripples disappear
     

    Attached Files:

  46. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,876
    how to fix this (2018.2.7f1 2018.1.0f1):
    Code (CSharp):
    1. C:/Users/aaapc/AppData/Local/Unity/cache/packages/packages.unity.com/com.unity.postprocessing@2.0.12-preview/PostProcessing/Runtime/Effects/LensDistortion.cs(52,50): error CS0117: `UnityEngine.Rendering.PostProcessing.ShaderIDs' does not contain a definition for `Distortion_Amount
     
  47. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    330
    Can Unity's Post Processing Stack v1 and v2 be used freely on commercial games when using Unity Personal Edition?
     
  48. tweedie

    tweedie

    Joined:
    Apr 24, 2013
    Posts:
    311
    Yes
     
    AlanMattano likes this.
  49. RendCycle

    RendCycle

    Joined:
    Apr 24, 2016
    Posts:
    330
    Thanks for the reply!
     
    tweedie likes this.
  50. Deonity

    Deonity

    Joined:
    May 16, 2018
    Posts:
    3
    Hi. Is this worked on 2018.200f1 macos 10.14 metal?