Search Unity

IndieEffects: Bringing (almost) AAA quality Post-Process FX to Unity Indie

Discussion in 'Assets and Asset Store' started by FuzzyQuills, Sep 2, 2013.

  1. Gogin

    Gogin

    Joined:
    Nov 9, 2013
    Posts:
    60
    @FuzzyQuills:

    No I just want some scene where will be some of these effect used and looks nice. I dont know how to use it correctly.
     
  2. Berenger

    Berenger

    Joined:
    Jul 11, 2012
    Posts:
    78
    Allright, to fix the AA, change line 3's required comp from Camera to IndieEffect. Then remove the component and add it again. Also, default shader of IndieEffect.cs is not set.
     
  3. Lemo76

    Lemo76

    Joined:
    Aug 7, 2012
    Posts:
    174
    @Gogin

    I suggest firing up any of the sample projects for Unity and try putting the FX in there for the time being.
     
  4. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Ok then, that's odd... And Berenger, i wonder what happened? Maybe you forgot to update the tex!

    EDIT: Just looked through it, and it seems everything is declared private... could this be the problem sir? I am so sure declaring private locks out variable changes, but other than that, i have no idea!

    EDIT2: Just saw your other post; A missing shader usually causes a pink screen, not a gray one, but still... that's odd. try changing the "private void" to "void" as this might free up the locked code. Only an assumption from my Java programming experience, i am otherwise a total n00b at C#!

    @Gogin: It's simple: try dropping these effects in order onto your camera. (don't bother about the base script, as this should be auto-added for you.)
    • DoF (Depth of field. the _depth extension should auto-add itself.)
    • Bloom (adjust the bloom amount value to whatever suits your scene!)
    there you go. just a basic setup to spruce up any scene. for a dream-like effect, try giving the vignette shader a go! And don't feel too bad: everyone has those times where they don't know where to start with an asset. ;)
     
    Last edited: Apr 2, 2014
  5. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Ok, berenger. I think the prob ex3me was experiencing was that the JS version of IndieEffects was added along with a C# script, which will never work no matter how much anyone tries. so adding the include will ensure that the right script gets added. I can easily check the scripts and do this for you if you like, since i at least have some basic understnading of C# syntax, enough to be able to port C# to JS, but not the other way round... :/ Anyway, don't worry, people make these mistakes. (I even broke the motion blur at some point, and realized it was an extra tex screwing around with the shader. of course, i have fixed that since. and, I'm babbling again... :p)
     
  6. Berenger

    Berenger

    Joined:
    Jul 11, 2012
    Posts:
    78
    Private is the default scope in C#, I just prefere adding it so it's explicite. I checked the others and they're ok. If you mean to continue with this project, maybe you could use a versioning solution like github ? I've never used it, but it could help I guess.
     
  7. CyberDreamer

    CyberDreamer

    Joined:
    Apr 2, 2014
    Posts:
    6
    Hello, FuzzyQuills!
    1) Can I implement edge detection in the free Unity (indie) version similar to the picture below? As far as I know you need to use the baking of vertex shader render to texture (GrabPass). but this is only available in the professional version.



    2) And I have a problem with using your effects. My game does not have a large number of polygons or some other effects, but the use of anti-aliasing and blur leads to a strong decrease in performance.
     
    Last edited: Apr 2, 2014
  8. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    @CyberDreamer: Ok... Could you post the amount of draw calls? anything above 800 will probably lag. and these effects are not designed to work on 1080p smoothly, unfortunately. As for your edge detect: that already has a basic implementation in the pack! It isn't as smooth as the example though, but at least it's there! Of course, i could give this a shot if you want.

    It would also be great if you could post your computer's specs too, since this fx pack needs a decent computer to run. (I consider anything above 30fps as acceptable, but your expectations may be different...) My computer is only a really cheap school lappy, yet this runs at 60fps on 640x480! and the NVIDIA quattro handles these at lightning speed! again, speed depends on how fast your beast can do readPixels on one frame...

    @Berenger: well, to keep things smooth, i prefer to release a stable version that is complete and bug-free! gives me time to fix bugs and the like before the next release. i could at least add a nightly build link too if you like... Anyway, i figured out a solution to the C# prob: simply have the components mark themselves as "<effect name>-C#" so that the scripts don't cross paths! I am doing this currently while fixing up my other water pack, so this should come soon... BTW, depending on what i achieve, you might have to port the scripts again anyway... :) Or just the one!
     
    Last edited: Apr 3, 2014
  9. CyberDreamer

    CyberDreamer

    Joined:
    Apr 2, 2014
    Posts:
    6
    Thanks for the quick reply!

    At a resolution of 1280 x 1024 I have ~30 fps. My video card is a NVIDIA GeForce GTS 250. I would like to have some reserve capacity and I think 30 fps is bad, when the scene has not filled out completely. Performance drops to 22 fps when I'm using edge detection (outline). Does it matter what order I use effects?

    And how can i make a selection borders in Outline Effect smoother? In my example, used information about the vertex normals, which then included in the texture. Sharp changes in normal textures show the border. Your method is based on finding the boundaries in the final render the scene, right?

    PS: Sorry for bad english, just in case :( And greetings from cold Russia! :D
     
  10. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Um, sorry, what's "reserve capacity?" And what are you using in your scene? BTW, you forgot to post the draw calls... also check there is no VSync, this will slow these fx down. and 1280x1024 is WAY TO HIGH to run this smoothly! my demo webplayer is only 640x480! The edges are drawn by checking for large differences in color, but the normal based approach might work! (Depth could also work, but some of the changes are too subtle sometimes...)

    BTW, greetings from Australia, and the one and only FuzzyQuills! And your english wasn't too bad at all, I've seen worse over here... :D And yes, i once heard that Russia went below -50.

    EDIT: I looked up your card, it should be able to handle these effects well. If you are using a terrain in your scene, try upping pixel error so it isn't too high to be glitchy, but high enough to increase performance, as rendering terrain is VERY expensive...
     
    Last edited: Apr 3, 2014
  11. CyberDreamer

    CyberDreamer

    Joined:
    Apr 2, 2014
    Posts:
    6
    FuzzyQuills

    Under reserve capacity i mean that on my computer it should be faster that to have high probability on old computers. Or this phenomenon depends on so many factors that it does not make sense? I just thought it strange that the use of 2-3 effects so much lade my system. But yes, you were right, the VSync was set. Now FPS became 60.

    Where can I find the number of scene calls ? it's not the FPS? My scene is represented in the picture
    $GameScreen_067.jpg

    EDIT: Yesterday snow fell and the temperature dropped to -10. Nice time for game develop:)
     
    Last edited: Apr 3, 2014
  12. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Oh yea, the cold is always good game design and gaming weather! means you can hold in heat better...

    Anyway, there should be a button called "show statistics" on the play window. click this to bring up the overlay. then look at the number that says "draw calls." there you go! (If you have Russian Unity, then it might be marked something different...) And you draw calls aren't the framerate, but it influences how long it will take to draw one frame, thus influencing the frame rate.

    BTW, nice scene! where did you get the models from?
     
  13. CyberDreamer

    CyberDreamer

    Joined:
    Apr 2, 2014
    Posts:
    6
    FuzzyQuills
    Thank you for the previous post!
    I found this parameter. He is now 130-160. Can i manage it?

    I and two my friends decided to make a game. I am a programmer, and they 3d artists. Scene they did. Graphics should not be photorealistic, but should be beautiful no matter what style.:)
     
    Last edited: Apr 3, 2014
  14. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    130 draw calls? that's nothing! I don't know what is causing low framerates then, unfortunately. one thing to try is to use a script to set the target frame rate. (if you have made one like this, then make sure it isn't interfering with your frame rate) and interesting concept, at least it isn't flappy bird or another FPS...

    Anyway, your scene should be performing well, also watch for high-poly meshes - this can bring the frame rate down. if possible, try reducing the polys and see how it goes.
     
  15. jocyf

    jocyf

    Joined:
    Jan 30, 2007
    Posts:
    288
    is it posible to simulate de grabpass effect of a shader?
    I'm doing a Distortion Glass effect but t only works using two cameras, because the grabpass texture is used to recreate the distortion using a bumpmap like the Glass_Stained_BumpDistort effect.

    I've been able to do full camera effect (used in underwater for example) but I cant do it per object (i need a second camera to achieve the effect).
     
  16. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    @jocyf: Actually, you don't need a per-object camera: it is possible to use one texture for all objects. if you want an example, have a look at my river water pack in my signature. as for how to do it, and if you fancy yourself a shader programmer, (not many people can get their head around shaders... ;)) it's simple: just use the tex as normal, and have each object using the glass material have the tex updated in their instance of that material. as for the shader: just have a texture drawn in screen coordinates, and apply a parallax offset to it. i can make an example if you like.

    Anyway, good luck, and unfortuantely, GrabPass isn't possible directly, but by using the method expained above, you can emulate grabpass from script! And i wouldn't mind seeing your underwater effect sir!

    -FuzzyQuills
     
  17. jocyf

    jocyf

    Joined:
    Jan 30, 2007
    Posts:
    288
    Ok. This is the fullscreen underwater code:

    BumpDistortFullScreen.js
    Code (csharp):
    1.  
    2. #pragma strict
    3. /*
    4.  
    5.                 ----------Negative----------
    6. When i was playing around with the indie effects motion blur shader, i got
    7. this effect by accident. enjoy!
    8. */
    9. @script RequireComponent (IndieEffects)
    10. @script AddComponentMenu ("Indie Effects/GlassStainedBumpDistortFS")
    11. import IndieEffects;
    12.  
    13. private var DistortMat : Material;
    14. var shader : Shader;
    15. var TintTex : Texture2D;
    16. var BumpMap : Texture2D;
    17. @Range(0, 128) var distortion : float;
    18. @Range(-10, 10) var speed : float;
    19. @Range(0, 1) var alpha : float;
    20.  
    21. function Start () {
    22.     DistortMat = new Material(shader);
    23. }
    24.  
    25. function Update () {
    26.     DistortMat.SetFloat("_BumpAmt",distortion);
    27.     DistortMat.SetFloat("_offset",speed);
    28.     DistortMat.SetFloat("_alpha",alpha);
    29.     DistortMat.SetTexture("_GrabTexture", IndieEffects.renderTexture);
    30.     DistortMat.SetTexture("_TintTex",TintTex);
    31.     DistortMat.SetTexture("_BumpMap",BumpMap);
    32. }
    33.  
    34. function OnPostRender () {
    35.     FullScreenQuad(DistortMat);
    36. }
    37.  
    BumpDistortFS.shader
    Code (csharp):
    1.  
    2. // Per pixel bumped refraction.
    3. // Uses a normal map to distort the image behind, and
    4. // an additional texture to tint the color.
    5.  
    6. Shader "FX/BumpDistortFS" {
    7. Properties {
    8.     //_MainTex ("Base (RGB)", 2D) = "" {}
    9.     _GrabTexture ("Base1 (RGB)", 2D) = "" {}
    10.     _BumpAmt ("Distortion", range (0,128)) = 10
    11.     _TintTex ("Tint Color (RGB)", 2D) = "white" {}
    12.     _BumpMap ("Normalmap", 2D) = "bump" {}
    13.     _offset ("Scroll Speed", Range (-0.99, 0.99)) = 0.99
    14.     _alpha ("Alpha Mult", Range (-0.99, 0.99)) = 0.99
    15. }
    16.  
    17. Category {
    18.  
    19.     // We must be transparent, so other objects are drawn before this one.
    20.     Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Opaque" }
    21.     //Blend SrcAlpha OneMinusSrcAlpha
    22.     //Blend SrcAlpha One
    23.     //AlphaTest Greater .01
    24.     //Cull Off Lighting Off ZWrite Off
    25.     //LOD 200
    26.    
    27.     SubShader {
    28.  
    29.         // This pass grabs the screen behind the object into a texture.
    30.         // We can access the result in the next pass as _GrabTexture
    31.         //GrabPass {                           
    32.         //  Name "BASE"
    33.         //  Tags { "LightMode" = "Always" }
    34.         //}
    35.        
    36.         // Main pass: Take the texture grabbed above and use the bumpmap to perturb it
    37.         // on to the screen
    38.         Pass {
    39.             Name "BASE"
    40.             Tags { "LightMode" = "Always" }
    41.            
    42. CGPROGRAM
    43. #pragma vertex vert
    44. #pragma fragment frag
    45. #pragma fragmentoption ARB_precision_hint_fastest
    46. #include "UnityCG.cginc"
    47.  
    48. struct appdata_t {
    49.     float4 vertex : POSITION;
    50.     float2 texcoord: TEXCOORD0;
    51. };
    52.  
    53. struct v2f {
    54.     float4 vertex : POSITION;
    55.     float4 uvgrab : TEXCOORD0;
    56.     float2 uvbump : TEXCOORD1;
    57.     float2 uvmain : TEXCOORD2;
    58. };
    59.  
    60. //sampler2D _MainTex;
    61. float _BumpAmt;
    62. float _offset;
    63. float _alpha;
    64. float4 _BumpMap_ST;
    65. float4 _TintTex_ST;
    66.  
    67. v2f vert (appdata_t v)
    68. {
    69.     v2f o;
    70.     o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
    71.     #if UNITY_UV_STARTS_AT_TOP
    72.     float scale = 1.0;
    73.     #else
    74.     float scale = -1.0;
    75.     #endif
    76.     o.uvgrab.xy = (float2(o.vertex.x, o.vertex.y*scale) + o.vertex.w) * 0.5;
    77.     o.uvgrab.zw = o.vertex.zw;
    78.     o.uvbump = TRANSFORM_TEX( v.texcoord, _BumpMap );
    79.     o.uvmain = TRANSFORM_TEX( v.texcoord, _TintTex );
    80.     //float sinX = sin ( _offset * _Time );
    81.     //float cosX = cos ( _offset * _Time );
    82.     //float sinY = sin ( _offset * _Time );
    83.     //float2x2 rotationMatrix = float2x2( cosX, -sinX, sinY, cosX);
    84.     //o.uvmain.xy = mul ( v.texcoord.xy, rotationMatrix );
    85.    
    86.     //o.uvmain = v.texcoord.xy * _TintTex_ST.xy + _TintTex_ST.zw;
    87.     float result = ( _offset * _Time );
    88.     o.uvmain = float4(o.uvmain.x + result , o.uvmain.y +  result, 0, 1);
    89.     o.uvbump = float4(o.uvbump.x + result , o.uvbump.y +  result, 0, 1);
    90.     //o.uvmain = float4(o.uvmain.x + _offset , o.uvmain.y +  _offset, 0, 1);
    91.     return o;
    92. }
    93.  
    94. sampler2D _GrabTexture;
    95. float4 _GrabTexture_TexelSize;
    96. sampler2D _BumpMap;
    97. sampler2D _TintTex;
    98.  
    99. half4 frag( v2f i ) : COLOR
    100. {
    101.     // calculate perturbed coordinates
    102.     half2 bump = UnpackNormal(tex2D( _BumpMap, i.uvbump )).rg; // we could optimize this by just reading the x  y without reconstructing the Z
    103.     float2 offset = bump * _BumpAmt;// * _GrabTexture_TexelSize.xy;
    104.     i.uvgrab.xy = offset * i.uvgrab.z + i.uvgrab.xy;
    105.    
    106.     half4 col = tex2Dproj( _GrabTexture, UNITY_PROJ_COORD(i.uvgrab));
    107.     half4 tint = tex2D( _TintTex, i.uvmain );
    108.     col.a = _alpha; // doesn't work
    109.     tint.a = _alpha;
    110.     return col * tint;
    111. }
    112.        
    113. ENDCG
    114.         }
    115.     }
    116.  
    117. }
    118.  
    119. }
    120.  
    121.  
    I'm using this texture as bumpmap (taken from Heat Distortion old post):
    $UnderWater BumpMap.png
     
  18. jocyf

    jocyf

    Joined:
    Jan 30, 2007
    Posts:
    288
    The glass per object effect, in the other side is giving me problems because i need a rendertexture without getting the glass object itself. So, as i comented before, i've done it using a second camara to render everething except the glass and using that rendertexure.
    Here are the scripts:

    BumDistort.js
    Code (csharp):
    1.  
    2. #pragma strict
    3. /*
    4.  
    5.                 ----------Negative----------
    6. When i was playing around with the indie effects motion blur shader, i got
    7. this effect by accident. enjoy!
    8. */
    9. //@script RequireComponent (IndieEffects)
    10. @script AddComponentMenu ("Indie Effects/GlassStainedBumpDistort")
    11. import IndieEffects;
    12.  
    13. private var DistortMat : Material;
    14. //var shader : Shader;
    15. //var TintTex : Texture2D;
    16. //var BumpMap : Texture2D;
    17. //var distortion : float;
    18.  
    19. function Start () {
    20.     //DistortMat = new Material(shader);
    21.     DistortMat = this.renderer.sharedMaterial;
    22. }
    23.  
    24. function Update () {
    25.     //DistortMat.SetFloat("Distortion",distortion);
    26.     DistortMat.SetTexture("_GrabTexture", IndieEffects.renderTexture);
    27.     //DistortMat.SetTexture("_MainTex", IndieEffects.renderTexture);
    28.     //DistortMat.SetTexture("_Tintmap",BumpMap);
    29.     //DistortMat.SetTexture("_Normalmap",TintTex);
    30. }
    31.  
    32. /*function Update () {
    33.     fisheyeMaterial.mainTexture = renderTexture;
    34. }*/
    35.  
    36. function OnPostRender () {
    37.     FullScreenQuad(DistortMat);
    38. }
    39.  
    BumpDistorPerObject.shader
    Code (csharp):
    1.  
    2. // Per pixel bumped refraction.
    3. // Uses a normal map to distort the image behind, and
    4. // an additional texture to tint the color.
    5.  
    6. Shader "FX/BumpDistortPerObject" {
    7. Properties {
    8.     _GrabTexture ("Base1 (RGB)", 2D) = "" {}
    9.     _BumpAmt ("Distortion", range (0,128)) = 10
    10.     _TintTex ("Tint Color (RGB)", 2D) = "white" {}
    11.     _BumpMap ("Normalmap", 2D) = "bump" {}
    12. }
    13.  
    14. Category {
    15.  
    16.     // We must be transparent, so other objects are drawn before this one.
    17.     Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Opaque" }
    18.    
    19.     SubShader {
    20.  
    21.         // Main pass: Take the texture grabbed above and use the bumpmap to perturb it
    22.         // on to the screen
    23.         Pass {
    24.             Name "BASE"
    25.             Tags { "LightMode" = "Always" }
    26.            
    27. CGPROGRAM
    28. #pragma vertex vert
    29. #pragma fragment frag
    30. #pragma fragmentoption ARB_precision_hint_fastest
    31. #include "UnityCG.cginc"
    32.  
    33. struct appdata_t {
    34.     float4 vertex : POSITION;
    35.     float2 texcoord: TEXCOORD0;
    36. };
    37.  
    38. struct v2f {
    39.     float4 vertex : POSITION;
    40.     float4 uvgrab : TEXCOORD0;
    41.     float2 uvbump : TEXCOORD1;
    42.     float2 uvmain : TEXCOORD2;
    43. };
    44.  
    45. //sampler2D _MainTex;
    46. float _BumpAmt;
    47. float4 _BumpMap_ST;
    48. float4 _TintTex_ST;
    49.  
    50. v2f vert (appdata_t v)
    51. {
    52.     v2f o;
    53.     o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
    54.     #if UNITY_UV_STARTS_AT_TOP
    55.     float scale = 1.0;
    56.     #else
    57.     float scale = -1.0;
    58.     #endif
    59.     o.uvgrab.xy = (float2(o.vertex.x, o.vertex.y*scale) + o.vertex.w) * 0.5;
    60.     o.uvgrab.zw = o.vertex.zw;
    61.     o.uvbump = TRANSFORM_TEX( v.texcoord, _BumpMap );
    62.     o.uvmain = TRANSFORM_TEX( v.texcoord, _TintTex );
    63.     return o;
    64. }
    65.  
    66. sampler2D _GrabTexture;
    67. float4 _GrabTexture_TexelSize;
    68. sampler2D _BumpMap;
    69. sampler2D _TintTex;
    70.  
    71. half4 frag( v2f i ) : COLOR
    72. {
    73.     // calculate perturbed coordinates
    74.     half2 bump = UnpackNormal(tex2D( _BumpMap, i.uvbump )).rg; // we could optimize this by just reading the x  y without reconstructing the Z
    75.     float2 offset = bump * _BumpAmt * _GrabTexture_TexelSize.xy;
    76.     i.uvgrab.xy = offset * i.uvgrab.z + i.uvgrab.xy;
    77.    
    78.     half4 col = tex2Dproj( _GrabTexture, UNITY_PROJ_COORD(i.uvgrab));
    79.     half4 tint = tex2D( _TintTex, i.uvmain );
    80.     return col * tint;
    81. }
    82.        
    83. ENDCG
    84.         }
    85.     }
    86.  
    87. }
    88.  
    89. }
    90.  
    91.  
    Using the textures used en Pro's Glass Example.

    Create a cube and assing a material that is using this shader. Drag the BumpDistort too.
    Create 2 cameras:
    - One to render everything but not the glass (using any layer to do it) and drag there the imageEffect script.
    - The other will render everything.
    That's it. I will take a look to the river example and try to get this effect using only one camera, tnx for your help.

    If i's too confusing and you wanna test it quickly in a new project:
    https://dl.dropboxusercontent.com/u/45531603/IndieEffects_Glass_Water_Test.rar
     
    Last edited: Apr 5, 2014
  19. 5hit6ames

    5hit6ames

    Joined:
    Jan 25, 2014
    Posts:
    4
    Hello FuzzyQuills,

    Is it possible to blur (simple blur, not motion blur) the background when I have paused the game?

    I read somewhere that the process would be to save the 3d view at the time of game-pause as a texture2D and then blur the texture using some shader, also ReadPixels shouldn't hit the performance here as the texture would be extracted only for a single frame (after the paused frame has been fully rendered).

    But thats all about the theory I read, how can I achieve it? Please help :)
     
  20. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    I can help! Definitely! Just have IndieEffects turn on for one frame, then disable it after applying the blur to the background. there you go. If you like, i can make a script for just this purpose!
     
  21. KuRouZu

    KuRouZu

    Joined:
    Aug 8, 2013
    Posts:
    27
    Hi, im testing the asset and is great. But I have a problem. I’m using the color balance component, in the scene I have a GameObject with a sprite renderer and animator components attached, the main character, and another sprite that is the background. (is a 2d game).

    When I press play and scene start, color balance works fine, but if I put a negative value in the scale of the sprite object (the character) in inspector or from code, for example X=-1, the color balance stops working.

    If I change the depth of the sprites in some "combinations" color balance works although the scale is negative, but I need it to work regardless of depth of objects and if they have negative scale

    I'm missing some configuration step? How I can fix it?
    Regards
     
  22. Eric2241

    Eric2241

    Joined:
    Dec 2, 2012
    Posts:
    642
    $Screen Shot 2014-04-08 at 5.39.55 PM.png $Screen Shot 2014-04-08 at 5.39.21 PM.png Amazing work, used it in my scene. Looks faboulous. One question, why does adding bloom and dof create a more saturated color like this: $Screen Shot 2014-04-08 at 5.39.21 PM.png
     
    Last edited: Apr 9, 2014
  23. Eric2241

    Eric2241

    Joined:
    Dec 2, 2012
    Posts:
    642
  24. Eric2241

    Eric2241

    Joined:
    Dec 2, 2012
    Posts:
    642
    Sorry about the large amounts of photos, my internet browse (Google chrome canary) was being weird.
     
  25. 0tacun

    0tacun

    Joined:
    Jun 23, 2013
    Posts:
    245
    The Bloom and DOF effect are taking the whole picture and multiply it with itself. I believe that the current bloom effect is broken as you will notice if you add the bloom effect with an intensity of 1 the colors will be the same as if you use the DOF effect. The luminance is somehow not taken into account for calculation. Maybe it was fixed in one of the latest releases or FuzzyQuills is currently working on it.
     
  26. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    @0tacun: yes, i am working on that... and trying to get it to mimic HDR, but it not working well! I did however get the DoF and Bloom to work together, just make sure the bloom is placed last! this should bloom the DoF too, but if not, then that's another bug to fix... :)

    @Eric2241: NICE! and yea, bloom is a bit broken right now. try placing the bloom effect last and see what happens. if it doesn't work, then, like i said above, another bug to fix... BTW, i saw that link a while back and wondered if i could do that myself!

    @KuRouZu: I haven't actually tested these effects with the new 2D toolkit, and probably won't anytime soon, so thanks for pointing this out. But still, a negative scale shouldn't bust the script...
     
    Last edited: Apr 10, 2014
  27. Eric2241

    Eric2241

    Joined:
    Dec 2, 2012
    Posts:
    642
    @fuzzyquills Thanks, I will try that and then post my results back here.
     
  28. Eric2241

    Eric2241

    Joined:
    Dec 2, 2012
    Posts:
    642
    @fuzzyquills The AA does not seem to have a visible effect on the game, however it does decrease the frames greatly. For example with AA on its 20 fps when with out 26-27 fps, of course this is with out any other effects applied.
     
  29. KuRouZu

    KuRouZu

    Joined:
    Aug 8, 2013
    Posts:
    27

    Thanks for your quick response. Yes, I'm using the new 2D toolkit.

    I have continued testing it, and the problem only occurs when a negative scale is introduced into a sprite that is a multiple sprite mode, not single. If you want I can prepare a project for reproduce easily the problem.

    Regards
     
  30. Deleted User

    Deleted User

    Guest

    Hello. I am trying to use this motion blur within my game. I am following the manual word for word but I cannot get any of the effects to work on a camera. I am using a First Person Controller, and I have also tried it on still cameras that use a mouse-look script.

    I am using Unity 4.2.1f4.

    Is there something I am doing wrong?

    I am importing the assets > Clicking my camera > Add componenet > IndieEffects > IndieEffects (blur) > Ticking the checkbox for Motion Blur > Play.. but nothing is changing?


    The errors I get in the console are :

    NullReferenceExpception
    IndieEffects.FullScreenQuad (UnityEngine.Material renderMat) (at Assets/IndieEffects/CSharp/IndieEffects.cs:25)

    Matrix stack full depth reached
    UnityEngine.GL:pushMatrix()



    Any help is appreciated, thanks.



    Edit : After updating Unity to 4.2.4f, the motion blur is now working. Thank you.
     
    Last edited by a moderator: Apr 10, 2014
  31. Eric2241

    Eric2241

    Joined:
    Dec 2, 2012
    Posts:
    642
    @fuzzyquills after the change you suggested, the result was the same, however turning up the bloom all the way did help!
     
  32. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    @Eric2241: Glad to hear! Hopefully i can get my new release out soon. And the bloom effect will use Luminance as well in the new release coming!

    @Raven2392: The problem there was missing shaders, which causes the errors because the material can't be drawn. But good that it's fixed! be mindful of this in the future, should a script of mine do this again...
     
  33. 5hit6ames

    5hit6ames

    Joined:
    Jan 25, 2014
    Posts:
    4
    Hello again FuzzyQuills, everything works brilliantly, except for blur and fisheye, blur effect (not motion) is what i need for my project

    Keeping stock settings for indieeffects script and varying the slider value for blur script only results in a washed (white) screen. I am using Unity 4.3.2f1

    EDIT: Fixed, blur script takes blurgaussian shader by default, swapped it with blur shader and everything worked :)
     
    Last edited: Apr 11, 2014
  34. Eric2241

    Eric2241

    Joined:
    Dec 2, 2012
    Posts:
    642
    Sounds good! Thanks for the reply!
     
  35. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    @5hit6games: Ok, that's odd... the blur gaussian shader shouldn't do that. Anyway, good to know that the old shader still works for you!
     
  36. Berenger

    Berenger

    Joined:
    Jul 11, 2012
    Posts:
    78
  37. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Thanks! Didn't think that was possible to do! After reading your link, i am thinking of doing this. If you like, the next time you are required to do a C# port again, i will give you a document with some tooltip text in it for you to use in the C# port!

    Once i have this up and running, I will report back!
     
  38. KeithT

    KeithT

    Joined:
    Nov 23, 2011
    Posts:
    83
    Have the same issue with Blur as 5hit6games, default gaussian shader just gives a white screen, simple shader works......
     
  39. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    I will have to look into this... the new blur shouldn't do that!
     
  40. Rphysx

    Rphysx

    Joined:
    Mar 26, 2014
    Posts:
    54
    Hi, I'd like to thank you for the great asset, and I'd also point out that apparently motion blur is not working if I don't play the game on fullscreen mode. If I do, the screen gets brighter and the blur doesn't show. Is this happening only to me ?

    EDIT : with some resolutions I noticed I see the effect correctly even in windowed mode. Setting the game for example to 1366x768 would give me the brigher screen while in 800x600 or 1280x720 the blur shows correctly, why is it ?
     
    Last edited: Apr 21, 2014
  41. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Huh? which effect are you trying to use? if it's the gaussian blur, then it shouldn't do that. on the other hand, i don't think anyone pointed out that my fx don't work unless it's fullscreen. (this, however, is the case in the editor with the default motion blur, and this is because alpha-blended shaders leak into the grey background the editor puts around your game window)

    I hope my pack is up to date, but if for some reason the damn motion blur wen't broke again... :mad: Anyway, if so then hopefully, i can teach it a lesson ;)

    Also try sending me a screenie of your setup. this will help find the problem. (just the inspector will do)
     
  42. Torigas

    Torigas

    Joined:
    Jan 1, 2014
    Posts:
    63
    Thanks so much for this package. Mighty kind of you!
     
  43. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    @Torigas: You're welcome sir! If you have any probs, don't hesitate to call on me!
     
  44. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    Ok, guys, it's time something happened around here:

    I was looking through Marrrk's FXLab image effects thread, and saw that some of his effects are actually achievable with this package too. so, i have decided to have a shot at chromatic abberation! once i have something, i will post results. I also plan to clean up the project a bit so that IndieEffects will be as complete as it was on first release!

    That is all for now...

    -FuzzyQuills
     
  45. Rphysx

    Rphysx

    Joined:
    Mar 26, 2014
    Posts:
    54
    That would be great ! : D
     
  46. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    And here is the chromatic abberation as of now...
    $Picture1.png
    I also plan on cleaning up the SSAO and add a blur pass to it, that way, it will be less noisy. (it's also still considered experimental until it actually looks like SSAO... ;))

    And BTW, any way of using MSI screen capture with unity? i used it once before, but it doesn't work now... (I used PowerPoint to do the one above)
     
  47. Eric2241

    Eric2241

    Joined:
    Dec 2, 2012
    Posts:
    642
    Looking nice!
     
  48. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Looks Really nice FuzzyQuills. Do you think an actual no artifacts SSAO would be possible in Unity free?
     
  49. FuzzyQuills

    FuzzyQuills

    Joined:
    Jun 8, 2013
    Posts:
    2,871
    @Baldinoboy: Yes, just look for the FXLab image fx pack, they have a working SSAO effect. (Wasn't that obvious though!) At the moment, i found an old bloom script sitting on my SD card, so expect a brand new bloom effect soon!

    EDIT: After accidentally producing an HDR effect, I couldn't reproduce it. the remnants are going to replace the current bloom effect, and I may be able to blur the SSAO shader. I am also looking for alternatives that use the _Normals extension, as the current one doesn't work right with the normal _Depth texture.
     
    Last edited: May 9, 2014
  50. Eric2241

    Eric2241

    Joined:
    Dec 2, 2012
    Posts:
    642
    Can't wait for the new bloom!