Search Unity

SVGAssets - SVG Rendering Engine for Unity.

Discussion in 'Assets and Asset Store' started by turbo3d, Jul 18, 2014.

  1. turbo3d

    turbo3d

    Joined:
    Apr 28, 2014
    Posts:
    50
    Hello wtan1010, thanks for your interest in SVGAssets!
    At the moment it doesn't support XBox One nor PS4, but if you are interested I will keep you updated as soon as I have news on this topic.

    Ciao!
     
  2. funtoplay

    funtoplay

    Joined:
    Mar 27, 2014
    Posts:
    3
    Hello,
    We are trying SVGAssets, and we have had good results so far..... until testing on iOS ( android seems to be fine however ). Can you please provide a guide to ensure the plugin works as expected on iOS? I have provided an image to show what we are seeing -

    It would be great if we can get some help with this soon, we have an approaching milestone and need to prove some concepts with SVGAssets.
    Apart from this issue, i think the plugin is really great :)
    Cheers
     
  3. turbo3d

    turbo3d

    Joined:
    Apr 28, 2014
    Posts:
    50
    Hello funtoplay,

    Please refer to this post in order to fix the iOS issue: http://forum.unity3d.com/threads/svgassets-svg-rendering-engine-for-unity.257650/page-2#post-2156377

     
  4. funtoplay

    funtoplay

    Joined:
    Mar 27, 2014
    Posts:
    3
  5. Kiupe

    Kiupe

    Joined:
    Feb 1, 2013
    Posts:
    528
    Hi,

    With this plugin is it possible to re-scale assets in-game and keep crisp textures or everything is computed à runtime ?

    Thanks
     
  6. turbo3d

    turbo3d

    Joined:
    Apr 28, 2014
    Posts:
    50
    Hello Kiupe,

    SVGAssets lets you to include SVG files within your builds instead of JPG/PNG/OtherBitmapsFormats and it takes care to render such SVG files into one or more textures (and sprites). Our idea is that the library will be used to generate graphics (at the right device-dependent resolution) at app initialization time, and/or when the device display has been rotated. Nothing will stop you if you have other idea on how to use the underlying rendering technology through your custom scripts.

     
  7. TokyoDan

    TokyoDan

    Joined:
    Jun 16, 2012
    Posts:
    1,080
    I'd be interested in this asset if the textures/sprites that it generates from SVGs could be used in Puppet2D to do what is being done to the dragon's eye between 2:00 and 2:40 in THIS VIDEO.
     
  8. Jakhongir

    Jakhongir

    Joined:
    May 12, 2015
    Posts:
    37
    Hello, I am interested in making scroll of levels like in game "two dots", could you advice how this can be achieved with your asset?
     
  9. drtyrell

    drtyrell

    Joined:
    Feb 24, 2013
    Posts:
    4
    I have an animated SVG that opens and animates in Adobe Edge. I bought the SVGAssets plugin and it works perfectly for single frame SVGs. I'm able to import my animated SVG files, but they don't seem to animate inside Unity regardless of what I do. Is there support for this feature? If so, how does one tell the SVG file to play a range of frames within the file? Thank you!
     
  10. omrip32

    omrip32

    Joined:
    Jan 4, 2016
    Posts:
    105
    Hi,
    I have a question, I have a pdf(containing only text - the one you supplied with the plugin) document which I converted to svg.
    I'm trying to upload it to your plugin but for some reason I always see a blank page. Also, when I try to open it with your player I get a blank page.
    It's interesting to note that when I try to use svg images it works ok.
    I'm uploading the file as well.

    Thanks!
     
  11. omrip32

    omrip32

    Joined:
    Jan 4, 2016
    Posts:
    105
    Can't upload the file.. but I think that my question is clear enough :)
     
  12. omrip32

    omrip32

    Joined:
    Jan 4, 2016
    Posts:
    105
    I think that your plugin can't display text elements.. Am I correct?
     
  13. turbo3d

    turbo3d

    Joined:
    Apr 28, 2014
    Posts:
    50
    I can't see the video, so could you please link it correctly? Thanks!
     
  14. TokyoDan

    TokyoDan

    Joined:
    Jun 16, 2012
    Posts:
    1,080
     
  15. turbo3d

    turbo3d

    Joined:
    Apr 28, 2014
    Posts:
    50
    Yes, at the moment <text> tags are not supported; anyway you can convert text into path objects within InkScape or other editors (e.g. Illustrator).
     
  16. turbo3d

    turbo3d

    Joined:
    Apr 28, 2014
    Posts:
    50
    SVG animations are not supported at the moment. The usual workflow would be to import SVG static graphics with SVGAssets, then animate it with Unity tools (as we did for the Orc example included in the package).
     
  17. turbo3d

    turbo3d

    Joined:
    Apr 28, 2014
    Posts:
    50
    Hello TokyoDan, we are trying to contact the Puppet2D author in order to verify the feasibility of such feature/approach combined with SVGAssets.
     
  18. TokyoDan

    TokyoDan

    Joined:
    Jun 16, 2012
    Posts:
    1,080
    The Puppet2D developer and the Simply SVG developer where very helpful in getting both their assets compatible.
     
  19. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,048
    turbo3d, any update on SVGAssets?
     
  20. Ghopper21

    Ghopper21

    Joined:
    Aug 24, 2012
    Posts:
    170
    Question about this interesting sounding tool. Is it possible to assign a texture (say a photo of fire) to an SVG (e.g. a star shape) so that the texture shows up within (and masked by) the shape?

    Also: possible to change the thickness and appearance of the SVG's line segments?
     
  21. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,048
    @turbo3d Would you please give us an update on your future plans for this asset?
     
  22. turbo3d

    turbo3d

    Joined:
    Apr 28, 2014
    Posts:
    50
    Hello ibyte!

    We have added the support of clip paths, now we are working on API refactoring.
    Then we will release a new version of the plugin.

     
    numberkruncher and ibyte like this.
  23. WarpZone

    WarpZone

    Joined:
    Oct 29, 2007
    Posts:
    326
    @turbo3d Can SVGAssets load an SVG at runtime? For example, if the end-user has a SVG file on their computer, and my Unity project presents a dialogue (that I wrote) for them to select the file from an appropriate directory, could SVGAssets be triggered to load and display it? Or must all SVGs be compiled within the Unity Project?
     
  24. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    The asset store says that the plugin does not work with WebPlayer since it includes native libraries; but does the plugin work with WebGL builds?
     
  25. ElectRocnic

    ElectRocnic

    Joined:
    Sep 19, 2016
    Posts:
    1
    Hello,

    I am really interested in this plugin, but before I spend 120 bucks for it, I would like to know whether:
    1. Does this plugin run with the Unity Personal Edition, or like I read somewhere else only with the Pro Edition of Unity Licencing?
    2. I am using Unity on my Desktop PC and for more flexibility on my XPS 13, to say, on a Linux Notebook. Would I have to pay twice to be able to use this tool on both of my computers or would this rather be coupled to my Unity Account, so I can simply switch between my two computers using this tool?
    3. Are you still developing? Is the future of this project bright or dark? I really wish the best for your team, as this is an important tool for the Games Industry.
     
  26. AlexHell

    AlexHell

    Joined:
    Oct 2, 2014
    Posts:
    167
    Does it support WebGL? I need fast svg plugin for web (and for pc/mobile too).
     
  27. ZoneOfTanks

    ZoneOfTanks

    Joined:
    Aug 10, 2014
    Posts:
    128
    Is it abandoned? o_O
     
  28. Riderfan

    Riderfan

    Joined:
    Jan 10, 2013
    Posts:
    514
    We're absolutely looking for console support as well. Seems like this project has been abandoned though.
     
  29. ibyte

    ibyte

    Joined:
    Aug 14, 2009
    Posts:
    1,048
    @turbo3d How is the update coming along?
     
  30. turbo3d

    turbo3d

    Joined:
    Apr 28, 2014
    Posts:
    50
    The project is still active, we are working on refactoring and updating the native rendering library.
    The next step will be to opensource the C# components and change licensing model for the native library on mobiles: we are thinking to free the desktop version for Unity games, and switch to a per-title-per-platform licensing model for mobile platforms.
    Then we will think to console support.
     
  31. AaronBossert

    AaronBossert

    Joined:
    May 16, 2017
    Posts:
    2
    An artist in my studio has purchased a copy of SVG Assets and has been trying it out in his own test project. We are interested in purchasing more licenses and integrating it into a larger project, but there are a couple bugs preventing us from doing so.

    Images generated are blurry
    This appears to be intentionally caused by a "dilateEdgesFix" flag in your code, when this is disabled a rough saw tooth pattern appears along the edges. This saw tooth pattern becomes less intense when SVGRenderingQuality is reduced, however it's always very evident. There does not appear to be a setting for the analytical pixel coverage advertised in your asset store description. I've included screen shots, the text "SAMPLE" in one of the images is an example of what we are looking for, you can compare the crispness of the edges to the svg assets image behind it.

    SharpSample.png Better_dilateEdgesFix.png Better.png Faster.png
    Color transparency values are ignored
    Alpha blending multiple layers of shapes in an SVG does not seem to work.

    Would you be able to provide some assistance in solving these issues? Thanks for your time.
     
    Last edited: Sep 19, 2017
  32. turbo3d

    turbo3d

    Joined:
    Apr 28, 2014
    Posts:
    50
    Please do not change SVGRenderingQuality (keep it BETTER), it only affects SVG software rendering antialiasing.
    'dilateEdgesFix' is mandatory (value TRUE) if you are using bilinear and/or mipmapped textures. Please have a look at this official Unity document:

    https://docs.unity3d.com/Manual/HOWTO-alphamaps.html

    The 'dilateEdgesFix' simply applies the same filter explained in the link.
    If, instead, you are using point sampled textures (i.e. no mipmaps, no bilinear filter, see https://docs.unity3d.com/ScriptReference/Texture2D-ctor.html), 'dilateEdgesFix' could be left as FALSE; because point sampled textures do not use adjacent pixels when performing magnification/mignification (3D GPU side).

    Could you please share with us a sample SVG showing up the transparency issue? Take into account that current version of SVGAssets (AmanithSVG actually) does not support "opacity" attribute on <g> elements. Instead, alpha values specified through "fill"/"fill-opacity" and "stroke"/"stroke-opacity" attributes are supported, as well as gradients stops opacity.
     
  33. AaronBossert

    AaronBossert

    Joined:
    May 16, 2017
    Posts:
    2
    Hi turbo3d,
    sorry for the delay.

    As you suggest we will avoid modifying SVGRenderingQuality or dilateEdgesFix.

    Here is a raw svg asset that demonstrates the alpha issue we are experiencing. ActualRender.png ExpectedRender.png

    I think I may now see what you mean by not supporting the "opacity" attribute on <g> elements, to be clear it is caused here by:
    <path style="opacity:0.1; ...
    Is there a way you could patch a fix for this in to your current version? I ask because we are exporting graphics from Adobe Illustrator as SVG version 1.0, and everything seems to work very well at this point, aside from this transparency issue.
     

    Attached Files:

    Last edited: Oct 11, 2017
  34. arvie97

    arvie97

    Joined:
    Oct 19, 2017
    Posts:
    1
    Hello,

    Is it possible to load it via WWW? I will be pulling my SVG files from my server and would like to load it on runtime on the device. Is this possible?
     
  35. turbo3d

    turbo3d

    Joined:
    Apr 28, 2014
    Posts:
    50
    Yes for sure, you can load SVG files and render them at runtime on the device.
     
  36. ctc5301

    ctc5301

    Joined:
    Jan 28, 2016
    Posts:
    16
    Hi,
    I am very interested to use SvgAssets to render 2D arts. I would like to know does SvgAssets has the capability to tweak the stroke attributes, like stroke width and dot, at runtime.
    Thanks.
     
  37. turbo3d

    turbo3d

    Joined:
    Apr 28, 2014
    Posts:
    50
    Hi ctc5301, at the moment SVGAssets is a rendering only library, there is no DOM modification API. Maybe in the future we can think of it, we will keep you updated here in the forum.
     
  38. DeanTheodorakis

    DeanTheodorakis

    Joined:
    Apr 29, 2018
    Posts:
    53
    Hello and sorry to bother you turbo3d, but is this asset working with unity 2018? It looks cool from the description in the asset store and I would love a way to get Vector art in my games. I just want to know if it is still being supported so I know if I should buy it when I can. Thank you for your time.
     
  39. weisuolong

    weisuolong

    Joined:
    Jun 12, 2017
    Posts:
    7
    it can not work on xiaomi unity 207.1.3
    plane became pink ~~~
     
  40. turbo3d

    turbo3d

    Joined:
    Apr 28, 2014
    Posts:
    50
    Hello DeanTheodorakis,

    We didn't have yet the time to test the plugin on Unity 2018, we will update you when tested on it.

     
  41. rgonsalv

    rgonsalv

    Joined:
    Sep 29, 2016
    Posts:
    47
    We have a perhaps interesting use case. We have hand drawn characters where we would like to change clothing and skin colors, for example, on the fly. Would this asset allow us to do that? These would all be 2D elements.
     
  42. liam_unity990

    liam_unity990

    Joined:
    Nov 29, 2017
    Posts:
    2
    Is it possible to create a raster of an SVG at runtime from an SVG file that was downloaded while the application is running. Or do you only support svg assets imported into the project itself?
     
  43. turbo3d

    turbo3d

    Joined:
    Apr 28, 2014
    Posts:
    50
    Hello rgonsalv,

    At the moment SVGAssets and in particular the relative native library (AmanithSVG) is just intended for rendering an SVG given its string representation. There are not methods to direct manipulate the DOM; if what you to achieve is something simple like to change some elements color, you can search & replace the color string and resubmit the new SVG string to the renderer.

    You can try our plugin without purchasing it from Unity Assetstore by downloading the evaluation version here: http://www.amanithsvg.com (this will be the new version of SVGAssets and it will have different licensing model, but in the meanwhile we will provide it with such new non-eval binaries to those people who have purchased SVGAssets license after Jan 1, 2018). Just write us an email providing order number at info[_at]mazatech[dot]com

    Bindings for Unity and other engines now are free and opensource:

    http://www.amanithsvg.com/docs/binding/004-unity.html
    http://github.com/Mazatech/amanithsvg-bindings/tree/master/Unity

     
  44. turbo3d

    turbo3d

    Joined:
    Apr 28, 2014
    Posts:
    50
    Hi liam_unity990,

    Yes, it's possible to render an SVG downloaded from internet by using the C# binding. Please have a look at http://www.amanithsvg.com/docs/binding/001-csharp.html

     
  45. rgonsalv

    rgonsalv

    Joined:
    Sep 29, 2016
    Posts:
    47
    "if what you to achieve is something simple like to change some elements color, you can search & replace the color string and resubmit the new SVG string to the renderer." Thank you, that is what we want and we'll download the evaluation version for our experiments.
     
  46. rgonsalv

    rgonsalv

    Joined:
    Sep 29, 2016
    Posts:
    47
    Sadly, compile errors after purchasing and importing into Unity 2018.4
    Code (CSharp):
    1.   SVGAtlas.cs(744, 91): [CS1061] 'AnimatorController' does not contain a definition for 'GetLayer' and no extension method 'GetLayer' accepting a first argument of type 'AnimatorController' could be found (are you missing a using directive or an assembly reference?)
    2.   SVGAtlas.cs(745, 38): [CS1061] 'AnimatorStateMachine' does not contain a definition for 'stateCount' and no extension method 'stateCount' accepting a first argument of type 'AnimatorStateMachine' could be found (are you missing a using directive or an assembly reference?)
    3.   SVGAtlas.cs(752, 79): [CS1061] 'AnimatorStateMachine' does not contain a definition for 'GetState' and no extension method 'GetState' accepting a first argument of type 'AnimatorStateMachine' could be found (are you missing a using directive or an assembly reference?)
    4.   SVGAtlas.cs(753, 19): [CS0619] 'AnimatorState.GetMotion()' is obsolete: 'GetMotion() is obsolete. Use motion'
    Please advise...
    [I don't even need Atlases and would just as soon yank it out]
     
  47. turbo3d

    turbo3d

    Joined:
    Apr 28, 2014
    Posts:
    50
    Please try our new plugin (in order to see if your issue goes away) by downloading the evaluation version here: http://www.amanithsvg.com (this will be the new version of SVGAssets and it will have different licensing model, but in the meanwhile we will provide it with such new non-eval binaries to those people who have purchased SVGAssets license after Jan 1, 2018). Just write us an email providing order number at info[_at]mazatech[dot]com

     
  48. reinier_at_ranj

    reinier_at_ranj

    Joined:
    Nov 28, 2017
    Posts:
    3
    Hi Mazatech,

    I have just purchased the SVGAssets to update an older project.
    When building (in Cloud Build), I get the following error:
    Of course, I can disable bitcode but I would prefer to keep it in.
    Is there a version of your asset available which includes the bitcode?

    Thanks in advance
     
    Last edited: Feb 10, 2020
  49. henriqueranj

    henriqueranj

    Joined:
    Feb 18, 2016
    Posts:
    177
    Hello @turbo3d ,

    The SVGAssets plugin does not provide the libraries for Android x64 architecture (only for armeabi-v7a and x86). This causes Android devices with x64 architecture to not properly render with SVGAssets.

    06-19 12:14:39.844 32584 32649 E Unity   : DllNotFoundException: Unable to load DLL 'AmanithSVG': The specified module could not be found.
    06-19 12:14:39.844 32584 32649 E Unity : at AmanithSVG.svgtInit (System.UInt32 screenWidth, System.UInt32 screenHeight, System.Single dpi) [0x00000] in <00000000000000000000000000000000>:0
    06-19 12:14:39.844 32584 32649 E Unity : at SVGAssets.Init () [0x00000] in <00000000000000000000000000000000>:0
    06-19 12:14:39.844 32584 32649 E Unity : at SVGAssets.CreateSurface (System.UInt32 width, System.UInt32 height) [0x00000] in <00000000000000000000000000000000>:0
    06-19 12:14:39.844 32584 32649 E Unity : at SVGImageBehaviour.DrawSVG (System.String svgXml, System.UInt32 texWidth, System.UInt32 texHeight, UnityEngine.Color clearColor, System.Boolean makeNoLongerReadable) [0x00000] in <00000000000000000000000000000000>:0
    06-19 12:14:39.844 32584 32649 E Unity : at SVGImageBehaviour.DrawToSprite (UnityEngine.TextAsset svgtxt, System.Nullable`1[T] altWidth, System.Nullable`1[T] altHeight) [0x00000] in <00000000000000000000000000000000>:0
    06-19 12:14:39.844 32584 32649 E Unity : at SVGImageBehaviour.DrawToImage (UnityEngine.TextAsset svgsource) [0x00000] in <00000000000000000000000000000000>:0
    06-19 12:14:39.844 32584 32649 E Unity : at SVGImageBehaviour.DrawToImage () [0x00000] in <0000


    Could you please provide support for Android x64?
     
  50. turbo3d

    turbo3d

    Joined:
    Apr 28, 2014
    Posts:
    50
    Hello henriqueranj, please contact us in private via email, info@mazatech.com
    We provide libraries for Android x64 for free to all customers that purchased SVGAssets from the AssetStore. So please provide us with invoice number.