Search Unity

  1. New Unity Live Help updates. Check them out here!

    Dismiss Notice

Highlighting System [Released]

Discussion in 'Assets and Asset Store' started by slice3d, Jul 10, 2012.

  1. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,395
    Ahh sorry i think i didn't explain it clearly, what i mean is the highlight effect is following the visible shape of the objects. For example as you can see in my attachment picture, the highlight effect on the sphere is not completely sphere shape, but it follows the visible part of the sphere.
     
  2. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    rea, your images didn't show up in my Chrome browser. I've noticed them only when i switched to Firefox and now it's clear.
    Yes, this is also possible in my Highlighting System and i already has a receipt for that.
    I call that "Highlighting Occluders" (for example, this is a Cylinder object on your image). Using them requires enabling additional z-buffer for the highlighting buffer. It can decrease performance especially on iOS devices, so it's not enabled by default.
    Check your PM, rea - i've sended you instructions on how to enable Highlighting Occluders.
     
  3. MichaelCarr

    MichaelCarr

    Joined:
    Nov 15, 2012
    Posts:
    2
    Thanks, that worked a treat. :)
     
  4. Lypheus

    Lypheus

    Joined:
    Apr 16, 2010
    Posts:
    664
    Any chance we could get the ability to render behind specific layers? For instance instead of drawing over a 3rd person player maybe ensure the player is always drawn over outlines specifically?
     
    Last edited: Dec 19, 2012
  5. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,395
    $Transparent.jpg
    Any idea how to make highlighting effect works with transparent object? Right now it highlight the mesh shape or is it intended?
     
    Last edited: Dec 20, 2012
  6. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    Glad I could help! Good luck with your Unity projects! ;)

    This is also what i've mentioned as "highlighting occluders". Check your PM.
    You can use them if there's not much occluders required for your project, but if you'll need to occlude highlighting by every object - i think it's better to rewrite the highlighting effect shaders to take into account z-buffer of your whole scene.

    Which behaviour do you expect?
    If it's what i think - then this is possible via alpha testing, but of course, it requires implementation.
    I have plans to add this in roadmap.
     
  7. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,395
    Hey this is interesting, is it the same shader that you told me in your PM or all shader that had Highlighting effect tag?


    well if its possible for the outline is following the alpha testing. Cool can't wait for the next update :)
     
  8. Tripwire

    Tripwire

    Joined:
    Oct 12, 2010
    Posts:
    442
    Hi,

    I'm considering buying this asset, but i have a question, how is the performance on IOS?
     
  9. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    Nope, I mean HighlightingComposite.shader, but now i think that this isn't possible, guys. :( At least - without hacky workarounds.
    Highlighted objects will already be in z-buffer, so z-testing with it won't give you anything useful to fill the highlighting buffer.
    rea, Lypheus, do you have any examples of existing realtime applications which shows the highlighting effect that you would like to obtain?

    Roadmap is like a to do list. So it may or may not be in the next update.

    Hi! It depends on amount of a separatedly highlighted meshes visible on the screen at the same time.
     
  10. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    Good news, rea! Alpha testing now works with Highlighting System, so it will be included in next update. ;)

    $aplhatest_teaser.png
     
  11. Zozo2099

    Zozo2099

    Joined:
    Jul 15, 2012
    Posts:
    478
    Please can I know if it is compatible with Unity 4? thanks.
     
  12. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,130
    Yes, it is compatible with Unity 4.
     
  13. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,395
    Awesome....Can't wait for it :)
     
  14. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    angel_m, thank you! :) Zozo2099 as Angel said - yes, it's compatible with Unity 4.

    Guys, very huge update is coming!
    All major problems has been solved - highlighting now works through lerping with framebuffer, so highlighting color doesn't change at all - you can highlight objects with any color you want (even black!) - it will remain unchanged!
    And also highlighting now visible on any background - even on the white one!

    $lerping_teaser.png

    But please, be patient - i still need to make a lot of things and triple-check everything before releasing this update.
     
  15. dasbin

    dasbin

    Joined:
    Jan 14, 2012
    Posts:
    253
    Ah, fantastic. That's exactly what I was looking for. Thanks so much.
     
  16. Tripwire

    Tripwire

    Joined:
    Oct 12, 2010
    Posts:
    442
    I really love this highlighting system! But i have a question, how do i hide the highlights behind an object? Do i need to use a specific shader or layer for that?

    Edit:
    2nd question: Is it possible to show highlighting on a bright white background?
     
    Last edited: Jan 18, 2013
  17. GonzoCubFan

    GonzoCubFan

    Joined:
    Oct 21, 2011
    Posts:
    70
    We purchased this system via the website and not the asset store and had major problems as it continually was crashing - hard! It made it very difficult to debug as Unity had to be force quit. Since the only contact information we could find was through the website, we tried sending comments via the site and after a couple of tries, we received no responses at all.

    So I had to dig in and locate the problem. We have a fairly complex scene, but I am guessing that the main reason that we had so much trouble is that the objects we were trying to highlight were instantiated from prefabs in our Resources folder at runtime. This should not have presented any problems as we were adding the HighlightableObject component after instantiation at the correct place in the hierarchy. After quite a bit of debug time, I did find the problem and a solution. I'm still not sure why slice3d did things the way he did, but if he is interested in our fix, he can contact me via PM since emails via his site go unanswered.

    = Ed Rotberg =
     
  18. Play_Edu

    Play_Edu

    Joined:
    Jun 10, 2012
    Posts:
    719
    HI,

    I brought your package. it's nice tool.But I have some issue. in highlight system objects Drow always first. but in some case i need it's drow behind the objects .it should not overlap objects front of it it should glow befind the front object so is there any solution.


    play_edu
     
  19. hpl123

    hpl123

    Joined:
    Jan 19, 2013
    Posts:
    4
    hello,it can flash from big to small and small to big?a loop...
     
  20. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,646
    Got it. Any date for this realease?
     
  21. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    Answered to everybody.

    Tripwire, Play_Edu check your PMs on this forum.
    GonzoCubFan, as you've figured out - problem is caused by buggy Unity iOS's Transform.GetComponentsInChildren method. This will be replaced with the working-well GameObject.GetComponentsInChildren method. Also, check your email.

    hpl123 Hello! Can you please describe more clearly what you need to obtain?

    ZJP I'm almost ready to start beta-testing phase. Plus I still need to update documentation.

    Guys, sorry but I'm working alone here, and you must understand that I have to choose between spending my time on development of an update or spending my time on providing support for my customers.
    I'm trying to find the right balance between these two things but as I've said already - I'm preparing a huge update for the Highlighting System and hope that you can forgive me my delayed answers.

    I want to thank every customer for all the support and feedback that you gave me, guys!
    Highlighting System is currently number 1 by popularity in Scripting/Effects category of the Unity Asset Store! :)

    PS:
    Contact form on my site works well, but it's better to send any support inquiries to the email, which you can find on the last page of a documentation.
    BTW, I sell Highlighting System only at the Unity Asset Store, and if you'll find it anywhere else on the internet - please report me.
     
  22. hpl123

    hpl123

    Joined:
    Jan 19, 2013
    Posts:
    4
    well,my English is not very good,I am so sorry.I need the outer glow has a effect that can scale-out and then inward narrow,Cycle reciprocating.Can the plugin has this effect?
     
  23. reddotgames

    reddotgames

    Joined:
    Apr 5, 2011
    Posts:
    663
    Hey

    I have bunch of objects that I wanna highlight but they use custom shaders that I write myself. Is you effect shader related and replace shaders in materials of objects that are selected? And what about multimaterial objects?
     
  24. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    reddotgames Hey!

    Highlighting System is mainly post-processing related.
    It is shader-related only because Unity lacks of efficient functionality which will allow you to send custom list of meshes to the rendering queue (separately from the main rendering queue).

    Any custom shaders can be highlighted - just follow the 4.1 section of the provided documentation.

    Multimaterial objects is also supported out of the box.

    hpl123
    Sorry, but FlashingOn() - is not what you need? Simply setup the offsets in HighlightingEffect component on your camera(s) and then call the ho.FlashingOn() method of any HighlightableObject component.
     
    Last edited: Jan 24, 2013
  25. hpl123

    hpl123

    Joined:
    Jan 19, 2013
    Posts:
    4
    oh,I have not seen this method,I will test out it,Ty!
     
  26. zhing

    zhing

    Joined:
    Jul 6, 2012
    Posts:
    19
    slice3d
    Does this package contain the source code of all shaders?
    If it contains the full source code, then I can add my custom effects easily.
     
  27. reddotgames

    reddotgames

    Joined:
    Apr 5, 2011
    Posts:
    663
    I bought it. All works good here.

    One request that you should consider doing in 1.2 : smooth highlight - outline alpha go from 0 to 1 at X time + smooth hightlight off (going from 1 to 0)

    This will make game with this function look smoother. I can add it myself but I dont have time :)
     
  28. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    zhing
    Sure, the package contains full source code of all shaders and scripts.

    reddotgames
    Thanks!
    Isn't smooth highlighting is already there?
    Highlighting is smoothly enabled if you use ConstantOn() and ConstantOff() methods instead of ConstantOnImmediate() and ConstantOffImmediate().
     
  29. GonzoCubFan

    GonzoCubFan

    Joined:
    Oct 21, 2011
    Posts:
    70
    So i've been able to confirm that highlighting is costing us some performance on iOS. Is there any chance that the new version will be a bit faster? Perhaps be able to run in non 32-bit buffer? Is the performance hit inescapable?

    = Ed =
     
  30. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    GonzoCubFan
    Well, it's definitely not raise up the performance in your application :)
    Especially if it's post-processing effects on mobile platforms.
    In the upcoming update I've optimized all main highlighting shaders, but due to lerp framebuffer feature implementation their complexity is also increased. Because of that - it is hard to say right now will it work faster or slower on a real devices.
    We'll see.
     
  31. dasbin

    dasbin

    Joined:
    Jan 14, 2012
    Posts:
    253
    Yeah, I am also curious to see performance with the lerp framebuffer feature, because right now I am able to do something visually similar by using the Blur post-proccesing effect on a second camera that only sees the objects I want to highlight (and then the regular main camera also sees those objects, so their insides are still sharp). So I am curious if if it ends up being slower or faster with your system, which would be a little better in some other ways.
     
  32. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    Update is delaying because I'm working hard on this new awesome features for you, guys:

    1. You don't need to adapt every custom shader anymore, and you don't need to call Highlighting.Init() method for initialization from your singleton. Everything works out-of-the-box - simply drop HighlightableObject component on your object and call any highlighting method.

    2. Looks like it doesn't break batching anymore! (Yaaay, mobile developers!)
    $highlightingsystem_batching.png
    On this image:
    +1 drawcall for the ground plane
    +1 drawcall and +5 batched to draw all green octahedrons
    +4 drawcalls to do post-processing operations for the Highlighting System
    +2 drawcalls to render objects highlighted with white and green colors into highlighting buffer
    +1 drawcall and +3 batched to render objects, highlighted with red color into highlighting buffer (they are childs of one root object and thus are highlighted with the same color - that's why batching works for them too)

    3. Highlighting occluders are built-in now. Enabling them is optional and easy.
    $highlightingsystem_occluders.png

    Highlighting system now uses 7th Builtin Layer, which is not reserved for anything (I hope) and is not available for assigning to objects via Editor. You doesn't use this layer for anything in your projects, right?

    Now checking that I'm not broke anything by implementing these features...
     
  33. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,646
    Yeaaaah!!! ;)
     
  34. TechnicalArtist

    TechnicalArtist

    Joined:
    Jul 9, 2012
    Posts:
    721
  35. angel_m

    angel_m

    Joined:
    Nov 4, 2005
    Posts:
    1,130
    What changes we have to do in our existing projects when updating to the new version?
     
  36. acarter

    acarter

    Joined:
    Jul 21, 2012
    Posts:
    4
    excited to get these updates, very valuable tool
     
  37. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    Thank you very much, guys!

    Beta testing has been started!

    angel_m:
    Usage is pretty much the same, but:
    - there's no need to adapt each shader (you must remove all shaders adapted for the previous version)
    - there's no need to call Highlighting.Init() from your singleton (remove that from your code)
    - if you change materials, shaders or child objects of your highlightable object - simply call ReinitMaterials() before or after that (it doesn't matter when). RestoreMaterials() is obsolete.
    Plus, when this update will be released - you'll need to backup your project, delete Plugins/HighlightingSystem folder and import new package.
     
  38. bocs

    bocs

    Joined:
    May 9, 2009
    Posts:
    339
    Is it possible to highlight only parts hidden?
    *Simply when an object is visible it doesn't have a highlight, but as it moves behind objects the occluded part is highlighted.

    I guess this would be the inverse of "Highlighting occluders"
     
  39. xadhoom

    xadhoom

    Joined:
    Sep 2, 2010
    Posts:
    91
    Hi Slice,

    Could you please expose the division factor in "HighlightingEffect"? The hardcoded value "4" seems to be too rough for our scenario. The value set to "2" yields better results. I´m aware of the possible performance impact, but it is fine in our case.

    Thank you,
    xad
     
  40. bilke

    bilke

    Joined:
    Jul 13, 2012
    Posts:
    54
    My camera has a custom projection matrix and because of this the highlight was not correctly rendered. I fixed the issue by adding the following line in HighlightingEffect.cs after the line where the refCam gets copied:

    Code (csharp):
    1.  
    2. shaderCamera.CopyFrom(refCam);
    3. shaderCamera.projectionMatrix = refCam.projectionMatrix; // I added this line
    4.  
     
  41. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    bocs,
    I think it's possible with some tweaking - you should render occluders in replacement shaders with "ZTest Greater", and your highlightable objects with "ZTest LEqual".
    But i recommend you to use rimlight shader as a second pass with "ZTest Greater" for your objects in this case.

    xadhoom
    Hi! Ok, I'll expose this parameter in Highlighting Effect Editor.
    Also, with 2.0 update you'll have more useful controls with the new important "Intensity" parameter, and it will come with 4 ready-to-use presets.

    bilke
    Thank you!
    Looks like it's a Unity bug - CopyFrom(refCam) should copy ALL properties from the reference camera.
     
  42. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,395
    Oh sweet, is the update online already at the asset store?
    Awesome work at the Occluded Highlight effect, and the alpha test effect is it included in this update?

    Edit : Whoops sorry, nevermind. Didn't read properly that it was delayed :)
     
    Last edited: Feb 27, 2013
  43. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,646
    PM you.
    I think it possible with the new Highlighting Occluders option. ;)
     
  44. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    Update will be released within a week.
    Thanks for the patience! I hope it was worthy... ;)

    ZJP
    Thanks, ZJP! I've replied you. Check your PM.
     
  45. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    2.0 update has been submitted for review to the Unity Asset Store. (Usually it takes 1-2 days before update goes live in the Asset Store)

    New features in this update:
    • Linear blending of the highlighting and frame buffers (gives true highlighting colors)
    • All shaders now compatible with the Highlighting System out of the box (no need to adapt each custom shader anymore)
    • Batching and shared materials support
    • Correct highlighting of transparent materials
    • Highlighting occluders
    • Handy highlighting effect quality and intensity controls with presets
    • Effect inspector helpers (will help you correctly setup Highlighting System in your project)
    • Bug fixes, shaders optimizations and other performance improvements
    Here's what you'll need when update will be live in the Asset Store:
    Upgrade guide:

    Backup your project(s) first before updating!

    When upgrading Highlighting System in your projects, to not loose all HighlightableObject
    and HighlightingEffect components references, please do the following:
    1. Remove Highlighting.Init() calls from your code – this is not needed anymore.
    2. Remove Highlighting.cs script from the Plugins\HighlightingSystem\Scripts folder.
    3. Remove everything from your Plugins\HighlightingSystem\Resources folder (don't worry - adapting each custom shader is not needed anymore).
    4. Import upgraded package from the Unity Asset Store. In the Importing package window click on All, then Import.
    5. Choose any highlighting preset on each HighlightingEffect component by clicking on its button, or setup highlighting intensity and quality parameters by yourself.
    6. May be you'll need to tune up highlighting colors, because now Highlighting System displays actual highlighting colors given to the highlighting methods.
     
  46. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    Update time, guys! :)
    2.0 now live in the Unity Asset Store.
    Write me your feedback, comments or bug reports (if you'll find any;)) regarding this update.
    Thanks for your support and patience!
     
  47. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,545
    IOS only, no Android?
     
  48. AntFitch

    AntFitch

    Joined:
    Jan 31, 2012
    Posts:
    243
    slice3d, your tool looks AWESOME! I wonder if you might be able to help me with a few questions about outlining (and color in general)

    Do you know if this is something that works with ex2D sprites? If it does, great! You have a new customer!

    This leads me to my next question: I need outlining, which you have, but I also need the ability to change the color of sprites to solid colors. For example, if a monster attacks another monster, I want the attacked monster to flash white (or bright red, green, etc). I haven't seen an easy way to do this without breaking batching, but your product gives me hope that this is possible for both sprite outlining and tone.

    I second imtrobin's question: is Android not supported? Or has the product simply not been tested on Android?
     
    Last edited: Mar 12, 2013
  49. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    imtrobin,
    Not tested, but I'm sure that if it works on iOS devices - then it WILL work on Android too (of course, only if you use Unity Pro).

    amaranth,
    Thank you! :)
    1. Not tested. Probably, it will work with static sprites, but not with dynamic ones (you'll need to call ReinitMaterials() every frame - not the best solution for 2D mobile games).

    2. This is what I call Inner Tinting. This undocumented feature was in previous version of my Highlighting System.
    Previously, you could change _InnerTint material property in runtime to control the object's Inner Tinting,
    but this feature has been removed in 2.0 update due to it's incompatibility with linear blending (without unjustified complicating of rendering).
    So, I must choose between Additive Blending (with wrong highlighting colors and other disatvantages) + Inner Tinting and Linear blending (gives true highlighting colors and lots of other highly requested features)
    And I made my choice in favor of a linear blending.

    This system has been developed as a solution for highlighting complex 3d objects.
    For tinting 2d sprites without breaking batching I recommend you to write custom shader, which will linearly blend vertex color with texture, and change this sprite vertex color in runtime to achieve what you want.
    I'm not sure but if my memory serves me right - Sprite Manager works in this way.

    3. See above.
     
  50. xadhoom

    xadhoom

    Joined:
    Sep 2, 2010
    Posts:
    91
    Hi slice,

    I just checked out the latest version and recognized in the demo scenes that the highlighting effect does not align pixel perfect with the edge of the object. Depending on the object and its rotation there is a recognizable distance of one pixel between the edge of the object and the start of the highlight effect showing the background. This is especially obvious with white backgrounds. Can you confirm this issue?

    xad

    Especially obvious in Demo "Colors" and "Transparency".
     
    Last edited: Mar 13, 2013
unityunity