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
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Feature Request Ability To Decide Corner Vertex Count

Discussion in 'UI Toolkit' started by Nexer8, Mar 13, 2021.

  1. Nexer8

    Nexer8

    Joined:
    Dec 10, 2017
    Posts:
    271
    The basic idea is that you should be able to override the amount of vertices used for the corners of Visual Elements. Either per-element or globally (or perhaps global with local overrides). Currently, Visual Elements seem to have 4 vertices per corner when the border radius of that corner is above 0. This is okay for elements with small border radiuses, but looks bad when the border radius is larger:
    upload_2021-3-13_9-58-41.png

    This would also make elements able to look like this, which would be useful in many cases (e.g. futuristic design):
    upload_2021-3-13_10-0-38.png

    And if there was a per-corner override, this type of element could be achieved:
    upload_2021-3-13_10-3-40.png
    This could also mean less vertices for small radiuses, and more for larger ones if some "automatic" option was enabled.
     
    Last edited: Mar 13, 2021
    Onigiri and MousePods like this.
  2. Onigiri

    Onigiri

    Joined:
    Aug 10, 2014
    Posts:
    410
    Yeah, i'm missing this functionality too
     
    Nexer8 likes this.
  3. MousePods

    MousePods

    Joined:
    Jul 19, 2012
    Posts:
    757
    I will chime in and say I also need this, especially the cut edges.
     
    Nexer8 likes this.
  4. AlexandreT-unity

    AlexandreT-unity

    Unity Technologies

    Joined:
    Feb 1, 2018
    Posts:
    323
    We're moving away from tessellated borders like that. We're already working on a new rendering technique that will make rounded corners look smooth at any resolution. We're also working on a Vector API that will allow to draw smooth-looking paths.
     
  5. Nexer8

    Nexer8

    Joined:
    Dec 10, 2017
    Posts:
    271
    That sounds better to be honest. The hard edges can be achieved with SVGs and the smooth with the default rendering.
     
    benoitd_unity likes this.
  6. Onigiri

    Onigiri

    Joined:
    Aug 10, 2014
    Posts:
    410
    Just tried 2021.2a15 and i want to say that new anlialiased smooth shape rendering is awesome! Thanks to all the developers for their hard work!