Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice
  2. Ever participated in one our Game Jams? Want pointers on your project? Our Evangelists will be available on Friday to give feedback. Come share your games with us!
    Dismiss Notice

Cinematic Image Effects (Pre Release) package

Discussion in 'Image Effects' started by willgoldstone, Dec 8, 2015.

  1. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    3,995
    I've often seen something like that with additive particles making areas of the screen too bright in HDR. I suspect this is a general Unity issue - one which I personally consider a bug, but it seems to be happening so consistently that I almost feel like this is by design. I think the effect starts somewhere around a brightness level of 2. I've even modified a particle shader to clamp brightness beyond a certain value to avoid colors getting darker again. I've seen the effect in published games too, like in the fire in 7 Days to Die (not sure if it is still there, didn't play that in a while). To me it's quite annoying. I also can't think of a reason why this would be considered a "feature" instead of a "bug". But maybe I'm just not understanding its purpose or logical reason. Can you give an explanation? Thanks for looking into it!
     
  2. Chman

    Chman

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    721
    If I understand what you're saying correctly, then it's by design (not in Unity, in general). It's in the name : "Additive Particles", meaning that if you have 100 particles on top of each other their brightness will add up (to simplify it, it would be like drawing each particle on top of each other by adding the pixel values every time, so you can imagine that with 100 particles on top of each other you'd quickly get values over 1).
     
  3. Yohann1172

    Yohann1172

    Joined:
    May 1, 2013
    Posts:
    6
    Depth of Field: I was excited about the Explicit mode, as I have a need to manually place the Near plane and Far plane. However, this mode leaves me with only the Focus Range slider to soften the transition between blurred and focused areas, and it doesn't make that transition very smooth at all. (Compare this with the F-Stops control in Basic and Advanced modes that make blur/focus transitions super smooth.) Can you allow the F-Stops controls to remain in Explicit mode, or make the Focus Range control way, way more effective?
     
  4. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    3,995
    Having values over 1 in the internal hdr representation of the image is totally fine - wanted actually, for bloom etc.. I just don't understand why those get visually represented as cyan rather than 255/255/255 white on my screen. My understanding is that fullwhite is the brightest color a screen can show, why does it get darker visually on my screen, when the hdr color gets too bright. That makes no sense to me. Can you explain why this happens?
     
  5. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,729
    You'd need some form of clamp for HDR if you want to go nuts with additive on additive cos the final pixel will just keep getting added to? Cyan is cos the number wraps after a sufficiently large range (as I understand it).

    I would rather evade it than have a final blit checking each pixel can't be brighter than white.
     
  6. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    3,995
    But why cyan? Or rather, why does it stay cyan and doesn't look like some rainbow colored glitch when I further increase the brightness? I can't make sense of this in a mathematical sense. If it was some kind of overflow like a binary 11111111 going to 00000000 when I add another 1, that would keep changing its value as long as I keep adding the 1, it wouldn't stabilize on a number that corresponds to a very specific color. I just don't get what's going on here.
    By the way I only could reproduce that with a particle shader. The PBR standard shader with an emissive material turned to 99 brightness didn't cause the same issue, which confuses me even further. I feel like I'm not understanding something :-/.
     
  7. cAyouMontreal

    cAyouMontreal

    Joined:
    Jun 30, 2011
    Posts:
    311
    Has anyone tried the playdead version of the TAA? (I can't find a thread dedicated to it)
    I have some performance issues with the Velocity buffer. It seems that if you have like 10 objects moving on your scene (only meshes, not skinned) sending the velocity buffer will take 4ms. That's ridiculously insane, to say the least. The post effect itself is very fast (0.04ms on my profiler) though, that's not an issue.

    Please tell me if you encountered this performance issues as well,
    thanks !
     
  8. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,401
    They already put a note in the readme that tagging skinned mesh into velocity buffer are expensive. Also they have source license so the actuall TAA they used are C++ integrated directly into internal rendering. The version in github repo are ported to C# afaik
     
    Mark_J18 likes this.
  9. MyGenericUsername

    MyGenericUsername

    Joined:
    Sep 6, 2014
    Posts:
    95
    Unity is spamming me with this warning message. I can't use Anti-Aliasing or Tonemapping. I am using unity 5.3.4p1. I have the latest upgrade to the cinematic image effects package.

    If someone can help me, I would be happy. Thanks!
    Help.png
     
  10. MyGenericUsername

    MyGenericUsername

    Joined:
    Sep 6, 2014
    Posts:
    95
    Fixed this problem. Delete all image effects and other effects then reimported them all. Works perfectly now
     
    Martin_H likes this.
  11. MyGenericUsername

    MyGenericUsername

    Joined:
    Sep 6, 2014
    Posts:
    95
    I rate these effects a 6.8/10. They are good. But there are a lot of bugs (Beta version). But i would recommend that you try these effects if you haven't already!
    RainLambo(2048)WM_FLATTEN.jpg
     
  12. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,682
    Hmm... maybe its just me - but I am loving these new FX and am having a blast with them!

    The one major comment so far is that there seems to be something very off with the SpeedTree shaders. Light coming through the leaves is completely off. Check the second image.

    Grab 20160407172648 w1900h1200 x23y59z-76r166.jpg

    Grab 20160405143706 w1900h1200 x-43y59z11r185.jpg

    Generated with Unity 5.3.4p1, and the latest asset store version of Cinematic FX.
     
    Last edited: Apr 7, 2016
    Cascho01 and MyGenericUsername like this.
  13. Chman

    Chman

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    721
    We can't fix bugs we don't know about, so please let us know what bug you found :)
     
    the_motionblur, Tim-C and S_Darkwell like this.
  14. xDavidLeon

    xDavidLeon

    Joined:
    Jun 9, 2014
    Posts:
    103
    Do you guys have flickering ocurring when using SMAA? I just had to go back to FXAA because of it. It's mostly noticeable on planes and angles parallel to the camera like stairs and boxes.
     
  15. MyGenericUsername

    MyGenericUsername

    Joined:
    Sep 6, 2014
    Posts:
    95
    Anti-aliasing for one has a major flickering problem where it flickers along edges of objects in the scene, and sometimes renders my camera black. Hopefully you guys fix this soon :)

    There was an issue with tonemapping saturation, when you scale it up or down it wouldn't effect the saturation at all, but it did create a shell around objects which made it look as if you could see atlas texture padding. I restarted unity and it went away. But i'm not sure if i needed to reboot unity or if this was indeed a bug. If it occurs again i will surely upload screenshots.

    Ambient Occlusion makes the camera render objects that are behind walls or other objects when those objects are not using the standard shader.
    Ambient Occlusion: On
    AO_On.png
    Ambient Occlusion: Off (Legacy Shader)
    AO_OFF.png
     
  16. MyGenericUsername

    MyGenericUsername

    Joined:
    Sep 6, 2014
    Posts:
    95
    Also, in the scene I posted with the car, when the camera is behind the car or in dark areas, it does not lighten the view at all. Eye adaptation also does not work with any other image effects like bloom. Not sure if this is a bug or if this was how it was intended to be. When i get close to very emissive objects, it does not adjust to bring down the exposure.
     
  17. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    3,995
    I think I've found the issue with my shader. I was using "Blend OneMinusDstColor One" where I should have used "Blend One One". Brightness values in the hundreds now work as expected. In the old blend mode I was hitting the color errors at a brigthness of ~2-3 already.
     
    hippocoder likes this.
  18. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,729
    Honestly from what I can see it's pretty much the driver's fault. Your scenes don't look remotely physically accurate so you will get all kinds of values in your gbuffers so pretty much everything except LDR post would look bad for you.

    Not being offensive, just pointing out should you be able to correct your lighting, ensure it's HDR, linear and you're using sane values and its STILL not behaving then I guess it is a bug, but filing a bug report should see it fixed (screenshots would be hard for unity to figure out where the problem is).
     
  19. Chman

    Chman

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    721
    This "transparent AO" bug generally happens when a shader isn't properly setup. Are the RenderType and Queue tags set properly in your custom shader ?
     
  20. MyGenericUsername

    MyGenericUsername

    Joined:
    Sep 6, 2014
    Posts:
    95
    I am using the tessellation shader from standard assets. I am also using Deferred Lighting.
     
  21. PhobicGunner

    PhobicGunner

    Joined:
    Jun 28, 2011
    Posts:
    1,813
    Go through your materials and enable Debug in the inspector, then check and see if the tags are properly set up. I once had an issue where the wrong RenderType was serialized for a material (it didn't match what I had defined in my shader, so the object was rendered as if it was transparent even though the shader defined it as Opaque - and this had very similar results as you encountered when AO was enabled)
     
    MyGenericUsername likes this.
  22. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,401
    Is it just me or the Ambient Only for AO are broken? or is it not working from the beginning?
    Hah. . . surprisingly i can make the SSR to work with semi transparent object. But i have to use dithered alpha :D
    upload_2016-4-11_20-7-44.png
     
    Last edited: Apr 11, 2016
    Soul-Challenger likes this.
  23. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,729
    Ambient only AO means that the AO will only appear where it is not directly touched by light. "Dithered alpha" should work as it is cutout queue (just after opaque, before transparent - ie it's not alpha)
     
  24. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,401
    I know, it was working before. But after last pull it doesn't work anymore.

    yeah that's what i mean :p
     
  25. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,135
    Are you on 5.4 beta? There is a command buffer bug at the moment, it's not the AO effect itself ;(

    Giving me some ideas about combining this with temporal so you can fake transparency and not need to render opaque ;)
     
    brisck1 and SAOTA like this.
  26. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,401
    Yes i'am, so i guess that what causing it then. i'll wait for the next beta

    That's the idea, i've been combine that with FXAA and it looks great, can't wait for your solution.
    Also a bonus from this technique is shadow cast/receiver :)
    The only drawback is sometimes it feel noisy :(
     
    Last edited: Apr 11, 2016
  27. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    3,995
    If you are talking about the screenspace reflections I recommend to take a look at how the one in UE4 looks (or even the source if that is open) because it seems to have a heavy temporal component that gives it a great reflection quality after the image stabilizes. I'm looking forward to see what you'll come up with. I'm sure it's going to rock!
     
    S_Darkwell likes this.
  28. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,135
    upload_2016-4-14_15-25-52.png

    Something just landed in 5.4 for the next beta.
     
  29. S_Darkwell

    S_Darkwell

    Joined:
    Oct 20, 2013
    Posts:
    318
    Martin_H likes this.
  30. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,401
  31. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,729
    OH YOU'RE THE DADDY!

    Post is coming along great now. Hopeful for the transparent stuff too, be really cool for particles etc...
     
    Last edited: Apr 14, 2016
  32. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,135
    Good AA on transparencies will be a way off still. That being said we have some really really cool stuff in the pipe (unrelated) that we are looking forward to sharing.
     
    hippocoder likes this.
  33. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,401
    man. . . . . just say it. . . . . .stop teasing. . .
     
  34. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,135
    Not till we can back it up with some awesome pictures and screenshots :)
     
    S_Darkwell and ArthurT like this.
  35. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,401
    you killing me. . . .
     
  36. reddotgames

    reddotgames

    Joined:
    Apr 5, 2011
    Posts:
    669
    Any ideas why we are having problems with forward-only materials and AO , SSR?


    SSAO Pro + old Unity's ScreenSpaceAmbientOcclusion works here without problems. Only way we can get this working is to turn on "ambient only" in AO, but it dont look as good as without it.

    SSR (screenshot with debug mode "incoming radiance", you can clearly see that SSR kind of skips those models)
     
  37. Aurecon_Unity

    Aurecon_Unity

    Joined:
    Jul 6, 2011
    Posts:
    241
    Sorry if this has already been answered, but how do I turn on or off the individual components in the Tonemapping in C#? For instance, turning on or off the 'Eye Adaptation' or 'Color Grading' checkboxes. I can see a '.enabled' property on the component but it seems to be read only?
     
  38. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,135
    We have not seen this at all and are not aware of it. Can you send your scene file? Upload it to attached to an issue on the bit bucket repository: https://bitbucket.org/Unity-Technologies/cinematic-image-effects/issues?status=new&status=open
     
  39. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,135
    The 'enabled' flag is held by the setting struct:

    so do something like:

    Code (csharp):
    1.  
    2. var tcg = GetComponent<TonemappingColorGrading>();
    3. var eyeSettings = tcg.eyeAdaptation;
    4. eyeSettings.enabled = false;
    5. tcg.eyeAdaptation = eyeSettings;
    6.  
     
    Aurecon_Unity likes this.
  40. Aurecon_Unity

    Aurecon_Unity

    Joined:
    Jul 6, 2011
    Posts:
    241
    Thanks Tim!
     
  41. reddotgames

    reddotgames

    Joined:
    Apr 5, 2011
    Posts:
    669
    One problem is that those are Alloy shaders - are this attachment will be available for all or only for you?
    I just checked build in shaders, and same thing is happening with Unlit/Texture (only in Deferred)

    upload_2016-4-15_11-54-15.png

    I did create issue in bitbucket so we can continue there.
     
    Last edited: Apr 15, 2016
  42. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,401
    Oh btw tim, can you still add this as an option for SSR, to use fake transparency with opaque?
     
  43. n00body

    n00body

    Joined:
    Dec 17, 2010
    Posts:
    691
    @Tim C
    In response to @reddotgames problem, what really needs to happen here is that these effects must use command buffers to directly apply to the G-Buffer's Light Accumulation Buffer before the forward materials are rendered. First, you would calculate SSRR and add it to the LAB. Then you would calculate SSAO and multiply it into the LAB. The only problem is that it wouldn't work for LDR mode, since that uses multiplicative blending for accumulating lights.
     
  44. zelmund

    zelmund

    Joined:
    Mar 2, 2012
    Posts:
    400
    hope that here will be link for this ))
     
  45. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,135
    Yep this is correct. The issue is
    *SSR is being applied to both deferred opaque and non deferred opaque objects. This is invalid as SSR needs the GBuffer, so these objects rendered later get weird reflection. The fix needs to be on our side and is: Add an extra camera command buffer event (after g-buffer rendering, but before rendering of forward opaque objects) to the engine. Then convert SSR to use command buffers instead of using OnRenderImage. We'll get this done over the next few weeks (engine changes take a little longer than image effect changes).

    *AO - Currently uses the GBuffer if available. the GBuffer does not have the non deferred opaque objects. So we need to not assume the GBuffer is present. You can quickly fix this by changing the function in AO 'IsGbufferAvailable' or whatever it is called to return false. We'll fix this quicker as it's just on the image effect.
     
    n00body and Paulohmm like this.
  46. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,401
    is everyone getting spammed by Histrogram error?
    i'm getting it in 5.4 beta 14
    Code (csharp):
    1.  
    2. Kernel 'KHistogramGather' not found
    3. UnityEngine.ComputeShader:FindKernel(String)
    4. UnityStandardAssets.CinematicEffects.TonemappingColorGradingEditor:UpdateHistogram(RenderTexture, Rect, HistogramMode) (at Assets/Standard Assets/Effects/CinematicEffects(BETA)/TonemappingColorGrading/Editor/TonemappingColorGradingEditor.cs:468)
    5. UnityStandardAssets.CinematicEffects.TonemappingColorGradingEditor:OnFrameEnd(RenderTexture) (at Assets/Standard Assets/Effects/CinematicEffects(BETA)/TonemappingColorGrading/Editor/TonemappingColorGradingEditor.cs:449)
    6. UnityStandardAssets.CinematicEffects.TonemappingColorGrading:OnRenderImage(RenderTexture, RenderTexture) (at Assets/Standard Assets/Effects/CinematicEffects(BETA)/TonemappingColorGrading/TonemappingColorGrading.cs:1009)
    7.  
    8. UnityException: FindKernel failed
    9. UnityStandardAssets.CinematicEffects.TonemappingColorGradingEditor.UpdateHistogram (UnityEngine.RenderTexture source, Rect rect, HistogramMode mode) (at Assets/Standard Assets/Effects/CinematicEffects(BETA)/TonemappingColorGrading/Editor/TonemappingColorGradingEditor.cs:468)
    10. UnityStandardAssets.CinematicEffects.TonemappingColorGradingEditor.OnFrameEnd (UnityEngine.RenderTexture source) (at Assets/Standard Assets/Effects/CinematicEffects(BETA)/TonemappingColorGrading/Editor/TonemappingColorGradingEditor.cs:449)
    11. UnityStandardAssets.CinematicEffects.TonemappingColorGrading.OnRenderImage (UnityEngine.RenderTexture source, UnityEngine.RenderTexture destination) (at Assets/Standard Assets/Effects/CinematicEffects(BETA)/TonemappingColorGrading/TonemappingColorGrading.cs:1009)
    12.  
     
  47. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,168
    I´ve got wrong results with Cinematic DepthOfField and old tree shaders (SoftOcclusionLeaves and SoftOcclusionBark):



    Will this be fixed?
     
  48. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    3,995
    That needs to be fixed in the tree shader I think. Unless it can be made to write to the depth buffer I don't think it's possible to fix that.
     
  49. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,168
    OK - however - a fix would be nice since a lot of users use the old tree system (due to the uncomplete Speedtree integration).
     
    Last edited: Apr 20, 2016
  50. reddotgames

    reddotgames

    Joined:
    Apr 5, 2011
    Posts:
    669
    Thanks! Already tested changing IsGbufferAvailable to false and AO is working great now! Cant wait for SSR fix.
     
unityunity