Search Unity

Official New Post-processing Stack (Pre-Release)

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

  1. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Well it's not an urgent task at all... :) When you get to fussing over a few checkboxes, life must be incredibly good.
     
  2. AcidArrow

    AcidArrow

    Joined:
    May 20, 2010
    Posts:
    11,792
    It's pretty good, but it could be perfect if only those darn CHECKBOXES WERE IN ORDER!

    (╯°□°)╯︵ ┻━┻

    (I'm kidding, the checkboxes are fine)

    (although, Unity in general, does suffer from UI inconsistencies here and there)
     
    Kronnect likes this.
  3. Justin-Wasilenko

    Justin-Wasilenko

    Joined:
    Mar 10, 2015
    Posts:
    104
    I'll have to go back and give V2 a try then. I switched back to V1 since that was what was used in the PS4 version, however now running SinglePass rendering get a black screen at start with color grading enabled, that only happens the first time the game is run. Not the second time. Doesn't make for a good first impression to a user :)
     
  4. greg-harding

    greg-harding

    Joined:
    Apr 11, 2013
    Posts:
    524
    Last edited: Feb 7, 2018
    chrismarch likes this.
  5. Brad-Newman

    Brad-Newman

    Joined:
    Feb 7, 2013
    Posts:
    185
    LOL. Guess I learned my lesson on giving user feedback to this particular forum.
     
  6. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    The lesson being you got some developer feedback, so it must be good :)
     
    karl_jones likes this.
  7. Brad-Newman

    Brad-Newman

    Joined:
    Feb 7, 2013
    Posts:
    185
    I'm not advocating for making the whole Unity UI look like the particle system. My main point is the grey circular buttons in V2 are not consistent really with anything in the Unity UI, and the boxes in V2 were more intuitive and consistent with the Unity UI in general.
     
  8. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
    I'm with you on this. The tool would be better if changed. It seems pretty obvious, not sure why there'd be resistance.

    The rebuttal offered above is kind of silly, saying that if the interface isn't good, well then your life must be great, so why worry.

    I suppose a similar line of reasoning would be that maybe your life is really bad, so why worry.

    In fact, why worry about making any changes or improvements to anything, because your life is either too good or too bad for it to matter?

    I'm actually not going to worry about it. lol

    That's because I won't use bad tools. My advice is that until they improve it, skip it.
     
  9. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hi, any plans of adding atmospheric effects, volumetric fog etc... !?
     
    Stardog likes this.
  10. Onigiri

    Onigiri

    Joined:
    Aug 10, 2014
    Posts:
    486
    I think they are focused on making physical camera now, thats why pp stack doesnt have any updates for some time. Btw, srp team working on the sky and volumetric lighting in hd pipeline. As for me, I would like to see this effect implemented in stack http://bankslab.berkeley.edu/publications/chromablur/
     
    Vagabond_ likes this.
  11. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Thanks for the feedback !

    As for the "chromablur" - wow. I always though how cool would be if chromatic aberration could be somehow applied to the whole image, simply because it somehow improves realism !
     
  12. Foestar

    Foestar

    Joined:
    Aug 12, 2013
    Posts:
    350
    Edit, nvm. Solved my own problem.
     
    Last edited: Feb 11, 2018
  13. GingerDr73

    GingerDr73

    Joined:
    Sep 25, 2013
    Posts:
    21
    I'm making a game that is about taking photos using post processing stack v1 atm. Is there a way to calculate if an object at a given distance is in focus if we know all the Depth of Field settings plus resolution etc? I've been digging through loads of camera theory and the depth of field shaders and scripts over the last two days but I can't work it out.
     
  14. Foestar

    Foestar

    Joined:
    Aug 12, 2013
    Posts:
    350
    I've never tried anything like that, and I'm not 100% I get what you're looking for. But you're trying to see if a object is physically in range to be clear for the player? If so all you need is to look at the distance of your object and cross reference that with your Depth of Field's Focal Point. Right off the top of my head the easiest way I would think to do that would be to have a raycast that checks the object it's hitting and it's distance. And since you know what the distance is for the focal point you can cross reference that with your object and determine if it's in range.
     
  15. Murgilod

    Murgilod

    Joined:
    Nov 12, 2013
    Posts:
    10,157
    I, too, am making a game about taking photos, but my issue is slightly different. By any chance, does PPSv2 solve the issue where shadows are immune to motion blur? Right now shadows are very sharp regardless of how blurry the object is. See below:
     
    Lex4art likes this.
  16. GingerDr73

    GingerDr73

    Joined:
    Sep 25, 2013
    Posts:
    21
    Wow that shadow sharpness is really hard to ignore once you notice it. I'm also using motion blur to simulate shutter speed. I'll try and explain my focus problem a little better. Basically the focus distance isn't always going to match object we are trying through the camera settings to focus on. This is because I cap the focus distance, as many camera lenses will simply have everything in focus beyond a certain distance, for the sake of clarity the max I have atm is 5(m). The current default lens I have setup in game simulates a fairly standard zoom lens with 18-55mm focal length and a max zoom of approximately 3x (the zoom is actually determined by the focal length as in a real lens). Similarly it has an aperture range from f/3.5 to f/5.6, presently completely under user control but it seems that it should creep up with the focal length unless its a really good quality lens.

    Basically with all these settings you can reasonably easily get quite a wide or narrow DoF that isn't necessarily dictated by the focus distance. The issue I have is if there are bunch of photo target points within the picture at different distances how do I tell which ones are in focus (assuming the objects in question are relatively narrow). I found a heap of tables listing near and far focus planes for various lens configurations but I can't find any that behave like the Unity DoF. Its further complicated by the way the DoF changes according to the screen resolution in Unity. When I take a photo in game I super sample it up to the desired output resolution and the DoF will always look a bit different to the way it looked in the camera viewer. I think the answer might be in understanding how the Post Processing stack calculates Circle of Confusion and how that changes according to the resolution. I found some logic about CoC in the Post processing stack DoF code but I couldn't get the math right or there is more to it.
     
  17. 4sascha

    4sascha

    Joined:
    Mar 9, 2017
    Posts:
    51
    Hello,
    I am rendering two video textures on planes in a car interior for ui simulation. Shader used for this is the avpro unlit shader.
    Is it somehow possible to exclude these from tonemapping and bloom in PP V2.
    Means. Bloom and Tonemapping works for car interior but is not affecting the two video textures for my ui displays?
     
  18. chrismarch

    chrismarch

    Joined:
    Jul 24, 2013
    Posts:
    472
    My team is also using 2017.1.1f1, and I am not prepared to update them just to test the beta v2 stack, but I do need to workaround the black rectangles/screen TAA bug others have run into. I have v1 working fine, HDR+deferred+TAA+bloom+Color Grading

    What version of v2 is stable for people on 2017.1.1f1 (Windows and Xbox)? I pulled the latest today to get the Xbox compile fix, and Bloom and Color Grading seem to have no effect, only AO works, and TAA is shaking my screen. I'm getting these warnings, that I imagine mean that 2017.1.1f1 isn't really supported in this pull of v2:
    • CommandBuffer: built-in render texture type 3 not found while executing Post-processing (SetRenderTarget depth buffer)
    • CommandBuffer: built-in render texture type 3 not found while executing Opaque Only Post-processing (SetRenderTarget depth buffer)

    I guess I will go make some hacks to clamp in TAA, but I really wanted to test out some version of v2, even if it is an older beta version.
     
    Last edited: Feb 22, 2018
  19. Radeg90

    Radeg90

    Joined:
    Feb 28, 2017
    Posts:
    38
    Can anybody give me any kind of tips how can I solve such problem:
    I have Post effects A - a game world
    I have Post effects B - render texture and other world with more bloom, sepia, etc.
    I want whole game to be with effect A, but WITHOUT the portal's render texture
    I want the other world (other world means normal world + Vector3.right * 1000f) to be with effect B, but also Portal's render texture to be with effect B
    3. Player moves through portal to other world - main camera switches from A to B
    4. Player comes back from portal world to main world - main camera switches from B to A

    Althrough changing post processing effects profile during game is simple, I can't manage how can I make a part of my game with different post processing effects - the render texture. When I add a post effects component to the main camera, whole game has effects, even portal's render texture. Disabling Layer in Post process layer in main camera doesn't change anything, it's like not working.

    Look on the screenshot, the world has post processing, the render texture in the portal has exactly the same effect as main world which is bad, because I want the render texture to have the post processing of the other camera which is looking through the portal.
     
  20. chrismarch

    chrismarch

    Joined:
    Jul 24, 2013
    Posts:
    472
    Can you render the portal (quad with a render texture, or something similar) after the post effects stack is done on your main camera ("A")?
     
    Last edited: Mar 8, 2018
  21. Radeg90

    Radeg90

    Joined:
    Feb 28, 2017
    Posts:
    38
    This sounds really logical. How can I render the rendertexture after post effects? Can I somehow set an order of rendering?
     
  22. chrismarch

    chrismarch

    Joined:
    Jul 24, 2013
    Posts:
    472
    I am not sure yet, I am investigating today.
    EDIT:
    • I think we are getting off topic, so further discussion warrants a new thread I think.
    • If we were using 2018.1 (beta): it looks like the Scriptable Render Pipeline would be a good way to customize the order of rendering, as you can pick when combinations of renderqueue/layer are rendered. I don't know if the post effects stack is compatible with 2018.1, but v2 in github might be.
    • If using a version before 2018:
      • Render the portal with a Command Buffer that will execute after post effects. OR
      • I think this would be more complicated than the command buffer, but you could write a post effect that runs last in the stack and composites the render texture with the portals into the main camera render, as rendered to separate camera and render texture, checking that depth buffer render texture generated from the portal quad camera and the depth buffer from your main camera.
     
    Last edited: Mar 9, 2018
  23. sgtkoolaid

    sgtkoolaid

    Joined:
    May 11, 2010
    Posts:
    899
    what am I supposed to do with this? this is the 2.0.2 preview, but also get the same bugs as 2.00 beta 5 version. what do I do to avoid this? or am i screwed until its fixed? I am currently using 2017.3.1f1


    upload_2018-3-10_23-23-12.png
     
  24. musicartslao

    musicartslao

    Joined:
    Nov 9, 2013
    Posts:
    13
    I just had this same error on Unity 2017 31 !:
    "Invalid pass number (1) for Graphics.Blit (Material "(Unknown material)" with 1 passes)"
    after changing from Gamma to Linear. Closing and opening Unity did not solve it.
    After the workaround of "Reimport All" assets, the warning is gone and instead I have this yellow one:
    "
    Rebuilding GUID cache: Deleting metadata Packages/com.unity.ads/Editor/Resources/iOS/builds/UnityAds.framework/Headers/UnityAds.h because the asset doesn't exist anymore.
    MetaData path library/metadata/c9/c99bfe4fc4e5c4dc3917c14075acd117
    "
    Now back on work again!
    Hope this helps others here !
     
  25. innerdecadencestudios

    innerdecadencestudios

    Joined:
    Mar 13, 2018
    Posts:
    2
    Did a solution ever come to this because i'm running into the same issue, can't seem to fix it.
     
  26. innerdecadencestudios

    innerdecadencestudios

    Joined:
    Mar 13, 2018
    Posts:
    2

    Did a solution ever come to this because i'm running into the same issue, can't seem to fix it.
     
  27. marcatore

    marcatore

    Joined:
    May 22, 2015
    Posts:
    160
    Is it possible to increase the sharpeness of the SSR?
    I've tried also the "Overkill" preset or a custom one but I got only blurred reflections.

    I think that it will be really good to have an option that doesn't blur anything and leave to the material smoothness.
    Is it something doable with SSR?

    Thanks in advance.
     
  28. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    1. it's based on screen resolution. The blur is the result of the optimization.
    2. You can use Legacy SSR from Legacy Cinematic Imageeffects on assetstore or
    https://github.com/cCharkes/StochasticScreenSpaceReflection

    Legacy SSR in low preset and proper settings has higher performance compare to Stochastic

    https://forum.unity.com/threads/new-post-processing-stack-pre-release.435581/page-14#post-3225462
     
  29. marcatore

    marcatore

    Joined:
    May 22, 2015
    Posts:
    160
    Thank you for your reply.
    I've tested the Post Process Stack V1 and the SSR seems really more sharp than the V2 one and as performance it seems really equal if not better.
    I hope to see something similar, as quality, in V2 because, at the moment, any kind of settings you use, it always blurred.
     
    UnityLighting likes this.
  30. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Gotta agree though, SSR in V2 seems reduced in quality. Not sure about performance.
     
  31. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Are there any tips for upgrading from V1 to V2? Or is it as simple as replacing the code and creating new V2 profiles?
     
  32. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    Settings are same in most effects

    only Color Grading has a bit different settings (x100)

    V1 :
    0-1

    V2:
    0-100
     
  33. Joe-Censored

    Joe-Censored

    Joined:
    Mar 26, 2013
    Posts:
    11,847
    Thanks, I ended up diving in and figuring it out over the weekend.

    For anyone else the basic steps of going from V1 to V2 are you have to throw out all the old V1 profiles, create new ones you assign to post process volume components which you make part of the scene instead of attached to your camera. Assign a custom layer to your object with the volume component attached, which you select in the post processing layer component you attach to the camera (which you use instead of the old V1 post processing component attached to the camera, where you used to assign the profile directly, now it is indirectly through layers).

    Finally if you want your anti-aliasing settings configurable by the user, you'll need to write a little code to change the AA settings on each camera's post processing layer component as it is no longer part of the post processing profile.
     
  34. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Anyone, or @Chman is it possible to exclude objects from motion blur?
    Ah Nvm :p
     
    Last edited: Mar 29, 2018
  35. cecarlsen

    cecarlsen

    Joined:
    Jun 30, 2006
    Posts:
    864
    PostProcessLayer resets the projection matrix on the camera automatically every update. Is there a way to disable that? I have an Asset Store asset that does custom manipulation of the camera matrix for off-axis projection.
    https://assetstore.unity.com/packages/tools/camera/offaxiscamera-98991

    Because Postprocessing resets the camera projection matrix it is incompatible with OffAxisCamera at this time =(

    EDIT: It happens regardless the Anti-Aliasing setting. (TTA use matrix jittering).

    EDIT 2: I found the sinner. Line 279 in PostProcessingLayer.cs
    https://github.com/Unity-Technologi...stProcessing/Runtime/PostProcessLayer.cs#L279

    Code (CSharp):
    1. // Resets the projection matrix from previous frame in case TAA was enabled.
    2. // We also need to force reset the non-jittered projection matrix here as it's not done
    3. // when ResetProjectionMatrix() is called and will break transparent rendering if TAA
    4. // is switched off and the FOV or any other camera property changes.
    5. m_Camera.ResetProjectionMatrix();
    EDIT3: Please make modification of the projection matrix optional. Or make it possible to set reference to a function like it is done for the jittered projection matrix in TAA.
     
    Last edited: Apr 26, 2018
    ElsaMengJ, iriguchi and camta005 like this.
  36. mmaclaurin

    mmaclaurin

    Joined:
    Dec 18, 2016
    Posts:
    244
    Also having this problem - post effects disappear when pressing play.
     
  37. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Hi, found a bug in post processing v2
    It is happening in 2018.1 b13 with v2.0.3 added using the Package Manager.
    The issue is that if you move an object is scene in play mode it remains blurred until you toggle it off and on again. Not sure if this is expected or an issue - but seems to me as an incorrect behavior !

    upload_2018-4-10_10-24-27.png
     
  38. marcatore

    marcatore

    Joined:
    May 22, 2015
    Posts:
    160
    Just a simple question...I hope with a simple answer. :)
    Is it possible to exclude one or more geometries from the ScreenSpace Reflection effect (V2) ?
    Thanks in advance
     
  39. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,835
    Has anyone tried the DepthOfField for V2? Does it work good like the legacy Depth Of Field image effect?
    The V1 of Unity Post Processing stack DepthOfField is just far to difficult to get anything reliable. Something just seems very wrong with the way it works. I reverted back to the legacy DoF because I'm getting too frustrated trying to figure out what the V1 settings should be to simulate what the legacy DoF could do.
     
  40. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,874
    It's not possible to get samething like legacy one
    You can just have ~good settings here:


    Code (CSharp):
    1.         dof.aperture.value = 0.9f;
    2.         dof.focalLength.value = 2f;
    3.         dof.kernelSize.value = KernelSize.Medium;
    4.         dof.focusDistance.value = dofDistance;
    5.  

    modify dof distance
     
  41. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,913
    I've mentioned before that it needs simplified, but certain people seem to want to work in the current unusable way.

    The focus puller here might be useful - https://github.com/keijiro/PostProcessingUtilities

    https://forum.unity.com/threads/new-post-processing-stack-pre-release.435581/page-10#post-3079888
    https://forum.unity.com/threads/new-post-processing-stack-pre-release.435581/page-15#post-3260586
     
  42. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,835
    Edit: see below

    EDIT:
    It is strange but after further trying to figure out the issue, I noticed that the DoF effect changes based on the window size of the player. I can't make sense of it, but this is the issue. It was unbeknownst to me until now.
    Here is the game window at 964x542. No DoF is noticeable.
    ss1.jpg

    Now I increase the game window. Now the DoF is visibe

    ss2.jpg
    k
    This is why I was struggling so much figuring out the settings.

    Can anyone else try it out to see if the DoF changes based on the player window size?
     
    Last edited: Apr 24, 2018
  43. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,835
    Has anyone tried out resizing the player window to see if the DoF effect changes? Like I mentioned above, when the player window is shrunk down, the DoF effect is almost completely gone. I can reproduce this every-time in the editor playmode and when running a standalone
     
  44. AlenH

    AlenH

    Joined:
    Jun 30, 2015
    Posts:
    42
    Same here..


     
  45. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,913
    There's still a few problems in WebGL after all this time:
    • Depth of Field not supported.
    • Ambient Occlusion in Ambient/Indirect only not supported.
    • SSR not supported.
    • Auto Exposure not supported.
    There needs to be non compute shaders versions of each of these effects. All apart from Auto Exposure were working in the previous stack.
     
  46. Acreates

    Acreates

    Joined:
    Dec 12, 2016
    Posts:
    41
    05/07/2018 Just downloaded Unity and the Post Processing stack, however the PP gives me a bunch of compiler errors. Is there a fix in sight?
     
  47. The_BenEvans

    The_BenEvans

    Joined:
    Jul 31, 2012
    Posts:
    139
    Upgraded to v2 today and Ambient Occlusion isn't behaving very well with Orthographic cameras. It just adds a dark shadow gradient across the top of the camera and doesn't affect the rest of the screen.
    Tried it on a new blank camera with the same results.

    Any ideas, am I missing something simple or is it broken atm?
     
  48. Adam-Bailey

    Adam-Bailey

    Joined:
    Feb 17, 2015
    Posts:
    232
    I'm testing out the LightweightVRTemplate which comes with 2018.1.0f2 and none of the post processing settings seem to be working in Play mode. They are displaying fine in the game view when I'm not playing, but as soon as the game starts all post processing disappears.
     
  49. Deeeds

    Deeeds

    Joined:
    Mar 15, 2018
    Posts:
    739
    Same. Can't get anything to work despite following rules to the letter.
     
  50. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Hello.

    Post Processing Stack asset is great but it lacks a feature. Unlike "Beautify" or the other assets, this one doesn't have a sharpening effect.


    Please add the effect to the stack.
    Thanks in advance.
     
    RendCycle, Stardog and Deeeds like this.