Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

{Released] Blur - Per Object

Discussion in 'Assets and Asset Store' started by aubergine, Jan 16, 2014.

  1. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,862
    With this package, you can blur individual objects selectively on screen.
    This pack requires Unity PRO because it uses RenderTextures.

    ASSETSTORE LINK

    The left half of the photo is the original, right half of the photo is after the effect is applied. In this scene, the floor and capsule is selected to be blurred.

    EDIT: IF you already own a copy of Aubergines PostProcess Effects pack, this blur effect will be included in the next update to that package. But i dont mind alittle support :)
     

    Attached Files:

    Last edited: Jan 16, 2014
  2. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    The outline of the capsule looks sharp to me, only the textures are blurred?
     
  3. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,862
    The mesh volume is blurred in screen space, not the textures. This is an image effect rather than an object shader.
    It works with making a mask out of the scene from selected objects and only apply blur to this masked area.

    I thought about adding an option to slightly expand volumes to give a fuzzy edge effect, but i will decide that in a further update after some feedback from customers.
     
  4. Cascho01

    Cascho01

    Joined:
    Mar 19, 2010
    Posts:
    1,347
    Ok, I see.
    I think you should add a public value to define this area around the object that also gets blurred (fuzzy).
     
  5. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,862
    Okay i will add smoother edges option for the next update.
     
  6. jcarpay

    jcarpay

    Joined:
    Aug 15, 2008
    Posts:
    558
    Yeah, a variable smooth edges option would be nice.
    Also, high blur values seems to give blocky results. Would it be possible to add an option that enables tweaking blur quality?
     
  7. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,862
    Its hard coded in the image effect shader, I can add a few more variations of the shader where the blur is calculated per texel size rather than random numbers to smooth out the blurring. Or 2-3 more passes to smooth out things.

    Im open to suggestions at this stage. Ill consider anything you want.
     
  8. jcarpay

    jcarpay

    Joined:
    Aug 15, 2008
    Posts:
    558
    Any solution that is cheap to render and tweakable would be great :)
     
  9. ianjgrant

    ianjgrant

    Joined:
    Mar 11, 2013
    Posts:
    28
    Hi, I bought the assets yesterday - Thanks for the work. I've been looking for a per-object blur technique for a while.

    Are there some constraints on what can be blurred? I have a bunch of transparent alpha-ed textures, some mapped to generated meshes (via UCLA mesh generator and some to 2D sprites). The images attached should indicate what I am trying to blur and some issues I am seeing.

    [a] With the required shader transparent/diffuse - I see no blur effect. If I change the shader to diffuse only I see image -an indication that something is happening with the blur...

    I'm using Unity Pro 4.3.2f1 on a mac. I have a stack of image effects on the camera. Do let me know if there is any further info you may need to troubleshoot the issue!

    Kind regards, Ian

    [a]

    $perobjectblue a.png



    $per object blur b.png
     
  10. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,862


    Hi,

    Blur Per Object doesnt support transparent objects out of the box. The reason is its based on how unity calculates a depth image (which this package doesnt use depth images but uses the same technique) Unity didnt provide a standard way of defining transparency.
    Forexample in some of my personal shaders, i get transparency from my mainTexture.a value but in another shader i get transparency from a differentTexture.r value. Or sometimes i just multiply different stuff.

    So we have to customize the shader for your needs.
    Kindly contact me from the email provided in the readme file and explain if you use standard unity transparent shaders on your meshes or is there any other custom shader you are using.

    EDIT: Also provide info about your target platform.

    Regards,
     
  11. jcarpay

    jcarpay

    Joined:
    Aug 15, 2008
    Posts:
    558
    Is an update coming soon?
     
  12. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,862
    Yes, i added the following so far:
    *sm2.0 compatiblity
    *variable for edge smoothness
    edge smoothness is a global value though it does effect every blurred object and it looks kind of funny for very distant objects if blurred. We could use depth texture but i think its overkill. Distant objects should not be blurred.

    EDIT: Should submit the update sometime around weekend.
     
  13. ianjgrant

    ianjgrant

    Joined:
    Mar 11, 2013
    Posts:
    28
    Thank you so much for the prompt and effective response the custom shader that accounts for transparency works a treat!

    Kind regards, Ian
     
  14. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,862
    No problem, let me know if you need anything else.
     
  15. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,862
    Just submitted the new update.

    Features:
    *Folder structure changed to be compatible with my other products.
    *Added variations of the image effect as SM2.0 and SM3.0
    *Added support for TRANSPARENT objects.

    Few notes about transparent objects: The unity standart shaders are not very standart actually. Unlit/mobile versions lack the _Color property but surface shader variations use _Color to calculate final transparency.
    Because of this, i added couple fixes in the readme file for any case.
    Cases are:
    *If you use unlit/mobile shaders only,
    *If you use surface shaders only,
    *If you use all mixed up.
     
  16. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,862
    New update is live in the store.
     
  17. r233967

    r233967

    Joined:
    Sep 24, 2013
    Posts:
    2
    Hi, just purchased your cool package. Where can I find the variable for edge smoothness?
     
  18. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,862
    Hi, looks like ive submitted the wrong version.
    Please reach me on my email which can be found on the readme file so i can send you the updated package.
    I will also submit it again to the store right now.
     
  19. gonzorob

    gonzorob

    Joined:
    Dec 1, 2011
    Posts:
    96
    As mentioned in a previous thread, I'm trying to selectively blur floors.
    Here's a very ugly screen:


    The middle floor (blue tree) is where the player would be. The current effect gives hard edges. Is there a way to have varying blur amounts for each floor? I can't seem to find the discussed 'edge smoothness' variable ...

    Any help greatly appreciated

    Rob

    PS: all 2d props are sprites
     
  20. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,862
    Give me your email, ill send you an update.
     
  21. gonzorob

    gonzorob

    Joined:
    Dec 1, 2011
    Posts:
    96
    Couldnt find the private message button - sent you an email instead :)
     
  22. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,862
    Got it, sent you the updated files.

    EDIT: Curious about your game, the screenshot didnt make sense to me at all.
     
  23. mitaywalle

    mitaywalle

    Joined:
    Jul 1, 2013
    Posts:
    241
    Hello! is there any chance, that you update your per object blur for Unity 5?
     
  24. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,862
    Sure, the pack is ready but didnt have time to submit it to the store. Maybe next week.
    I am considering to make it a paid update though, like 10$ something.
     
  25. mlsptn

    mlsptn

    Joined:
    Jul 27, 2016
    Posts:
    7
    Hi, did you ever submit the updated package to the asset store? I can't seem to find it. Thanks!
     
  26. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,862
    I didn't submit yet, but I should as it is ready anyways. Will do asap.
     
  27. Gruguir

    Gruguir

    Joined:
    Nov 30, 2010
    Posts:
    340
    Hey @aubergine i'm looking forward your selective blur asset, any news ?
     
  28. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,862
    Totally forgot about it, I should submit all waiting packs next week.
     
  29. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,862
    Hello
    Added a new webgl demo to see TOZ Glow and TOZ Pixelate effects working together, TOZ Blur is identical to TOZ Pixelate.
    TOZ Pixelate and TOZ Blur will be seperate products.
     
  30. Gruguir

    Gruguir

    Joined:
    Nov 30, 2010
    Posts:
    340
    any news about TOZ Blur release ?
     
  31. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,862
    Yeah its ready for submission, it takes long time for review stuff though.
    In the below Picture, the bunny on the left and the front are blurred individually while the other 2 remains original.

    blur.jpg
     
  32. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,862
    Unity 5.x version is finally released on the assetstore.