Search Unity

TOZ Glow (Per Object)

Discussion in 'Assets and Asset Store' started by aubergine, Jul 1, 2015.

  1. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,663

    Selective glow effect per object.
    You define which objects to glow with an individual Glow texture.
    Works on mobile and desktop.
    Compatible with Single Pass Stereo Rendering.
    Compatible with GPU Instancing.

    There are 3 types of image effects for SM2.0 (Diagonal), SM3.0 (Both diagonal and Vertical/Horizontal)
    It works with any unity provided shader including the standard ones as well as any custom shaders which follow unity RenderType naming schemes.

    Glow is occluded properly with any of the above mentioned shaders.

    WEBGL DEMO

    Buy from:
    ASSETSTORE
    TOZ MARKET



     
    Last edited: Feb 17, 2019
  2. RavenTravelStudios

    RavenTravelStudios

    Joined:
    Oct 15, 2015
    Posts:
    72
    Hi Aubergine,

    is it working with sprite renderer for 2D also?
     
  3. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,663
    Yes it works with all Unity provided shaders including sprites and anything else. But i didnt submit it to Assetstore yet.
     
  4. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,663
    There is a new update on the way which includes minor bug fixes and make the package compatible with VR Single pass stereo rendering.
    New update Works 2017.2 and onwards only.

    I do not intend to support previous versions, so make a backup copy.
     
  5. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,045
    Can you give me an idea of performance impact? We're using another glow shader now, and we often have 25-30 animated objects onscreen, all with selective glow, and it uses 3.5-4.5ms on the CPU (and a good CPU). Would love to buy this if yours is a lot more performant!
     
  6. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,663
    My package doesnt care how many objects are on screen, it does create a correctly occluded fullscreen mask and applies the effect in one pass. It is also up to you to make things more beautiful or more performant.
    In my average demo running in the editor, the profiler says 0.25ms and im on a Intel core i7-6700 3.4ghz with an ancient amd radeon r7 200
    I can go up to 1ms and make the glow more beautiful, or i can go much lower. Its up to you.
     
  7. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,045
    sounds great, thanks for the quick reply. We'll buy it and try it out!
     
  8. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,663
    Let me know if you need any customization. And dont forget to review :)
     
  9. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,045
    Got it, and yes, very very fast! :)

    Looks like there's no way to adjust the color intensity, right? I've adjusted the color on the texture, but it is still quite intense even with the texture becoming quite desaturated.
     
  10. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,663
    Try to make the glow texture use darker colors for less intensive parts and try to use brighter colors for the opposite.
    Or, if you dont care to add an alpha channel to your glow texture, add it and edit the TextureMask.shader line 36 as follows: return fixed4(result * mask.a, 1.0);
    This way your alpha channel will control the intensity of the glow colors. However, i strongly advise against it and its better to make a nicer glow texture with rgb channels only instead.
     
  11. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,045
    Oh, I forgot about the Glow Amount slider on the object, duh -- that does exactly what I need!

    Thanks again for this excellent effect!
     
    aubergine likes this.
  12. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,663
    I do frequently update these packages, and customer reviews on the store encourage me to do better :)
     
    gecko likes this.
  13. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,045
    So we have a tricky situation with one animal in our game -- the model has four meshes, and we need the third mesh to glow, but TOZ Glow uses the first mesh, no option to choose a different one. This is a very complicated rigged animal, so reordering the meshes in the model is not a good option. Is there any way we can assign the glow to (a) affect all meshes, or (b) just one selected mesh?

    thanks
    Dave
     
  14. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,663
    Couple of options here.

    1- When you say "four meshes", if you mean individual meshes, all you have to do is attach the GlowController.cs file to the transform whichever has the mesh renderer you want to glow.

    2- If you mean it has only one mesh renderer but has multi-material, you can edit the GlowController.cs file and change the material variable to be an array value in Awake function: material = GetComponent<Renderer>().materials[3]

    If you want all the multi-materials to glow, then you do the material as an array itself, and all other functions must be in a for loop.

    3- If the object(s) have a material in your project folder, you can edit the GlowController.cs file as to make the material a public variable and delete the Awake function and attach the script to any game object you want. But beware that this effect is actually per-material, so any other object using the same material will also glow.

    Just a side note, there is a bug in the code that when you use material instead of sharedMaterial, i forgot to destroy the material and it is leaking at the moment. I will release a bug fix version soon. But if you are in a hurry, just edit the GlowController.cs file and add the following:
    Code (CSharp):
    1.         void OnDestroy() {
    2.             Destroy(material);
    3.         }
    If any of the above sounds confusing, just send me the animal model and i will send you the custom package for it.
     
    gecko likes this.
  15. JediNizar

    JediNizar

    Joined:
    Nov 13, 2016
    Posts:
    43
    Hi did u tested it on mobile? would love to use it in my mobile project
     
  16. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,663
    It works on mobile and it works very fast. Actually, it is meant to work on a mobile platform as default, for desktops there is room for more beautiful effect. Also works on VR gadgets.
     
  17. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,045
    thanks! We did #3, works great!
     
  18. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,663
    If you did number 3, then you can also use instancing, static or dynamic batching as well, it will be faster.
     
    gecko likes this.
  19. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,663
    Just submitted the new v3.0 update to the AssetStore. It will take some days until it will be alive on the Assetstore, but you can also buy it right now from TOZ Market.

    Check the new webgl demo to see it in action.
     
  20. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,663
    New update is acepted and alive on the AssetStore now.
     
  21. gecko

    gecko

    Joined:
    Aug 10, 2006
    Posts:
    2,045
    I just started having a weird problem with TOZ Glow. Was working great on Friday, but today, when it's activated, GPU usage skyrockets to 50ms to 300ms or more. But what's weirder is that my Unity coder doesn't see it happening on his end. We're all synced up on git, so it's baffling why I have this problem and he doesn't.

    I'm sure it's not a problem with TOZ.....but since I'm stumped, I wondered if you had any suggestions about what the actual culprit might be?

    Here's the profiler: if I drill down more, it just has N/A for Related Objects.

    thanks
    Dave

    toz profiler.PNG
     
  22. aubergine

    aubergine

    Joined:
    Sep 12, 2009
    Posts:
    2,663
    The previous version had materials leaking as default and there was garbage but not too many to crush your fps. And if you did the number 3 solution, it shouldnt.
    Anyways the new update is on the store. Please use that one. The only difference though is i use seperate materials and i destroy the material at the end, so there is no garbage.
    First, please remove the previous package completely both from your project and remove scripts from your camera and objects to glow.
    Second, please reset the material(s) that were previously effected by the glow, i mean only those that you added GlowController.cs. And you will have to re-apply the values and textures again sorry.
    Finally, use the new updated package as is without changing code as in its default state, it doesnt leak materials.

    I dont think it is the reason if you did number 3 though.
     
  23. Holty71

    Holty71

    Joined:
    Nov 11, 2018
    Posts:
    17
    Hi. Does your asset work OK with Unity 2019? I would like to consider it for mobile VR development. Any issues been reported? Thanks!!!
     
unityunity