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

SC Post Effects Pack - 33 additional effects

Discussion in 'Assets and Asset Store' started by StaggartCreations, Jan 18, 2018.

  1. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,028
    I'm unable to reproduce the same effect unfortunately. It may be worthwhile to try to move the Tilt Shift effect to execute before or after other effects. You can do so in the "Custom Effect Sorting" dropdown on the Post Process Layer component on your camera.

    In any event, I'll send you an updated version of the effect, perhaps the issue I described earlier is related.
     
  2. macish

    macish

    Joined:
    Oct 29, 2018
    Posts:
    33
    Posting here too, there was nothing wrong with Staggarts shader, idiot user error and a combination of blindness and i dont know what.. everything works as intended my bad, sorry!
     
  3. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    2,777
    FYI a nice addition would be a distance option to blur. Unity's DOF is rather limited you can't say don't blur objects closer then focal point.
     
  4. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,028
    Thanks for the suggestion! This is technically possible, but the result is generally poor looking and should be considered a "budget" DoF effect. Blurring by distance will only increase/decrease the blur amount, where as true Depth of Field effects will increase/decrease the blur radius. The result will resemble a bloom effect.

    Here is a photoshop mockup where you can see what the result would be:
    quantum_theory_distblur.jpg
     
    Lars-Steenhoff likes this.
  5. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    2,567
    I love the bloom effect blur
     
    wetcircuit likes this.
  6. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    2,777
  7. macish

    macish

    Joined:
    Oct 29, 2018
    Posts:
    33
    Disabling HDR would remove all blur before the focal point if thats is feasible for you. Found this limitation while mixing up DOF with Stags TS.
     
  8. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,028
    Submitted version 1.0.2. Note that version 2.1.8+ of the Post Processing Stack is currently not compatible due to a bug introduced in these versions.

    I've meanwhile been working on a script to toggle certain code blocks in shaders. Which I'll be using to configure all the effect shaders for a specific render pipeline during the installation. This'll be needed for the URP in the future as well.
     
    macish and Onevisiongames like this.
  9. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    795
    Hi @StaggartCreations , thanks for this amazing asset!

    Now that directional light support is in, I was wondering if it would be possible to multiply fog by spherical ambient provided by Unity through global shader properties. That is, I believe, could allow the fog to work perfectly with full time of day cycles. I can continuously tweak fog color through scripting, but that would not correctly map it to spherical ambient light and would be just a pale imitation of proper ambient support.

    I apologize if this is already supported in some way and I have missed this in one of the earlier releases - I might be a few versions behind.

    P.S.: I apologize, missed the skybox color mode! It looks almost entirely as expected, except for this strange visual artifact - could you tell me what might be the cause of it? It looks like skybox is sampled without taking camera rotation into account, with the same horizontal angle being used no matter the camera orientation.



    Maybe there is a special camera component I'm supposed to use to update the camera orientation shader property - similarly to how there are special component for fog lights?
     
    Last edited: Nov 27, 2019
  10. mick129

    mick129

    Joined:
    Jun 19, 2013
    Posts:
    32
    Those effects are awesome thanks!

    Only one problem, the cloud effect seems to create a weird shadow to the FAE's trees, it create a kind of outline effect.

    Any idea on how to fix this?

    A is a shadow made bu a cube and B is a cloud shadow.
    upload_2019-11-30_12-27-25.png
     
    StaggartCreations likes this.
  11. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,028
    Thank you for your purchase! May I ask which anti-aliasing method are you using? And if you're using Deferred or Forward rendering?

    Ps: the cloud shadows effect is going to get distance curve soon. So it can decrease in strength close to the camera. Would work great for casting shadows over distant landscapes only.
     
  12. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,028
    Sorry, I seem to have missed your message. The skybox is renderer into fog the with the same transform/FoV as the camera currently rendering fog, this will always be a 1:1 match. Though the default skybox is rather uniform, horizontally, so it may seem like nothing is happening. If this is not the case, please let me know!

    PS to all: I've got the scanlines effect working on HDRP. This took me over an hour, so it may be some time before all the effects are available for HDRP in 2019.3. I'll likely do this in stages
     
    Flurgle, Korindian and Lars-Steenhoff like this.
  13. Lars-Steenhoff

    Lars-Steenhoff

    Joined:
    Aug 7, 2007
    Posts:
    2,567
    I hope unity will hurry up with custom post effects for URP, and I also hope you don't need to do a full rewrite to get then working once they release the custom post effects for v3
     
    StaggartCreations likes this.
  14. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,028
    From what I was told, it will work very differently from HDRP. Supposedly custom effects for URP (through the volume system at least) is said to arrive somewhere in 2020 release cycle. I'm keeping tabs on GitHub so I can step in early and start figuring it out.

    Though I'm really missing the fog and sun shafts effect in URP at the moment :oops:
     
    Lars-Steenhoff likes this.
  15. mick129

    mick129

    Joined:
    Jun 19, 2013
    Posts:
    32
    I'm currently usint TAA but it is not compatible with the cloud effect so to do some test with the cloud effect I switched and tested all the other Anti-Aliasing possibilities and the problem remain.

    EDIT: Oh and after some test I will have to stick with TAA (which I know doesn't work well with both the fog and the cloud shadows). Will that option be available soon?

    Oh and I use deffered rendering.
     
  16. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,028
    Thanks for the additional info and testing! I have any idea as to what could be wrong. But'll have to see if I can reproduce this first. I'll be able to get to this next Tuesday.
     
  17. mick129

    mick129

    Joined:
    Jun 19, 2013
    Posts:
    32
    No problem, thanks!
     
  18. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,028
    You can also try to disable MSAA in your Quality Settings. This technique poses an issue where the depth texture rendered by Unity is not being anti-aliassed. Which tends to cause depth discrepancies like you're seeing. The depth texture is used by some effects (Fog and Clouds Shadow included), so these are affected.
     
  19. bac9-flcl

    bac9-flcl

    Joined:
    Dec 5, 2012
    Posts:
    795
    I have two cameras in my scene - main game camera rendering everything with the postprocessing layer, and a secondary camera that renders my UI (through NGUI framework). I suspect that what's happening is that the second camera is being used to rotate the skybox in the fog - it seems to be sampled the same what no matter what I do, completely fixed to a horizontal view my UI camera has. UI camera is not using any postprocessing components, though, so I wonder how that came to happen. :)
     
  20. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    271
    Rendering SC fog before transparencies and using the deferred renderer, I was able to use the standard Unity fog on transparent water with reasonable results. In deferred rendering standard Unity fog doesn't work on opaque objects (so there is no conflict with SC fog), but Unity fog does still work on transparent shaders that have Unity fog implemented. This is what we used to do with the Global Fog image effect to handle transparent water. Also the settings of SC fog and Unity fog are separate so you can tweak them independently until you get a decent match.
     
    Last edited: Dec 22, 2019
  21. AngelBeatsZzz

    AngelBeatsZzz

    Joined:
    Nov 24, 2017
    Posts:
    207
    Hi, I'm using 'SCPE 1.0.2' + 'Unity2019.2.0f1'. I turned on the ‘Draw Instanced’ of the terrain and used it with ‘Edge Detection’. As a result, the camera can see the cube behind the mountain.

    20200113102441.jpg
     
  22. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,028
    I had a look, and according to the frame debugger, instanced terrain is apparently always rendered after Unity is done rendering the Depth Normals texture, which is what the edge detection effect uses. This is not the case for non-instanced terrains. As a result, the edge detection effect doesn't know anything about the terrain and appears to ignore it.

    The only solutions in this case are to switch to the Deferred rendering path (rather than Forward rendering), or to disable instancing for the terrain (not ideal). You can set the rendering path on either the camera, or in Unity's Graphics Settings.
     
    AngelBeatsZzz likes this.
  23. Admin_Friend_Factory

    Admin_Friend_Factory

    Joined:
    Oct 23, 2018
    Posts:
    24
  24. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,028
    Support for custom effects in URP through the volume system was said to come some time this summer. Though, adopting the post processing framework for HDRP turned out to be more work that I had thought. So unfortuantely compatibility most likely won't follow right after.

    Once I spot it on GitHub, I'll be able to investigate what changes are needed to start porting effects.
     
  25. Admin_Friend_Factory

    Admin_Friend_Factory

    Joined:
    Oct 23, 2018
    Posts:
    24
    Hi! Thanks! Would be possible to get version with Global Volume, hence effecting the full screen? Thanks
     
  26. GoldFireStudios

    GoldFireStudios

    Joined:
    Nov 21, 2018
    Posts:
    37
    I've got blowing snow particles that are just using billboards and the material is using the Mobile/Particles/Alpha Blended shader. When I enable fog, the particles only render in the lower part of the screen where the fog is not present (video:
    ). Any idea why this is and how to get around that?
     
  27. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,028
    The fog effect uses the depth texture Unity renders to determine how far away things are from the camera, and thus how much fog they should receive. Transparent materials, such as particles do not contribute to the depth textures, as such they are ignored by fog. This is a very common drawback of screen-space fog.

    A potential improvement is to open the Fog.cs file and replace PostProcessEvent.BeforeStack with PostProcessEvent.BeforeTransparent.This'll have any transparent materials render over the fog. Downside is that transparent materials in the distance will appear to have no fog applied at all. But if your particles are mostly visible in unfogged areas, such as close to the camera, this'll be hardly noticeable
     
  28. GoldFireStudios

    GoldFireStudios

    Joined:
    Nov 21, 2018
    Posts:
    37
    Thanks for the explanation, that makes sense. Unfortunately, this means that the fog won't render in the sky now due to our use of Enviro. Maybe we can find a way to get a passable snow particle rendering without transparency like the leaf particles in the above video.
     
  29. GoldFireStudios

    GoldFireStudios

    Joined:
    Nov 21, 2018
    Posts:
    37
    Oh actually, I just realized that not starting the fog density at 0 fixes the issue! I guess I should have tried that to start with...
     
  30. KlutoTek

    KlutoTek

    Joined:
    May 24, 2017
    Posts:
    6
    These effects look fantastic! I am looking for something that can create sun shafts in a 2D setup similar to this. https://rakeshmalikblog.wordpress.com/2016/12/06/unity-scrolling-background/

    I tried the .cs version of the old Unity 5 sun shafts but it didn't work very well. And the old .js version would not be supported with current versions of Unity.

    Is something like this possible with this package?
     
  31. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,028
    I tried it out in the 2D Game Kit project, but it seems the Sunshafts effect is not suitable for 2D. Namely because the position of the sunshaft caster does not translate correctly to a 2D screen position, there's possibly a way around this.

    Secondly, the effect creates a mask from the skybox, so that the sunshafts only cast from the sky, around the sun. 2D games do not have any depth, so this process fails. The solution to this is not very straightforward, as it would require to render a mask from the sprites that make specifically make up the background
     
  32. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,348
    I know its not supported on mobile, but it works great on iOS

    Im wondering if there's just like s setting or line of code that keeps t from running on android.

    On android there is just an error when I try to add it to the PP stack

    I attached a screenshot. Is there anything off the top of your head that you think is blocking this?

    Do I have to implicitly "install" SCPE in the project?

    Screen Shot 2020-04-01 at 4.22.52 PM.png
     
  33. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,348
    I added ;SCPE to the Scripting Defines Symbols text box in the Build Settings for android. I haven't tested it on android device yet, but doing this did get rid of the script errors.
     
    camta005 likes this.
  34. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,348
    OK the SCPE effects work in editor in Android great. The only thing I can figure out is how to reference it to turn it on and off and adjust the values.

    On iOS I use :

    private SCPE.Pixelize pixelize = null;

    void Start()
    {
    volume.profile.TryGetSettings(out pixelize);
    }​

    And I think this is what sets a reference to the effect in the PPstack. Then I enable it

    pixelize.enabled.value = true;​

    But when I try it on Android I get a null reference exception. The code is valid, but on start it doesn't assign an instance of SCPE.Pixelize to the pixelize variable.

    Do you have any suggestions?

    UPDATE: Ok I had a reference to the PP volume

    public PostProcessVolume volume;

    And in my component there was. preference there but it wasn't finding it in the script. I just re-dragged the volume component to my volume variable and it all works. Ill try it on an actual device too. Thank for the sounding board, it helps me organize my thoughts to say them to loud.
     
    Last edited: Apr 2, 2020
    camta005 and StaggartCreations like this.
  35. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,028
    Update on URP/HDRP compatibility in Unity 2019.3+. This has been on my radar for a while and I'm working on making sure this package will still be usable for the years to come. Effects will make use of the SRP volume system, just like built-in Unity effects.

    In order preserve backwards compatibility, and to avoid having a mess of separate scripts/shaders per render pipeline, I had to lay a lot groundwork to get this done. Essentially reworking the entire asset. No point in delving into the technical aspects involved, but the installer now only requires to change one file to switch render pipelines. This makes it far more maintainable for me, and fixes added features only need to be done in one place.

    So far this has been a slow and often frustrating process, since every change requires to be backported to 2 other render pipelines (and often breaks something else). Fortunately I've reached baseline and successfully ported the Blur and Sunshafts effect to this new system. So I'm starting to pick up speed!

    Version 1.1.0 will include all these changes. Basically nothing will appear to have changed, but with this out of the way I can port over effects to support URP/HDRP a few at a time. Admittedly, this is rather tedious work to do, and takes up a few hours to a day per effect, so will roll out gradually.

    Thanks for the patience so far, as much as I'd like to have everything done by tomorrow, there's still a lot of work involved ;)

    Trello board remains available here: https://trello.com/b/J5mEv8Cn/sc-post-effects
     
    Last edited: Apr 10, 2020
    Kerrjgan, protopop, Korindian and 2 others like this.
  36. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,348
    I can only imagine how tricky it is to support 3 render pipelines. Congrats on making such progress and for all your hard work. I hope this is very successful.
     
    rrahim, StaggartCreations and hopeful like this.
  37. Kerrjgan

    Kerrjgan

    Joined:
    May 30, 2016
    Posts:
    8
    Hey! Do you have a rough timeline for when we can expect to see 2019.3.x with URP compatibility available? Just picked this up with your grass shader, but need the whole package under URP.

    Many thanks.
     
  38. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,028
    I think the first version is still 3-4 weeks away. I'm porting the more advanced effects first, since these cover most technical aspects, making simpler effects more straightforward to do. HDRP is currently giving me some grievance, where I need to make the decision to either not support TAA or not support volume blending :(

    Version 1.1.0 will include the following effects:
    • Blur
    • Sunshafts
    • Color Grading LUT
    • Edge Detection
    • Sketch
    The rest will follow over a number of updates. Trello board is available here.
     
    rrahim likes this.
  39. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,028
    Another update on SRP support.

    After much consideration I have decided to not add support for HDRP in 2019.3+. This is another case where I'll spare everyone the technical details. But it turns out my new cross-compatibility setup will no longer work in 2020.1+ due to some changes in how serialization works from there on, amongst other things.

    In the end this would require a literal separate package per render pipeline. And given the small amount of effects that have an application in HDRP's graphics level, it's not viable to put this much work into it. I've already burned up several weeks of my time plowing through a multitude of issues and hurdles, and I'd really like to move on :p

    So here's my plan:

    Current package: Specifically for the Post Processing Stack v2, compatible from 2017.4.0 through 2019.4. This'll still be supported, and bug fixed where necessary. As it stands, this version won't work in 2020.1 for the reason I mentioned earlier. Meaning the URP package is to be used in this version and up.

    SC Post Effects URP: Specifically for the URP (integrated post processing/volume system). Compatible from 2019.3.0 to whenever. I'll publish this as a "beta" version, until all effects are included. During this time, you can upgrade for free.

    Business as usual for the built-in render pipeline, for as long as the Post Processing Stack is compatible. URP scripts will be package in a .unitypackage file and overwrite the necessary scripts.

    If anyone bought the package in the last 3 months, with the intent to wait on HDRP compatibility, you're free to request a refund, which seems fair. You can send me a PM or email contact@staggart.xyz

    So with that decision out of the way, I can go full speed ahead and convert effects to the URP :)
     
    Last edited: May 14, 2020
    rrahim, protopop and camta005 like this.
  40. Amadeu

    Amadeu

    Joined:
    Dec 11, 2014
    Posts:
    8
    Man! looking forward to upgrade to 2019.3 but once LUT and Sharpen effects are implemented, as they are core effects in our current game :)
     
  41. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,028
    Thanks! The LUT effect already works so far, I'm porting the effects that affect art direction first, rather than feedback effects.
     
    Amadeu likes this.
  42. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,348
    Will the effects still work if we use the built in render pipeline in unity 2019.3 and up?
     
  43. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    271
    Seems like a good plan and thanks for your hard work supporting this asset.
     
    StaggartCreations and protopop like this.
  44. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,028
    Yes, up to 2019.4 LTS. But starting from 2020.1 they will not. It's possible to make this work, but would still require an entirely separate package/setup in order to not break backwards compatibility, which is why the separation is needed. This is what I'm going for, but only have room to do this for the URP.
     
    camta005 and protopop like this.
  45. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,348
    I understand . This must be very difficult . I wish unity wasn’t becoming so fractured. Thanks for the heads up.
     
    camta005 likes this.
  46. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,028
    I found a way to keep the current package compatible throughout Unity 2020. This requires me to restructure the files and folders, and bump the minimum compatible version up to 2019.1. Both fairly drastic, but necessary to ensure it is future proof (for as long as the Post Processing Stack works). The alternative is to lock it to 2019.4 max forever, or switch to URP. Either way, a touch call.

    This'll see a version bump to 2.0.0, which I'm currently preparing. This update would require to delete the current package folder, before importing it from the asset store. Sadly, this also means any effects added to profiles will be removed. Unfortunately no way around that. So exciting projects shouldn't update.
     
    protopop likes this.
  47. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    271
    So with this new plan will you still develop a separate URP version?

    I would think looking forward that most projects still using the built-in renderer will either be using 2018.4 LTS or 2019.4 LTS and most new projects after 2019.4 will be using one of the SRPs.

    It's your call of course but I liked your previous plan, as my project is locked into 2018.4 LTS until it's finished.
     
  48. protopop

    protopop

    Joined:
    May 19, 2009
    Posts:
    1,348
    One issue though is people developing for mobile like me, where forced upgrades are more common than developing for other platforms. Im on 2019 but often we are forced to upgrade because Apple or Google will have anew requirement. So even if a legacy project using Built In Render starts on 2018 or 2019, we might have to upgrade 2020 so if there is on a URP version then we have to drop the asset.

    I like the plan as long as it doesn't kill him to do the work. Its nice to know those of us on Built in and 2020 have an emergency out - what he says about having to read to profiles etc is a small price to pay. And I will be trying to move to URP, but that can take. a lot of time and face barriers for a legacy project, so this way I think everyone has an option. From what I understood the URP version will still be the main one going forward, and the Built in fix is just a back up to extend compatibility for those who need it.
     
    StaggartCreations and camta005 like this.
  49. camta005

    camta005

    Joined:
    Dec 16, 2016
    Posts:
    271
    That's a fair point.
     
  50. StaggartCreations

    StaggartCreations

    Joined:
    Feb 18, 2015
    Posts:
    1,028
    Yes, there will still be a separate URP version coming out. It's likely I'll be able to keep a feature parity between the two, since the shaders are identical.

    If you're on 2018 currently, you can stick the current 1.0.2 version without any issues. The 2.0.0 update should be imported into new projects, to avoid breakage. I agree that 2018.4 is still a viable version, but there's something in 2019.1 that I need for everything to work ;)

    If anyone wants to use the package in 2018.4, they can send me a DM with invoice number and I'll forward a download link for v.1.0.2
     
    protopop and camta005 like this.
unityunity