Search Unity

Cinematic Image Effects (Pre Release) package

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

  1. pleribus77

    pleribus77

    Joined:
    Jul 9, 2013
    Posts:
    36
    I've just received delivery of my Vive headset and immediately noted that the SSR effect is broken when rendering with the Vive. It's all warped and different per eye, so really jarring.

    Oculus DK2 worked fine. Can anyone shed light on what might be breaking here?

    Not using Single Pass Stereo Rendering or Graphic Jobs optimizations (as they are known to be incompatible with current camera effects)
     
  2. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    It's currently not expected to work single pass (so it's good you are not using that). Are you using normal unity rendering of the valve plugin? Which version of ssr are you using?
     
  3. jbakirli

    jbakirli

    Joined:
    Dec 31, 2015
    Posts:
    10
    How can i ignore AO for my normal maps? off.PNG on.PNG
     
  4. Arkhham

    Arkhham

    Joined:
    May 7, 2016
    Posts:
    167
    Hello, i was just wondering... Since these are Pre-release Image Effects, am i allowed to include them in my asset-store project?
    I hope that's not a stupid question!;)
     
  5. pleribus77

    pleribus77

    Joined:
    Jul 9, 2013
    Posts:
    36
    Using native OpenVR along with SteamVR asset and Cinematic Effects (Beta) SSR - each eye displaying something very different.

    I did a little more digging through the release notes and came across:

    VR: Native OpenVR support added
    • Note that native OpenVR support renders with an off-center asymmetric projection matrix. This means that any shaders which relied on fov / aspect may not work correctly.
    If I was to switch back to using only SteamVR plugin, would this help? Any advice on how to do in 5.4 beta given it's now native through OpenVR?
     
  6. pleribus77

    pleribus77

    Joined:
    Jul 9, 2013
    Posts:
    36
    It appears downgrading to Unity 5.3.4p1 and using SteamVR instead of OpenVR allows us to use SSR again (which is key for our project)

    Can anyone shed light on why OpenVR differs to SteamVR implementation (assuming at this point that SteamVR does not use an off-center asymmertic projection matrix, or whatever is causing this to break)?

    This will be a problem going forward obviously, is there anything on the roadmap to support VR with these effects (particularly the Vive).

    I read that support won't make it for 5.4 and single-pass VR rendering (and understand the implications single-pass has to all camera effects), but what of support for non single-pass VR that need to make use of such effects?
     
  7. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    I'm not an expert on VR, but my guess is that because of the projection matrix not being symmetrical any effects that use the depth buffer to reconstruct depth will break. So work there will need to be done to figure out if / how that is possible.

    I just reviewed a bunch of changes from the VR team yesterday. They are dropping in support for single-pass vr rendering for most (not all, at least in the changes I saw) image effects for 5.4. After that is done they are going to help us with the cinematic effects. The reason it's in that order is that the standard assets ship with unity (tied to the release), whereas we ship on bitbucket and are not tied to the release. The cinematic effects that make sense for VR we will get working there, but it may not line up exactly with the 5.4 release. Don't worry though you won't have to wait for 5.5 :)
     
    m4d likes this.
  8. pleribus77

    pleribus77

    Joined:
    Jul 9, 2013
    Posts:
    36
    Thanks very much for following up on this. SSR is probably the most important one for a particular application / industry of VR that we are targeting here.

    Do you know if it's even possible to correct the depth buffer after an off center asymmetric projection matrix?

    Just trying to set expectations at this end.

    We have a prototype launching end of June, where we can continue targeting 5.3, but just want to be confident with recommendations going forward.
     
  9. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    3,527
    The bloom is showing black boxes on apple tv 4, probably related to this
    • Clamping of HDR result, leading to broken bloom

    Edit: only when high quality is off
    Apple tv does not have so much power for the high quality mode ..
     
    Last edited: May 28, 2016
  10. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    Yep
     
  11. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    Well everything is possible, it's more about if its practical and makes sense for us. What makes sense in general is supporting the features and the way unity works. So normal rendering, two eye rendering vr, and single pass stereo, these make sense. If one of our native rendering techniques requires asymmetrical projection then we should support it. If it's a third party plugin... We are probably less likely to support it.
     
  12. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Latest SSR in 5.4 B19 if the SSR quality are set to Low i'm getting pixelated screen
     
  13. DxStd_IgnatPribylov

    DxStd_IgnatPribylov

    Joined:
    Sep 24, 2015
    Posts:
    30
  14. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    Yeah, we discovered this on friday. It will be fixed in the coming week.
     
  15. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    Alright cool, btw what happen with resolve resolution option? why it's removed? that was usefull
     
  16. argosy_ops

    argosy_ops

    Joined:
    Dec 27, 2012
    Posts:
    49
    I have a question about the new SMAA implementation. We're working on a VR project where one would usually recommend MSAA for the smoothest anti-aliasing, which becomes a lot more visible in VR anyways. For a variety of reasons, the forward renderer is too limiting for our use case, so we've been experimenting with SMAA. As you can see in the comparison below, it does a job comparable to MSAA on the blue surface. The red line however is still pretty jagged, which is very visible in VR. This particular surface is self-illuminated with HDR values to produce some over-exposure in combination with the bloom filter that I've turned off for this comparison. As long as I keep the emission value low, it looks good. But especially within the HDR range, the edges become very jagged.

    Any suggestions on this?
    AA.png
     
  17. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    Reanimate_L likes this.
  18. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    Hi. Would you be able to log a bug here with that scene. We need to tonemap -> inverse tonemap each pixel when doing AA as it only works properly in that space (theory at least). Just want your scene so I can really make sure this is your issue and we fix it.
    https://bitbucket.org/Unity-Technologies/cinematic-image-effects/issues?status=new&status=open
     
  19. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    You should be able to use that already. It will make it's way into the package soon ;)
     
  20. eros-dadoli

    eros-dadoli

    Joined:
    Oct 17, 2015
    Posts:
    8
    scene i've created with lighting setup, level design and image effects setup with the new cinematic image effects package and other.



    Hope you enjoy
     
    Teejay5 likes this.
  21. Teejay5

    Teejay5

    Joined:
    Feb 26, 2010
    Posts:
    106
    @Tim C @willgoldstone
    Hi there! I was wondering if you guys had any ideas why our color grading looks drastically different when built, as opposed to when it's in the editor?
    Here are two screenshots:

    This is how the game looks in the editor, and on the right are the settings.


    This is how the game looks once built for Mac.
    Both screenshots are using the same LUT and settings, and are under similar lighting conditions. But the colors are way more saturated and blown out in the build.

    Here are the import settings for the LUT:
     
  22. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    You may also find that SMAA does a comparable job to MSAA on some edges in still screenshots, but in VR feel like it's still jagged. The reason is temporal aliasing is far more apparent in VR than the local pixel aliasing alone. Temporal SMAA or other temporal AA techniques can help with this, but the base SMAA can't and is the reason why MSAA is so preferred for VR.

    I would personally love to see a proper HDR MSAA implementation for the forward renderer. The same work on getting an inverse tonemapper could be applied to a custom MSAA resolve pass. It's something people have been doing for nearly a decade now to support both HDR and MSAA in forward.
    http://www.humus.name/index.php?page=3D&ID=77
     
  23. Chman

    Chman

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    721
    Hello,

    I can't reproduce this bug using the latest version of the cinematic effects. Looking at your settings, it seems like you're using an old version (probably the one from the Asset Store ? We need to update it...). Could you grab the latest one here and let me know if it works any better ?

    Also, I can see you're using Eye Adaptation, it will influence the comparison as it makes the exposure dynamic so you'll want to disable it temporarily to make sure the Lut is applied correctly.
     
    Teejay5 likes this.
  24. Tiny-Man

    Tiny-Man

    Joined:
    Mar 22, 2014
    Posts:
    482
    Is it possible to make the ssr ignore a layer? I dont wan't my first person objects to have ssr.
     
  25. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    Not currently as we don't have a way to mark them in the deferred buffer for this. We have some promising internal tech that will make this easier going forward, but it's not available yet :(

    Normally in a first person game you render the first person objects with a different camera. This is so that you can clear the depth buffer before rendering and make it so the 'gun' or whatever you have will not clip into walls or other scene geometry. If you go down this road you can decide to not have SSR on this second camera.
     
  26. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    Hi all. We have a new version of our prototype Temporal AA available on a branch on the bitbucket repository here:
    https://bitbucket.org/Unity-Technologies/cinematic-image-effects/src/e280d3d7d497?at=taa

    As a note, this code hasn't really been tested on a wide variety gfx devices yet, it's still in prerelease and may be really broken on some platforms.

    You will need to wait until the next beta of 5.4 for this to work as we have added a small api to the engine in the camera (to assist with frustum jitter). Here is a little video of the corridor showing how it looks on / off (I toggle a few times).

     
    Invertex, movra, AcidArrow and 2 others like this.
  27. Vagabond_

    Vagabond_

    Joined:
    Aug 26, 2014
    Posts:
    1,148
    just downloaded image effects and tested on 5.4 b21, it gives me this error...

    Assets/Standard Assets/Effects/CinematicEffects(ALPHA)/TemporalAntiAliasing/TemporalAntiAliasing.cs(159,17): error CS1061: Type `UnityEngine.Camera' does not contain a definition for `nonJitteredProjectionMatrix' and no extension method `nonJitteredProjectionMatrix' of type `UnityEngine.Camera' could be found (are you missing a using directive or an assembly reference?)

    EDIT: DOES IT NEED b22 in order to work properly ?
     
  28. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    Yep B22. B21 was already out when I posted that I should have been more specific.
     
    Vagabond_ likes this.
  29. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Looks mint Tim. I'm guessing at this point you're going to throw motion blur in and then merge them into some sort of optimised thing with as few passes as possible? Whats the next step? :)
     
    Chman, GoGoGadget and chiapet1021 like this.
  30. elbows

    elbows

    Joined:
    Nov 28, 2009
    Posts:
    2,502
    Im guessing they aren't ready to do that yet.
     
  31. CG_Echtzeitschmiede

    CG_Echtzeitschmiede

    Joined:
    Feb 19, 2015
    Posts:
    93
    I'm loving this new depth of field effect, it works wonderfully!
    Is there a way yet to access its values through scripting? When I access the DepthOfField component in a script, it's listing the values of the old component, not of the new one.

    Edit: Nevermind, I just had to use the namespace CinematicEffects rather than ImageEffects, it's all good!
     
    Last edited: Jun 11, 2016
  32. Tiny-Man

    Tiny-Man

    Joined:
    Mar 22, 2014
    Posts:
    482
    We would like to render the weapon in one camera to not overcomplicate the setup. Is it possible to modify a shader to prevent it being affected by ssr? thanks.
     
  33. Tim-C

    Tim-C

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    2,225
    If it's in the transparent queue or forward opaque it won't be affected by SSR (and AO also). SSR renders before these render.
     
  34. rsodre

    rsodre

    Joined:
    May 9, 2012
    Posts:
    229
    Hi!

    I'm getting started with this pack (nice stuff!), and want to make some things clear about SSR

    1) I understand we don't need reflection probes anymore, right?
    2) Is it already compatible with iOS? Android? If not, will it be?
    3) What's the minimum requirements and steps to setup?

    I can't get them to work. I'm just adding it to my main camera, deferred path, tried on iOS/Android/Desktop, and no reflections. Only when I turn on the probes, but then the probes do the job, I see no difference. I'm on Unity 5.3.5f1.
     
  35. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I'm pretty sure you will still need them or you get no offscreen reflection.
     
  36. Teejay5

    Teejay5

    Joined:
    Feb 26, 2010
    Posts:
    106
    Hi there, yes I was using the asset store version, thanks for linking me to the BitBucket page! So I imported the newer version and got it set up, and it appears to be worse;
    Here is how it looks in the editor:


    And here's how it looks in the build, same lighting conditions, same LUT.


    This is still with Eye Adaptation enabled, but even in the darkest situations, the game never looks like that in the editor. I tried multiple import settings and they all still make it look bad, any ideas? @Chman
     
  37. Chman

    Chman

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    721
    What happens if you disable Eye Adaptation ? Because looking at your screenshots we can clearly see that they're both exposed differently, so it's hard to see what's going on exactly with the Lut.

    While I'm at it, are you working in gamma or linear space ?
     
  38. Hliouxas

    Hliouxas

    Joined:
    Nov 10, 2014
    Posts:
    15
    Guys i've imported this package on my project but when i try implementing antialiasing i get this message Missing shader for image effect Main Camera (UnityStandardAssets.CinematicEffects.AntiAliasing) i've imported it normaly from the asset store , any clues?
     
  39. Teejay5

    Teejay5

    Joined:
    Feb 26, 2010
    Posts:
    106
    Oh huh apparently we were working in gamma space, I switched it to linear space and things look different; the eye adaptation and bloom behaves differently! But I still noticed color differences even with Eye Adaptation and Tonemapping disabled; the only thing enabled is LUT, with the contribution at 1.
    Here is the editor:

    Here is the build:
    and here is the LUT:


    and for even more clarity, here are the natural colors:


    the LUT was exported from the built-in "Export to PNG" button
     
  40. Chman

    Chman

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    721
    Interesting, thanks. I'm curious, do you actually use the exported LUT or did you only export it for this thread ? If you do use it in your normal game, note that you don't have to. You can simply do your color grading in the inspector, the game will automatically build an internal LUT and apply it. The "export" button is only there per user request as it's not needed at all, and I wonder if it could be something wrong with the exported LUT instead of the internal one...

    Anyway, I'll run some tests !
     
  41. ivank

    ivank

    Joined:
    Nov 16, 2013
    Posts:
    105
    Hello, sorry for maybe already discussed issue, but - it would seem useful - at least to me as a "poor consumer":) - to put - somewhere to place easy to find - clear information about under which conditions is each effect supposed to work?
    Such as to bitbucket "Readme" and Asset Store description?
    It means - for example: AmbientOcclusion: deffered rendering only, not on mobile, not on WebGL... etc?

    Beside that, of course thanks for your effort, and looking forward to see finally a great-looking AO in my nicely antialiased image... :)
     
  42. Tinovdk

    Tinovdk

    Joined:
    Nov 28, 2013
    Posts:
    83
    Hi!

    When using the Ambient Occlusion post effect on Xbox One it seems to triple the performance when standing close by and looking to a wall. The GPU cost goes from ~10ms to ~34ms just by walking up to a wall.

    Here is a demonstration video in a simple scene captured from the Xbox One:


    Here is a before and after of the profiler when walking up to a wall.

    Before
    2016-06-21_17-03-27.png

    After

    2016-06-21_17-03-35.png

    Any idea why this happens?
     
  43. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    It's a quirk of all AO implementations. Some fare better than others, due to samples I guess. You're much better off baking it.
     
    Tinovdk likes this.
  44. Chman

    Chman

    Unity Technologies

    Joined:
    Feb 6, 2010
    Posts:
    721
    Here's a copy/paste from a post I made a while ago about this :
    Hope this makes sense !

    There are ways to alleviate this issue, by reducing the number of samples and downscaling the AO pass you should see a nice performance boost. I was running some benchmarks on PS4 earlier and generally speaking using a low number of samples without downscaling (especially with Ambient Only in Deferred) is good enough for most cases and is way faster than going for the overkill High preset.
     
    Tinovdk likes this.
  45. bgolus

    bgolus

    Joined:
    Dec 7, 2012
    Posts:
    12,352
    Also should be noted a lot of older SSAO implementations didn't suffer from this because they were doing SSAO wrong by using a fixed screen space radius which caused over-occlusion on things in the distance (which was usually handled by fading out distant AO).

    An alternative to reducing the sample count is the AO implementation can use a screen space radius clamp. The original Scalable Ambient Obscurance, what Unity's Screen Space Ambient Obscurance is based on, handled this by generating a mip map chain for the depth and using lower mips when the radius got larger for better cache coherency.
     
  46. Tinovdk

    Tinovdk

    Joined:
    Nov 28, 2013
    Posts:
    83
    Thanks everyone for all the insight! Glad to know this is a side effect and not a bug. :)
     
  47. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    What do you guys think about this as a replacement for AO in general?

    - bake AO into textures for env and characters
    - use spherical harmonic style soft shadows where dynamic object meets env

    I mean this is faster and generally looks pretty much the same up to a point. We can still make it react to light. Why isn't this the first solution? AO seems to me a lazy man's solution with only a small quality gain for a loss of a lot of performance.
     
    AcidArrow and nxrighthere like this.
  48. Teejay5

    Teejay5

    Joined:
    Feb 26, 2010
    Posts:
    106
    Ah yes, we actually were using the exported LUT in the game. Since my last post, we tried setting the color grading in the scene, but after making a build, we got the same result; The build looked different from the editor.

    Also note that we're changing values in the component via code after the scene loads; we thought this could have something to do with the problem but HOWEVER, we tried this: We made a new blank test project, and ONLY imported the Color Grading and Tonemapping component. We built the game, and boom, the editor and the build looked exactly the same.
    THEN, in the test project, we tried changing the values of the component via code, and it worked just fine, looked the same in the editor and in the built.

    SO that leads me to believe that something in our big project is interfering with the Tonemapping and Color Grading component......but I have no idea as to what....Both projects are in forward rendering, gamma color space, and are using HDR, same quality settings and everything, I'm quite confused.

    Are the cinematic image effects only supposed to work in Deferred rendering? We're using Forward.
     
    Last edited: Jun 22, 2016
  49. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Have mobile fixes been pushed yet? Im curious if effects work on mobile devices.. Is there a test scene Unity can send me to check on various physical devices I own. Feel mobile not been covered fully here.. Cheers
     
  50. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I think grarding works as far as I can tell, I'm not sure all of the effects will work on a mobile though, in particular SSRR might not work on most phones as it is deferred only, so depends on if the mobile supports deferred... imagine similar story for the AO.
     
    MrEsquire likes this.