Search Unity

Highlighting System [Released]

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

  1. GlennKo

    GlennKo

    Joined:
    Oct 27, 2016
    Posts:
    4
    I discovered a problem on IOS (tested on Iphone5) for the following specific case:

    1) Run the Highlighting Renderer component on any Camera using Clear Flags: Depth only ( eg. in a particular AR example, for having a seperate transparent background cameras over another secondary AR camera's background like this...
    )). The result???? BAd bad FPS when you have the Highlighting Renderer component ticked on for the Camera.

    For the above, you DON'T even need to have any Highlighter instances running at all, so long as you have highlighting Renderer active over Camera's clear flags: Depth only, you are screwed in terms of performance, at least, that's how it appears on IOS..my Iphone5.

    In short, this component doesn't work with any Camera with "Clear Flags" Depth Only". So be forewarned. Perhaps, for the example above, could someone suggest a way to work around this? It seems only Skybox or Solid Color clear flags for camera should be used.

    The funny thing is, this doesn't seem to have any problems on Android (ie. testing on Sony Z1).
     
    Last edited: Nov 4, 2016
  2. sgower

    sgower

    Joined:
    Mar 9, 2015
    Posts:
    316
    Hello, great asset. I have a question. I currently observe this behavior:

    -If there are 2 highlighted objects, and one is in front of the other, the highlighting of the back object doesn't show through the object in front of it. This is good.
    -If instead, for the same 2 objects, only the back object is highlighted, it's highlighting shows through the front object. I'd prefer to have the highlighting to not show through the front objects, whether or not the front object is highlighted.

    Is there a way to make it work like this? Thanks!
     
  3. sgower

    sgower

    Joined:
    Mar 9, 2015
    Posts:
    316
    It doesn't appear the dev is checking this thread anymore. :(
     
  4. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    Hey guys,

    Sorry about the delay - I'm hard at work preparing an update, which will resolve quite a lot of issues and bring up new features and improvements to the Highlighting System.

    @faraz-glu
    I will take a look at this further, but I'm pretty sure it's never taking 40 milliseconds to render highlighting. (e.g. on my relatively old Asus PadFone S, FPS never drops below 45 and is usually between 50 and 60 frames per second). As a developer - I've noticed that Samsung is making crappy devices in terms of stability and performance, so that might be an issue specific for the devices from this manufacturer.

    @stefanob
    I've never seen such offset. Could you please send me an example project (to my email) so I'll be able to reproduce this issue? Thanks!

    @realmzero
    Make sure to disable seeThrough mode on the Highlighter component (enabled by default):
    Code (CSharp):
    1. highlighter.seeThrough = false;
    @CrazedGhoul
    No, highlighting system is not modifying Renderer materials in any way, so shared materials will remain intact.

    @MalboM
    Hey! I've replied to your email already, but in case anyone else is also interested:
    To prevent highlighting of a specific object in the hierarchy - simply assign HighlighterBlocker component on it.
    To disable particles highlighting completely - you can remove or comment out the following line in the Highlighter.cs script:
    Code (CSharp):
    1. typeof(ParticleSystemRenderer),
    @Spanky11
    Hello,
    I'm glad you like Highlighting System! Thank you!
    To achieve what you want - instead of disabling highlighting on your front object - keep it highlighted and change it's highlighting color to Color.clear:
    Code (CSharp):
    1. h.ConstantOn(new Color(0f, 0f, 0f, 0f), 0f);
    Or you can turn it into 'see-through occluder':
    Code (CSharp):
    1. h.occluder = true;
    2. h.seeThrough = true;
    but in that case it will overlap highlighting coming from all other objects regardless of their depth/draw order (see OccluderModes demo scene for an example).

    @GlennKo
    Having HighlightingRenderer alone (without any AR-related changes) on the Camera with clearFlags set to CameraClearFlags.Depth doesn't make any difference in terms of performance.
    I'm not sure yet, but probably using Highlighting System (which is rendered just before opaque image effects) in combination with WebCamTexture assigned to RawImage on Canvas in Screen-Space Overlay mode (rendered after image effects) is bad idea and leads to such performance drop. I will try to figure out the best way to use WebCamTexture with the Highlighting System.
    Also, take a look at this answer from the guy at Unity Technologies (it's from 2012, but I don't think the situation has changed much since then).
     
  5. GlennKo

    GlennKo

    Joined:
    Oct 27, 2016
    Posts:
    4
    @slice3d

    BTW, it's NOT WebCamTexture that's causing a performance issue (yes, WebCamTexture by itself is laggy for mobile and normally using a native device-targeted plugin to render such a texture is done).

    As mentioned, It's CameraClearFlags.Depth (ie. "Depth") being set to Camera's component's clearFlags Inspector property that causes the Highlighting System to not run performantly on IOS device .Strange that you mentioned there's no difference in performance. Did you test on an Iphone5? It only affects IOS device (ie. at least, from what i experienced on my Iphone5 (ios9), not sure about later models). To recreate, just load a minimal example scene from the package and set it's Camera renderer's Clear flags to "Depth" ...and use an iphone5 to run it.
     
    Last edited: Nov 22, 2016
  6. KyleOlsen

    KyleOlsen

    Joined:
    Apr 3, 2012
    Posts:
    237
    @slice3d

    Any chance the new update will support single pass stereo rendering for VR?
     
  7. silentslack

    silentslack

    Joined:
    Apr 5, 2013
    Posts:
    393
    Would also like to know if there will be an update to support this? Thanks!
     
    KyleOlsen likes this.
  8. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    @GlennKo
    Oh, ok! Well, I'm no longer using native depth buffer in the upcoming update, so there is a high chance that there will be no such issue. I'm testing it on an iPad Mini 3 and iPhone 6S Plus.

    @KyleOlsen @silentslack
    Yeah, I'm working on single pass stereo rendering support. Send me an email with your invoice number if you want to try out the beta soon.
     
    KyleOlsen likes this.
  9. Ibukii

    Ibukii

    Joined:
    Jun 23, 2016
    Posts:
    45
    Hi slice3d,
    I have several objects that need to be highlighted. The big ones glow properly. The small ones however do not show their glow. Is there a option to glow the same amount regardless of size?
     
    Last edited: Dec 16, 2016
  10. songjiankuan

    songjiankuan

    Joined:
    Dec 28, 2016
    Posts:
    2
    用了4.2后报错 不知道怎么回事

    Dimensions of color surface does not match dimensions of depth surface

    (Filename: C:ildslave/unityild/Runtime/GfxDevice/threaded/GfxDeviceClient.cpp Line: 1912)
     
  11. songjiankuan

    songjiankuan

    Joined:
    Dec 28, 2016
    Posts:
    2
    用你的demo本身是可以运行的,但是加入到我的项目里面就出现上面的错误,我也是没办法了,在这上面问问。我写的是中文,不知道可以看明白吗?
     
  12. MythicalCity

    MythicalCity

    Joined:
    Feb 10, 2011
    Posts:
    420
    Hi, I've been using Highlighting System for a while but I have the older version, which doesn't work with VR single pass rendering. Does anyone know if the latest version supports single pass for vr cameras?
     
  13. AnomalusUndrdog

    AnomalusUndrdog

    Joined:
    Jul 3, 2009
    Posts:
    1,553
    Is it possible to make Highlighting System behave like this? (this screenshot is only a Photoshop edit)

    The highlight outline would show up only on areas where it is being obstructed?

    I've been playing with the demo and couldn't figure out a way to do it.

     
  14. KyleOlsen

    KyleOlsen

    Joined:
    Apr 3, 2012
    Posts:
    237
    I'm not sure if it's out yet or not, but the new version does support it.
     
  15. aaagbasm

    aaagbasm

    Joined:
    Jan 16, 2017
    Posts:
    1
    Hi,
    I am trying to Highlighting the object which I use script to instantiate.
    then console will show null reference,did there a solution ?
     
  16. sgower

    sgower

    Joined:
    Mar 9, 2015
    Posts:
    316
    Hi, has this been tested in the latest 5.5 release (5.5f3)? I ask because I'm pretty sure this is freezing unity (freezing, not crashing). I've had a problem for weeks where every few minutes my game crashes randomly and I haven't been able to figure out the cause. Today I disabled the highlighting system and I'm no longer seeing these freezes. I'm going to continue to monitor this and will post any updates for anything I learn.
     
  17. greengremline

    greengremline

    Joined:
    Sep 16, 2015
    Posts:
    183
    Hey, hope you're doing well. I recently purchased your asset and it works great for windows 32-bit and 64-bit! Unfortunately, when trying to build for linux, I run into these errors:



    Any help would be appreciated!
     
  18. Dobalina

    Dobalina

    Joined:
    Sep 6, 2013
    Posts:
    105
    Is this package capable of black outlines? From what I can see, everything is additive?
     
  19. Ibukii

    Ibukii

    Joined:
    Jun 23, 2016
    Posts:
    45
    Is there a way to put the UGUI slider in front of the highlighter? The highlights are cutting into the slider and I can't hide the highlights behind the slider.
     
  20. plmx

    plmx

    Joined:
    Sep 10, 2015
    Posts:
    308
    Using Unity 5.6b8, getting the following warnings, might want to look into that?

    Code (csharp):
    1.  
    2. Assets/Imports/HighlightingSystem/Scripts/Service/VRHelper.cs(10,17): warning CS0618: `UnityEngine.VR.VRDeviceType' is obsolete: `VRDeviceType is deprecated. Use VRSettings.supportedDevices instead.'
    3. Assets/Imports/HighlightingSystem/Scripts/Service/VRHelper.cs(27,50): warning CS0618: `UnityEngine.VR.VRDeviceType' is obsolete: `VRDeviceType is deprecated. Use VRSettings.supportedDevices instead.'
    4. Assets/Imports/HighlightingSystem/Scripts/Service/VRSettingsUI.cs(17,10): warning CS0618: `UnityEngine.VR.VRDeviceType' is obsolete: `VRDeviceType is deprecated. Use VRSettings.supportedDevices instead.'
    5. Assets/Imports/HighlightingSystem/Scripts/Service/VRSettingsUI.cs(18,10): warning CS0618: `UnityEngine.VR.VRDeviceType' is obsolete: `VRDeviceType is deprecated. Use VRSettings.supportedDevices instead.'
    6. Assets/Imports/HighlightingSystem/Scripts/Highlighter.cs(16,11): warning CS0618: `UnityEngine.ParticleRenderer' is obsolete: `This component is part of the legacy particle system, which is deprecated and will be removed in a future release. Use the ParticleSystem component instead.'
    7. Assets/Imports/HighlightingSystem/Scripts/Internal/HighlightingBase.cs(33,38): warning CS0618: `UnityEngine.Rendering.GraphicsDeviceType.Xbox360' is obsolete: `Xbox360 is no longer supported in Unity 5.5+'
    8. Assets/Imports/HighlightingSystem/Scripts/Internal/HighlightingBase.cs(34,38): warning CS0618: `UnityEngine.Rendering.GraphicsDeviceType.PlayStation3' is obsolete: `PS3 is no longer supported in Unity 5.5+'
    9. Assets/Imports/HighlightingSystem/Scripts/Internal/HighlightingBase.cs(486,20): warning CS0618: `UnityEngine.SystemInfo.supportsRenderTextures' is obsolete: `supportsRenderTextures always returns true, no need to call it'
    10. Assets/Imports/HighlightingSystem/Scripts/Internal/HighlightingBase.cs(500,19): warning CS0618: `UnityEngine.SystemInfo.supportsStencil' is obsolete: `supportsStencil always returns true, no need to call it'
    11. Assets/Imports/HighlightingSystem/Scripts/Service/ScreenSpaceCanvas.cs(46,25): warning CS0618: `UnityEngine.VR.VRSettings.loadedDevice' is obsolete: `loadedDevice is deprecated.  Use loadedDeviceName and LoadDeviceByName instead.'
    12. Assets/Imports/HighlightingSystem/Scripts/Service/ScreenSpaceCanvas.cs(46,54): warning CS0618: `UnityEngine.VR.VRDeviceType' is obsolete: `VRDeviceType is deprecated. Use VRSettings.supportedDevices instead.'
    13. Assets/Imports/HighlightingSystem/Scripts/Service/VRHelper.cs(15,32): warning CS0618: `UnityEngine.VR.VRDeviceType' is obsolete: `VRDeviceType is deprecated. Use VRSettings.supportedDevices instead.'
    14. Assets/Imports/HighlightingSystem/Scripts/Service/VRHelper.cs(22,32): warning CS0618: `UnityEngine.VR.VRDeviceType' is obsolete: `VRDeviceType is deprecated. Use VRSettings.supportedDevices instead.'
    15. Assets/Imports/HighlightingSystem/Scripts/Service/VRHelper.cs(32,14): warning CS0618: `UnityEngine.VR.VRSettings.loadedDevice' is obsolete: `loadedDevice is deprecated.  Use loadedDeviceName and LoadDeviceByName instead.'
    16. Assets/Imports/HighlightingSystem/Scripts/Service/VRHelper.cs(33,44): warning CS0618: `UnityEngine.VR.VRDeviceType' is obsolete: `VRDeviceType is deprecated. Use VRSettings.supportedDevices instead.'
    17. Assets/Imports/HighlightingSystem/Scripts/Service/VRHelper.cs(10,59): warning CS0618: `UnityEngine.VR.VRDeviceType' is obsolete: `VRDeviceType is deprecated. Use VRSettings.supportedDevices instead.'
    18. Assets/Imports/HighlightingSystem/Scripts/Service/VRSettingsUI.cs(27,48): warning CS0618: `UnityEngine.VR.VRDeviceType' is obsolete: `VRDeviceType is deprecated. Use VRSettings.supportedDevices instead.'
    19. Assets/Imports/HighlightingSystem/Scripts/Service/VRSettingsUI.cs(32,5): warning CS0618: `UnityEngine.VR.VRDeviceType' is obsolete: `VRDeviceType is deprecated. Use VRSettings.supportedDevices instead.'
    20. Assets/Imports/HighlightingSystem/Scripts/Service/VRSettingsUI.cs(32,34): warning CS0618: `UnityEngine.VR.VRDeviceType' is obsolete: `VRDeviceType is deprecated. Use VRSettings.supportedDevices instead.'
    21. Assets/Imports/HighlightingSystem/Scripts/Service/VRSettingsUI.cs(40,52): warning CS0618: `UnityEngine.VR.VRSettings.loadedDevice' is obsolete: `loadedDevice is deprecated.  Use loadedDeviceName and LoadDeviceByName instead.'
    22. Assets/Imports/HighlightingSystem/Scripts/Service/VRSettingsUI.cs(63,78): warning CS0618: `UnityEngine.VR.VRSettings.loadedDevice' is obsolete: `loadedDevice is deprecated.  Use loadedDeviceName and LoadDeviceByName instead.'
    23. Assets/Imports/HighlightingSystem/Scripts/Service/VRSettingsUI.cs(69,56): warning CS0618: `UnityEngine.VR.VRSettings.loadedDevice' is obsolete: `loadedDevice is deprecated.  Use loadedDeviceName and LoadDeviceByName instead.'
    24. Assets/Imports/HighlightingSystem/Scripts/Service/VRSettingsUI.cs(69,85): warning CS0618: `UnityEngine.VR.VRDeviceType' is obsolete: `VRDeviceType is deprecated. Use VRSettings.supportedDevices instead.'
    25. Assets/Imports/HighlightingSystem/Scripts/Service/VRSettingsUI.cs(85,49): warning CS0618: `UnityEngine.VR.VRDeviceType' is obsolete: `VRDeviceType is deprecated. Use VRSettings.supportedDevices instead.'
    26. Assets/Imports/HighlightingSystem/Scripts/Service/VRSettingsUI.cs(85,70): warning CS0618: `UnityEngine.VR.VRDeviceType' is obsolete: `VRDeviceType is deprecated. Use VRSettings.supportedDevices instead.'
    27. Assets/Imports/HighlightingSystem/Scripts/Service/VRSettingsUI.cs(17,82): warning CS0618: `UnityEngine.VR.VRDeviceType' is obsolete: `VRDeviceType is deprecated. Use VRSettings.supportedDevices instead.'
    28. Assets/Imports/HighlightingSystem/Scripts/Service/VRSettingsUI.cs(18,77): warning CS0618: `UnityEngine.VR.VRDeviceType' is obsolete: `VRDeviceType is deprecated. Use VRSettings.supportedDevices instead.'
    29.  
     
  21. Ibukii

    Ibukii

    Joined:
    Jun 23, 2016
    Posts:
    45
    Is the developer not helping or supporting this asset already?
     
  22. sgower

    sgower

    Joined:
    Mar 9, 2015
    Posts:
    316
    If you scroll up, you'll see that the last time the Dev made an appearance, he answered several questions in a single post. I'm sure he'll return and do the same at some point. Will need to be patient.
     
  23. Ibukii

    Ibukii

    Joined:
    Jun 23, 2016
    Posts:
    45
    2 months or more per update is really bad. Projects that initially depend on this asset would already have found alternatives or even worse failed.
     
  24. sgower

    sgower

    Joined:
    Mar 9, 2015
    Posts:
    316
    I don't disagree. I'm guessing that the money that comes in from selling Assets like this is too small to justify spending great amounts of time on support. I just think that's the reality of the situation. The Dev is likely busy with another job.
     
  25. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    Sorry for such late reply, guys! When I'm working hard on the new update - I had to sacrifice time that would otherwise be spent on providing support to you (I know, this is not an excuse for me). But now I'm done with 4.3 update, so I promise you to improve my response time. I'm sure you will be happy about this upcoming update! (See my next post for more info) ;)

    @Ibukii
    Hi Ibukii!
    1. Internally, Highlighting System is downsampling highlighting buffer and then performing multiple blur iterations on it in order to make glowing halo around the objects, and in case your object takes only few pixels on screen - downsampling and blurring makes it hardly noticeable. You can set the downsampling factor to Half or None, but then you will have to increase blurring iterations number in order to get thicker halo. Take a look at the Solid 1px or 2px preset, which works equally well for objects of any size:
    upload_2017-3-1_17-19-54.png
    2. Unity renders World Space UI Canvases as a regular transparent geometry, so any Image Effect (including Highlighting System) will be applied on top. To change that - you should either use Screen Space UI Canvas rendering mode instead, or use secondary Camera with higher depth to render your World Space UI Canvases after highlighting.

    @songjiankuan
    This issue has been fixed in the upcoming update of the Highlighting System. Please wait a couple days before it will get to the Asset Store.

    @capitalJmedia
    Hi! Single Pass Stereo Rendering Method support has been implemented in the upcoming update. Please wait a couple days before it will be released.

    @AnomalusUndrdog
    Despite the fact that this can be easily implemented for simple convex geometry:
    InverseHighlighting.png

    complex arbitrary meshes will occlude their own parts, so they will also become highlighted:
    InverseHighlightingSelfOcclusion.png

    Unfortunately, there is no simple solution (if any) to this issue.

    @aaagbasm
    Hi! Could you please send me your example project, so I will be able to reproduce this issue on my end?

    @Spanky11
    Probably you're using very high screen resolution (Retina display on MacBook?) in combination with MSAA (hardware anti-aliasing), so you're out of video memory. Can you confirm that this is your case?

    @zornor90
    Hey, thank you! I hope you are well too! Simply remove this VRSettings script. Also, this issue has been fixed in the upcoming update.

    @Dobalina
    Yes, you can use any color for the highlighting. Try out the WebGL demo if in doubt.

    @plmx
    Thanks! That should be fixed in the upcoming update.
     
    greengremline and plmx like this.
  26. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    Hey guys, thanks for your patience!
    I have submitted Highlighting System v4.3 for a review.
    We should wait a couple more days before it will be released in the Unity Asset Store.
    Here's the list of improvements from this version:
    • Virtual Reality Single Pass (Fast) Stereo Rendering Method is now supported
    • Implemented support for highlighting geometry rendered with GPU instancing
    • Static and Dynamic batching will no longer produce z-fighting artifacts under any circumstances. Dynamic Offset and Factor options have been removed from the HighlightingRenderer component
    • Highlighting depth occlusion now works even if MSAA is enabled. This is no longer necessary to manually add HighlighterOccluder components to GameObjects (use HighlighterOccluder component only to achieve see-thorugh occluders). Non-see-through occluders is now never rendered, so that saves performance
    • Added API for runtime control of highlighting presets. Now they are stored in HighlightingRenderer components (previously they were stored using Unity EditorPrefs)
    • Exposed Blur Directions settings for HighlightingRenderer component (options: Diagonal, Straight, All) to allow finer control of solid highlighting modes
    • Exposed Anti Aliasing settings for HighlightingRenderer component (options: Use Value From Quality Settings, Disabled, 2x Multi Sampling, 4x Multi Sampling, 8x Multi Sampling). That will define the state of anti-aliasing for the highlighting buffer
    • Added forceRender option to the Highlighter (to make it ignore frustum culling and occlusion culling)
    • Improved cross-platform compatibility
    • Fixed highlighting depth occlusion not working if Camera Clear Flags set to Depth only or Don't clear in Forward or VertexLit rendering paths
    • Fixed no longer used highlighting materials kept in memory (turns out Unity is never releasing unreferenced materials without the Resources.UnloadUnusedAssets() call, so explicit Destroy() call is required) (https://trello.com/c/st8b6YZ9)
    • Fixed 'gray tint instead of highlighting' bug (https://trello.com/c/58fK9qqd)
    • Fixed HighlightierRenderer.EndOfFrame generating garbage every frame (https://trello.com/c/4lbbfKee)
    • Fixed "WARNING: Shader Unsupported: 'Hidden/Highlighted/Blur' - Pass '' has no fragment shader" or even “EXC_BAD_ACCESS” exception when running on iOS Metal device (https://trello.com/c/yiDskT1i)
    • Improved documentation
     
    greengremline and plmx like this.
  27. astrobot7

    astrobot7

    Joined:
    Feb 1, 2017
    Posts:
    2
    Hey,
    I am having trouble with the package. I have attached Highlighting Renderer script to my camera and is dynamically adding Highlighter to game objects. I have no problem when m playing the game inside editor. But it doesnt seem to work when i actually build the game. Please help its urgent.
     
  28. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    @astrobot7
    Hey, please let me know your:
    1. Unity version
    2. Highlighting System version (specified in the provided Documentation.pdf file)
    3. Operating system version (e.g. Windows 10 64-bit)
    4. Graphics card model (e.g. NVIDIA GeForce GTX 980)
    5. Mobile device version in case of mobile-related issues (please find your device on http://www.gsmarena.com/ and send me the link. For example: http://www.gsmarena.com/asus_zenfone_3_ze552kl-8106.php)
    6. Your output_log.txt file from problematic build
    7. If possible - your stripped project with which I will be able to reproduce this issue on my end. Please don't publicly share any files which may include Highlighting System or any of it's parts - send it directly to my Support E-mail specified on this page. Also note, that there is no need to include Library folder (only Assets and ProjectSettings folders is required).
     
  29. greengremline

    greengremline

    Joined:
    Sep 16, 2015
    Posts:
    183
    Thanks for your response to my earlier question! I do have another one.

    I'm using HighlightingSystem with unity's post processing stack on deferred rendering. I'm running into an issue because that stack includes both anti-aliasing and bloom. If I put the stack below the renderer on the camera, then the highlight has bloom (which I don't want). If I put the stack above the renderer, then the highlight starts to shake and wobble.

    Do you have any recommendation for fixing this?
     
    Last edited: Mar 2, 2017
  30. Ibukii

    Ibukii

    Joined:
    Jun 23, 2016
    Posts:
    45
    Hi slice3d, thanks for the prompt response! Can I know if the plugin using GPU to process the highlighting? I have a few highlighting components in the scene and it's not exactly operating at 60 fps (ideal). Is there any suggestions that I can optimize this?
     
  31. akareactor

    akareactor

    Joined:
    Apr 6, 2015
    Posts:
    108
    After update get error

    "Assets/Plugins/Editor/HighlightingRendererEditor.cs(300,15): error CS0101: The namespace `HighlightingSystem' already contains a definition for `SavePresetWindow'"
     
    Serve likes this.
  32. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    @zornor90
    Yeah, I'm aware of this issue. The order of effects in Unity's new Post-processing Stack is fixed and does not respect their own 'order of Image Effect components on Camera defines the order of their execution' concept,
    so I have to change the Highlighting System a bit and implement integration for this Post-processing Stack. Send your invoice number to my support email if you want to receive an updated Highlighting System as soon as I have it.

    @Ibukii
    Hi Ibukii! Yes, of course highlighting is rendered on the GPU. Have you tried upgrading to v4.3 (was recently released in the Asset Store)? Does it works faster or slower for you?

    @akastargazer
    Thanks for reporting about this issue! Here's the fix, but in short - you have to remove the HighlightingBaseEditor, VRHelper and VRSettingsUI scripts.
     
  33. Steamroller

    Steamroller

    Joined:
    Jan 2, 2013
    Posts:
    71
    Quick question. Does this plugin support doing a solid fill of an occluded objects? If not, how hard would it be to add this as an option?
     
  34. greengremline

    greengremline

    Joined:
    Sep 16, 2015
    Posts:
    183
    I figured that had something to do with it. Awesome I'll send it your way, really liking this support; was why I paid $30 for this asset vs a couple more cheap assets

    I have one more question for now. I'm trying to keep my update calls down to a minimum due to the cost involved in converting from C# to C++. I noticed that, because I have a highlighter on all of my interactables, I have currently anywhere from 100-150 highlighter updates a scene.

    upload_2017-3-12_19-16-1.png

    I was able to fix this by simply adding / removing the Highlighter component when the user hovers over / hovers away, but is there a way to avoid constant Update() calls when the highlighter is not highlighting an object without having to do that? My solution involves GetComponent and a coroutine to disable after a certain period (unless the user has re-enabled the highlighter), so it's not a huge deal if not.

    Thanks!
     
    Last edited: Mar 13, 2017
  35. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    @Steamroller
    No this isn't currently (if at all) possible. See my reply to AnomalusUndrdog here for an explanation.
    Though I'm currently doing research and trying out different approaches to make that possible.

    @zornor90
    Thanks! I believe this is not the only advantage compared to other solutions ;)

    As for the amount of Update() calls - yeah, I've also seen this blog post.
    In HighlighterInternal.cs script - remove Update() method completely and make highlighters field and UpdateTransition() method public.
    Then call it from your update manager once per frame like this:
    Code (CSharp):
    1. void Update()
    2. {
    3.     var e = Highlighter.highlighters.GetEnumerator();
    4.     while (e.MoveNext())
    5.     {
    6.         var highlighter = e.Current;
    7.         highlighter.UpdateTransition();
    8.     }
    9. }
    I will try to get rid of necessity to have Update() in Highlighter completely in the future versions of the Highlighting System.
     
    Alverik and greengremline like this.
  36. BrunoHbk

    BrunoHbk

    Joined:
    Jul 11, 2016
    Posts:
    4
    Hi,
    i have the same problem of @realmzero.
    Though i change the bool var seeTrough the result not change.
    I have tryed also your demo scene "OCCLUSION" and i changed seeTrough var at gameObject cube and the result is the same.
    Why?
     
  37. GameNative

    GameNative

    Joined:
    Apr 17, 2014
    Posts:
    40
    I was able to fix the issue, but I had to modify the source.
    I can post an update when I get home later today.
     
    BrunoHbk likes this.
  38. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
  39. greengremline

    greengremline

    Joined:
    Sep 16, 2015
    Posts:
    183
    Awesome!
     
  40. BrunoHbk

    BrunoHbk

    Joined:
    Jul 11, 2016
    Posts:
    4
    Hi @slice3d ,
    i have the last version of tool. My problem is about occlusion.


    I want to highlight only the handler that i can see and not even the handle behind the door.
    I set in code seeTrough=false;

    Code (CSharp):
    1.  if (go.GetComponent<Highlighter>() == null)
    2.                     {
    3.                         Highlighter highlighter = go.AddComponent<Highlighter>();
    4.  
    5.                         highlighter.seeThrough = false;
    6.                     }
     
  41. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    @BrunoHbk
    I cannot reproduce your issue, but this can happen if your door material doesn't write anything to the depth buffer and / or it's RenderType is not set to Opaque.
    Could you please send me your stripped-down example project with this door (+materials), camera and your ProjectSettings to my support email specified on this page?
     
  42. BrunoHbk

    BrunoHbk

    Joined:
    Jul 11, 2016
    Posts:
    4
    @realmzero i'm waiting :D :D
     
  43. sgower

    sgower

    Joined:
    Mar 9, 2015
    Posts:
    316
    Hi, after updating (maybe 3 weeks ago?) I notice that there are times when, instead of highlighting the object, it turns the entire object the highlight color. In the example below, I had applied a red highlight. I hadn't seen this problem before upgrading.

    Dev, have any idea what could be happening? What's odd is that the behavior doesn't seem consistent. It just happens occasionally.


     
  44. AleksanderN

    AleksanderN

    Joined:
    Jan 9, 2017
    Posts:
    6
    Hello, thank you for an awesome outline effect! Really can't prise you enough for including so many convenient and user friendly options :)
    Now, I got it working and covering my purpose, but there is something am having slight trouble with. I am unsure if its even possible, so I came here to ask. I outline all intractable objects in scene, which include a table and several objects on the table. I bet you get where am going with this, I figured out I can just switch between table outline and objects on the table. But it would be nice to be able to outline all of them at the same time.
    upload_2017-4-11_9-58-33.png
    Like in this image, I wish to outline all objects overlapping the white plane and the white cube overlapping blue and red cube needs to be fully outlined. Is there a simple way to do this?
     
  45. SimonsCat

    SimonsCat

    Joined:
    Mar 11, 2015
    Posts:
    49
    Hi Slice,

    We are using your Highlighter for a while now. Shipped one title (Industry Manager), now working on the next one (RTS - Beta stage).

    The assest is quite cool but we had to improve the performance by adding some changes for coroutines handling - we basically eliminated a coroutine for each HighlighterRenderer improving performance a bit. If you would like to take a look at the changes I can send you the changes on a private message so you can think about including them into the asset.

    The reason I'm writing you today is about improving the quality: We have a problem that the highlighted objects (=the glow) does not take in consideration the depth buffer between different highlighted objects. I did not analized the entire Highlighter behaviour as it would take some time so I'm asking if is there anything we can do to solve the following problem:

    Is there a way to achieve that the object infront of the highlighted object obscures the highlighted part behind the front object. On the image you can see the issue, the smaller object is above the highlighted object.

    backhighlight.jpg

    And the second case: We would like to have the front object highlighted in full even if there is another highliter object behind:

    fronthighlight.jpg


    I tried to solve this by using Highlighter occluder, playing with seetrough option, but somehow you can't achieve both at the same time. This objects are moving in space so sometimes the first one is above the second and sometimes the second is above the first. We can have also multiple objects highlighted (in our case max 2) and want to show properly both highlights without mixing them up (example: one object is highlighted because is selected and the other is highlighted because of MouseOver)
    Desired final result:
    combined.jpg


    I wanted to ask you about a possible solution (if any) to come around this obstacles before I dig into shaders, commandBuffers and rendertargets :).
    I'm guessing but, after a quick glimpse at the system I see that all the highlighters are rendered into the same buffer that does not support depthbuffer because of Blit usage after blurring...?? I'm not very familiar with custom image effects so I'm just making assumptions...

    Do you think we can do anything about that from your point of view?

    Thank you for the response,
    Simon.
     
    Alverik likes this.
  46. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    @Spanky11
    Hi! I have figured that highlighting of negatively scaled objects leads to this issue. Please apply this hotfix in order to fix it.

    @AleksanderN
    Hello! Thank you for your kind words. Appreciate that! :)
    See right below for an answer since you guys are asking about the same thing.

    @SimonsCat
    Hi Simon! Congratulations on the release! :)
    I must say that this is the one most-requested feature and I'm constantly looking for the ways to implement this, but unfortunately it seems impossible in general. At least without significant performance drop or hacks which won't work in all cases. Blurred highlighting halo doesn't have any depth, so there is no way to perform depth test for it in order to figure out if it's closer or farther to the viewer than the other highlighted object.
    That's why I stated it in the limitations section of the provided documentation (see multi-layer highlighting). If you want to dig deeper and/or implement it yourself - look for 'depth peeling technique' or any other method of order-independent transparency. But so far, I haven't seen such multi-layer (or overlapping) highlighting in any game (probably because the performance drop from that change doesn't worth it, especially on mobiles).

    As for the coroutines - getting rid of them in HighlighterRenderer is on my todo list.
    The challenge here is to keep each HighlighterRenderer autonomous, while keeping it compatible with multi-camera multi-HighlightingRenderer setups, so if you do something fancy with the Highlighter or any of it's children - that won't cause any errors. But unfortunately Unity lacks of this EndOfFrame message that would be ideally triggered for every MonoBehaviour (like Update() or LateUpdate()). Of course I'm interested in taking a look at how you propose to deal with this and get rid of coroutines, so please feel free to send me your changes via PM or email. Personally I was thinking about the highlighters manager which will trigger EndOfFrame() and Update() on all registered HighlighterRenderers, but I'm still looking for better solutions.
     
  47. SimonsCat

    SimonsCat

    Joined:
    Mar 11, 2015
    Posts:
    49
    Thanks, I was afraid you will say that ;) Based on the method you used is very tifficult to achieve that + using the blur itself is indeed tricky. We have to find a solution for that...

    Regarding the performance optimization we did exactly the second thing... some sort of manager. I'm attaching 2 files you can look at them. Nothing special but you will know what to look for. Sorry for the code format but it's just a test. We left some commented unused code in it. We made just a slight change but it saves hundreds of coroutines and basically works faster.
     
  48. punk

    punk

    Joined:
    Jun 28, 2013
    Posts:
    408
    @slice3d thanks for the system it‘s awesome

    however I'm having an issue - I'm using the unity post effects stack and then I have the highlight renderer component afterwards - this worked perfectly in 5.5, but after upgrading to 5.6 when the highlight renderer is active I get really bad color banding, it can be avoided by putting the highlight renderer before the post processing stack, but I don't want to do that because I don't want the highlight to be affect by color grading, any ideas?

    highlight.jpg
     
  49. Tony707

    Tony707

    Joined:
    Jun 15, 2015
    Posts:
    38
    @slice3d
    Is there a technical reason why the last update is only compatible on 5.5+ ?
    We are currently on 5.4 and would like to update the asset.

    Thank you.
     
  50. slice3d

    slice3d

    Joined:
    May 7, 2011
    Posts:
    207
    @punk
    Thank you! Unity Post-Processing Stack integration is on my todo list for the next update here.

    @Tony707
    Not really. You can easily make Highlighting System 4.3 compatible with Unity 5.4.
    Simply comment out the following lines in HighlightingOpaque and HighlightingTransparent shaders:
    Code (CSharp):
    1. UNITY_VERTEX_INPUT_INSTANCE_ID
    2. UNITY_SETUP_INSTANCE_ID(v);
    Though please note that the demo scenes will be corrupted since they are not backwards-compatible in Unity (luckily you can always check them out in Unity 5.5.2 in a separate project) - so it is better to remove the HighlightingSystemDemo folder completely if you plan to use Highlighting System 4.3 with Unity 5.4.
     
    Tony707, punk and Alverik like this.