Unity3D Indie Effects

True Image Effects for Unity Indie.

Unity Indie Effects

iFx

True Image Effects for Unity free

Introduction:

Welcome!

This here is the Indie Effects pack, one of the only free ways of getting image effects in Unity free. With this epic pack, you can do fisheye lensing, motion blur, bloom and lighting FX, SSAO, vignetting, chromatic aberration, radial blur, and an easy to use API to code your own FX! But where’s the motion blur you ask? Unfortunately, an improvement in performance came at the cost of breaking the original motion blur, so for now, there is none. I am working on a camera-based solution that uses motion vectors instead.

Basic Setup and Use in Unity Free:

Here are the basic setup steps. Unlike previous versions, it isn’t as fiddly as it was anymore! Now, let’s get started:

Examples of effects (more to come): iFx

Custom Image Effects:

iFx

When writing your own effects for Indie Effects API you will need knowledge of the functions contained within.

For a basic view of how a script interfacing to this API should work, here is a basic template for any “indie effect” (you can use this as a base if you like!) Copy and paste this code into a new JavaScript, then tweak it however you like:

Javascript example:

    #pragma strict
    @script RequireComponent(IndieEffects)
    @script AddComponentMenu(Indie Effects/FX Skeleton)

    Import IndieEffects;
    var fxRes : IndieEffects;

    private var mat : Material;
    var shader : Shader;

    function Start () {
        fxRes = GetComponent(IndieEffects);
        mat : new Material(shader);
    }

    function Update () {
        mat.SetTexture(_MainTex, fxRes.RT);
        //if your effect doesn’t use depth buffer, comment this out
        mat.SetTexture(_Depth, fxRes.DNBuffer);
    }

    function OnPostRender () {
        FullScreenQuad(mat);
    }

C# example:

note the c# version still needs to be ported.

  using IndieEffects;

  [RequireComponent(IndieEffects)]
  [AddComponentMenu(“Indie Effects/FX Skeleton”)]
  public class ExampleEffect : MonoBehaviour {
    private Material mat;
    public Shader shader;
    public IndieEffects fxRes;

    void Start (){
      fxRes = GetComponent(IndieEffects);
      mat = new Material(shader);
    }

    void Update (){
      mat.SetTexture(_MainTex, fxRes.RT);
        //if your effect doesn’t use depth buffer, comment this out
          mat.SetTexture(_Depth, fxRes.DNBuffer);
    }

    void OnPostRender (){
      fxRes.FullScreenQuad(mat);
    }

  }

When using effects with depth buffer, use the variable DNBuffer in the base script to assign to the shader. It is also possible to remove the @script lines up top for a performance boost, but it is not recommended you do this until final build time.

Effects Included in the package:

  1. Fisheye (adapted from the Unity Pro Fisheye effect)
  2. Simply adjust the X and Y values to get the fisheye. DO NOT USE NEGATIVE VALUES!!!
  3. Negative (this reverses colour)
  4. A drag ‘n’ drop effect. Reverses and distorts color.
  5. Anti-Aliasing (Ported From Unity Pro)
  6. A port of the FXAA shaders from Unity Pro! Simply adjust the settings to your liking, or pick the FXAAPresetB or A for smoothest Plug ‘n’ Play result!
  7. Vignetting (may darken screen too much, so use sparingly)
  8. Simply adjust the value, then set the vignette texture. Some textures are included for you to experiment.
  9. Radial Blur/God Rays (God rays deprecated. A new effect is going to be made soon that uses gameObject origin instead. FuzzyQuills suggests sticking with radial blur only!)
  10. Adjust the values carefully, and make sure Radial Blur is selected, otherwise the screen will be FLOODED with sunlight!
  11. Colour Balance (A nice colour adjustment script for your games)
  12. Simply adjust the values. Note the script is reported to be not working in the latest version of unity 4.
  13. Image Bloom (a new bloom effect from my labs)
  14. This bloom effect uses a new and improved blurring algorithm, and looks real nice.
  15. Blur (based on the Image Bloom)
  16. Adjust the slider to blur the scene
  17. SSAO:
  18. A new SSAO implementation without needing a blur pass! This implementation uses the Bunell disk algorithm. For best results, I recommend setting the strength to 2. If you wish, feel free to fiddle with the other settings!
  19. DoF (A nice thing to add, er, depth to the scene!)
  20. This effect has two sliders – A blurring slider and an F-Stop. Adjust the values to get the desired effect. This effect now culls trees and other transparent objects better.
  21. A nice toon outline for games where using multiple toon variants isn’t feasible. To make the lines either thicker or thinner, set intensity to anything other than 0. Having it at 0 gives a black screen which kinda defeats the purpose, so it isn’t recommended you do this!
  22. Chromatic Abberation: A brand-new vignetting/chroma effect. Make your games go HIIIGH, with this sick-as effect!

  23. Help:

    If you want to make a comment, give credit, or need help with this, you can email FuzzyQuills at neubot321@gmail.com. You can also post on the Indie Effects thread at Indie Effects Thread if you like to help other users or want to give credit! (Or even suggest a new effect you think FuzzyQuills could do. There are lots of suggestions being posted all the time) Coming soon: Various bloom fx, to spruce up scenes. Thanks to FrostBite23 for offering to port them! Sun shafts effect. Again, thank Frosty! Cyrien5100, for helping out with SSAO. FrostBite23 now has a new SSAO coming as well.

    Credits: Main Project Lead: FuzzyQuills

    Color Balance Script provided by Tryder. Bloom script written by me. Base Bloom shader provided by Tryder, and tweaked by FuzzyQuills.

    Special Thanks: