SVGAssets - SVG Rendering Engine for Unity.

NEW UPDATE!!!

SVGAssets 2.0.1
The SVG engine for Unity

SVGAssets is a FREE plugin for reading and rendering SVG files on Texture2D objects, supporting some static features of SVG Full 1.1 and SVG Tiny 1.2.

For projects that need to run across a wide range of devices, with different resolutions, SVGAssets simplifies your life: a single SVG file is enough, you won’t need to maintain multiple copies of the same texture image, at different resolutions, anymore!

  • Automatic generation of sprites from SVG files
  • Optimized texture atlasing, built at runtime on the target device
  • Automatic deployment system: textures removal and regeneration on the target device
  • Final player file size reduction, avoiding bitmaps deployment at all
  • Separate rendering of first level groups (SVG ‘g’ tags)
  • Based on the robust AmanithVG SRE rendering engine
  • High antialiasing quality: analytical pixel coverage
  • Cross platform: desktops (Win, OSX, Linux), mobile (iOS, Android), 64bit support

Link to AssetStore:
SVGAssets 2.0.1

Link to the documentation:
SVGAssets_User_Guide.pdf

For faster bugfix response, please email to mfabbri[at]mazatech[dot]com





2 Likes

Looks interesting! Will keep an eye on this.

1 Like

Thanks for your interest!

Looks nice! I tried other solutions to render SVG assets for Unity, but none met my requirements: some performed too slow at rendering, others didn’t support some features I need.
For example, does SVGAssets support linear and radial gradients? And what kind of performance can I expect?
Thank you!

As i understood, this is a solution that converts a SVG into a Bitmap, which will be immediately rendered on screen. Difference between RAGEspline is, that RAGEspline renders vectors / splines on screen, without a conversion, right ?
Are there any automation that can be set, to fit the individual resolution ? It seems, now i have to set it manually. But it would be cool if this could be set sutomaticly (f.e device resolution: 1280x720p = auto SVG object resolution : 1280x720 or the twice of it )

Yes for sure, SVGAssets supports both linear and radial gradients, with an unlimited number of color keys!
Talking about performance, you must know that SVGAssets is based on AmanithVG SRE, a rendering engine that draws the famous Tiger SVG example in just 30ms on a Nexus4 device, at full resolution (768x1280 pixels), with a really high rendering quality.

SVGAssets does not convert SVG file to Bitmap (e.g. PNG): SVGAssets renders SVG files, at runtime, into memory buffers called drawing surfaces (SVGSurface class, as you can see int the official documentation).
Drawing surface pixels can be uploaded/copied in Unity Texture2D objects (SVGSurface.Copy method) at runtime. On the other side, RageSpline converts SVG shapes in Unity meshes (i.e. triangles) and shaders to fill them.
We have chosen to not implement an automatic sizing of Texture2D objects in relation of the rendered SVG, because we want to give the developers an highest level of freedom; for example it is possible, through the SVGAssets API, to render multiple SVG files to a single texture, as you can see even in the video tutorial (15:23 minute).

Ok. I think i got it. Would like to see a web-example or video that shows a zoom in and out of a SVG object, so i can have a close look and i can evaluate the quality.

Unfortunately SVGAssets does not support Unity web player, because it is a native plugin.
Anyway, we will try to write an example showing a runtime rendering+textureUpload every frame, even if this is not a common use case. In such scenario, probably it is better to have meshes+shaders as in RageSpline.
In the future we would publish our realtime vector graphics engine (AmanithVG GLE) for Unity.

If you want to evaluate the quality of the rendering, you can download AmanithVG evaluate package (SVGAssets uses the AmanithVG SRE rendering engine). Just run the included “Tiger Example” that allow zoom in and out.

I’m very interested in AmanithVG GLE - you say “in the future” - any more firm timelines?

Thanks,
Mike
@runonthespot

1 Like

At the moment, I don’t have a timeline to share; what I can say is that porting AmanithVG GLE to Unity will be the next big work for Mazatech.

2 Likes

Ok, thanks…i will try it.

It looks really interesting

1 Like

thanks for your interest!

Sure!

A little clarification: at Mazatech we are working to an SVG engine based on AmanithVG GLE (triangles + shaders solution, like RageSpline) too, not to expose the entire OpenVG 1.1 API to Unity.

Radial gradients are pain in the ass :wink:

Interesting, cause of the upcoming new version: trinagles + shaders. Sounds like this tech is more powerful than the current one. More interesting is, how well the SVG import will work in this upcoming version. I read in the RageSpline thread, it isn´t easy to import a clean SVG…

The upcoming engine (triangle+shaders) is not “more powerful”, it just solve a different use-case: Realtime rendering of SVG VS Preloading of SVG assets on Textures2D at initialization time.

At current stage, our AmanithVG GLE engine is capable to handle all the rendering features needed for the correct rendering of SVG (as the SVGAssets do for the software rendering) using only OpenGL|ES 1.x compatible static pipeline (without pixel-shaders). Of course, this means that, for complex paints (like rad.gradients), non-opaque fills, stroke, compositing operations, clip-rects, masks (and mixes of these) several drawing passes are needed. This is the reason that pushed our work in the direction of a pixel-shader solution (OpenGL|ES 2.x compatible). This solution will get rid of performance and antialiasing quality too.