Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

PRISM - Realistic All-In-One Post-Processing for Unity

Discussion in 'Assets and Asset Store' started by GoGoGadget, Dec 12, 2015.

  1. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    Just FYI - game was released today and we've had to pull it from the store. Now seeing this issue for ALL users that have either an iPhone 7 or 7 Plus. Will keep you posted as I troubleshoot in case it is something with PRISM.

    Another screenshot:
     
  2. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    Confirming - this is definitely a problem with PRISM's Bloom when running specifically on iPhone 7/7+.

    * Updated to the latest PRISM from the store. The blobs still appear but are now white, not black.
    * Changed from Simple to HDR on Bloom settings, the problem becomes much more pronounced.
    * Turned off Bloom, left other effects on, everything works fine.
     
  3. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Looking into it now - don't have an iPhone 7/7+ to test it on, I guess that's why the issue hasn't been spotted before as well.

    Edit: PMed you for some more details
     
  4. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    Thanks as always for the super-quick support. Will work through your suggestions.
     
  5. Gametyme

    Gametyme

    Joined:
    May 7, 2014
    Posts:
    618
    I just checked my game on both a iphone7 and iphone7 plus. No issues with bloom. I am running linear deferred.
     
  6. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    Are you ONLY using Bloom? I wonder if the issue might be a combination of Bloom and some other effect - i.e. the Bloom issue is only there if you've also got certain other effect(s).

    Anyway, I'll be experimenting over the weekend to try to narrow down the exact issue on my game.
     
  7. Gametyme

    Gametyme

    Joined:
    May 7, 2014
    Posts:
    618
    Bloom, fog, vignette, color correction and color enhance. Are you using gamma color space?
     
  8. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    No, Linear.
     
    GoGoGadget likes this.
  9. ZoneOfTanks

    ZoneOfTanks

    Joined:
    Aug 10, 2014
    Posts:
    128
  10. Gametyme

    Gametyme

    Joined:
    May 7, 2014
    Posts:
    618
    Yes.
     
    GoGoGadget likes this.
  11. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    PRISM 2.1 has now been submitted to the Asset Store, pending review! As always, patchnotes can be found here.
    Main changes:
    • PRISM Volumes added (Sphere and Box volumes)
    • Few small optimizations
    • Build bugfixes for some tonemapping/flares options
    • Bugfix for really weird iOS 7.0 bloom issue that only occurred sometimes
    • PS4 compilation fixes
     
    gurayg likes this.
  12. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Did you get that other Wii U fix in there?
     
  13. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Yep! Forgot to add it into the patchnotes, but the conditional defines for WiiU are in there now.
     
    magique likes this.
  14. shamsfk

    shamsfk

    Joined:
    Nov 21, 2014
    Posts:
    307
    Hi! It isn't out yet? Just checked store, no 2.1 up to this point.
     
  15. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Still pending review, I've heard recently the Asset Store have been a bit slow to review stuff, will update the thread once it's up!
     
  16. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    This feature is very nice!

    I currently do lerping of individual PRISM values by code (based on distance reached in game, or based on some triggers). I didn't use the LerpToPreset because I have my dataset of values to change that includes also other things as ambient light, directional light, other shaders vars, etc... (and also because I implemented this long time ago, before to switch to PRISM).

    Now just an idea:
    with this new volume-based feature that manages ranges and tether, could be interesting to use Prism as the main controller of the lerping. But to do this I'd need an event to be raised for every new lerping value between 0 and 1 so that I could also change my other values accordingly with prism.
    It could be a Unity event or just an Action<float> to be set. Whatever you prefer.
    Probably could also be needed an identifier of the PRISM preset (could be a simple string) to be passed with the event, so that I could associate it to additional settings.
    More volumes could reuse the same preset, so the ID should be associate to a PRISM preset instead of a specific volume instance. As a different preset could be assigned by mistake to a volume and the id (and so my custom settings) will no match anymore.

    Also, I didn't check the list of volumes you added, but just in case, some useful ones could be:
    • an infinite plane (defined by a custom axis and an offset), so that would be easier, for example, to switch between underwater and overwater.
    • a box for rooms or also very large outdoor areas. For optimization reasons an axis aligned box could also be enough.
     
    GoGoGadget likes this.
  17. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    It's out now.
     
    GoGoGadget likes this.
  18. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    That event callback is a great idea - I can see myself using that exact type of thing in my game too! Will put it on the TODO list for a future update. Right now there is a way to differentiate the "Control" preset (used on your main camera) with any other preset, just not uniquely identify each one.

    For the volumes:
    1. What would the scenarios be where you'd want to use this instead of just a big box at water level that goes down to the bottom of your scene?
    2. Box-shaped volume is in. It is indeed axis-aligned.
     
  19. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    Cool! :)
    The plane has the advantage to be infinite.
    In our game there isn't a fixed length of the road, and the player could be able to drive for thousands of meters. So I thought would be safer and also more efficient to have a plane. But for sure a super huge box would make the job too.
     
    GoGoGadget likes this.
  20. Migueljb

    Migueljb

    Joined:
    Feb 27, 2008
    Posts:
    562
    Not sure if this question has been asked or where in this thread. How does Prism run in VR either using the Vive or Oculus? Any help or pointing to how it runs and any type of problems encountered would be great.

    -Miguel
     
  21. LordMortis

    LordMortis

    Joined:
    Jan 25, 2014
    Posts:
    26
    We were doing some prelimiary tests on it when we ran into a PS4 problem. Will be trying it more extensively in the next day or so as it looks like that bug is fixed!

     
    GoGoGadget likes this.
  22. Elecman

    Elecman

    Joined:
    May 5, 2011
    Posts:
    1,369
    Does Prism work with single pass VR rendering?

    Also, what is the difference (sharpening wise) between Beautify and Prism?
     
    Last edited: Mar 9, 2017
  23. doq

    doq

    Joined:
    Aug 17, 2015
    Posts:
    121
    Anyone know why my God Rays aren't respecting the Directional Light direction? The Ray Caster is set to the Directional Light Transform.

    http://imgur.com/a/oYqkQ
     
  24. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    I noticed this same problem with my new project. I am using RFPS and I was beginning to think it had to do with that, but maybe it's just a PRISM bug.
     
  25. scheichs

    scheichs

    Joined:
    Sep 7, 2013
    Posts:
    77
    I don't think GodRays work with a custom direction. In principle it is a masked radial blur filter that takes the 2D projected position of the transform as the center.
     
  26. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    What custom direction? It's supposed to work off the light's direction.
     
  27. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    I personally don't have Beautify so can't comment on that, but PRISM's sharpen is a very stable, very safe, easy to use sharpen (only 1 parameter needed - intensity, vs Beautify's which from what I understand is complex). It's the sort of sharpen that you turn on once, and never turn off because it works in just about every scene.

    Currently I don't have a VR device to do an actual HMD test on, but if you run into issues with PRISM in VR let me know, I'll help out (and you can try it for VR/ask for a refund if it's not working on your device)

    Hmm, will look into this. To confirm, you're on latest asset store PRISM?
     
  28. doq

    doq

    Joined:
    Aug 17, 2015
    Posts:
    121
    @GoGoGadget With respect to the God Rays question, I am using the latest version from the asset store.
     
    GoGoGadget likes this.
  29. scheichs

    scheichs

    Joined:
    Sep 7, 2013
    Posts:
    77
    I don't have PRISM in action right now, but if it works similar to Unity's Sunshafts and most other god rays, it takes a transform as the ray casters POSITION... and ignores the direction. Because those effects work as I have described above. There are certainly more advanced light caster solution possible (with ray marching e.g. http://robert.cupisz.eu/post/75397489019/lightshafts) but they are also much more costly.
     
  30. doq

    doq

    Joined:
    Aug 17, 2015
    Posts:
    121
    @scheichs Thanks for the info! You're right. It is POSITION based. I didn't understand how the technique was implemented.
     
    GoGoGadget likes this.
  31. imDanOush

    imDanOush

    Joined:
    Oct 12, 2013
    Posts:
    368
    Does Prism v2 have auto focus like the one that Sion has or the one that GTA V has?
     
    Last edited: Mar 11, 2017
  32. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    PRISM does have that! It's the PrismSetDofFocusPointToCameraRay script in PRISM Demo scripts.
     
    imDanOush likes this.
  33. SteveJ

    SteveJ

    Joined:
    Mar 26, 2010
    Posts:
    3,085
    Without going through the entire thread, does anyone have any general tips/tricks on their experiences implementing PRISM in an Android game? My initial findings are that it seems to have a huge impact on performance vs. running really well on iOS. I need to experiment with turning individual effects off/on, but I thought there might already be some known "gotchas".
     
  34. mcmorry

    mcmorry

    Joined:
    Dec 2, 2012
    Posts:
    580
    I'm planning to port my ios game to android using 5.6 and Vulkan.
    On what version/driver are you experiencing this performance issue?
     
  35. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Hey Steve,

    I've seen pretty good performance (generally speaking) on my Android device (Nexus 5x) in testing, and heard positive results from a few other games, but there may indeed be a few corner cases which cause issues like this. I know you've probably sent me them before, but to confirm, could you screenshot your PRISM inspector for android and send it to me so I can try and repro any issues you're having? (Along with PRISM version).

    As general advice, the following are always heavy on mobile:
    AO
    DoF
    Color Enhance -- IIRC, this one actually might be android-specific, as glsl doesn't have one of the trig functions built in, so it uses a replacement. This is actually an area where Vulkan *should* see a nice perf. improvement (haven't tested though).
    HDR bloom with lots of blur passes (>1) - use a bigger downsample amount on mobile with less blur passes/higher radius if possible.
     
    Last edited: Mar 21, 2017
  36. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    397
    Our team is really interested in PRISM and we want to buy it. But we can't evaluate those effects from screenshots and videos. Can we have a demo package/build to play around with settings?
     
  37. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    For sure! Since the Asset Store doesn't really support 'demos', you can purchase PRISM, and if you find it not suitable within about a week of purchase, you can get a no-questions-asked refund without any issues, just flick me over a mail. If that doesn't suit, PM me with a few more details on your game and we can sort a demo out :)
     
    Shodan0101 likes this.
  38. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    When I use prism my sky looks really bad!!!!!!! even if I don't enable any effect, I need to place it upper than my tonemaping image effect but it looks like below pic (No effect is enable).
     

    Attached Files:

    • 1.png
      1.png
      File size:
      69.8 KB
      Views:
      798
  39. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Just a guess but maybe make camera HDR.
     
  40. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    Thanks but camera is HDR already.
     
  41. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Hey Ksam,

    The only thing PRISM will do is transform an HDR image into LDR if no effects are enabled, and PRISM should be used in place of your tonemapping effect - tonemapping after PRISM will result in incorrect results/precision loss, as you're trying to convert an image that the tonemapper thinks is HDR (but is actually LDR) into LDR again.
     
    ksam2 likes this.
  42. ksam2

    ksam2

    Joined:
    Apr 28, 2012
    Posts:
    1,079
    Isn't here a way for this? cause I need to use prism upper than any other of my image effects.
     
  43. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Hey Ksam,

    There technically is, but it's not a common use case (as PRISM should be the image effect that performs everything from HDR>Tonemapping) - you'll have to edit PrismEffects.cs and replace the line:

    RenderTexture tempDest = RenderTexture.GetTemporary(source.width, source.height, 0, RenderTextureFormat.Default);

    With

    RenderTexture tempDest = RenderTexture.GetTemporary(source.width, source.height, 0, RenderTextureFormat.DefaultHDR);

    Around line 2150 or so.
     
  44. Ikaruga7

    Ikaruga7

    Joined:
    Jan 16, 2016
    Posts:
    6
    Hello, is Prism added to camera's as a component or as a profile like Unity's new Post Processing Stack?
     
  45. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Hi Ikaruga,

    PRISM was the first post-processing stack for Unity to utilize a serialized ScriptableObject asset for each different profile - in PRISM, they are called PRISM-Presets. The good thing about PRISM-Presets is that unlike Unity's Post-Process stack, you can edit them directly on the camera component itself, as well as individually.

    Also, PRISM supports preset lerping - a super easy way to blend between two presets - you can also lerp presets of individual effects into "full" presets, like the PRISM Volume does (included in the demo scene).
     
  46. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    397
    We were testing PRISM and so far we like it. But I have a question about bloom's flares. They are good and all while they are generated from a source that's near the center of a screen, but they totally disappear when the bloom source is near the edge of a screen. Is this how it's supposed to be?
     

    Attached Files:

  47. Ikaruga7

    Ikaruga7

    Joined:
    Jan 16, 2016
    Posts:
    6

    Cheers GoGo, just so I'm clear...do I have to have a separate preset for every camera that has different settings (Same as the Unity Post Stack), or do the settings live on the camera, but you allow the settings to be saved as a preset? It's important to me that I'm not forced to have a profile or preset for every camera, as I have a lot of cameras, all with unique settings (Different focal lengths, therefore different dof, barrel, and grading for example) so I want the settings to exist on the camera, as they would any component. Thanks in advance.
     
  48. GoGoGadget

    GoGoGadget

    Joined:
    Sep 23, 2013
    Posts:
    864
    Hey Holyasisan,

    This is the intended behaviour, as the way PRISM flares work is by creating multiple flare "ghosts" spaced out from the original light source and taking into account the light source's position on screen. If you have a good smartphone camera (or normal camera) you can replicate this effect by pointing it at a light, you will see the flare dissappear when the light is on the edge of the field of view.

    Nope, PRISM is one step ahead of the Unity post stack in that regard! If you don't ever want to touch PRISM-Presets, you don't have to, and you can have a setup that only lives on that specific camera :)
     
    Ikaruga7 likes this.
  49. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    397
    Thank's for your explanation. By the way, will we get automatic lens glare that can spawn "light bursts" on top of a bloom source? I found this feature in Silicon Studio's Yebis and it looks awesome and runs pretty fast on mobiles (tested it out myself). I bet that this feature also exists in several bloom packages on the asset store. What do you think about it?
     

    Attached Files:

  50. Ikaruga7

    Ikaruga7

    Joined:
    Jan 16, 2016
    Posts:
    6
    Thank you GoGo. That sounds perfect.
     
    GoGoGadget likes this.