Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Official Vector Graphics Preview Package

Discussion in 'UI Toolkit' started by rustum, May 4, 2018.

  1. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    If they are going to end up as shapes internally anyway, it might be less confusing if MakeCircle and MakeEllipse just returned a Shape.
     
  2. mcoted3d

    mcoted3d

    Unity Technologies

    Joined:
    Feb 3, 2016
    Posts:
    998
    Absolutely, this should be fixed in the next version. Thank you!
     
    ecurtz likes this.
  3. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    I started a very simple and preliminary editor window for vector shapes. GitHub

    It uses my custom classes, but might be a good starting point for working directly with the Unity classes (at some point.) It's under the MIT license, so feel free to use any of the code for whatever.

    PREVIEW.png
     
    Digimus, AbgaryanFX and mcoted3d like this.
  4. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    It would be nice to have ClosestPointOnBezier and DistanceToBezier in VectorUtils. There's one in HandleUtils, but that's editor only and native code, so I can't steal it.
     
    mcoted3d likes this.
  5. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    I think I found a bug with closed shapes. It seems to be ignoring the control points on the final segment connecting the last vertex back to the first, and always creating a straight line.

    Code (CSharp):
    1.  
    2. var circle = VectorUtils.MakeCircle(position, radius);
    3. /*
    4. // Draw the circle using 4 Bezier curves
    5. float bezierCircleConst =  0.55191502449f;
    6. var circle = new Shape()
    7. {
    8.    Contours = new BezierContour[]
    9.    {
    10.        new BezierContour()
    11.        {
    12.            Segments = new BezierPathSegment[4],
    13.            Closed = true
    14.        }
    15.    }
    16. };
    17.  
    18. circle.Contours[0].Segments[0].P0.x = position.x;
    19. circle.Contours[0].Segments[0].P0.y = position.y + radius;
    20. circle.Contours[0].Segments[0].P1.x = position.x + radius * bezierCircleConst;
    21. circle.Contours[0].Segments[0].P1.y = position.y + radius;
    22. circle.Contours[0].Segments[0].P2.x = position.x + radius;
    23. circle.Contours[0].Segments[0].P2.y = position.y + radius * bezierCircleConst;
    24.  
    25. circle.Contours[0].Segments[1].P0.x = position.x + radius;
    26. circle.Contours[0].Segments[1].P0.y = position.y;
    27. circle.Contours[0].Segments[1].P1.x = position.x + radius;
    28. circle.Contours[0].Segments[1].P1.y = position.y - radius * bezierCircleConst;
    29. circle.Contours[0].Segments[1].P2.x = position.x + radius * bezierCircleConst;
    30. circle.Contours[0].Segments[1].P2.y = position.y - radius;
    31.  
    32. circle.Contours[0].Segments[2].P0.x = position.x;
    33. circle.Contours[0].Segments[2].P0.y = position.y - radius;
    34. circle.Contours[0].Segments[2].P1.x = position.x - radius * bezierCircleConst;
    35. circle.Contours[0].Segments[2].P1.y = position.y - radius;
    36. circle.Contours[0].Segments[2].P2.x = position.x - radius;
    37. circle.Contours[0].Segments[2].P2.y = position.y - radius * bezierCircleConst;
    38.  
    39. circle.Contours[0].Segments[3].P0.x = position.x - radius;
    40. circle.Contours[0].Segments[3].P0.y = position.y;
    41. circle.Contours[0].Segments[3].P1.x = position.x - radius;
    42. circle.Contours[0].Segments[3].P1.y = position.y + radius * bezierCircleConst;
    43. circle.Contours[0].Segments[3].P2.x = position.x - radius * bezierCircleConst;
    44. circle.Contours[0].Segments[3].P2.y = position.y + radius;
    45. */
    46.  
     
  6. mcoted3d

    mcoted3d

    Unity Technologies

    Joined:
    Feb 3, 2016
    Posts:
    998
    This is because the BezierPathSegment struct doesn't hold the final point of the segment. The final point is actually the P0 of the next path segment. You'll have to allocate one more BezierPathSegment in your array, and only set the P0 of the last one.

    For your particular example, there's a simpler way to do this. You can use the VectorUtils.BuildRectangleContour(Rectangle) which will convert your rounded rectangle into a BezierContour. That resulting BezierContour will have 5 BezierPathSegments.

    Hope this helps!
     
  7. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    That's not the same behavior as a closed regular polygon, which draws just fine without duplicating P0.

    EDIT: Just to clarify it will draw a closed shape without duplicating the first point, which seems like the correct behavior to me, but in this case (which must be an error fallback?) it fails to use P1 and P2 from the final vertex. The fact that final.P0 == initial.P0 is implied by it being a closed shape, so I think this behavior is wrong.
     
    Last edited: Jul 10, 2018
  8. mcoted3d

    mcoted3d

    Unity Technologies

    Joined:
    Feb 3, 2016
    Posts:
    998
    Ok I understand now. I would also assume that a contour with Closed = true would remove the need of the extra path segment at the end. I remember there was a technical issue why we made it this way. I'll revisit and hopefully come up with a fix.

    Thanks!
     
  9. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    517
    I was able to experiment with the package a bit with the 2018.2 release. Unfortunately, I don't think that our needs are met by the package currently. We'd love to reduce the size of the build by generating certain assets from the .svg source files and ship only the .svg with the player. We'd also want to generate meshes based on the device so that we can get a good pixel accurate rasterization of the SVG.

    Is there a way to get the raw .svg assets to be generated in the player so that we can ship the .svg files instead of importing and storing a much heavier vertex game object asset? While they are fairly small for some simple SVGs, some of our vertex counts are greater than 65k vert limit due to the complexity of our source assets and the size that the mesh would consume is larger than a rasterized image of it by a significant margin. I would guess that the .svg import is fairly expensive, but then again web browser can do it fairly quickly so I thought I'd ask. Or if there would be a way that we could ship the .svg but then rasterize it in a more optimized manner to create a more pixel perfect image rather than generating it via vertex data?
     
  10. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    I haven't played with them yet, but I think you can use SVGParser.ImportSVG() to get your data into a Scene followed by VectorUtils.BuildSprite() to get a rasterized image.
     
  11. Ferazel

    Ferazel

    Joined:
    Apr 18, 2010
    Posts:
    517
  12. wbahnassi_unity

    wbahnassi_unity

    Unity Technologies

    Joined:
    Mar 12, 2018
    Posts:
    28
    The Closed flag has more meaning than just stitching start to end. In fact, it is doing that stitching as a courtesy, but a proper closed path in this API requires you match the end and start in the segments array.
    And just to note, matching end to start by itself is also not enough without setting Closed to true. Otherwise path endings will kick in... So yes, two requirements: match the tips, AND set Closed to true.
    Dont rely on the auto-stitch or else you will get that backup line connecting the start and the end, and you lose the ability to maintain curvature as you like.
     
    mcoted3d likes this.
  13. BasmanovDaniil

    BasmanovDaniil

    Joined:
    Apr 30, 2013
    Posts:
    2
    First of all, great work! Glad to finally see official SVG support. Now to the feedback.
    1. You have a typo in VectorTesselation.cs and VectorSceneTesselation.cs, it should be Tessellation.
    2. I already had LibTessDotNet in my project and it collided with your package. I bet the same will happen with Clipper. You could move them to a Unity.VectorGraphics subnamespace, but it would even better if you extracted them into separate packages, for example com.unity.libtessdotnet and com.unity.clipper. That way they could be used independently for procedural generation or referenced in other packages. As of now, the only public triangulation API in Unity is Lightmapping.Tetrahedralize which is a great shame given how much work went into sprites and 2d colliders.
    3. What is the reason for a 45° rotation in TessellateShapeLibTess?
     
  14. mcoted3d

    mcoted3d

    Unity Technologies

    Joined:
    Feb 3, 2016
    Posts:
    998
    We may eventually provide a simpler way to do this, but for now, you can send your raw SVG files as text resources in your player (you can use the StreamingAssets folder for that matter) and import them at runtime. You can then provide custom tessellation options based on the device. The usual way to do this is like this:

    Code (CSharp):
    1. var tessOptions = new VectorUtils.TessellationOptions() { ... } // Settings for the current device
    2. var sceneInfo = SVGParser.ImportSVG(new StreamReader(svgFilePath));
    3. var geoms = VectorUtils.TessellateScene(sceneInfo.Scene, tessOptions);
    4. var sprite = VectorUtils.BuildSprite(geoms, 10.0f, VectorUtils.Alignment.Center, Vector2.zero, 128, true);
    As you experienced, the tessellation process can be quite expensive, so this should usually be done at level load time.

    This can certainly happen for complex SVG files. It would be worth playing with the advanced settings to see if you can find a combination that works for you. If possible, you should avoid using clip-paths in your SVG file. The clipping process is expensive and can bring the import process to a crawl and may generate a ton of vertices.
     
  15. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    Not trying to be obtuse here, but that requirement makes no sense to me. All the curvature information exists in the previous entry, you're just choosing not to use it. Nothing else in Unity I'm aware of, e.g. PolygonCollider2D, has this requirement to duplicate the final point.
     
  16. mcoted3d

    mcoted3d

    Unity Technologies

    Joined:
    Feb 3, 2016
    Posts:
    998
    Thanks for reporting. It would be nice to have standalone packages for tessellation and clipping, but in the short term I think I would be more inclined to put them in separate namespaces to avoid collisions.

    We see many shapes with straight edges that are aligned on the axes. In these situations, libtess generates very thin triangles and I've even seen "gaps" occurring caused by invalid triangles. By doing a 45° rotation, the resulting triangles have a better area coverage and are more GPU-friendly. Note that the "thin triangles" issue can also be fixed with Delaunay triangulation algorithms. We hope to provide that as an alternative tessellator eventually.
     
  17. wbahnassi_unity

    wbahnassi_unity

    Unity Technologies

    Joined:
    Mar 12, 2018
    Posts:
    28
    You are correct that the necessary information is all available in the closed=true case, as even with BezierPathSegment, the P3 for the last segment should be the P0 of the first.
    Now, as @mcoted3d explained, BezierPathSegment arrays are expected to have a closing entry which only defines a P0 (that is why you see the last segment's P1 and P2 being ignored in your circle example). This closing entry requirement applies whether you have a contour with closed=true or not. So back to your example, the API is behaving as expected (draws a line between the third and first points of the circle).

    That being said, I do see your point about the information already being there, so it would be redundant to add a closing entry just to please the API (+1). Moreover, it would make the API less error-prone to avoid the closing entry when you are describing a closed path (+1). The implementation can be adjusted to cope with this without much problem. The only downside is that open paths will be the only case which require the closing entry since you can't specify a P3 in BezierPathSegment, so open path construction will require special attention as opposed to a uniform way to construct paths using BezierPathSegment despite their closure or openness (-1). I also noticed that the documentation in BezierContour is even already specifying the behavior you want (closed paths don't use a closing entry), so we have a mismatch there that needs to be fixed too.

    We will address this whole thing in the upcoming preview update. Thanks for your notes, and please keep them coming!
     
    ecurtz likes this.
  18. AntonVazhinsky

    AntonVazhinsky

    Joined:
    Nov 24, 2013
    Posts:
    67
    How can I access individual objects after importing SVG? To change the color of an object for example.
     
  19. mcoted3d

    mcoted3d

    Unity Technologies

    Joined:
    Feb 3, 2016
    Posts:
    998
    During import, the SVG is flattened inside the generated sprite asset as an array of triangles, so modifying it after import would be challenging.

    However, you could use the SVGParser to manually load the SVG into a vector scene object. The vector scene holds the vector data that was read from the SVG file, and it will follow roughly the same structure. You can then modify the scene before the final sprite generation. It would look roughly like this:

    Code (CSharp):
    1. var sceneInfo = SVGParser.ImportSVG(new StringReader(svg));
    2. // Modify sceneInfo.Scene before tessellation here
    3. var geoms = VectorUtils.TessellateScene(sceneInfo.Scene, tessOptions);
    4. var sprite = VectorUtils.BuildSprite(geoms, 10.0f, VectorUtils.Alignment.Center, Vector2.zero, 128, true);
    5. GetComponent<SpriteRenderer>().sprite = sprite;
    Note that there is no way to identify which SVG tags resulted in which node in the vector scene. So, you would have to understand the structure of the original SVG file to be able to locate the proper node.
     
  20. wbahnassi_unity

    wbahnassi_unity

    Unity Technologies

    Joined:
    Mar 12, 2018
    Posts:
    28
    Probably it would be easier to keep the object you'd like to colorize as a separate sprite asset which you can color-tint individually without affecting the rest of the art. This would also give you best runtime performance. But if you want to change the color in the editor import process, then yeah.. what @mcoted3d suggested is the best option right now.
     
  21. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    1,085
    I've noticed that it's possible to make frame by frame animations using imported Svgs. Is there any software that supports skeletal animations and provides svg sequences exporter? Does it even make sense to make them? Low file sizes is what convince me.
     
  22. Ame

    Ame

    Joined:
    Jul 10, 2012
    Posts:
    8
    Hi!
    I'm testing the SVG package and I've noticed a difference between an SVG file exported with Illustrator and the Unity SVG Mesh.

    Basically , while on Illustrator (and on Mac Command+Y) you see a shape half transparent with a solid colored square in the background, on Unity the foreground image is rendere with full opacity.
    So, is this something that will be added in the future or is there something wrong in my exported SVG?

    Here's the SVG file as txt,
    Thanks
     

    Attached Files:

  23. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    I'm guessing this is because I'm trying to call VectorUtils:BuildSprite() outside of a MonoBehavior? Is there a way to generate a Texture2d skipping the Sprite step? If not can can we get one added?
     
  24. print_helloworld

    print_helloworld

    Joined:
    Nov 14, 2016
    Posts:
    231
    I could see having the option to rasterize an svg to a png during initialization of the game would be nice. Since it could generate a high res version of the png (in memory or on disk) and then use that version instead if the svg is static, to save on performance perhaps. Or just being able to outright convert svg > png to act as a source > asset kind of workflow, similar to how some people prefer blender > fbx.
     
  25. wbahnassi_unity

    wbahnassi_unity

    Unity Technologies

    Joined:
    Mar 12, 2018
    Posts:
    28
    There are various workflows around SVG that we would like to support, including the scenario that you mentioned. In the mean time, while we haven't provided an example for this yet, there are helper APIs provided to easily achieve the rasterization part. The methods of interest are in VectorUtil class: BuildSprite() and RenderSpriteToTexture2D(). At the moment you will have to manage the resulting textures (e.g. caching them as PNGs on the user's device for faster reloads).
     
    print_helloworld likes this.
  26. wbahnassi_unity

    wbahnassi_unity

    Unity Technologies

    Joined:
    Mar 12, 2018
    Posts:
    28
    This type of "blend mode" is not supported out of the box. This is using a special CSS mix-blend-mode:eek:verlay property, which is not part of the SVG specs per se (hence why Unity doesn't support it). There are many styles that come from the web which can be embedded in an SVG document, but unless a web browser parses that document then most of those web CSS properties will just be ignored.
    I also tried to reimport the file in Illustrator and it failed to get back the correct blend mode so the result came all opaque just like in Unity and Microsoft Edge. You can still use regular transparency/opacity though.
     
  27. wbahnassi_unity

    wbahnassi_unity

    Unity Technologies

    Joined:
    Mar 12, 2018
    Posts:
    28
    Yes there are such tools. Certain professional 2D animation packages support that workflow exactly. And yes, it makes sense :)
     
    Kamyker likes this.
  28. wbahnassi_unity

    wbahnassi_unity

    Unity Technologies

    Joined:
    Mar 12, 2018
    Posts:
    28
    The inner call to OverrideGeometry is only allowed by the Sprite during two times only: during an asset import in the editor, or during play mode (at runtime or within editor play mode). What is the context/timing around your call?
     
  29. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    In this case I was trying to dynamically create an icon to use in my editor window, but I can imagine any number of scenarios where it would be useful to rasterize a vector but you weren't making a sprite.
     
  30. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    1,085
    Somehow I can't find any :(. Spine (and Dragonbones) has only:

    Google gives me a lot of css, js and smil animators for web usage. Tried that one funny looking TupiTube but it seems that it can't export transparent backgrounds (I could edit all .svgs separately but that's a meh solution). Looks like Adobe Animate also has only javascript svg animations exporter.

    I think for now I will just do
    and use new 2d Animator. Who knows maybe in the future it will allow switching png to svg.
     
  31. Ame

    Ame

    Joined:
    Jul 10, 2012
    Posts:
    8

    Thank You very much, I solved it.

    There's still one thing that I want to ask : can we have the possibility to change Sprite Renderer Color and affect the SVG Sprite?
    Cause it's not working now, in the shader it seems that it counts the renderer color but in reality is not; it seems that only the Tint Color property is read.

    Thank You.
     
  32. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    1,085
    It's pretty weird that Vector.shader looks almost the same as Sprites-Default.shader, they work interchangeably and only difference is:
    Code (CSharp):
    1. #ifdef UNITY_COLORSPACE_GAMMA
    2. fixed4 color = IN.color;
    3. #else
    4. fixed4 color = fixed4(GammaToLinearSpace(IN.color.rgb), IN.color.a);
    5. #endif
    What happens to simpler shader? I've tried:
    Code (CSharp):
    1. fixed4 VectorFrag(v2f IN) : SV_Target
    2. {
    3.     fixed4 c = IN.color;
    4.     c.rgb *= c.a;
    5.     return c;
    6. }
    Removed all unneeded properties like _MainTex, _AlphaTex. Saw that nasty warning in SpriteRenderer about _MainTex but guess what... it worked anyway. Could we then get simpler SpriteRenderer or it doesn't matter and there won't be much performance increase?
     
  33. my2iu

    my2iu

    Joined:
    Jul 17, 2018
    Posts:
    2
    It would be nice if you could also provide a lower-level API layer as well. Having SVG support is a huge improvement and is really great, but SVG is also 20 years old now. There's newer vector graphics technology like gradient meshes, which overcome many of the limitations of SVG. It would be useful if you supplied lower-level hooks that others could use to build support for their own vector graphics formats in Unity.

    For example, I had to write my own Unity importer for importing vector graphics from my Omber program into Unity. But it just imports things as static 3d meshes. It would be nice if I could hook into the lower layers of your SVG code to get support for things like rendering to sprites, rigging, and animation.
     
  34. mcoted3d

    mcoted3d

    Unity Technologies

    Joined:
    Feb 3, 2016
    Posts:
    998
    Yes, and this is a common issue. This is caused by the renderer's color property trying to make use of the vertex color channel, which is already used by the SVG sprite.

    The workaround right now is to use an instanced material to pass the color. Create a new material that uses the "Unlit/Vector" shader, and check the "Enable GPU Instancing" checkbox. Your SVG sprites that use this material should now be tintable. It won't work with the "Unlit/VectorGradient" shader at this time though, which you would need for SVGs with textures and/or gradients.
     
    Ame likes this.
  35. mcoted3d

    mcoted3d

    Unity Technologies

    Joined:
    Feb 3, 2016
    Posts:
    998
    The only difference is that Vector.shader does proper sRGB color conversion when your project is set to use the linear colorspace. The Sprites-Default.shader may do that in the future, and we could get rid of Vector.shader when that happens.

    Your version is simpler an may run faster, so feel free to use it! In our situation, we want to follow the regular sprites shader as much as possible to inherit its features (pixel snapping, instancing, etc.).
     
  36. mcoted3d

    mcoted3d

    Unity Technologies

    Joined:
    Feb 3, 2016
    Posts:
    998
    We do have a public API to our internal vector scene representation. You can find the documentation here (look for the "Vector Graphics API" section):
    https://github.com/Unity-Technologi...s/blob/master/Documentation/vectorgraphics.md

    With the API, you have full access to bezier paths and shapes, color/texture/gradient fillings, tessellation methods, etc. Unless this isn't what you mean by "low-level API"? :)
     
    Last edited: Jul 20, 2018
  37. AntonVazhinsky

    AntonVazhinsky

    Joined:
    Nov 24, 2013
    Posts:
    67
    Thank you. Another question, why does not work PolygonCollider2D. Physics is not automatically created. What can be done with this?
     
  38. mcoted3d

    mcoted3d

    Unity Technologies

    Joined:
    Feb 3, 2016
    Posts:
    998
    The physics outline is not generated automatically for you (we may fix that in the future). So, you will have to select your SVG asset in the project browser, press "Sprite Editor" and go to the "Custom Physics Shape" module to generate an outline.

    Note that there is an issue with the Sprite Editor at this time as it will not show anything when you select the SVG asset. With the Sprite Editor open, you will have to select the *sprite sub asset* of the SVG file in the project browser to make it work (this is fixed in 2018.2).

    Once the physics outline is generated and applied, adding a PolygonCollider2D component will make use of it.
     
  39. AntonVazhinsky

    AntonVazhinsky

    Joined:
    Nov 24, 2013
    Posts:
    67
    I import the file via ImportSVG. Is it possible to automatically build physics by points svg?
     
  40. mcoted3d

    mcoted3d

    Unity Technologies

    Joined:
    Feb 3, 2016
    Posts:
    998
    Oh, that makes things a bit more complicated. You can set your own physics shape using the Sprite.OverridePhysicsShape method:
    https://docs.unity3d.com/ScriptReference/Sprite.OverridePhysicsShape.html

    Getting that shape is the challenging part since I assume you want to generate it automatically. The "Custom Physics Shape" module generates it by detecting the transparent regions in the sprite. To do that, the SVG sprite is first rendered in a texture, so it doesn't use the SVG sprite geometry at all, unfortunately.

    As for using the SVG sprite geometry, I don't see any "generic" solution right now as the polygon shape you want would depend on how the SVG sprite is constructed. If you know your SVG sprites always have an outer shape enclosing the whole thing, you could use this as your physics shape (it would be part of the list of geometries you get when calling TessellateScene). If your SVG sprite is more complex with different parts and maybe holes in them, this will be trickier. You would have to detect the regions and build a surrounding shape for those.

    An alternative would be to build another SVG that would be used as the physics shape. You could import the "physics SVG" using ImportSVG(), tessellate it using TessellateScene() and take the resulting geometry as the physics shape of the original SVG. This way, you would have full control over the physics shape. The downside is that it would make the SVG authoring workflow more cumbersome.
     
  41. my2iu

    my2iu

    Joined:
    Jul 17, 2018
    Posts:
    2
    By low-level API, I mean I would want to access the "Geometry" class. I want to be able to create my own tessellation for my own shapes and feed them into all the Unity libraries. I should be able to take tight sprite meshes from, say, Spine or even Unity itself and represent them using your libraries.
     
  42. james7132

    james7132

    Joined:
    Mar 6, 2015
    Posts:
    166
    Quick question if it hasn't already been asked: is there any plans on doing text rendering with the same methodology? Most of the fonts formats (OTF, TTF, etc) seem to be stored in vector format.

    I for one certainly would like to see a comparison between text rendered in that fashion vs the normal Unity UI Text and TextMeshPro.
     
  43. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    1,085
    +1, I wish that every single internal class/method would be made public and just set to other namespace to hide it from high-level users. Reflections are not enough (try extending internal class) and tiresome.

    I really wonder how animations are going to be implemented. Will we animate mesh loosing svg powers or maybe animate low-level api shapes and bake them to mesh frames?
     
  44. Korindian

    Korindian

    Joined:
    Jun 25, 2013
    Posts:
    584
    @mcoted3d Hi... will we be able to to use SVGs as part of Unity UI soon?

    Also how will antialiasing be handled for UI SVGs in HDRP in deferred?
     
  45. AntonVazhinsky

    AntonVazhinsky

    Joined:
    Nov 24, 2013
    Posts:
    67
    Will the export to SVG of the changed object?
     
  46. crdmrn

    crdmrn

    Joined:
    Dec 24, 2013
    Posts:
    152
    @mcoted3d @wbahnassi_unity In the company I'm working for we're considering using the Vector Graphics package for production, is there anywhere to check the roadmap plan for it, just to know if/when it will go into beta and then release? We've been using the SVGImporter plugin from the Asset Store for a while, but of course a Unity-developed solution feels really appealing to us :D
     
  47. Nadan

    Nadan

    Joined:
    Jan 20, 2013
    Posts:
    341
    Hi,

    I'm having trouble understanding how this works. I have Unity 2018.2.0f2 and I have SVG (.svg) file that I made with Inkscape. When I drag and drop the file to Unity I can't see the properties in the inspector like in the YouTube video.



    Any help?
     
  48. Kamyker

    Kamyker

    Joined:
    May 14, 2013
    Posts:
    1,085
    Download Vector Graphics from Window/Package Manager, "All tab".

    @rustum this should be added to the first post.
     
    ecurtz and Nadan like this.
  49. ecurtz

    ecurtz

    Joined:
    May 13, 2009
    Posts:
    640
    When I try to "View Changes" in the Package Manager window for updating the Vector Package I get a 404.
     
  50. wbahnassi_unity

    wbahnassi_unity

    Unity Technologies

    Joined:
    Mar 12, 2018
    Posts:
    28
    A software-based AA approach is needed in that case since MSAA is not possible in the scene. This is in our list of things to do. If your SVG sprites are part of UI for your HDRP scene then it's also possible to render that UI pass on a separate MSAA target then compose it on top of the final scene at the end... not ideal in terms of memory and performance, but gives you the quality...
     
    Korindian likes this.