Search Unity

Sleek Render - Lightning Fast Mobile Post Processing Effects

Discussion in 'Assets and Asset Store' started by Kumo-Kairo, Oct 28, 2017.

  1. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    279
    Is there any chance of VR support any time soon(ish) :) Couldn't see it roadmapped on your trello board. Doesn't necessarily have to support singlepass, although that would be great.

    Out of interested, why does the asset description say " any form of VR is not supported yet" Surely basic Cardboard (which doesn't do singlepass) would do the processing (all be it twice, i.e. once per eye)

    I've already bought the asset, just haven't had a chance to do the tests. :)
     
  2. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    331
    @jeromeWork It's all about focusing my relatively limited resources on making things better in a narrow scope. Supporting VR will force me to split my attention, doing several things at once. And it's usually doesn't lead to great quality in any of those things.
    But I will surely get back to VR support once I have a stable feature list and good visual fidelity on my main target - the mobiles.

    And thanks for the support! Cheers!
     
  3. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    279
    Thanks @Kumo-Kairo I totally understand. Just not sure why, with your main target platform being mobile, there are issues with mobileVR. It may not be optimised for it specifically but surely it's got to work? Have you by any chance tried it?
     
  4. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    331
    @jerokWork I haven't tried it myself, but had a few customers who did and said that it's not working as expected. Thus the general note about "any form of VR is not supported". Just to make sure it won't misguide anybody for buying, expecting it to work in that scenario :)

    I have just remembered that I have community-driven features. I've added general VR research to the roadmap, if the demand will be consistent, I will definitely move to trying that too. Cheers!
     
    Last edited: Jan 23, 2018
  5. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    279
    Thanks :) I really liked the fact that you had a public Trello board. Makes it totally transparent for potential buyers, and great for users too.

    ... now VR Devs... let's hear some votes for this as a feature! Would be super usful to finally have a post fx that's useable on low-end mobileVR platforms
     
    Kumo-Kairo likes this.
  6. phili_maas

    phili_maas

    Joined:
    Dec 11, 2016
    Posts:
    21
    yes, I'm also looking for very fast and simple post fx for mobile vr. I haven't found a solution for fast basic bloom or fog / gradients that works smoothly on mobile vr + Single pass stereo support.
     
    jeromeWork and Kumo-Kairo like this.
  7. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    331
    @phili_maas , @jeromeWork can you share some screenshots from your games? I need to know the scope of the bloom - which objects of which size should cast it on the screen
     
  8. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    279
    I tried the support form on the asset website but although I ticketed 'send me a copy', I've received nothing. I'm guessing maybe the form is broken and you won't receive my query? Apologies if I'm just duplicating an email you've already received.

    Bought MEC pro ages ago and finally starting to use it :)

    Sorry for the stupid newbie question... can I ask for clarification on avoiding the .CancelWith GC allocation?

    The manual says to add the if statement after every yield return statement, but that doesn't make sense... if what?

    I'm using MEC to optimise an AI system, the AICycle moves the player so I'm assuming I do need CancelWith.


    My code is as follows:
    Code (CSharp):
    1. IEnumerator<float> AICycle()
    2.         {
    3.             //Will stop if the script is disabled at any point.
    4.             while (this.enabled)
    5.             {
    6.                 if (currentBehaviour != null)
    7.                 {
    8.                     currentBehaviour.AICycle();
    9.                 }
    10.  
    11.                 //Check to see if we should dodge.
    12.                 //Dodges are automatically triggered after spending time in their target's line of sight
    13.                 if (!isDodging)
    14.                 {
    15.                     if ((myTransform && targetTransform && canMelee && !isMeleeing && Vector3.SqrMagnitude(myTransform.position - targetTransform.position) < meleeRange))
    16.                     {
    17.                         isSprinting = false;
    18.                         animationScript.StopSprinting();
    19.                         SetProperSpeed();
    20.                         //headLookScript.Deactivate();
    21.                         StartCoroutine(AttackInMelee());
    22.                     }
    23.                     else
    24.                     {
    25.                         if (!isMeleeing && Vector3.SqrMagnitude(myTransform.position - currentBehaviour.targetVector) > distFromTargetToSprint && canSprint && engaging)
    26.                         {
    27.                             animationScript.StartSprinting();
    28.                             SetSprintSpeed();
    29.                             headLookScript.Deactivate();
    30.                         }
    31.                     }
    32.                 }
    33.                 MoveAI();
    34.  
    35.                 if ((!targetTransform && !engaging))
    36.                 {
    37.                     isSprinting = false;
    38.                     animationScript.StopSprinting();
    39.                 }
    40.                 else if (Vector3.SqrMagnitude(myTransform.position - currentBehaviour.targetVector) < distFromTargetToSprint && engaging && !isDodging)
    41.                 {
    42.                     animationScript.StopSprinting();
    43.                     SetProperSpeed();
    44.                     if(!usingDynamicObject && !isMeleeing && !inParkour)
    45.                         headLookScript.Activate();
    46.                 }
    47.                 yield return Timing.WaitForSeconds(cycleTime);
    48.                
    49.                 if(gameObject != null && gameObject.activeInHierarchy) // ... what ???
    50.             }
    51.         }

    Any guidance much appreciated,
     
  9. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    331
  10. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    279
    Ah now I get it!!! I'm in the WRONG thread!!! Sorry! Very embarrassed o_O :)
     
    hippocoder likes this.
  11. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    25,444
  12. jeromeWork

    jeromeWork

    Joined:
    Sep 1, 2015
    Posts:
    279
    @Kumo-Kairo Now that I know which asset's thread I'm on!... in answer to your question, this kind of thing is what I'm working on:

     
    Kumo-Kairo likes this.
  13. hungrybelome

    hungrybelome

    Joined:
    Dec 31, 2014
    Posts:
    259
    Any chance for depth of field? :)
     
  14. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    331
    Sure thing, it's on my roadmap
     
    hungrybelome likes this.
  15. hungrybelome

    hungrybelome

    Joined:
    Dec 31, 2014
    Posts:
    259
    Awesome! Looking forward to it.
     
  16. Jean-Pif

    Jean-Pif

    Joined:
    Jun 6, 2017
    Posts:
    5
    Hi Kairo,

    Just bought your Sleek render few days ago and totally loving its simplicity and great performance :)
    I have a request here :)
    Let me say first I am not a 3d art expert so I might be asking for something that's impossible to achieve or doesn't make sense...
    But I was a bit disappointed with the way the Bloom looks: It looks like it more or less always create some kind of vertical hashes or chops, and the only thing I was able to do about this, is make the bloom weaker - then the "chops' go away but so does the nice glow neon feeling I'm after...
    Let me paste some pics below so you see what I mean, hope it's clearer.

    So my question is: Would you see a way to give users more control on how those "shades" or glowing silhouettes spread apart around the bright object, thus enabling me to limit those vertical chops?

    Thanks a lot,

    J.P.

    Screenshots:
    Example_02.PNG Example_01.PNG
     
  17. Jean-Pif

    Jean-Pif

    Joined:
    Jun 6, 2017
    Posts:
    5
    just discovered your Trello board, so I guess my request goes into the "Bloom spread" and "Bloom alternatives" cards - great to see you're on it already !!

    Cheers,
    J.P.
     
  18. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    331
    @Jean-Pif, hi, thanks for supporting it!
    Regarding the bloom - it was a common feature request to make it work in more general cases, make it less anamorphic and less flickery. This is what I've been working on lately an there's an update pending in the assetstore. It contains improved bloom visuals (non-anamorphic bloom) and it's much less flickery. It should go live in a day or two.
    Performance differences between "current" bloom and the new one is negligible, barely any difference on my lowest end asus tablet and zte phone. And there's also an option to go back to anamorphic bloom for large areas of bright light as sky.
    There are also plans and currently ongoing research on making bloom more tweakable (like in FxPro with spread, like you've written), but I can't promise any ETA on this as I'm not pleased with current performance of this functionality yet. But we'll get there, I promise ;)

    Stay tuned for later updates,
    Cheers
     
    Jean-Pif likes this.
  19. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    331
    I have a question for users - how much is lens correction (lens curvature) used? I see it in every post processing package, but haven't seen any specific use cases for it in my work projects. This is the effect where the image "bulges" a bit, like with some kind of a "fisheye" lens

    An example from FxPro package upload_2018-2-5_13-10-36.png
     
  20. Jean-Pif

    Jean-Pif

    Joined:
    Jun 6, 2017
    Posts:
    5
    That's right, just got the update and it does improve a lot the bloom effect! Great to see a problem one day and get the fix the next day, thx a lot ;)
    Cheers,

    J.P.
     
    Kumo-Kairo likes this.
  21. adslitw

    adslitw

    Joined:
    Aug 23, 2012
    Posts:
    146
    Hey @Kumo-Kairo, just to be clear your tonemapping can't be use for exposure adjustment right? Have you got anything planned for that?

    Cheers!
     
  22. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    331
    @adslitw current color grading solution works like color overlay. It just tints the whole image uniformly and it can't change contrast or bring brightness up (it can dim the picture if you make overlay color darker). So it doesn't work like a 3D LUT texture like it's usually done for color grading (it's a nightmare for OpenGL ES 2.0 and lower end ES 3.0 devices).
    There are plans for adding something like an S curve - there's a trello card for that (think curves in Photoshop or S curve parameter in FxPro) - brightness + contrast, so stay tuned.
     
    adslitw likes this.
  23. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    331
    There were quite a few requests on making Sleek Render 5.3+ compatible. So this is what the 0.6.2 release is going to be about.

    Starting from 0.6.2, the minimum version of Unity is dropped to 5.3. Works consistently from the single code base so I won't need to support a hell lot of different Unity versions for it.

    I have also managed to get two IT student interns from the local University. So hopefully, in a month or so, it will allow bringing more content at a faster rate (quality and performance won't go anywhere, I will still be hand testing everything).

    Cheers
     
    adslitw likes this.
  24. Catalyst-NG

    Catalyst-NG

    Joined:
    Oct 25, 2017
    Posts:
    3
    Hey!

    I wanted to thank you for creating a concise, efficient and easy to implement post-process script & shaders!

    Regarding the lens correction/curvature that you asked about a couple of weeks ago: at least we have no need for this type of effect, and I personally have not been part of any project to use a similar effect so far, so this is not at all on our priority lists. Certainly, needs vary, so just commenting from one perspective.

    What we would be extremely interested in the future, would be a (potentially) quality sacrificing, but blazingly fast depth of field -effect. Unity's old PP-stacks solution leaves quite a bit wanting in the render times department. DoF is certainly quite a bit more complex an effect, controls and implementation wise, to add, but the need for an actually fast and straightforward DoF solution is acute.

    In any case, thanks again for your work on Sleek Render!
     
    Kumo-Kairo likes this.
  25. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    331
    @Catalyst-NG thanks!
    Stay tuned for a blazingly fast depth-of-field effect, I'm working on it ;)
     
    Fenixake and Catalyst-NG like this.
  26. adslitw

    adslitw

    Joined:
    Aug 23, 2012
    Posts:
    146
    @Kumo-Kairo hey man how is the update coming along? I'm curious to hear what you think will be included!
     
  27. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    331
    @adslitw Hi! At the bare minimum this update will include master downscale and relative cost calculator.
    Alternative blur/bloom techniques will most likely to come in 0.8
     
    adslitw likes this.
  28. DHARMAKAYA

    DHARMAKAYA

    Joined:
    Dec 1, 2014
    Posts:
    56
    Kumo-Kairo likes this.
  29. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    331
    @DHARMAKAYA thanks, I'll take a look when I get to VR support
     
  30. DHARMAKAYA

    DHARMAKAYA

    Joined:
    Dec 1, 2014
    Posts:
    56
    At this point it seems SINGLE PASS STEREO basically IS mobile VR these days. So much faster than multipass.

    Think it may actually be much easier than Kumo expects.

    By the way, nihonjin?
     
  31. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    331
    Nah, just an ex-weeb dude. I like how this nickname sounds
     
    Last edited: Mar 6, 2018
  32. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    331
    @adslitw one of the interns took the task with s-curve brightness/contrast adjustments, so expect this thing to be live in a month or so.
     
  33. adslitw

    adslitw

    Joined:
    Aug 23, 2012
    Posts:
    146
    Awesome! :D
     
  34. odysoftware

    odysoftware

    Joined:
    Jul 21, 2015
    Posts:
    45
    Hey there - is it possible with this asset to create a very simple blur effect for UI canvas? I need a performant blur effect when showing specific items on the screen which will blur the complete background.

    I already tried many blur effects - all which mentioned high performance - but they all halfed the FPS or more on older android devices.

    Thanks a lot,
    Oliver
     
  35. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    331
    @lorddevil It's pretty easy to blur a 3D scene under uGUI canvas. Blurring a 3D scene under other 3D objects is quite more tricky as it will either require command buffers (preferred) or a multi-camera setup (an easy, user-oriented way that is less robust in case of mobiles).
    So yeah, while it's totally doable, it's way too much game-specific thing going on here which doesn't really allow for a generic robust solution (more generic = less performance). If you feel confident enough to try shading and pipelining, I can guide you more or less step by step. (And maybe we will create a sort of an explanation/tutorial video so others can benefit from that too). Please contact me through direct messages if you need further assistance
     
    odysoftware likes this.
  36. mahdiii

    mahdiii

    Joined:
    Oct 30, 2014
    Posts:
    801
    Perfect. Do you introduce resources to learn about that?
    I know shader coding but want to dive in. How can we create stack post processing with a lot of post processing for mobiles efficiently?
    and one question, it is better to create several passes and set them arbitrary to enable and disable effects or use for example OnRenderImage/OnPreRender/OnPostRender and shader materials and send source to destination rendertexture sequentially or other way?
     
  37. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    331
    You can take Sleek Render as a base for your custom effects ;)

    It's always best to combine as many different effects into one pass as possible. More passes mean more framebuffer bindings and it's the most expensive operation in OpenGL ES 2.0. Features then can be enabled/disabled based on shader keywords (shader variants)
     
    mahdiii likes this.
  38. mahdiii

    mahdiii

    Joined:
    Oct 30, 2014
    Posts:
    801
    So you say that we combine all of them in one pass (Distortaion,Blur,Tone mapping,Bloom,...) and control them using boolean or shader variants multi compiles?
     
  39. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    331
    @mahdiii technically you won't be able to combine all of them (say Bloom requires at least a few separate passes of blurring), but if something can be combined, it should be combined. And all that's left after combining effects can be further controlled by bools and shader variants
     
    mahdiii likes this.
  40. mahdiii

    mahdiii

    Joined:
    Oct 30, 2014
    Posts:
    801
    Therefore if I can not combine them, which approach is better?
     
  41. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    331
    Separate sequential OnRenderImage are not really suitable because they require intermediate copies of the fullrez texture so it can be passed further. You rarely need fullrez textures for post processing (save for color correction), so it will just be a waste of resources.
    So the best way is to put all of the effects into one script with OnRenderImage (or use some custom render-texture based solution which doesn't involve OnRenderImage) and put all of your effect passes there. This is actually what Unity guys do in latest PostProcessingStack v2, they have also adopted this "One OnRenderImage call for all effects" approach, so it's really the way to go.
     
    mahdiii likes this.
  42. Idlerid

    Idlerid

    Joined:
    Nov 7, 2017
    Posts:
    2
    Are you planning to add culling mask? Would like to know, thanks!
     
  43. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    331
    @Idlerid what do you mean by "adding a culling mask"? Can you expand on that? This thing is just too broad of a meaning, I need some clarification.
     
  44. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    331
    @adslitw Brightness / Contrast is live. Intern developer Amir done a great job of implementing it, it turned out to be as fast as it can possibly get. We have to give him some credits on that :)

    I've also added a relative cost calculator to help with calculating rendering budget for different mobile hardware (timings are for low-end and most general case of Mali400 GPU with medium resolution).

    Cheers.
     
    Last edited: Apr 5, 2018
    Gregorik and Lars-Steenhoff like this.
  45. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    2,099
    now that you have curves for contrast brightness, are those also seperate for rgb?
    if not i like to request rgb curves for color grading

    and could you look into supporting volume boxes? where the players walks through a volume box and the strength of the post processing changes / blends.
    this way it posisble to blend different colors and effect strengths. unity post processing v2 also has this now.
     
    Last edited: Apr 6, 2018
  46. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    331
    No, right now it's a uniform brightness/contrast formula. Channel-wise settings would most likely require more or less real tweakable curve, not just a simple formula (so it really allows some substantial control). I will add this to the backlog and we'll see how it plays out.

    Yeah, I like that feature too, I'll definitely look into it.
    I have actually thought of implementing it, but the functionality is relatively trivial so it can be implemented by an end user, allowing Sleek Render package to remain small and simple. On the second thought though (as it's pretty trivial) I will most likely implement it as a separate free package that will complement the main Sleek Render package so the latter remains small and simple without unneeded feature bloating.

    Thanks for the feedback.
     
    lookx2 and Lars-Steenhoff like this.
  47. SunixDev

    SunixDev

    Joined:
    Mar 1, 2014
    Posts:
    18
    Hey do you think you could add s-curve , chromatic and blur or may be a fast antialiasing setting for mobile ,i have fxpro but its just fps killing , then i tryed and bought your package and actually its the best solution for mobile i found
    Good job
     
  48. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    331
    There's a brightness-contrast setting that serves as an s-curve, you shoud try that. Basically FxPro's S-Curve setting is Contrast in Sleek Render.

    It's on the roadmap for research. Blur will definitely be there at some point, but I can't say that about chromatic aberrations for sure.

    Fastest AntiAliasing for mobile is MSAAx4 (right in Unity's quality settings). It's hardware accelerated and almost free on tile-based GPUs (99.9% of used mobile GPUs are tile-based, save for Tegra 3, Tegra 4 and Tegra K1). You will barely see any performance impact. Some GPUs like new Malis even have optimized hardware accelerated MSAAx16. But MSAAx4 is the safest bet for most devices (including low-end 2011-ish ones)

    And thanks for the Assetstore review :)
     
    Last edited: Apr 12, 2018
    Fenixake and chelnok like this.
  49. SunixDev

    SunixDev

    Joined:
    Mar 1, 2014
    Posts:
    18
    Ok thank you , for mobile antialiasing i was pretty sure fxaa was the faster but now its like not working on android on my rescent test, may be im wrong
     
  50. Kumo-Kairo

    Kumo-Kairo

    Joined:
    Sep 2, 2013
    Posts:
    331
    Any post-processing Anti Aliasing (including FXAA) will always be slower than hardware MSAA. FXAA also usually looks worse. So using MSAA is a win-win.
     
    SunixDev likes this.