Post Processing

Plugins Post Processing

Screenshot at 2023-08-17 04-32-14.png


Consider this a beta/early version, there may be bugs, but it's been stable enough for me that I think it's okay to release. I'm actively working on adding more features and fixing issues.

If you'd like to support continued development of this and more plugins, consider
subscribing to my Patreon for just $1 a month:giggle:

Usage
Add the PostProcessing plugin to your scene, it will activate immediately with some opinionated defaults. This should get you up and running pretty quickly. Most features will work in both desktop and VR modes.

⚠ Important: This plugin is not intended to be used alongside PostMagic or the popular Colortone CUA. It may work, it may not, but it's almost guaranteed that strange things will happen.


Example of Post Processing being used with neci's https://hub.virtamate.com/resources/nier-and-mvc-env-pack.37766/

To configure the plugin, use the "Open Custom UI" button. You'll be greeted by a few tabs worth of options:

Color Grading

Saturation and contrast should be fairly self explanatory.

The channel mixers work in a similar way to the one built in to Unity and gives you some level of colour grading flexibility. What I'd recommend is either using the channel mixers as a tuning mechanism for your chosen LUT, or chosing to use no LUT and purely use the channel mixer to do colour grading.

Soften attempts to cut out some of the harshness in the image to try and make it a bit more natural, particularly the blues, by default this is at full strength.

The Tonemapper will by default use ACES at full strength, right now the only other option is to turn it off, but I plan to add additional tonemapping algorithms at some point, I just happen to like the look of ACES most so I added it first. You can also control the exposure of the image before it goes through tonemapping.

LUTs are a super powerful and popular way of colour grading images and video. I've included a few of my own, and the Unity default one as built ins, but of course you can choose custom and use which ever LUT you like. I'd recommend putting any custom LUTs in the "Custom/Images/LUT" folder in your VaM directory.

Lens

Bloom enables objects with a brightness over the threshold to glow, this is currently using Unity's built in post processor, it may be rewritten at some point. Can configure threshold, intensity and radius of the effect.

Sharpening uses the excellent open source Contrast Adaptive Sharpening, by default I've included a little, because I feel it helps save some of the details, especially when using resolution scaling.

Vignette darkens edges/corners. I don't recommend using this in VR at the moment because I need to fix it. Works fine in desktop mode though. Only works in desktop mode for now.

Chromatic Aberration simulates a camera lens by slightly distorting colours towards the edge of the screen. Only works in desktop mode for now.

Depth of Field makes objects within a certain range appear in focus, and outside of that range will be out of focus.

You can control the Aperture and Focal Length to effect how deep the focus area is. Kernel Size controls how many blur iterations are performed on the GPU, higher settings will impact performance more.

Focus can be set to either manually controlled with a slider, or to automatically focus on a person.

Atmosphere

An approximation of atmospheric scattering, allowing you to set the Sky and Sun colors independently. If the first light in your scene is a directional light, that light will contribute to the atmosphere and use the Sun Color to tint the atmosphere when looking in it's direction.

Density lets you set how particle dense the air is, more density means more intense scattering.

Sea Level Density does much the same, the air is denser closer to sea level, so this will let you control how much scattering there is closer to the ground. Currently Sea Level Density is ignored in VR because it has very disorienting bugs, will enable it once I fix some of the math, but it works fine in desktop.

Sea Level allows you to configure where the "Sea" should start, this is only really here because some CUA scenes go below y 0.0 which is normally treated as Sea Level. Just allows some flexibility.

Known issues
  • Vignette and Chromatic Aberration don't work properly in VR so they will only function in Desktop mode.
  • Sharpen may not work as intended if you resize the window. However you can fix it just by moving the slider.
  • Sea Level Density is disabled in VR due to motion sickness/disorientation related bugs.
  • Enable/Disable plugin does not work, if you want to turn it off you'll have to remove it.
Packaging LUTs for Post Processing

If you are a LUT author ensure your LUTs are stored in Custom/Images/LUT/

The package builder paths should look like this:

Screenshot at 2023-08-17 04-24-05.png


If you publish your VAR with the correct paths, as above, your VAR will automatically appear in the file browser when people select "Custom LUT".

Acknowledgements
MacGruber for PostMagic, used it for years, and it's what inspired me to start digging around in Unity to see what was possible.
mopedlampe for the nice elf armor I used in the example and also appears in the icon.
AMD's open source FidelityFX which I have modified and used parts of, I hope to add more FidelityFX features soon.
Author
moyashi
Downloads
117,321
Views
117,321
Packages
1
Total Size
0.27 MB
Version
7
First release
Last update
Rating
5.00 star(s) 19 ratings

More resources from moyashi

Latest updates

  1. Version 7

    Big rewrite of internals to improve performance. Depending on the scene and GPU architecture...
  2. Version 6

    Add support for Unity's built in DoF effect while I try and port the better FidelityFX version...
  3. Version 5

    Fixed bug which caused LUTs to apply with higher intensity than was accurate Added exposure...

Latest reviews

I love this plugin. Works great! Though it sometimes has issues with SpawnPoint.
Upvote 0
Recently switched to this plugin away from PostMagic; I wasn't too big on the original upload but I'm finding the current version to be more than capable (even superior) to MacGruber's still-very-useful original effort. It also fixes an issue that my primary model always encountered when enabling desktop bloom/DoF (something weird at the eyelashes causing black cubes) in PostMagic, and DoF doesn't require setting an "AutoFocusPoint" CUA either.

The bigger standout though is just how nice the saturation/tone mapping works when trying to key in particular toon looks. Works nicely with SallyFXCUAShader too, which can help with environmental aesthetics too.
Upvote 0
Tried this recently, it's better than MacGruber's Post Magic since it fixes the big white or black spots problem (and also fixes the issue where the actual GUI wouldn't be responsive anymore with MG's Post Magic). Thank you very much for this!
Upvote 1
Very good. Does drop my FPS more than PostMagic, but has more options. For a beta version this is great.

Would love the ability to imterpolate between two or more LUT images (e.g. have 2 LUT images at 0.5 opacity so you're using both). Not sure if that's possible, but I think Unity is capable of it.
M
moyashi
The LUT processing is done using a custom shader, so yeah definitely possible and something I am interested in too. It would be useful for transitioning between areas (having location based LUTs) or for doing day/night cycles.

So yeah, it's on my list for sure.
Upvote 0
Helps big time with my photo needs!
Upvote 0
easy to use, barely takes any fps, vr works and great customizability - just a great plugin. keep up the amazing work!
Upvote 0
I love this post processing plugin as it doesn't break anything in VR and most features work in VR. :)
M
moyashi
Thanks, I did my best to make VR as bug free as possible, I hope to enable more effects in VR once I'm sure they will work properly :)
Upvote 1
Excellent, and great job adding the channel mixers.
Upvote 0
Easy to use with spectacular results. Can't wait to see where this Plug-In goes. Thanks for sharing with the community.
Upvote 0
Looks amazing in VR!
Upvote 0
Back
Top Bottom