Search Unity

[RELEASED] Cinematic URP Post-Processing - The Power To Create

Discussion in 'Assets and Asset Store' started by GoGoGadget, Apr 15, 2021.

  1. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Thanks for the info, I've added it to my notes. Will DM you!
     
  2. Frojo

    Frojo

    Joined:
    Jan 24, 2015
    Posts:
    9
    Hey GoGoGadget,

    I just purchased your plugin to finally get some sunshafts etc in my URP project, but the scripts failed to compile so I never got to experience the magnificent godrays :( (Unity asked me if I wanted to upgrade the scripts when I had imported the package)

    Is 2021.2.1f1 not supported yet or what could be causing this? Double checked the guide and think I've done everything correctly.
     
  3. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    I have been using CUPP on 2021.2 (developing a motion blur effect, actually!) without issue - what scripts are you seeing as failing to compile? I can take a look
     
  4. JudahMantell

    JudahMantell

    Joined:
    Feb 28, 2017
    Posts:
    476
    Excited for the motion blur! My 2021.1 project crashes whenever I try to use it in 2021.2-- not a cupp issue though :(

    My goal is to use Post-processing to replicate the physical properties of an HDRP camera (aperture, ISO, etc) but in URP, so I'm super excited to see the way cupp is evolving :)
     
    GoGoGadget likes this.
  5. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864


    Quick tease of the (very WIP) Motion Blur for CUPP + Unity 2021.2! Still plenty of work to do on it but as a proof of concept it's looking great.

    Also, worth noting, in 2021.2, Unity has completely changed up the way post-processing blits to color/camera targets work (without notice/proper documentation, of course) so bear with me as I work through a new version.
     
    PutridEx likes this.
  6. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    677
    Would that explain why I'm not able to see any effects in 2021.2.3 in a blank project regardless of what I set any parameter too? Just want to be sure I'm not missing something completely, I have them all added to the renderer and am using the included demo scene. I'm trying to download 2020 to verify but my internet is not cooperating and keeps failing the download :(

    Edit: I was able to get 2020 to download and I am seeing the effects there, so I'm guessing that is broken because of Unity in 2021.
     
    Last edited: Nov 25, 2021
  7. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Unfortunately yes, that would explain it. If Unity would document this breaking change properly somewhere ahead of time, then it would've been easy to support on the actual launch of 2021.2, but my hands are tied playing catch-up (as per usual) with Unity SRPs. Amazing to think that we had a perfectly stable (and no less performant) post-processing system for 4+ years with OG post-processing, and now Unity manage to break it every second update :(

    Not to worry though, the update/fix is in the pipeline, aiming to push it to the Asset Store no later than this weekend, along with some Mac/Metal API fixes :)
     
    Acissathar likes this.
  8. Acissathar

    Acissathar

    Joined:
    Jun 24, 2011
    Posts:
    677
    No worries, and that hidden update frustration seems to unfortunately be something that is becoming commonplace. I'm not in any rush I just wanted to be sure I wasn't missing something from the setup, so I will hold tight :)
     
    GoGoGadget likes this.
  9. tarasrng

    tarasrng

    Joined:
    May 18, 2017
    Posts:
    11
    Hey, cool asset! The main reason to buy it for me is the fact that unity's URP post-processing is not so good on low/middle mobile devices. From the performance results you've posted, there is not much difference for a PC, but it could be different for low-level mobiles. Is it possible to do some measurements in this area? Would love to buy it, but currently not sure if the asset really solves the performance issues I have.
    I'm specifically interested in Shadows/Midtones/Highlights and Vignette. Also, I will most likely need Chromatic aberration, Lens Distortion, and Color adjustments. I think I'm not the only one who is thinking about post-processing performance on low/mid-end mobile phones, so it will be helpful for others as well.
     
    GoGoGadget likes this.
  10. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Thanks, and it is definitely possible to do some mobile benchmarks - I will add those to the list of things to get done by the new year.

    I will say though - I only have one mobile (and a VR headset now, which is exciting) - so even when those benchmarks are done (and they should give a rough idea), I wouldn't want to make a false guarantee that they'd be representative of all mobile performance. So I'd certainly recommend if performance is critical to you and you know/have the devices that you want to run faster - pick up CUPP and let me know - my messages are always open for people who own CUPP and want performance advice for their particular use case. The more real-world users I can get on different devices, the more data the prouct will have for future optimizations.
     
  11. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    FYI to all, a new CUPP update is now live in the store, with new support for Metal API on macs & iOS!
     
  12. ZhavShaw

    ZhavShaw

    Joined:
    Aug 12, 2013
    Posts:
    173
    Any word on the 2021.2 fixes?
     
  13. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    They should be out in an update before this weekend.
     
    ZhavShaw likes this.
  14. ZhavShaw

    ZhavShaw

    Joined:
    Aug 12, 2013
    Posts:
    173
    Much thanks! It's so disappointing that Unity breaks from version to version... but I hope all this hogwash is worth it.
     
    GoGoGadget likes this.
  15. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    New version of CUPP for Unity 2021.2 has just been uploaded, pending Asset Store approval! I spent some time fixing up blits which Unity managed to break unintentionally, but in good news, it looks like Unity are finally getting around to unifying their blit APIs between SRPs - once that happens I'll probably have a rewrite of all of CUPP's Blitting systems, but for now it's looking good!

    2021_2_newversion.PNG

    FYI to all, I am away on holiday until December 26, so please bear with me for any delayed support responses during that time!
     
    Justice-V18 and ZhavShaw like this.
  16. ZhavShaw

    ZhavShaw

    Joined:
    Aug 12, 2013
    Posts:
    173
    Screenshot 2021-12-17 143729.png Screenshot 2021-12-17 143718.png
    Not quite sure if I'm doing something wrong here

    EDIT: Upgraded from 2021.2.0 -> 2021.2.7 and it's fine
     
    Last edited: Dec 20, 2021
    GoGoGadget likes this.
  17. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Finally happy with how motion blur (AKA: Long Exposure) is looking in the upcoming new version of CUPP for 2021.2!

    One goal I've wanted to achieve (and have) with CUPP's motion blur is to make it emulate exactly how modern digital cameras see motion blur. Motion blur happens over time - that's why CUPP's motion blur by default has a history buffer of up to 5 frames which it uses only if the exposure time is greater than the time since the last frame was rendered.

    This means it automatically supports higher refresh rate games & displays - if your game is rendering at 240fps, CUPP's motion blur will have much less of a visible impact than if your game, say, on console or mobile, is targeting 30fps or even dipping below that, when motion blur is really needed.

    This also means that you can put videos like this into it, and see the results come out exactly as many "Live-ND" functions of modern cameras & smartphones do long exposures:


    Of course, all game-specific motion blur requirements are there as well. It fully supports natural blurring of challenging objects, such as rotating spheres, and won't cause unnatural blur when an object is moving behind a static object:


    This will be coming to the next Asset Store update, currently targeted for this weekend/end of March.
     
  18. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    The 4.3 Cinematic URP Post Processing update is now live on the Asset Store!

    Featuring a new cinematic long exposure (motion blur) with full URP integration, as well as a number of fixes to 2021.2 blit issues, I'm pretty excited about this release. The backend renderfeature that CUPP uses required a whole host of changes to get it properly production-ready for 2021.2 and beyond, so I ended up rewriting that, and the blit process for a number of effects.

    https://assetstore.unity.com/packag...cts/cinematic-urp-post-processing-cupp-192917
     
    PutridEx and JohnDraisey like this.
  19. Oreka

    Oreka

    Joined:
    May 22, 2014
    Posts:
    5
    Hi, we just updated to 4.3, and we are getting black screen on all renderer frame when any CUPP effect is active in Unity 2021.2.17, I tried to delete and reimport the assets and did all configuration again in the Render Pipeline but same result. Same result in the demo scene.
     
  20. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Just tried to reproduce this on a blank 2021.2 project with no success (all effects work as normal) - any chance you can skip through the frame debugger and see which effect is causing the black screen, and are you on DirectX or Metal/OpenGL?
     
  21. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    A minor update went live today on the asset store - with a workaround to an issue in some 2021.2 configurations where scene view would not display the correct effects from the PRISM.Effects component. Now, there is a toggle on the inspector that lets you disable scene view just for this component.
     
  22. JamesArndt

    JamesArndt

    Joined:
    Dec 1, 2009
    Posts:
    2,932
    We are using Unity 2021.2.18f1 and URP 13.1.7 with the Cinematic URP Post-Processing package. The "Show in Scene View" toggle on the PRISM Effects class object causes the entire scene view to no longer render the scene. Unchecking this toggle, will return the Scene view back to a rendered state.
     
    Last edited: Apr 6, 2022
  23. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Currently a known issue I'm working on, having some issues with the scene view camera not behaving the same as the game view camera at the moment - was an issue that popped up in 2021.2. No current ETA for a fix (will be having another crack at it this weekend), but the workaround for now if you're on 2021.2 is to leave the scene view checkbox unticked.
     
    PutridEx likes this.
  24. ColeChittim

    ColeChittim

    Joined:
    Aug 11, 2011
    Posts:
    59
    Hi just purchased and tried importing CUPP into a project and looks like its causing a black rendering issue? (In game and in scene).
    I've tried DirectX 11 and 12 as well as Vulkan as well as Forward and Deferred Rendering.
    I'm on 2021.2.19f1 (Planning to move to LTS soon)
    Also tried creating a brand new unity project with nothing but URP and CUPP and still have the same issue.
    I've attached a screen of the issue as well as my Renderer asset as perhaps I've set it up wrong.
    Let me know if there is any other info you'd like me to provide. Love what this asset is doing and would love to make it work in my projects =)
     

    Attached Files:

    GoGoGadget likes this.
  25. ColeChittim

    ColeChittim

    Joined:
    Aug 11, 2011
    Posts:
    59
    Tried the same test in 2021.1.28f1 and got a compiler error so was unable to test the package

    Assets\Cinematic URP Post-Processing\Scripts\PRISMLongExposure.cs(66,82): error CS0117: 'ScriptableRenderPassInput' does not contain a definition for 'Motion'
    Looking at the code showed more API incompatibilities but this is the only one that appeared in the console.

    And tried in 2021.3.0f1 (LTS) and was faced with the same black objects. This seemed to be the case using all render passes as well as just trying individual ones. The only ones that seemed to not create this issue immediately were the Prism Filters and Long Exposure render pass. However, when looking at the Volume settings and actually enabling the blur (the filter in this pass) nothing happened to the rendered image.
    Long exposure seemed to work briefly but created black artifacts while moving.
    (This is also the case in 2021.2.19)
     
    Last edited: Apr 19, 2022
  26. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Thanks for raising, I've been able to reproduce on my end - looks like the latest version of URP is causing it. Will be aiming to fix tonight.

    Update: Have found the issue, will be a fix uploaded to the Asset Store before the weekend. DM me if you need it sooner!
     
    Last edited: Apr 20, 2022
    ColeChittim likes this.
  27. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Working on some really exciting improvements to an upcoming version of CUPP, including updated tonemapping and completely reworked shader keyword system (that in turn allows for more flexible settings on some effects).

    Here's a little sneak peek using Sponza + URP 2021.3 LTS:
    CUPP Off

    CUPP On
     
    PutridEx and JohnDraisey like this.
  28. JohnDraisey

    JohnDraisey

    Joined:
    Jul 28, 2013
    Posts:
    19
    Hold up, better motion blur than what Unity provides??
     
    GoGoGadget likes this.
  29. JohnDraisey

    JohnDraisey

    Joined:
    Jul 28, 2013
    Posts:
    19
    Bring it on! Looks like a photo I would have taken on my Sony camera.
     
    GoGoGadget likes this.
  30. JudahMantell

    JudahMantell

    Joined:
    Feb 28, 2017
    Posts:
    476
    This looks great!
    Can you give some more details about what effects are in play here?
    Looks almost like some Indirect/GI lighting going on, but I'm probably wrong there ;)
     
  31. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    For sure! The key thing is baked lighting+GI using the GPU lightmapper on 2021.3.

    The effects I used here in the "after" shot included:
    • Sunshafts
    • Depth of Field
    • CIELab Color Correction
    • Bloom
    • DLAA
    • Barrel Distortion
    • Chromatic Aberration
    • Vignette
    • Grain
    • Dithering
    • Tonemapping
    • LUT Color Correction
    • Sharpening
    The only things different between my internal version here and the asset store version are tonemapping, and a slightly improved noise algorithm on the sunshafts. Everything else is 100% achievable in the current version of CUPP.

    This next big update will take a while (couple of weeks at least) as I am refocusing CUPP to position it as the ultimate high-end post-processing solution for URP.
     
  32. JudahMantell

    JudahMantell

    Joined:
    Feb 28, 2017
    Posts:
    476
    Awesome, thanks for the details!
    Can't wait to mess around with it some more.

    I was super excited because I'm in search of a functionling realtime GI solution for URP (there aren't any!) and thought that the image was showing one off :p
     
    GoGoGadget likes this.
  33. spikezart

    spikezart

    Joined:
    Oct 28, 2021
    Posts:
    72
    Hi, do you have any documentation describing the effects? e.g. Filmic Noise.

    Thanks
     
  34. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    spikezart likes this.
  35. spikezart

    spikezart

    Joined:
    Oct 28, 2021
    Posts:
    72
    Thank you. Im not sure if its the effect I'm searching for actually. I'm looking for something that creates the effect of old film cinecam from the 50's ish.


     
    GoGoGadget likes this.
  36. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Ah, what you'll be looking for is a "dust and scratches" effect, which CUPP doesn't have by default. Hope that helps to narrow down your search! Essentially, it's just an animated 4-5 frames of precomputed or runtime-generated dust & scratches that get overlaid on the scene.
     
  37. JudahMantell

    JudahMantell

    Joined:
    Feb 28, 2017
    Posts:
    476
    Is there a way to exclude certain layers from the motion blur?
    I am trying to essentially add a "layer" to the camera, kinda like a watermark. I'm doing this with a Camera-Space Canvas and it looks pretty solid, but using the default Unity Motion Blur blurs the canvas as well.
    I was hoping that if I switch to CUPP's Long Exposure then I'd be able to do this?
    Thanks!
     
  38. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Yep, just render that layer after post-processing (ie. as a UI camera). That should work for both Unity's MoBlur and CUPP's long exposure. By default Post-Processing will always affect the whole screen that it 'sees', so the answer to "how do I avoid effect x on y object(s)" is always "render it after everything".
     
    JudahMantell likes this.
  39. TenklabsEmil

    TenklabsEmil

    Joined:
    Oct 31, 2018
    Posts:
    5
    I have been trying to find a LUT for URP that mimics the ACES RRT, since the tone mapping profile included with unity is just trash, and not representative of ACES.

    Alas I have yet to find one, perhaps anybody here knows how I could make one.
     
  40. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Thanks for the reminder. CUPP's next update (a major one) actually updates this and brings CUPP's tonemapping much closer to traditional ACES (but with some tweaks, as ACES is designed for digital camera sensors, and IMO a bit overrated for games).

    Otherwise, you can use the "Neutral" LUT that comes with CUPP, export it to your video editing software, apply whatever your preferred ACES LUT is, then just re-export as a png with the same dimensions. I know some software like Kdenlive can do this.
     
    PutridEx likes this.
  41. Marseol

    Marseol

    Joined:
    Jan 16, 2022
    Posts:
    10
    Hi! I'm finding a problem, it does not seem to detect motion vector although the "DethtextureMode" seems to be active, I miss something? Unity 2021.3.6f1
     

    Attached Files:

  42. PutridEx

    PutridEx

    Joined:
    Feb 3, 2021
    Posts:
    1,136
    Are you sure that URP asset is the one your project is using? Go to quality and check what URP asset you're actively using, then enable depth texture in the active one

    (or just enable it in all URP assets to see if it fixes the issue)
     
    GoGoGadget likes this.
  43. Marseol

    Marseol

    Joined:
    Jan 16, 2022
    Posts:
    10
    Yes, I had assured me was the only URP asset by eliminating the unused ones. But now by restarting Unity there is no longer that "Worning", although I also go to deactivate the Depthtexture,
    maybe unity had a meltdown ... But now I don't know if Motion Vectors are actually enabled and if I am having the most optimal result of the motion blur. I will do other tests, however thanks for the reply
     
  44. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Hey Marseol,
    The next version of CUPP has a Motion Vectors test scene in it, so hopefully this should help troubleshoot in the future.
    In the meantime, restarting Unity usually fixes this bug, but I have included a fix in the next version of CUPP that should prevent this from occurring, which is, lines 110+111 of PRISMSunshafts.cs get changed to:
    Code (CSharp):
    1.         m_Camera.depthTextureMode// = DepthTextureMode.MotionVectors;
    2.         |= DepthTextureMode.Depth;
     
    Marseol likes this.
  45. Marseol

    Marseol

    Joined:
    Jan 16, 2022
    Posts:
    10
    Hei, I see that with the LongExposure, the more the Exposure Time is increased, the more generated than the flicker to the transparent gameobjects and postprocess effects such as HBAO. Is there a solution? I also saw a 20fps loss when it is active. I hope there can be improvements, maybe parameters to regulate their quality. Anyway congratulations for this package!
     
    Last edited: Jul 16, 2022
  46. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Thanks! On the topic of Long Exposure, what device are you testing on that's seeing that 20fps loss? I can try and do some more optimization, although that loss may be caused by Unity itself, rendering the motion vector buffer, particularly on mobile devices it will hurt.

    Re: Transparent objects, do you mind sending through an example of the issue you're seeing? Just tried a (very simple) repro scene on my end but everything seems to be working properly. If you are using custom transparency shaders, that could be the cause, as most on the Asset Store/elsewhere have not been updated to write to the URP motion vector buffer correctly yet.

    Gif of the transparents test scene, red = transparent.
     
  47. Marseol

    Marseol

    Joined:
    Jan 16, 2022
    Posts:
    10
    I'm currently testing on pc with GTX970. Maybe the drop in FPS and the problem of transpirence are connected. Here is the problem that I find, only the enabled Long Exposure, Exposure Time and Intensity to the maximum, transparent lit material. Unity 2021.3.6f1 URP 12.1.7
     
    Last edited: Jul 18, 2022
  48. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Thanks, that flickering definitely shouldn't happen, and you're right that the issue is probably linked. I'll try a repro case (I'm on an AMD GPU, so could be a driver issue) and tweak a few things in the next update either way, which will be coming in a week.
     
    Marseol and PutridEx like this.
  49. Felinde

    Felinde

    Joined:
    Sep 19, 2021
    Posts:
    18
    Hi, is it compatible on webgl?
     
  50. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Hi! WebGL is not officially supported. CUPP's core effects compile for gles2.0, but the rest of the package does not (ie. long exposure, due to it requiring Unity's motion vectors, which are not supported by default in WebGL AFAIK.) So unless you have a solid knowledge of shaders and are willing to maintain your own subversion, I would not recommend CUPP for WebGL.
     
    Felinde likes this.