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. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

[FREE] [OPEN-SOURCE] Outline Effect

Discussion in 'Assets and Asset Store' started by cakeslice, Mar 28, 2015.

  1. FinleyOderSo

    FinleyOderSo

    Joined:
    Mar 31, 2019
    Posts:
    5
    What was causing the problem is that I had the script attached to the wrong camera in the scene. Feeling stupid now.
    But something else: Doesn't it work with the Universal Render Pipeline?
     
  2. duartedd

    duartedd

    Joined:
    Aug 1, 2017
    Posts:
    148
    Hey Any plans for URP support ?
     
    Ziplock9000 likes this.
  3. cakeslice

    cakeslice

    Joined:
    Oct 18, 2014
    Posts:
    197
    There are no plans right now to support URP but maybe in the future once URP becomes more widely used.
     
  4. OlafsOsh

    OlafsOsh

    Joined:
    Jul 10, 2018
    Posts:
    61
    Hey!

    That does not seem to work...

    The Cam:
    upload_2020-12-27_12-47-6.png

    And the actual object with SpriteRenderer,,,
    upload_2020-12-27_12-47-43.png

    Any ideas?

    Olafs
     
  5. QbAnYtO

    QbAnYtO

    Joined:
    Dec 18, 2016
    Posts:
    219
    HMm..so for some reason the Alpha cutoff doesn't do anything for me. any ideas. I would like to get this to work. Also how do I use Auto enable feature? I want it to turn on automatically when character is occluded by any object (buildings, walls, etc.) I can set this up manually, but i rather have it on auto. What do I have to type in the script (I'm not a coder, I am using playmaker)

    he otherwise it works GREAT!
     
  6. TinyCrocodileStudios

    TinyCrocodileStudios

    Joined:
    Jun 5, 2018
    Posts:
    6
    Thank you for this cool asset!
     
  7. nemryk

    nemryk

    Joined:
    Aug 14, 2018
    Posts:
    1
    Is there any way to get rid of auto-merging mesh outlines?
     
  8. capu087

    capu087

    Joined:
    Jan 17, 2016
    Posts:
    11
    Hello, thanks for this asset, it's amazing!!

    I used the erase renderer to hide the hidden parts of the outline, and wondered if it was possible to have the outline go along the resulting "remaining" visible fill zone (have an outline around the whole fill zone)
    It's a bloc seperated in several pieces.

    Current result:
    upload_2021-4-15_14-25-52.png
    Result I woul'd like
    upload_2021-4-15_14-27-47.png
    Result without erase renderer (hidden parts shows up obv.)
    upload_2021-4-15_14-25-33.png

    Anyway the current result is already very good and suficient, but I ask in case it is already possible to do but didn't find out how.

    EDIT: I achieved this by disabling eraseRenderer and using color 2 on the pieces that should mask/cover the outline instead, and enabling Add lines between colors. I used a fully transparent color for color 2 so no outline/fill will be visible.
    Problem is the blocks rendering gets their transparency equal to the fill amount because of this. I would need to leave the materials of the blocks that have an Outline script (with 2 as a color parameter (transparent)) unchanged so they don't get altered by the outline asset, but still take them into account to cover the visible outline as before. I don't know if it is possible though...


    Cheers
     
    Last edited: Apr 15, 2021
    MNNoxMortem likes this.
  9. liebltabeling

    liebltabeling

    Joined:
    Mar 17, 2016
    Posts:
    13
    Hi
    since I Am using the Outline Effect with an HTC Vive Pro VR Set (via SteamVR) I get a black screen on the desktop and the screen inside the HTC totally is white.
    When I disable the script "Outline Effect" on VRCamera everything is ok.
    Can you help me?

    Thank you very much.
    Greetings Matthias
     
  10. bbjygm

    bbjygm

    Joined:
    Jul 21, 2017
    Posts:
    1
    I know this is late but I had the same issue and I just now fixed it.

    The line of code that was the problem was OutlineEffect.cs line 227:
    if (outline.SharedMaterials[v].HasProperty("_MainTex") && outline.SharedMaterials[v].mainTexture != null && outline.SharedMaterials[v])


    The final "does it exist" check should be at the beginning, so just move that
    outline.SharedMaterials[v]
    to the front:
    if (outline.SharedMaterials[v] && outline.SharedMaterials[v].HasProperty("_MainTex") && outline.SharedMaterials[v].mainTexture != null)
     
  11. MathewHI

    MathewHI

    Joined:
    Mar 29, 2016
    Posts:
    501
    Is it possible to not have the outline be visible through other geometry? I can see the outline from places I don't want to see it.
     
  12. MathewHI

    MathewHI

    Joined:
    Mar 29, 2016
    Posts:
    501
    Never mind I found out about the Erase Renderer option
     
  13. slaga

    slaga

    Joined:
    Dec 3, 2018
    Posts:
    142
    any tips into making it render the lines above all? cause if i have two objects next to each other the outline does not show where it overlaps
     
  14. Neidty

    Neidty

    Joined:
    Jun 2, 2019
    Posts:
    8
    Well simply great,

    plug & play, easy to use, simple and quick.

    Very well for beginners like me.
     
  15. AbgaryanFX

    AbgaryanFX

    Joined:
    Jan 9, 2010
    Posts:
    167
    Any support for Blur ?
     
    Last edited: Jul 27, 2021
  16. shubham-arora1

    shubham-arora1

    Joined:
    Nov 22, 2017
    Posts:
    2
    Does this plugin support HoloLens2?
     
  17. albpb2

    albpb2

    Joined:
    Jul 29, 2018
    Posts:
    1
    Hi! Thanks for the asset! I've tried it today but I run into an issue: if I have 2 sprites that overlap (e.g. a background and a character) and I add the Outline component to the character, it doesn't show up unless I disable the sprite renderer of the background.
     
  18. UglyDuckling

    UglyDuckling

    Joined:
    Mar 18, 2015
    Posts:
    7
    I have the same problem, did you find a solution?
     
  19. Bigg_P

    Bigg_P

    Joined:
    Jul 16, 2014
    Posts:
    10
    Hi,
    I am facing the same problem in Oculus Quest 2. Did you manage to find any solution?
     
  20. Bioman75

    Bioman75

    Joined:
    Oct 31, 2014
    Posts:
    92
    Anyone figure out how to stop outline from showing through walls and other objects? Disable render just removes the outline all together.
     
  21. T_Nugget

    T_Nugget

    Joined:
    Jul 17, 2019
    Posts:
    1
    Hey! I am loving your asset pack. If I import the project it works just fine, but I'm trying to set it up from scratch in a different project. It seems like everything is working but, when I push play, the scene looks very dark suddenly. Any thoughts or advice?
    upload_2022-2-10_23-54-6.png
     
  22. TSCSimulation_AH

    TSCSimulation_AH

    Joined:
    Dec 7, 2017
    Posts:
    7
    Hi, I'm using this script but I want to be able to display 4 colours instead of three, but it seems that's not possible. Is there a way to set this up to display more than three colours because changing the colours of one of the 3 already supplied isn't an option for me, thanks :)
     
  23. SpaharGR

    SpaharGR

    Joined:
    Dec 5, 2012
    Posts:
    11
    Hello, I have a problem when adding a post process effect of bloom. Outline is also affected by the bloom, which is not desired. Any ideas how to make outlines not be affected by bloom? Thanks.
     
  24. alexpazz

    alexpazz

    Joined:
    Mar 23, 2022
    Posts:
    1
    Just a quick note on the OutlineEffect script. On prerender, you're applying the outline material to all existing outlines regardless of if they are enabled or not:


    Code (CSharp):
    1. if (outline.eraseRenderer)
    2.                                     m = new Material(outlineEraseMaterial);
    3.                                 else
    4.                                     m = new Material(GetMaterialFromID(outline.color));
    Changed it to that:
    Code (CSharp):
    1. if (outline.eraseRenderer)
    2.                                     m = new Material(outlineEraseMaterial);
    3.                                 else if (outline.enabled)
    4.                                     m = new Material(GetMaterialFromID(outline.color));
     
  25. Tan_Li_yang

    Tan_Li_yang

    Joined:
    Mar 21, 2022
    Posts:
    1
    Is there anyway to add glowing or blinking effect to the outline only?
     
  26. tomcb

    tomcb

    Joined:
    Apr 3, 2017
    Posts:
    15
    upload_2022-7-15_13-18-35.png

    This asset is amazing and served me well when making my game. The only problem I have is that with thin objects (like the paper in the picture) the lines are kind of messy. Why is this happening?
    I assume it is because of the inner edges of the model. Can this be prevented?
     
  27. d2clon

    d2clon

    Joined:
    Aug 19, 2017
    Posts:
    19
    I see this error when I import the asset:

    Assets/ThirdParty/OutlineEffect/OutlineEffect/OutlineEffect.cs(28,19): error CS0234: The type or namespace name 'VR' does not exist in the namespace 'UnityEngine' (are you missing an assembly reference?)

    Thanks for your work!
     
  28. rangit1987

    rangit1987

    Joined:
    Nov 21, 2021
    Posts:
    1
    If 2 sprites are there(1 background and other one the object where outline script is atatched ) then outline is not displayed. if I deactivate background then Outline is visible. Please help.
     
  29. AliHassan09

    AliHassan09

    Joined:
    Mar 1, 2023
    Posts:
    3
    isn't it optimized for mobile devices?
     
  30. AliHassan09

    AliHassan09

    Joined:
    Mar 1, 2023
    Posts:
    3
    hey developer, isn't it optimized for mobile devices
     
  31. Xelnath

    Xelnath

    Joined:
    Jan 31, 2015
    Posts:
    400
    he no longer develops this app
     
  32. xrsandbox

    xrsandbox

    Joined:
    Jan 31, 2023
    Posts:
    1
    Change "UnityEngine.VR" to "UnityEngine.XR"
     
  33. wechat_os_Qy0_H7LjqyZA2YaRRpOulur6c

    wechat_os_Qy0_H7LjqyZA2YaRRpOulur6c

    Joined:
    Apr 21, 2023
    Posts:
    1
    Can't highlight in URP rendering mode, how to solve
     
  34. Dolotboy

    Dolotboy

    Joined:
    Feb 25, 2020
    Posts:
    7
    I downloaded the project and even the DEMO scene isn't working, what to do ?
     
  35. Dolotboy

    Dolotboy

    Joined:
    Feb 25, 2020
    Posts:
    7
    Same here
     
  36. ak4514768

    ak4514768

    Joined:
    Aug 18, 2021
    Posts:
    4
    I am using Unity XRIT and have added the Outline Effect script to XR Origin main camera and Outline component to my 3D gun that I want to highlight. It is a VR room and I have added bool enable to my Hover events in the gun's XR Grab interactable. However, it is not working.
     
  37. weidenfj

    weidenfj

    Joined:
    Dec 6, 2022
    Posts:
    1
    Great asset. I have problems getting this to work on HoloLens 2, however. While the outlines show up when testing the App in the Editor and via holographic remoting, they do not show when deploying to the HoloLens. Has anyone experienced a similar issue or has an idea what could be going wrong?
     
  38. aidanboch

    aidanboch

    Joined:
    Apr 17, 2020
    Posts:
    5
    How can I get the shader to create lines between objects with the same colour? I want to render my entire scene with black outlines.
     
  39. dev_vin

    dev_vin

    Joined:
    Aug 30, 2018
    Posts:
    1
    Same here. Any update on URP Support.
    How can we make it work in URP. Any help.
     
    yuliyF likes this.