Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Glow 11 - for desktop and mobile

Discussion in 'Assets and Asset Store' started by SRH, May 1, 2013.

  1. Lostlogic

    Lostlogic

    Joined:
    Sep 6, 2009
    Posts:
    693
    There is now a patch where? Right now all glows render in the wrong spot.

    Nevermind, sorry, didn't see your link before. ;)
     
  2. MrMetwurst2

    MrMetwurst2

    Joined:
    Jul 16, 2009
    Posts:
    253
    Try to change the blend mode from additive to screen. It fixed the black screen on my Galaxy Note.
     
  3. mayaman1215

    mayaman1215

    Joined:
    Aug 21, 2013
    Posts:
    3
    Just purchased it, love the glows!

    One problem though: on mobile, my scene can run 30fps, but once added the glow to the camera, the fps dropped to 6 on my iTouch5.
    (I have set up a separate camera for rendering only the glow objects: a helix of light bulbs (there are about 100 of this cloned prefab lightbulbs using a single material). From the stats menu in the Unity Editor, I can see 2 more draw calls are added because of this. )

    How can I optimize this?

    Note: I used all default options for the Glow component attached to camera and used Glow's mobile->Self-illumin->Specular (1 directional light) illum vertext color shader.

    Thanks.
     
    Last edited: Aug 21, 2013
  4. SRH

    SRH

    Joined:
    Feb 28, 2011
    Posts:
    160
    Your setup seems a bit strange. If you use a second camera for rendering only the glowing objects, the glow won't be affected (occluded) correctly by other objects in the scene, also performance will be worse then using only one camera.

    If you really don't need the glow to be affected by other objects then Glow 11 does a lot of useless stuff (most of the work is to make sure other objects can affect the glow). In that I could provide another version of the plugin that removes all the unnecessary stuff.
     
  5. mayaman1215

    mayaman1215

    Joined:
    Aug 21, 2013
    Posts:
    3
    So a separate camera actually made the performance worse. my original thought is separate camera will limit the effects of the glow and thus improve the performance.

    Then I will revert back to the single camera set up.

    However, I tried with one camera set up and the result is the same. So my question still is: how can I improve the performance on mobile. are there any settings i need to pay particular attentions? I have no doubt some developers have made Glow working efficiently on their mobile apps. Could anyone here share your insights about how to set Glow up properly for mobile apps? Thanks a lot.
     
    Last edited: Aug 21, 2013
  6. SRH

    SRH

    Joined:
    Feb 28, 2011
    Posts:
    160
    Here a list of the settings that affect the performance and a recommend setting for mobile

    • [High Precision - enabling should be slower (off)
    • Reuse Depth Buffer - could improve the performance in a few cases, but most probably it's always slower on mobile (off)
    • Rerender Resolution - lower = faster (half)
    • Base Resolution - lower = faster (half)
    • Downsample steps - lower = faster
    • Downsample resolution - lower = faster (quarter)

    Also I would recommend to
    • disable antialiasing.
    • only use mobile shaders
    • don't trust the unity profiler if you're running the app thru xcode (always launch the app directly on the device if you want to profile it)
     
  7. mayaman1215

    mayaman1215

    Joined:
    Aug 21, 2013
    Posts:
    3
    Hi SRH, thanks for the mobile advice. However, I am still no luck to make the app faster. Can you send me the version without all the "unnecessary stuffs"? I want to give it a try.

    Thank you very much!
     
  8. CraigGraff

    CraigGraff

    Joined:
    May 7, 2013
    Posts:
    44
    I'm attempting to modify glows for different objects by creating materials at runtime and modifying the shader properties. I can set the Glow Strength with

    material.SetFloat("_GlowStrength", 1.0f);

    but I can't figure out how to set the Glow Source. Any idea how this would be accomplished?
     
  9. SRH

    SRH

    Joined:
    Feb 28, 2011
    Posts:
    160
    Do change the Glow Source (and/or Glow Multiplier) you need to change the shaderKeywords.

    You'll have to set two shaderKeywords, one for the Glow Source and one for the Glow Multiplier

    The possible values are:

    Glow Source

    Base Texture - GLOW11_GLOW_MAINTEX
    Main Color - GLOW11_GLOW_MAINCOLOR
    Glow Texture - GLOW11_GLOW_GLOWTEX
    Glow Color - GLOW11_GLOW_GLOWCOLOR
    Illumin Texture (RGB) - GLOW11_GLOW_ILLUMTEX
    Vertex Color - GLOW11_GLOW_VERTEXCOLOR"}

    Glow Multiplier

    No multiplier - GLOW11_MULTIPLY_OFF
    Glow Color - GLOW11_MULTIPLY_GLOWCOLOR
    Vertex Colo - GLOW11_MULTIPLY_VERT
    Vertex Alpha - GLOW11_MULTIPLY_VERT_ALPHA,
    Base Texture (A) - GLOW11_MULTIPLY_MAINTEX_ALPHA
    Illumin Texture (A) - GLOW11_MULTIPLY_ILLUMTEX_ALPHA

    Example:
    Code (csharp):
    1. material.shaderKeywords = new string[] {"GLOW11_GLOW_GLOWTEX", "GLOW11_MULTIPLY_MAINTEX_ALPHA"};
     
    Last edited: Aug 23, 2013
  10. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,240
    The patch didn't work right for me. The conditional value always seems to fire, so now it's *always* doing the correction flip. So now the glow effect is correct when anti-aliasing is enabled, but flipped the wrong way when anti-aliasing is disabled.
     
  11. gegagome

    gegagome

    Joined:
    Oct 11, 2012
    Posts:
    392
    I love the glow effect, but what is your official solution regarding a second camera?

    In my setup enabling the second camera removes the glow effect.


    Thanks
     
  12. SRH

    SRH

    Joined:
    Feb 28, 2011
    Posts:
    160
    Please send a test scene/project to glow11@i-gamedev.com

    Adding a second camera shouldn't have any effect on the glow:
    $Screen Shot 2013-08-26 at 7.40.08 AM.png
     
  13. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,160
    Please, can you explain what is the solution to the problem posted by EvilDingo, about the unexpected bloom effect applied to the whole scene?
    Thanks
     
  14. gegagome

    gegagome

    Joined:
    Oct 11, 2012
    Posts:
    392
    Using two cameras doesn't affect the glow in anyway. YOU ARE RIGHT.

    The glow was affected by the background color of the plane, which was too light for the outer glow to shine through, sorry about that.

    I'm going to update my review on UAS and say how awesome you are.

    One real question though, will this work well on mobile devices?

    $Screen Shot 2013-08-25 at 11.59.23 PM.png


    Thanks again!
     
  15. SRH

    SRH

    Joined:
    Feb 28, 2011
    Posts:
    160
    IIRC that was a bug with the handling of fog (which dhas been fixed)
     
  16. SRH

    SRH

    Joined:
    Feb 28, 2011
    Posts:
    160
    While it does work on mobile it's still an expensive effect. Also Unity 4.2 didn't help the performance as I had to remove an optimisation to get rid of performance warnings.
     
  17. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,240
    I don't mean to be a pest, but this is a serious issue. I tried a stand-alone Windows build of my game on three different PC's and they all now have the opposite problem: the glow effect is inverted when anti-aliasing is disabled with that last patch. Is it something you've been able to reproduce at least?
     
  18. SRH

    SRH

    Joined:
    Feb 28, 2011
    Posts:
    160
    Sorry, missed your last post (btw. I recommend that you either write an email to glow11@i-gamedev.com or send me a PM to make sure I don't miss it).

    I can't reproduce that issue, it works fine here.

    Can you please download and test http://www.i-gamedev.com/glow11/test/glow11win.zip (set quality setting to beautiful or fantastic to run with AA, any other quality setting is without AA).
     
  19. Steve-Tack

    Steve-Tack

    Joined:
    Mar 12, 2013
    Posts:
    1,240
    Will do!

    It works fine no matter what quality setting I try. Interesting.
     
  20. SRH

    SRH

    Joined:
    Feb 28, 2011
    Posts:
    160
    Ok, that is strange, if this works I don't understand why there is an issue in your project.

    Can you send me a project where you've got the issue? My best guess right now it's either some project setting or something went wrong when applying the patch.
     
  21. BeardOfFury

    BeardOfFury

    Joined:
    Sep 4, 2012
    Posts:
    18
    Any tips for optimising for mobile? Even with basic tk2d animations it seems to be lagging a heap.
     
  22. jgalvezpa

    jgalvezpa

    Joined:
    Dec 27, 2012
    Posts:
    36
    hey could you please optimize for mobile!
     
  23. paraself

    paraself

    Joined:
    Jun 30, 2012
    Posts:
    139
    Hi Sven, how to reach you? I need the MRT system....I skyped you long time ago, and have no reply till now...
     
  24. SRH

    SRH

    Joined:
    Feb 28, 2011
    Posts:
    160
    Don't remember getting a Skype message from you recently (maybe Skype messed up and didn't delivered the message). It would be best if you would send me an email (sven@i-gamedev.com)
     
  25. biabianm

    biabianm

    Joined:
    Jun 19, 2013
    Posts:
    1
    I also have this problem. Your solution can solve this . But when I publish the game in Ipadmini , it can't run fluency . I also use AR in this game, but the original glow11 can work well ,except for the warning. Can you help me?
     
  26. SRH

    SRH

    Joined:
    Feb 28, 2011
    Posts:
    160
    I recommend you test this version: https://dl.dropboxusercontent.com/u/35234118/glow/glow11_1_0_7_unity4_2_hotfix_alternative.unitypackage

    There will be a warning, but this will only appear in the editor and not in the build.
     
  27. Nico-777

    Nico-777

    Joined:
    Mar 31, 2011
    Posts:
    21
    Glow 11 is amazing! Highly recommended!
    We used it in our latest mobile game: Dice Jockey

     
  28. LeagueOfMonkeys

    LeagueOfMonkeys

    Joined:
    Aug 13, 2012
    Posts:
    33
    Hi - I purchased Glow - and it is really what I was after - nice job.

    I need some help with an issue I am getting - I have a project made up of lots of different scenes and only one of them is using the Glow plugin - issue is the only way I can get the effect to display properly is by using 'Deferred lighting' - this is something I can't do because all the other scenes are Forward and I can't switch Rendering Paths (plus lack the Aliasing is too jarring). I have read all the manuals and tried many different settings - what am I doing wrong. Any help would be greatly appreciated ? $RenderingPath_question.jpg
     
  29. LeagueOfMonkeys

    LeagueOfMonkeys

    Joined:
    Aug 13, 2012
    Posts:
    33
  30. SRH

    SRH

    Joined:
    Feb 28, 2011
    Posts:
    160
    Try this fix: Download
     
  31. LeagueOfMonkeys

    LeagueOfMonkeys

    Joined:
    Aug 13, 2012
    Posts:
    33
    OMG !!! you sir are a legend.

    Thank you soooooo much for the speedy response - it now works :D
     
  32. Adam_Starcaster

    Adam_Starcaster

    Joined:
    Dec 7, 2012
    Posts:
    37
    I am super happy with this shader set. It is beyond great for our projects.

    I wonder if I can request Sprite variants for Unity 3.5 for all the shaders?
     
  33. invadererik

    invadererik

    Joined:
    Oct 31, 2010
    Posts:
    148
    needed to download the package on previous page, everything works great, except I get this error on windows :

    Can't load custom inspector GlowCamEditor because the inspected type is null.
    UnityEditor.AssetPreviewUpdater:CreatePreviewForAsset(Object, Object[], String)
     
  34. SRH

    SRH

    Joined:
    Feb 28, 2011
    Posts:
    160
    Never had this issue and no one else reported something similar.

    My suggestion (after doing a quick google search) is to try to reimport the glow (and maybe all other assets too). The issue seems to occur when there is something wrong with the UNity project and a reimport seems to fix this (according to http://forum.unity3d.com/threads/65174-CustomEditor-Error and http://answers.unity3d.com/questions/41572/failed-to-load-customeditor-inspected-type.html)
     
  35. masterprompt

    masterprompt

    Joined:
    Jan 6, 2009
    Posts:
    115
    Last edited: Dec 4, 2013
  36. SRH

    SRH

    Joined:
    Feb 28, 2011
    Posts:
    160
    That seems to be a bug in Unity when applying image effects to cameras that don't clear the the color buffer. It also happens with the standard image effects and even the most simple image effect causes this.

    Code (csharp):
    1.  
    2. void OnRenderImage(RenderTexture source, RenderTexture destination) {  
    3.     Graphics.Blit(source, destination);
    4. }
    5.  
    Trying to save/restore the active rendertexture as suggested in the issue you posted doesn't help either.

    :(
     
  37. KayaOrsan

    KayaOrsan

    Joined:
    Jan 22, 2013
    Posts:
    20
    May I ask how you got Glow11 to work with NGUI? I can get the glow effect to show on widgets, but it's always white. I cannot change the color of the glow at all.
     
  38. Lostlogic

    Lostlogic

    Joined:
    Sep 6, 2009
    Posts:
    693
    This fixed a problem I was having too, thanks!
     
  39. rodger_hu

    rodger_hu

    Joined:
    Apr 10, 2012
    Posts:
    5
    Why kill FPS~
    I just add a new Depth Only Camera.
    $Screenshot 2013.12.30 20.03.12.png $屏幕快照 2013-12-30 下午8.03.35.png $屏幕快照 2013-12-30 下午8.03.23.png
     
  40. Groucho

    Groucho

    Joined:
    Dec 24, 2009
    Posts:
    73
    I just tested this dll version on my iOS project and it appears to be quite a bit faster than the version in the Asset Store. My game is now running at 60fps on the iPhone5S (just barely 60fps though) about 45 fps on the iPad Air with about 30-50 glowing objects on screen. It looks awesome.

    I've tested Glow11, Glow Effect (Mobile Friendly), and Indie Glow from the Asset Store and so far, Glow11 is the fastest on iOS. There's not doubt that individual object glow is expensive on mobile though. To get 60fps on the 5S, I used these settings on the Glow11 script along with the Glow11/Unity/Unlit/Color shader on my glowing objects:
    $Screen Shot 2014-01-01 at 10.38.56 AM.png

    I don't need inner glow I haven't looked up what "boost" is yet, so there might be more speed to get still. I'd love to get this working with at least 30fps on devices back to the iPhone 4S. If anyone has any more performance tweaks for iOS, I'd love to hear them.

    In my game I wanted to just use Unity's FastBloom, but I didn't want it to bloom the skybox or several other things in the scene -- but I still wanted to do some full screen effects (big explosions, flashes, etc). So, for now, Glow11 is the best I've found. Thanks for putting it together SRH!
     
  41. Groucho

    Groucho

    Joined:
    Dec 24, 2009
    Posts:
    73
    @SRH- I'm trying to disable Glow11 for some devices via script. I can't seem to find how to make a reference to a dll (like Glow11.dll that's attached to the camera). Is there a good way to do this?

    Code (csharp):
    1.  
    2. public Glow11 glowScript; //this generates an error: `Glow11' is a `namespace' but a `type' was expected
    3.  
    Thanks,
     
  42. SRH

    SRH

    Joined:
    Feb 28, 2011
    Posts:
    160
    Simply use
    Code (csharp):
    1.  
    2. public Glow11.Glow11 glowScript;
    3.  
     
  43. Groucho

    Groucho

    Joined:
    Dec 24, 2009
    Posts:
    73
    Perfect, thanks!!
     
  44. Ozone_ABN

    Ozone_ABN

    Joined:
    Jan 11, 2014
    Posts:
    12
    @SRH

    In my App I use an iPad and an AppleTV to be able to render to the second display over Airplay (using AngryAnt gits source https://gist.github.com/AngryAnt/5160204). When my app is synced with the AppleTV I render my main screen on the TV and display a logo on the iPad. This is working fine for almost everything except for the Glow 11 plugin, which still renders the glow on the iPad screen.

    Do you have an idea why this happens?

    Thanks!
     
    Last edited: Jan 12, 2014
  45. nerik

    nerik

    Joined:
    Nov 8, 2011
    Posts:
    22
    Hello,

    Would that work with a MovieTexture?

    Thanks
     
  46. SRH

    SRH

    Joined:
    Feb 28, 2011
    Posts:
    160
    Yes.
     
  47. nerik

    nerik

    Joined:
    Nov 8, 2011
    Posts:
    22
    Great, and thanks for the reply :)

    Does that means that the glow is updated dynamically according to the current movie frame? Seems obvious, but just checking...

    Other question : does it requires a particular setup with cameras? I'm asking because I'm currently working on an Oculus VR project, which doesn't make that particularly easy.

    Thanks :)
     
  48. SRH

    SRH

    Joined:
    Feb 28, 2011
    Posts:
    160
    Yes, it updates according to the movie frame.

    It doesn't really require a special camera setup, but the occulus rift is special... so there is a special version for it ;-) (to make it work there is a small modification to the way the glow is applied needed and this also requires a small modification in one of the oculus sdk scripts).
    Simply send me an email after you bought it and I'll send it to you.
     
  49. nerik

    nerik

    Joined:
    Nov 8, 2011
    Posts:
    22
    I just did it.

    Thanks for the quick replies.
     
  50. CaptainChristian

    CaptainChristian

    Joined:
    Apr 3, 2013
    Posts:
    100
    Hi,
    when we build and run our game as a standalone program, all materials using glow appear to be missing (showing up pink). It works just fine in editor, but how can we make it run flawlessly in the build?