Search Unity

Official New Post-processing Stack (Pre-Release)

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

  1. Tzan

    Tzan

    Joined:
    Apr 5, 2009
    Posts:
    736
    Thanks!
    I do have one of those. Looks like I have some work to do.

    I got used to not using namespaces, because Unity didnt support them at first.
    Then when they were supported it took me a couple years before I started to use them.
    I suppose I should spend some time properly namespacing all my classes.
     
    Last edited: Jul 1, 2017
  2. Invertex

    Invertex

    Joined:
    Nov 7, 2013
    Posts:
    1,550
    So, is Unity giving up on their SSR implementation? I don't see any files related to SSR in the V2 of the post processing stack... I wanted to upgrade but lighting doesn't look great without it.
     
    Last edited: Jul 5, 2017
  3. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Wondering what's happening in SSRR land as well... last implementation seemed to overthink it and try too hard.
     
    Alverik and Martin_H like this.
  4. JakubSmaga

    JakubSmaga

    Joined:
    Aug 5, 2015
    Posts:
    417
    Last edited: Jul 6, 2017
  5. Hazneliel

    Hazneliel

    Joined:
    Nov 14, 2013
    Posts:
    306
    I have this question now, which is better?

    Post Processing Stack or Beautify ??

    Which one is more performant?

    Do Post Processing Stack also supports VR?
     
  6. Alverik

    Alverik

    Joined:
    Apr 15, 2016
    Posts:
    417
    Dude... they are different effects. Beautify is like a last pass on colors and some other details which enhance overall appearance (well, it's more than that, but hard to explain quickly, it tries to fix artifacts from other post effects too, etc). Beautify is not meant to replace standard effects. Then, as far as I know most effects in the stack support VR, but the ones that don't are listed in the wiki in the github (at least I usually just check them there).

    Anyway, make sure to read the explanation/manual for all the effects you use...

    Edit: oh, sorry, I checked the link and I see the author has indeed added some random effects to Beautify since the last time I checked it. But, it still doesn't have all the important ones (since that's not it's purpose, anyway). You still won't get antialiasing, Ambient Occlusion, fog, chromatic aberration, color correction and SSR from Beautify (all important standard effects, Beautify only gets Bloom and DoF from the main effects). For the effects which are shared between both packs, you could just test them in each pack and activate only the one which looks best in your eye (bloom and DoF are the only ones you'll have to try to compare in performance, nothing that a quick build won't show - with an fps counter).
     
    Last edited: Jul 8, 2017
    Martin_H and GoGoGadget like this.
  7. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    No, tonemapping is not broken in 5.6. The reason it is not broken is because you have not filed a bug report and got a case number.

    In short: I think it's your fault it isn't working, but if you can explain your problem clearer, I'm sure someone can help you fix it. Or file a bug report. It could be you're not using the right version of the post effects or you might have camera set up incorrectly.
     
  8. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Sounds to me you have MSAA enabled?
     
    Syberam likes this.
  9. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
  10. JakubSmaga

    JakubSmaga

    Joined:
    Aug 5, 2015
    Posts:
    417
    infinitypbr likes this.
  11. infinitypbr

    infinitypbr

    Joined:
    Nov 28, 2012
    Posts:
    3,149
  12. JakubSmaga

    JakubSmaga

    Joined:
    Aug 5, 2015
    Posts:
    417
  13. arnoob

    arnoob

    Joined:
    May 16, 2014
    Posts:
    155
  14. mmfahrrad

    mmfahrrad

    Joined:
    Nov 6, 2013
    Posts:
    2
    Is there a way to get a handle to the effects in the post process volume? I want to interpolate between two states with different vignette/chromatic aberration/bloom and can't find a way to make it work.

    How do I achieve something like:
    [Pseudo-Code] Vignette myVignette = PostProcessVolume.GetVignette();

    I could work around by just changing the weight of two preset post process volumes but that feels a little bit clunky to me.
     
  15. Alverik

    Alverik

    Joined:
    Apr 15, 2016
    Posts:
    417
    V2 already deals with that. It uses post processing volumes and you can define in each which effects are going to differ from the global settings, then blends from one profile to another (or the specified differing settings). Check the Quickstart page.

    If you are stuck with V1, then there's also a free third party plugin called Post Processing Volume that blends between profiles too.
     
    Last edited: Jul 11, 2017
    UnityLighting likes this.
  16. ranybechara

    ranybechara

    Joined:
    Jun 7, 2016
    Posts:
    1
    Hello, I'd like to know how did you make it work on Vive? Which component should I add the post processing stack on? and if you encountered any problems using the effects in VR
     
  17. wilberforce

    wilberforce

    Joined:
    Aug 29, 2016
    Posts:
    92
    Hello

    We've found out that Temporal Anti-aliasing also jitters the projectionParams built-in variable (near and far plane). Is this intended behavior? This breaks effects that use near/far plane when the planes are relatively far apart. Small variations in these parameters cause flickering.
     
  18. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    This is BEAUTIFUL!!!! Will have pictures once the PL finishes... unfortunately, my old profiles no longer work with the new beta :(, so for now I will stick with the stable version until the next update, I can retain my settings.
     
    Last edited: Jul 13, 2017
  19. Firlefanz73

    Firlefanz73

    Joined:
    Apr 2, 2015
    Posts:
    1,316
    Hello,

    I have a procedural based voxel game. I was using the first post processing stack until now, I only want depth of field and Motion blur.

    I am using Unity 2017 since yesterday. Performance is extreme important for me, since my voxel landscape has a lot of Polygons.

    I am satisfied with the Beauty of the first post processing effects, do you think I should use the 2nd one? Does it offer better Performance?

    Thanks a lot!
     
  20. LootlabGames

    LootlabGames

    Joined:
    Nov 21, 2014
    Posts:
    343
    Adding Post Processing Stack seems to disable my FOW shader.
    If I enable the post processing the shader stops working.

    Any ideas on why this would happen and possible solutions?

    Shader Code:
    Code (CSharp):
    1. Shader "Custom/FogOfWarMask" {
    2.     Properties{
    3.         _Color("Main Color", Color) = (1, 1, 1, 1)
    4.         _MainTex("Base (RGB)", 2D) = "white" {}
    5.     }
    6.     SubShader{
    7.             Tags{ "Queue" = "Transparent" "RenderType" = "Transparent" "LightMode" = "ForwardBase" }
    8.             Blend SrcAlpha OneMinusSrcAlpha
    9.             Lighting Off
    10.             LOD 200
    11.  
    12.             CGPROGRAM
    13. #pragma surface surf Lambert alpha:fade
    14.  
    15.             fixed4 LightingNoLighting(SurfaceOutput s, fixed3 lightDir, float aten)
    16.             {
    17.                 fixed4 color;
    18.                 color.rgb = s.Albedo;
    19.                 color.a = s.Alpha;
    20.                 return color;
    21.             }
    22.  
    23.             fixed4 _Color;
    24.             sampler2D _MainTex;
    25.  
    26.             struct Input {
    27.                 float2 uv_MainTex;
    28.             };
    29.  
    30.             void surf(Input IN, inout SurfaceOutput o)
    31.             {
    32.                 half4 baseColor = tex2D(_MainTex, IN.uv_MainTex);
    33.                 o.Albedo = _Color.rgb * baseColor.b;
    34.                 o.Alpha = _Color.a - baseColor.g; //green - color of aperture mask
    35.             }
    36.             ENDCG
    37.         }
    38.         Fallback "Diffuse"
    39. }
    40.  
     
  21. SoftwareGeezers

    SoftwareGeezers

    Joined:
    Jun 22, 2013
    Posts:
    902
    Is this optimised for mobile? I tried the beta and it killed mobile performance, as do all the official post process effects. However, optimised solution can be written, so it's just a case of making that a target for the effects.
     
  22. Pixelpatr0n

    Pixelpatr0n

    Joined:
    Aug 23, 2016
    Posts:
    9
    Might of already been asked but where are the sunshafts? As well as the lens flare's appear to be messed up? They now render on the FPS controller behind the camera so they are no longer visible? I don't get it. They released this broken or I'm doing something wrong?
     
    Last edited: Jul 15, 2017
  23. Straafe

    Straafe

    Joined:
    Oct 15, 2012
    Posts:
    73
    I was wondering if there are any simple scripting examples for v2? I set up some basic effects which I like including DOF, but quickly needed the ability to change the focus distance based on the distance from an object and can't figure out quite how to do it. I saw some scripting references for creating a quick volume, but I have a simple global volume I created out of runtime in the inspector and I just wanted to tweak its value for the DOF Focus Distance during runtime in script, how would I do that?

    So far I've tried the below, which does not work.

    Code (CSharp):
    1. ppv = this.GetComponent<PostProcessVolume>();
    2. DepthOfField dof;
    3. ppv.profile.TryGetSettings<DepthOfField>(out dof);
    4. float distance = Vector3.Distance(GameObject.Find("Main Camera").transform.position, GameObject.Find("Assembly").transform.position);
    5. dof.focusDistance.value = distance;
    Also tried to set it by using AddSettings to no avail:
    Code (CSharp):
    1. ppv.profile.AddSettings(dof);
     
    Last edited: Jul 16, 2017
  24. Straafe

    Straafe

    Joined:
    Oct 15, 2012
    Posts:
    73
    This appears to actually change the value, but it gives unexpected results that are not correct looking:
    Code (CSharp):
    1. dof.focusDistance.Override(distance);
    Is there an easier way to have a dynamic DOF that keeps a specific object in the focused area even if the camera is freely transformed around the scene (distance from camera to object can change greatly)?

    It's unfortunate because the old DOF image effect script had a transform value to automatically keep an object in focus and works perfectly, except it appears to hit performance way more than the new one.
     
    Last edited: Jul 16, 2017
  25. KnightPista

    KnightPista

    Joined:
    May 18, 2015
    Posts:
    40
    Are the post-processing profiles created with V1 compatible with V2?

    I'm asking because when we upgrade Unity and the post-processing stack to V2, will the profiles be usable with V2?
     
    KRGraphics likes this.
  26. bobi_z_nairobi

    bobi_z_nairobi

    Joined:
    Jul 18, 2017
    Posts:
    10
    I'm making stylized tree for my game. For creating shaders I use shader forge. I use many light sources so I'm using deffered lighting system. Best visual results are with using light attenuation node. However, it can only be used in forward shader. My problem with this combination is ambient occlusion. I see it through my tree. I currently use unity post processing stack. The problem can be solved by using "ambient only" checker, but the visuals are poor then.
    I tried to use any other AO plugin, same results. The only way it worked was HBAO with normal reconstruct option, but it decreased my performance by 20%.

    The screen below shows the problem, I also increased some contrast to make it more visible.
     

    Attached Files:

  27. rsodre

    rsodre

    Joined:
    May 9, 2012
    Posts:
    229
    @bobi_z_nairobi, did you try the Foce Forward ot Ambient Only flags?
     
  28. bobi_z_nairobi

    bobi_z_nairobi

    Joined:
    Jul 18, 2017
    Posts:
    10
    this doesnt help ;/

    EDIT:
    Ive Found a reason, removing vertex offset from shader solves it completely.... any idea how to animate it with vertex and keep proper AO?
     
    Last edited: Jul 18, 2017
  29. DuvE

    DuvE

    Joined:
    May 22, 2016
    Posts:
    169
    Is is possible to separate some effects from stack? I want to use different bloom asset instead of this one. But it is better to put custom Bloom after Antialiasing to prevent flickering.
     
  30. alanmthomas

    alanmthomas

    Joined:
    Sep 7, 2015
    Posts:
    197
    Any indications on how the effects stack performs on mobile (which is a wide range, I know)?
     
    Gametyme likes this.
  31. SoftwareGeezers

    SoftwareGeezers

    Joined:
    Jun 22, 2013
    Posts:
    902
  32. alanmthomas

    alanmthomas

    Joined:
    Sep 7, 2015
    Posts:
    197
    So, it sounds like you are suggesting that this is unusable on mobile. Would that be correct? I just want to know for sure before I attempt to find some alternative solution.
     
  33. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    I think it's not compatible. because the new version has modified effects with some different settings (modified shaders).
     
    Last edited: Jul 20, 2017
  34. Sentionaut

    Sentionaut

    Joined:
    Apr 27, 2015
    Posts:
    10
    Hi there. I'm using the stack v2, trying desperately to export a .EXR file to make a LUT, but Unity crashes every single time. I've already done it with most of the scenes from the game, but in the current one it won't work. The log file has an "Acces Violation 0xc0000005" code.
    I've already sent the report, but I need a quick solution for this. Did anyone had this problem?

    EDIT: Ok, it seems the reason is one shader in particular: Unity's SimpleWater4 shader (and Water4 too, actually). The scene I'm working on is placed in a swamp, which uses this shader. If I deactivate the water I can export the .EXR file with no problem, but every time I try it with the water active, it'll just crash.
     
    Last edited: Jul 20, 2017
  35. knocking

    knocking

    Joined:
    Apr 10, 2014
    Posts:
    26
    Hi just started using Stack v2 Beta, Maybe a bug report or not.

    Gamma and lift values affecting the scene at all times globally regardless of volumes. anyone else having similar issue?
     
  36. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,447
    is there some issue using LUT? whole screen becomes gray..

    using 2017.2.0b4 and v2 stack,
    luterror.png
     
  37. Fera_KM

    Fera_KM

    Joined:
    Nov 7, 2013
    Posts:
    307
    It seems like most effects are killing the alpha channel when using it in conjunction with renderTexture, which is unfortunate. Unless I'm missing something..
     
  38. mangax

    mangax

    Joined:
    Jul 17, 2013
    Posts:
    336
    Hi, i started using v2 as well... overall i think it is slightly more performant than v1.. but any idea or does anybody know why onprecull usage is high? is it because v2 effects applied at on precull??
    strangely, even when i disable all effects while post process layer is enabled.. it still have impact on "precull"
    Screen Shot 2017-07-26 at 4.32.30 PM.png
     
  39. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    @Chman it seems latest v2 are broken in 2017.1. I keep getting black screen glitch, and ambient occlussion not working.
    and turning off AO make the screen black
     
  40. bakanekofr

    bakanekofr

    Joined:
    Feb 28, 2014
    Posts:
    122
    Hello,

    Any chance you could add color bleeding in the ambient occlusion? Or at least a color tint?

    I'm using V1.

    Thanks!
     
  41. Pawige

    Pawige

    Joined:
    Nov 26, 2012
    Posts:
    40
    V2 seems to break with single-pass stereo enabled, both in forward and deferred, and even if all effects are disabled:
    PPV2_SinglePassBug.jpg
    It looks like everything is rendering into one tiny little quad and everything else is not even clearing. Switching it back to multipass makes everything okay again:
    PPV2_Multipass.jpg
    Is this known behavior?
     
  42. Kronnect

    Kronnect

    Joined:
    Nov 16, 2014
    Posts:
    2,906
    Hi everyone, just read this and wanted to chime in with some details about Beautify.

    Firstly, Beautify is Single Pass Stereo compatible. It's being used in many games and platforms and users love it both in results and performance.

    Performance is a very sensitive theme, especially when you compare two different systems as the results and implementations vary. What looks great in some way in one system may look and performs differently in another, especially on "mobile" which is a quite broad term.

    To make things easier, Beautify provides 3 performance presets which uses different shader variants for some of the effects (ie. "Best Performance" uses less texture fetches or internal passes compared with "Best Quality" for the same effects, which is basically what usually determines performance along the number of draw calls).

    Beautify can also be referred as a highly integrated and optimized image enhancement filter (which packs HDR dither + custom sharpening + color enhancement) plus a bunch of optional extra effects which are combined in the same pass.

    The core image enhancement filter can work without depth information. In forward rendering path, the depth is computed using an additional pass so you can save ms if you're just interested in the core functionality. Again, Beautify turns this as simple as a global toggle (Best Quality, Best Performace or Super-Fast Performance).

    On the other hand, some effects are both presently in Beautify and Unity's Post-Processing Stack although with subtle variations. They are:

    - Bloom: in Beautify you have options for depth attenuation (focus bloom in short distance) + bloom culling mask (you can apply bloom just to a group of objects).
    - Depth of Field: comes with bokeh + support for transparent objects + exclusion layers options.

    Other effects that are only available in Beautify are:

    - Anamorphic Flares.
    - Sun Flares (video)
    - Purkinje Shift
    - Frame
    - Outline
    - Sepia
    - Thermal and Night Vision
    - Daltonize

    Effects like SSAO, SSR and LUT support and extended color options are only available in Unity's Post-Processing Stack (and other Asset Store packages that seems to work also very well with Beautify like HBAO or Amplify Color). So yes, they can work together since each package comes with unique effects.

    If you have question specific to Beautify, please feel free to ask on the corresponding thread: https://forum.unity3d.com/threads/b...ing-incredibly-crisp-and-vivid-scenes.401999/

    Cheers!
     
    Last edited: Sep 5, 2017
    Hazneliel, Lex4art and turboscalpeur like this.
  43. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    hey, I've just updated my project from unity 5.4 to 5.6 and trying post-process stack to enhance my game's visual effects.
    Then I found a very strange effect in my screen:
    upload_2017-8-3_16-53-1.png

    The color insides shadows is very ugly and forms solid color blocks, no details rendered in these shadows.
    Then I tried to disable the post-processing behavior component
    upload_2017-8-3_16-54-47.png
    it got much better but still some strange color inside shadows.
    Wondering if this is something about my hardware or I got some settings wrong?

    I'm using deferred rendering and linear color space.
     
  44. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Right click on your Assets folder and select Reimport All. It's may fix your problem and is a useful way to fix upgrading issues
     
  45. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    Thanks for the reply, but I tried to import it into a new project and they still has ugly color blocks.
    I'll try this on another PC that has a better graphic card to see if it is a hardware issue.
     
  46. GMM

    GMM

    Joined:
    Sep 24, 2012
    Posts:
    301
    It's unlikely to be a hardware issue as i experience this is using the post process stack along with Prism post effects, are you by any change using those? I believe some HDR -> LDR remapping might be going on and the same might be happening with other effects that are not Prism.

    Prism + PostEffects Stack:


    Prism only:


    Notice the very clear banding on the middle character's face and the light source bloom.
     
  47. Harekelas

    Harekelas

    Joined:
    Feb 3, 2015
    Posts:
    864
    I'm using Tenkoku dynamic sky that has it's own illuminating methods. I'm not familiar with rendering techniques so I'm not sure if Tenkoku used the same tech as Prism.

    And you just reminded me that I can try out Prism post-effects and see if it can be a replacement of unity's post-processing stack. Thanks ;)
     
  48. GMM

    GMM

    Joined:
    Sep 24, 2012
    Posts:
    301
    I generally prefer the Prism, Scion or Beautify stacks to the Unity stack, but those does not have good AA or SSR solutions, so i kinda hoped to use the Unity stack for that ¯\_(ツ)_/¯.
     
  49. Dennis_eA

    Dennis_eA

    Joined:
    Jan 17, 2011
    Posts:
    380
    Can someone please help me?
    I am trying to modify my profile at runtime with UnityScript.

    I tried to import EVERYTHING ha ha..

    Code (JavaScript):
    1. /*import System;
    2. import System.Linq;
    3. import UnityEngine;
    4. import System.Collections;
    5. import System.Collections.Generic;
    6. import UnityEngine.Rendering;*/
    7. import UnityEngine.PostProcessing;
    It always gives me the following error:

    Code (CSharp):
    1. Assets/Scripts/CameraScriptA.js(9,8): BCE0021: Namespace 'UnityEngine.PostProcessing' not found, maybe you forgot to add an assembly reference?

    edit: I'm using v1. The Asset Store version

    EDIT:
    SOLVED - for everyone having the same question:

    I moved the the whole PostProcessing Folder to a 'Plugins' folder.
    This way I am able to access C-Scripts from inside Unity Scripts.
     
    Last edited: Aug 9, 2017
  50. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hi,
    i remember in some of the earlier versions we were able to bake the current color correction to a LUT file from the Color Grading panel in Post Processing Stack and then use the generated LUT texture straight in the User LUT panel. Now i don't see this option. Is it no more available ?