Quick tip to produce gaussian blur effect as seen on iOS Mobile using Allegorithmic SD5

Hey Peeps

Here is a supper quick way to produce a gaussian blur effect as seen on iOS user interface designs.

In Substance Designer just add a InputColor node and a Blur HQ node, connect them chronological, don’t forget to add the final output to base color. on the inputColor node under attributes>Identifier change “input” to “ImageInput”:

2617471--183935--Screen Shot 2016-05-03 at 10.19.17.png

Next click on the blur hq node under “Instance Parameters” > expose the parameter and call it “BlurIntensity”. Step 2: double click on the empty part of the graph and change the max value of “BlurIntensity” to 64.

Also make your graph relative to parent, then the image texture you add will be the uv size it generates,this should save on memory cost (in my case i want the exact size). Then publish your graph and copy into your projects asset folder.

In unity create a RawImage. and assign the new_graph_basecolor to the Texture input of the Rawimage.

2617471--183774--this.png

just add your texture to your new shader and “presto”.

Now you can adjust the blur intensity by dragging the slider and your input node is also exposed, both these values can be changed at runtime.

Ive tested it on my iPhone 6 and it works perfectly.

Hope this finds you if you need it.

Rock on!

P.S. Here is how you would change the value during runtime:

using UnityEngine;
using System.Collections;

public class SubstanceProfile : MonoBehaviour {


    #region Public Fields

    public ProceduralMaterial myBlurGraph;

    #endregion



    public void LoadNewSubstanceTexture (Texture profileTexture){


        Texture2D newTexture = profileTexture as Texture2D;

        myBlurGraph.SetProceduralTexture ("ImageInput", newTexture);
        myBlurGraph.RebuildTextures();

    }


}

And here is what one can do with it:

2617471--183706--Screen Shot 2016-05-01 at 09.41.56.png

1 Like

Cool! Thanks for doing this.

1 Like

Only a pleasure, the community has helped me out so much, I’m glad i can contribute a little.
rock on!