Search Unity

Official New Post-processing Stack (Pre-Release)

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

  1. CRISTALSONIC

    CRISTALSONIC

    Joined:
    Sep 22, 2016
    Posts:
    136
    hey does the post-processing tool need an update with unity 2017? or am I missing a standard asset ?
    I downloaded it the other day to find that it just put 49 errors in my project
     
  2. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,876
    First re open your current project
    Then if you had error, send one of them here
     
  3. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,374
    I just tried V2 from gitbub and I must say that the for my asset SpriteLights, the bloom looks so-much-better. V1 is totally unusable for very small point lights (over saturated bloom, extreme flicker with anti flicker removing bloom entirely) but I am very happy with V2.

    However, the setup experience is a fail. It is hardly the "Unity way" where things just work. It might be more flexible with the zone system but having to add 2 different components, create a profile, and setup a layering system, is just overly complex. It should be possible to just add one component to the camera which works right away (not even needing to create a profile and add it). If you would like to create a zoning system, only then should it require additional steps.
     
    Freznosis, freedomize, f1ac and 3 others like this.
  4. Chman

    Chman

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    721
    It's in beta and will rely on another feature that hasn't been released yet that will take a good chunk of this step away.

    The initial setup (right now anyway) is a one time thing and honestly takes a few seconds, after which you get a powerful framework to play with. The volume system also isn't the only thing that went into consideration when designing this feature (interoperability with other features... "Big picture" kind of thing). Ultimately it comes down to power/flexibility vs simplicity in the context of game production. The "scalable" solution you propose isn't doable without dropping a lot of things this framework enables you to do and introduces UX redundancy.

    Think about it this way: in the context of a generic engine (Unity), would you rather forego flexibility and features for the sole purpose of making the initial setup a few seconds/minutes shorter or would you rather have this greatly enhanced flexibility and power at your hand reach when making your game?
     
    dadude123 likes this.
  5. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,374
    Ok, I understand the flexibility vs feature set issue. I hope most people do ;)
     
  6. CRISTALSONIC

    CRISTALSONIC

    Joined:
    Sep 22, 2016
    Posts:
    136
    apparently its working after re importing it but i don't know why lol
     
  7. Onat-H

    Onat-H

    Joined:
    Mar 11, 2015
    Posts:
    195
    right after coning the Repo in my Project, i get the following error (among other bloom related errors)

    Assets/PostProcessing/PostProcessing/Editor/Effects/BloomEditor.cs(6,39): error CS0311: The type `Bloom' cannot be used as type parameter `T' in the generic type or method `UnityEditor.Rendering.PostProcessing.PostProcessEffectEditor<T>'. There is no implicit reference conversion from `Bloom' to `UnityEngine.Rendering.PostProcessing.PostProcessEffectSettings'

    How can I solve this?
     
    blaher and danilonobre like this.
  8. Velo222

    Velo222

    Joined:
    Apr 29, 2012
    Posts:
    1,437
    Umm.....I'm having a brain freeze right now, but how do I actually use this? Do I drag a specific script onto my camera?

    :rolleyes:

    *Edit: Nevermind, I found the QuickStart guide. Thanks. :D
     
    Last edited: Sep 26, 2017
  9. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    @Chman i'm getting spammed with this error in 2017.1p3 with ssr active
    Code (csharp):
    1.  
    2. RenderTexture.GenerateMips failed: render texture does not have mip maps (set useMipMap to true).
    3.  
     
  10. mikeyycxc

    mikeyycxc

    Joined:
    Sep 27, 2017
    Posts:
    1
    Having an issue. Not able to insert a post-process component even though I have imported PPS
     

    Attached Files:

  11. a-t-hellboy

    a-t-hellboy

    Joined:
    Dec 6, 2013
    Posts:
    180
    Hey guys, very simple question, I want to know if Post-processing Stack supports mobile devices (Android and iOS) ?

    More specific, I want to know Blur feature of this package is optimized on Android and iOS ?

    I don't have any idea how to write shader, so if this package doesn't support mobile devices, is there any Blur shader that is optimized on mobile devices ? I've tested some shaders before but non of them is good (I've tested Blur shader in Standard Asset too but it's not optimized on Android)
     
  12. UnityLighting

    UnityLighting

    Joined:
    Mar 31, 2015
    Posts:
    3,876
    Android was not supported in my tests on GLES 3 and 3.1
     
  13. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    Is there a way to convert a PPStack 1 profile to PPStack 2?

    The gamma and gain handles move sluggishly in PPStack 2 in 2017.1.1 and I'm unable to recreate my PPStack 1 profile exactly.
     
  14. Chman

    Chman

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    721
    No, the stack has been through way too many changes for that to be possible. Some effects could be ported automatically, but others like bloom and especially color grading have been reworked from the ground up and behave differently (and are mostly incompatible with v1 as the maths are different).
    If by "sluggish" you mean that they don't follow the cursor 1:1 it's the intended behavior (and works the same way in most color grading softwares actually). It makes trackball tweaking a lot more precise, especially if your display/inspector isn't wide enough to display large enough trackballs. If that bother you too much simply go to Edit -> Preferences, you can tweak the trackball sensitivity in the "PostProcessing" panel.
     
  15. NesG

    NesG

    Joined:
    Sep 29, 2017
    Posts:
    1
    Hi, any way to exclude objects or layers from effect with post processing stack (V2)?
     
  16. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    @Chman how about the render texture mip error?
     
  17. Chman

    Chman

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    721
    Post-processing is applied to whatever your camera renders, these are fullscreen effects, so you should use a multi-camera setup to do that (compositing).
    It's been talked about a few days ago (see the previous page).
     
    Reanimate_L likes this.
  18. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Ahh i totally didn't catch that. Noted
     
  19. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    Good to know. I've been trying to port my color grading settings from a PP1 profile to PP2 and they weren't getting similar results even though the settings are mostly the same. I'm guessing if I am happy with the PP1 look, it's probably best to stick with the look I like in my PP1 profile.
     
    David_Marshall likes this.
  20. snowcult

    snowcult

    Joined:
    Feb 6, 2014
    Posts:
    295
    So, I've applied this to my player camera, and I see the effects work in the scene view and game view (not pressing play) as I edit them. But the moment I press play, the effects are not applied.

    Should note I'm using Enviro and Aquas in scene.
     
  21. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    437
    ArgumentNullException: Argument cannot be null.
    Parameter name: value
    UnityEngine.MaterialPropertyBlock.SetTexture (Int32 nameID, UnityEngine.Texture value) (at C:/buildslave/unity/build/Runtime/Export/Graphics.cs:475)
    UnityEngine.Rendering.PostProcessing.Dithering.Render (UnityEngine.Rendering.PostProcessing.PostProcessRenderContext context) (at Assets/Runtime/Effects/Dithering.cs:31)
    UnityEngine.Rendering.PostProcessing.PostProcessLayer.RenderBuiltins (UnityEngine.Rendering.PostProcessing.PostProcessRenderContext context, Boolean isFinalPass, Int32 releaseTargetAfterUse) (at Assets/Runtime/PostProcessLayer.cs:804)
    UnityEngine.Rendering.PostProcessing.PostProcessLayer.Render (UnityEngine.Rendering.PostProcessing.PostProcessRenderContext context) (at Assets/Runtime/PostProcessLayer.cs:651)
    UnityEngine.Rendering.PostProcessing.PostProcessLayer.BuildCommandBuffers () (at Assets/Runtime/PostProcessLayer.cs:416)
    UnityEngine.Rendering.PostProcessing.PostProcessLayer.OnPreCull () (at Assets/Runtime/PostProcessLayer.cs:278)
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)


    unity 2017.1.1f1 personal
    clear project. nothing works
    PP stuck v2

    EDIT:
    seems reimport helps. just deleted whole folder and reimported PP stuck v2 again. no errors so far ,but... all settings gray. non of special effects working. only AA on camera (where PP volume itself).
    did everything like in tutorial... what i missing?

    and there is no option "rendering feature" in pp layer (component)

    EDIT2:
    omg, why no1 told about small gray circles in effect options!!!!

    also, i still have spamm of errors:
    RenderTexture.GenerateMips failed: render texture does not have mip maps (set useMipMap to true).
    UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
     
    Last edited: Oct 1, 2017
  22. Deckard_89

    Deckard_89

    Joined:
    Feb 4, 2016
    Posts:
    316
    I am having exactly the same issue - no Aqua or Enviro though. I'm just using Unity's First Person Controller.
     
  23. JakubSmaga

    JakubSmaga

    Joined:
    Aug 5, 2015
    Posts:
    417
  24. StaffanEk

    StaffanEk

    Joined:
    Jul 13, 2012
    Posts:
    380

    I'm curious what Unitys response to this is.
     
  25. sturentzler

    sturentzler

    Joined:
    Jan 8, 2017
    Posts:
    14
    Hi,

    Question is about post processing v2. Downloading and was following along with the Austin keynote live stream (awesome to see the new features). Wondering if anyone can tell me about the "Da Rain FX" that was demoed in the pp v2 during the keynote. Is that a custom effect written by the team or an asset script available from the store. Was used during the demo and is seen in the stack at this moment:


    Thank you!
     
  26. JakubSmaga

    JakubSmaga

    Joined:
    Aug 5, 2015
    Posts:
    417
    They used this: https://www.assetstore.unity3d.com/en/#!/content/59986
    Also looks like they modified the code and added it as a Post-Processing custom effect.
     
    arnoob and Gametyme like this.
  27. sturentzler

    sturentzler

    Joined:
    Jan 8, 2017
    Posts:
    14
    thank you for identifying and pointer to the asset. Was interesting that it's modified as post effect.
     
  28. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    829
    @Chman
    To join @lverhoef - is there a way to stop AO from drawing over bright emissive pixels? Things like glowing windows are heavilty dimmed if they happen to be in an area with high ambient occlusion. That doesn't seem intentional, most AO implementations tend to skip drawing to pixels past certain luminance threshold.



    That aside, I have to say I'm completely blown away by the quality of new MSVO occlusion mode, it's absolutely incredible. It blows precomputed voxel based AO we planned to use out of the water, I think it's some eldritch magic:





    I wonder if you could clear a few things about it, though:
    • Is it lacking a quality setting (resolution/sample count) by design?
    • What hardware do you have in mind for this mode? I don't see any performance issues so far, but performance on my work PC is not a good reference point :)
     
    Last edited: Oct 12, 2017
    Martin_H and Lex4art like this.
  29. uvavoo

    uvavoo

    Joined:
    Oct 15, 2007
    Posts:
    60
    From the Unity manual:
    Compute shaders in Unity closely match DirectX 11 DirectCompute technology. Platforms where compute shaders work:

    • Windows and Windows Store, with a DirectX 11 or DirectX 12 graphics API and Shader Model 5.0 GPU
    • macOS and iOS using Metal graphics API
    • Android, Linux and Windows platforms with Vulkan API
    • Modern OpenGL platforms (OpenGL 4.3 on Linux or Windows; OpenGL ES 3.1 on Android). Note that Mac OS X does not support OpenGL 4.3
    • Modern consoles (Sony PS4 and Microsoft Xbox One)
    Quoted from an earlier post.
    So apparently from this information Macs only support up to OpenGl 4.1, so no DirectCompute, thus making some of the effects such as the new AO or the new SSR not workable on mac platforms?
    Are we abandoning macs now with regard to these new post processing effects.?
     
  30. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    Isn't "Metal" API support Compute Shaders as well now ! I guess it should work well if metal is selected !
     
  31. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,825
    Is there any estimate on when v2 might be finalized and placed on the Asset Store? Thx.
     
  32. f0ff886f

    f0ff886f

    Joined:
    Nov 1, 2015
    Posts:
    201
    I have a question about Tweening a new PostProcessVolume, as is described here: https://github.com/Unity-Technologies/PostProcessing/wiki/(v2)-Scripting-the-stack

    I'm trying to tween my DoF settings so that I can smoothly change my focal distance / aperature, however I find that using DOTween (like the example) the Volume really only takes effect right near weight = 1.0f.

    It means that when I'm enabling/disabling the effect via Tween, I have a very short range that shows any visual difference, so a tween time of 1.0f seconds means the entire DoF visual change happens in maybe the last 0.01s, so its closer to a snap than it is a smooth blur.

    Is there a way around this? I just essentially want to smoothly tweak two values of the global volume... and it is really unclear how to touch those values accessing the PostProcessVolume component directly.

    Has anyone found a way to adjust parameters of given effects slowly?
     
  33. egoalterato

    egoalterato

    Joined:
    Oct 17, 2017
    Posts:
    5
    me and other thousand people on a forum are looking for this as showed in the video, since a month or more.
    the yt channel has comment disabled and don't answer.
    Do you have any idea of what is this panel on the right and how to apply in that game
    called Illusion PlayHome?
    thanks in advance for answer and sorry for bothering newbie question

    link of the video:

     
    Last edited: Oct 17, 2017
    jihedovsky likes this.
  34. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    829
    Had an issue opened on GitHub, but might as well post it here too, I suppose.
    https://github.com/Unity-Technologies/PostProcessing/issues/334

    Got a bit of a problem - multi-scale ambient occlusion is composited onto emissive pixels. MSVO already includes ambient-only mode correctly filtering out areas lit with light sources, so filtering out self-illuminating pixels would be fitting in that mode (probably an unintentional omission). Normally, AO implementations just sample the deferred emission buffer to fade AO over highly emissive pixels.

    The fix would involve doing something like this in the G-buffer compositing pass in MultiScaleVO.shader:

    Code (csharp):
    1. Output Frag(VaryingsDefault i)
    2. {
    3.    float ao = (1.0 - SAMPLE_TEXTURE2D (_MSVOcclusionTexture, sampler_MSVOcclusionTexture, i.texcoordStereo).r);
    4.    float4 emission = SAMPLE_TEXTURE2D (_EmissionTex, sampler_EmissionTex, i.texcoordStereo);
    5.    float luminance = dot (emission.xyz, float3(0.299, 0.587, 0.114));
    6.    ao = ao * (1 - luminance);
    7.    Output o;
    8.    o.gbuffer0 = float4(0.0, 0.0, 0.0, ao);
    9.    o.gbuffer3 = float4(ao * _AOColor, 0.0);
    10.    return o;
    11. }
    I'm not sure how to implement this on my own, though, because I don't know how to pass the HDR deferred RT containing emission to this place in MSVO shader - sadly, I'm not yet very familiar with the patterns/systems used for all new postprocessing effects, with all those new macros, PostProcessRenderContext methods and command buffers. :)

    Also, not sure if computing luminance through dot product is a good idea for HDR colors, there is probably a better way to derive an "intensity" value for AO masking from HDR emission.
     
    StaffanEk and Lex4art like this.
  35. egoalterato

    egoalterato

    Joined:
    Oct 17, 2017
    Posts:
    5

    So.. no one ?
     
  36. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,913
    You just have to make a UI that changes the values of the post processing. Same as any other UI.
     
  37. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,913
    Does anyone know how to make the Depth of Field effect to work more like Linear Fog? It seems so useless, since you can't choose the amount of blur.
     
    dadude123 likes this.
  38. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    829
    Speaking of Depth of Field, can someone explain how to calculate the values for focus distance, aperture, and focal length fields which would guarantee:
    • that an object N meters away from the camera is in focus (assume it's in dead center of the lens, no need to compensate for projection matrix)
    • that a volume X meters in front an behind the object is in focus
    • that transition from depth in focus to depth with full blur happens over Y meters
    I'd really love to have some formula I can plug N, X, Y values into to get usable focus distance, aperture and focal length values out of it. I can get usable depth of field by randomly moving the values and eyeballing, but I need to implement a scripted DoF setter for procedurally generated cutscenes, where eyeballing is not possible. :)
     
  39. Stardog

    Stardog

    Joined:
    Jun 28, 2010
    Posts:
    1,913
    There is a FocusPuller script here you could look at - https://github.com/keijiro/PostProcessingUtilities

    It's still hard/impossible to adjust the distance + blur amount though, as I mentioned.
     
  40. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    829
    Thanks!

    This makes me half tempted to manually adjust parameters in a test scene with focus targets spaced with some metric intervals, collect each set of settings into containers stuffed into a dictionary (keyed by target distance used to create the settings), then generate three animation curves (one for each DoF module property) with keys grabbed from that dictionary and sample the animation curves with a distance value to finally get guaranteed-to-be-right DoF. :D

    (This would probably stop working the minute you change your FoV and won't support custom focus area arguments though, so it won't be better than distance-only focus pulling)
     
  41. egoalterato

    egoalterato

    Joined:
    Oct 17, 2017
    Posts:
    5
    ehm... i know how much can be difficult to answer to a newbie but.. can you tell me where to begin to learn how to do this?
     
  42. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    829
    I agree, it's just some custom UI accessing the public methods/fields on the postprocessing script. Nothing like that is shipped with post effects, you'll need to implement it.

    The Learn portal has very good explainers and tutorials on using the new UI system.
    https://unity3d.com/learn/tutorials/topics/user-interface-ui
     
    Lex4art likes this.
  43. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    829
    Just encountered a big issue with temporal AA:
    https://github.com/Unity-Technologies/PostProcessing/issues/340

    Using a particle shader on traditional geometry (for example, camera-facing quads) results in NaNs (or infinities, not sure - it's a growing black blob, as usual with them) being rendered on bright pixels. Fastest way to trigger that issue is to overlap several quads with an alpha-blended shader and pure white texels:




    Others report this can be caused by any bright pixels in HDR, e.g. overlaps of several bright lights.
     
  44. egoalterato

    egoalterato

    Joined:
    Oct 17, 2017
    Posts:
    5
    i mean, that UI is not in the game. I assume that i should learn how to manage the UI, and then how to apply an UI to that game (maybe i should learn also how to decompile the game to put the ui inside the game) am i right? .. pretty impossible for me. i give up
     
  45. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    829
    I'm not sure what you mean. You want to make an ingame UI like that for your own game, right? It's not a part of the postprocessing package, so you have to make it yourself (first step towards that would be learning UI basics on the page I linked). It's impossible to extract interfaces from other Unity games if that was your plan.

    Every game has different UI needs and different set of settings in needs to expose to the users, so there is no point in shipping this kind of UI with the postprocessing package, it's not in it's scope. Postprocessing system provides a nice clean API allowing you to implement custom UI using any UI system and scope of your choosing, that's the extent of it's responsibilities there. :)
     
    egoalterato and StaffanEk like this.
  46. egoalterato

    egoalterato

    Joined:
    Oct 17, 2017
    Posts:
    5
    thanks a lot bac9, i really appreciated your help and sorry everybody for boring newbie questions.
    i just wanted to have that UI showed in that video to use in that game (i know, is a questionable game but the character creator can give fast results for simple modeling/lights/poses without rendering times)
    so..I give up.. if a game can look better with a mod/ui so should be an interest of the industry cause
    better graphics=more people promote it=more sells
    but obviously they do not care.. thanks again for your support
     
  47. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,685
    Back in March someone created a post processing UI to share. I haven't tried it, so I don't know if it is updated or outdated. It's possible you might need to modify it.

    https://forum.unity.com/threads/new-post-processing-stack-pre-release.435581/page-7#post-2999411

    http://twiik.net/projects/in-game-settings-menu
     
    chelnok and Lex4art like this.
  48. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    Your game looks amazing but I really hope you will make the chromatic aberration effect optional. I find it very distracting and I disable it in all games I play.


    I've seen some option along the lines of "stop NAN propagation" or something like that in the settings. Is that already in your version of the stack and does it help?



    I've tried v2 for the first time yesterday and I'm sold yet. So far I like v1 more, but I don't use Unity 2017 so I couldn't test the new AO. Is there no option to disable dithering in the v2 stack? I feel like this should be optional because you might have people with usecases that don't need it and don't want the flickering it causes. In my case I used it on a 2D pixelart scene and there it is very distractiong. I'll go back to using the v1 stack for that as that will likely be a better fit for my usecase but I'm sure there are others who need v2 features and want to disable dithering too.

    Also +1 on the complaint about SSAO darkening emissive surfaces, that shouldn't be the case imho.

    Then I noticed that enabling new features on a profile in v2, like adding grain, vignette and color grading will always add the new ones on the bottom of the list, but I can't reorder them. That's kind of confusing. If they can't be reordered, they should always have the order in which they are applied imho.
     
  49. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    829
    Yeah, it's toggleable.

    Nah, it's not doing anything. Probably because temporal antialiasing propagates infinities without using the copy method which implements NaN/infinities filter. Or maybe it's due to fundamental issue with temporal AA incorrectly blending history of pixels with particle shaders, causing them to accumulate brightness over time, inevitably reaching infinity no matter whether you stop propagation or not (propagation here is not happening over time through bloom or other effect, it's happening when temporal AA smears older frames from history to new places of last frame).

    I'm using Unity 5.6.4 and MSVO works fine, actually. Some very recent commit did some changes to MSVO in preparation for SRP/HDRP integration, maybe that one erroneously introduced a preprocessor directive locking out Unity 5.6, though.

    There is no option to do that, as far as I know. I think it's dithering based on the paper about Inside rendering, which proposed a dithering implementation that is universally useful for elimination of color banding. Might not be desirable for games with pixel art style where virtual pixels take up multiple screen space pixels at once, I suppose - but otherwise it's a visual boost with no drawbacks (since it's using blue noise and very nice blending).

    Check page 44 of this presentation for explanations about that dithering:
    https://www.gdcvault.com/play/1023002/Low-Complexity-High-Fidelity-INSIDE
     
    Martin_H likes this.
  50. f0ff886f

    f0ff886f

    Joined:
    Nov 1, 2015
    Posts:
    201
    If anyone else runs into this, I found that lerping only from 0.9f to 1.0f works well enough. The lack of precision isn't horrible, it gets around the problem for now.
     
    hopeful likes this.