Search Unity

Bug [CASE: 1172941] Fuzzy/Blurry text after moving VisualElement (2019.3.0a10)

Discussion in 'UI Toolkit' started by taylank, Jul 28, 2019.

  1. taylank

    taylank

    Joined:
    Nov 3, 2012
    Posts:
    182
    I'm encountering this issue very frequently: whenever I move a UI element inside an editor window, some text elements contained in the UI element become fuzzy and blurry. See the screenshot below. Is there anything I can do about this?


    upload_2019-7-27_16-17-31.png
     
    PrimalCoder likes this.
  2. taylank

    taylank

    Joined:
    Nov 3, 2012
    Posts:
    182
    Also in the above example, fields drawn by IMGUI Container (Some Int and Some String fields) never get blurry.
     
  3. antoine-unity

    antoine-unity

    Unity Technologies

    Joined:
    Sep 10, 2015
    Posts:
    780
    Hello,

    We are not aware of this bug. Would you mind reporting a bug with your project or some minimalistic version of it so we can reproduce it ?

    When you mean you "move the element" is that by using manipulating the VisualElement.transform property ?

    Thanks
     
  4. taylank

    taylank

    Joined:
    Nov 3, 2012
    Posts:
    182
    Sure, I'll submit a sample project. To be more precise, it happens when I scale the element down (zooming out) and then move it around using its transform. When I scale it back up again (zoom in) the text elements appear all blurry. Sometimes focusing on the object or dragging it out of the viewport and back in fixes the blurriness.

    Here's an animated gif to better illustrate the problem:

    blurryGraph.gif

    P.S. The icons are drawn using Font Awesome.
     
  5. taylank

    taylank

    Joined:
    Nov 3, 2012
    Posts:
    182
    @antoine-unity I submitted a bug report with 2019.3.a10 a couple weeks ago. Case ticket: 1172941_pc8fotcbi0vnp0ck
    The issue remains unfixed in 2019.3.a12
    The case has since been closed since the QA team asked for a sample project with an earlier version and I wasn't able to reply because I was out of office. I will attempt reopening the issue. Will let you know.
     
    Last edited: Aug 19, 2019
  6. taylank

    taylank

    Joined:
    Nov 3, 2012
    Posts:
    182
    @antoine-unity Can I please have an update on this?

    The QA team informed me that they were able to reproduce it, but checking the status of the issue I can see it's been marked as Won't Fix, with a comment saying it's related to user code.
    https://issuetracker.unity3d.com/is...mes-blurry-when-zoomed-out-and-then-zoomed-in

    If it's indeed caused by user code, it'd be very helpful to know how one avoids this issue. This is done with plain transform manipulation. Is that something to avoid? Should I be repainting all elements after scaling? Is there something else to do? Please help.
     
    Last edited: Aug 27, 2019
  7. taylank

    taylank

    Joined:
    Nov 3, 2012
    Posts:
    182
    Man, wish this was pointed out to me sooner but here we are. Allow me to answer my own question after a month of pulling my hair out:
    https://docs.unity3d.com/2019.3/Doc...ence/UIElements.VisualElement-usageHints.html
    https://docs.unity3d.com/2019.3/Documentation/ScriptReference/UIElements.UsageHints.html

    If you expect your transform to change a lot, like say, a node in a node graph or something, you should set the usageHints property to DynamicTransform (or GroupTransform if it has sub-elements with variable transforms) to tell the system how often the rendering should be refreshed.

    Also I'd like to suggest renaming usageHints to RenderMode or something. UsageHints sounds more related to tooltip support.
     
    PrimalCoder likes this.
  8. antoine-unity

    antoine-unity

    Unity Technologies

    Joined:
    Sep 10, 2015
    Posts:
    780
    Something was lost in translation it seems, I believe our devs have included information on how to approach this.

    Will get back to you.
     
  9. taylank

    taylank

    Joined:
    Nov 3, 2012
    Posts:
    182
    Yeah, it may well be a case of communication breakdown. There was little explanation on the Issue Tracker page aside from saying it was caused by user code, and I have not received any other communications from Unity. Since then I see that the comment has been removed and the issue appears active again.

    In any case, thank you for the response.