Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Question Poor quality SVG

Discussion in 'General Graphics' started by Tobias-J, Nov 8, 2023.

  1. Tobias-J


    Apr 11, 2013

    I have imported an SVG file and dragged it into my Scene, turning it into a prefab.
    However, the quality of the image is not even close to the original. Some circles are dots while others seem to have been segmented somehow.
    This is a part of the image in normal scale, from the editor (playing):
    svg error normal.png

    Here I have scaled the image up several times and cut out part of the larger circles from above image:
    svg error scaled.png
    As you can tell, the circles doesn't actually seem to be a circle, and the width of the stroke changes considerably. It appears quite different in many ways, from what we see in Adobe Illustrator.

    I'm using the built-in Render Pipeline at Ultra Quality and anti aliasing is set to 8x multi sampling.

    I'm not exactly new to Unity (though rusty), but graphics is certainly not my strong point, so please do not assume that I have thought of all the simple or basic stuff.

    Thanks for your time,
  2. halley


    Aug 26, 2013
    Nothing in Unity is based on curves. Nothing. Every single curve is always converted to polygons. When you convert to polygons, you have to decide how far from the original curve the lines are allowed to stray. If you force it to be super-close to the curve at every point, the number of polygons can skyrocket and ruin your realtime rendering performance.

    This is not a setting that is controlled by the "Ultra Quality" or anti-aliasing settings. If you're using the Vector Graphics package, then in your import settings, look for Tesselation Step Distance.

    In drawing apps, they resample the curve every time you zoom in and out, to be sure that the image displayed is the best representation of the curve possible. In Unity, you would have to resample the curves based on how you plan to view them. Again, if you were to try to resample all the time, you would ruin your realtime rendering performance.
    Tobias-J likes this.
  3. Tobias-J


    Apr 11, 2013
    Picture Perfect!
    Thanks a bunch @halley :)

    PS: I must be more tired than I thought. Can't see a way to mark your reply as correct or the thread as resolved.