Live data from Hacker News

TinyVG: A challenger to the throne of vector graphics

zig.news

161–170 of 196 posts

Re: TinyVG: A challenger to the throne of vector graphics

#161
post #158

A small nitpick as the resvg author: the repo located here https://github.com/RazrFalcon/resvg I'm not sure why the author linked some random, outdated fork. If you're trying to beat SVG, you should have done a better research. But yes, SVG is extremely bloated and under-documented. Especially SVG 2. The core resvg codebase is close to 20 KLOC, while the whole package is like 50 KLOC. On the other hand, resvg is an e…

Oh, hi! > A small nitpick as the resvg author: the repo located here https://github.com/RazrFalcon/resvg Oh, i didn't see this. Thanks for some more correct and real numbers, i will correct them in the article later! > I'm not sure why the author linked some random, outdated fork. because it appears way higher up on the google search if you search for "svg rendering library". Sorry i didn't recognize that it's a fork…

>How much work would it be to port over the C# SVG→TinyVG converter to Rust based on resvg?

Probably a day, as long as you know Rust. I can take a look into it if you're interested. usvg (the SVG parser of resvg) is specifically designed to convert a real world SVG with all its quirks into a machine readable, minimal SVG/XML.

One thing to note is that usvg doesn't preserve text at the moment (will be converted into paths automatically) and Quadratic curves.

PS: I also have a longer, but still unfinished rant [0] over SVG complexity if you're interested.

[0] https://github.com/RazrFalcon/resvg/blob/master/docs/renderi...

Re: TinyVG: A challenger to the throne of vector graphics

#165

It's common to think of vector art of 'ground truth' and bitmaps as sampled image, but SVG and TinyVG don't add so much over bitmaps. When you zoom into 100-point polygon, you still reach the limit where there is no additional details. Those 100 points are in fact samples, an approximation of artist's intention. When boolean operations are preformed on polygons, information gets lost and the shapes degenerate. The SD…

You are talking about 2 vastly separate things.

Most uses today of SVG, that I have seen in the wild are icons, graphs and diagrams. Which this TinyVG covers beautifully. Especially for embeded (TinyVG's authors motivation for this) you often need some icons.

Sure if you need something more complex keep using SVG, or create something new. But for 80% - 90% off web and embedded its enough.

> TinyVG doesn't implement node referencing. In SVG it is done by the `clone` operation, which creates SVG node that references original shape. Using this you can build smart scenes with shadows, reflections, arrayed clones and other interesting effects. It's like DRY principle for art; you can later modify the original shape and see changes reflected in other parts of the scene.

TinyVG is final format optimized for rendering. You can design your graphic with all those futures, and then render them to TinyVG.

DRY doesn't apply since you will not be writing it by hand anyway, but use a tool.

Author clearly states that this is not an Authoring format, but display format. What you are looking for is better authoring format.

> Edit: I like that TinyVG takes form of very readable lisp-like data description language. Maybe it could be used as a starting point for a smarter vector format for authoring graphics and not just for distributing the end results.

That's not TinyVG format. That is just sample generator that comes with TinyVG suite. TinyVG is binary format, and you can't edit it with text editor

Re: TinyVG: A challenger to the throne of vector graphics

#166
post #158

Earlier quoted context omitted.

Oh, hi! > A small nitpick as the resvg author: the repo located here https://github.com/RazrFalcon/resvg Oh, i didn't see this. Thanks for some more correct and real numbers, i will correct them in the article later! > I'm not sure why the author linked some random, outdated fork. because it appears way higher up on the google search if you search for "svg rendering library". Sorry i didn't recognize that it's a fork…

>How much work would it be to port over the C# SVG→TinyVG converter to Rust based on resvg? Probably a day, as long as you know Rust. I can take a look into it if you're interested. usvg (the SVG parser of resvg) is specifically designed to convert a real world SVG with all its quirks into a machine readable, minimal SVG/XML. One thing to note is that usvg doesn't preserve text at the moment (will be converted into p…

> One thing to note is that usvg doesn't preserve text at the moment (will be converted into paths automatically) and Quadratic curves.

I mean, that sounds perfect in my ears as TinyVG doesn't has text/font support anyways and you need to perform the conversion at one point or another.

> Probably a day, as long as you know Rust. I can take a look into it if you're interested

That would be rad! I'll try to do that myself as well, but my last experience with Rust is over two years away, so i'd be happy to see a pro doing the work!

Re: TinyVG: A challenger to the throne of vector graphics

#167
post #62

Earlier quoted context omitted.

the biggest thing we could get for the standard that would really help people to animate TinyVG files via a secondary format, without animating TinyVG files, is if you can tag an item with a reference. Maybe do commands 17-26, which are (command n - 16) + an optional 32-bit "reference" field on the top. References are basically "up to the implementor" to do whatever they want with. You might want to also do a command…

The tag thingy is an interesting idea, could you create a github issue on the specification repo for that? => https://github.com/TinyVG/specification/

ok, i'll try to find some time this week!

Re: TinyVG: A challenger to the throne of vector graphics

#168

It's common to think of vector art of 'ground truth' and bitmaps as sampled image, but SVG and TinyVG don't add so much over bitmaps. When you zoom into 100-point polygon, you still reach the limit where there is no additional details. Those 100 points are in fact samples, an approximation of artist's intention. When boolean operations are preformed on polygons, information gets lost and the shapes degenerate. The SD…

You are talking about 2 vastly separate things. Most uses today of SVG, that I have seen in the wild are icons, graphs and diagrams. Which this TinyVG covers beautifully. Especially for embeded (TinyVG's authors motivation for this) you often need some icons. Sure if you need something more complex keep using SVG, or create something new. But for 80% - 90% off web and embedded its enough. > TinyVG doesn't implement n…

For web and embedded I would still need to dynamically control transforms of object groups. Otherwise the graphics is baked and I can just as well use PNG.

Just like bitmaps, vector graphics looks best when it is displayed at size it was designed for. Too small and details will just blur together; too large and the design looks overly simple with unnaturally sharp edges.

Re: TinyVG: A challenger to the throne of vector graphics

#169

Earlier quoted context omitted.

You are talking about 2 vastly separate things. Most uses today of SVG, that I have seen in the wild are icons, graphs and diagrams. Which this TinyVG covers beautifully. Especially for embeded (TinyVG's authors motivation for this) you often need some icons. Sure if you need something more complex keep using SVG, or create something new. But for 80% - 90% off web and embedded its enough. > TinyVG doesn't implement n…

For web and embedded I would still need to dynamically control transforms of object groups. Otherwise the graphics is baked and I can just as well use PNG. Just like bitmaps, vector graphics looks best when it is displayed at size it was designed for. Too small and details will just blur together; too large and the design looks overly simple with unnaturally sharp edges.

> For web and embedded I would still need to dynamically control transforms of object groups.

Looking at what people mostly use SVG's for on the web, most people don't agree with you. Like I said most SVG's I see are either static icons, diagrams or graphs.

Weather it would be better for them to be bitmaps is another discussion. Lately in embedded I often come in situation where I have CPU cycles to spare, but bump into available storage limit on micro. So this might make sense in such situation

Whole point of this format is to be 80%. that's why it has tiny in name :) If you want to do dynamic content this is not format for you.

> Otherwise the graphics is baked and I can just as well use PNG.

that's what I use now.

But I will try this TinyVG for my next projects dashboard icons, to see cpu/storage space is favorable

Re: TinyVG: A challenger to the throne of vector graphics

#170

It would be interesting to see how it compares to Haiku Vector Icon Format, which shares some of the same priorities. Some more info: https://en.wikipedia.org/wiki/Haiku_Vector_Icon_Format http://blog.leahhanson.us/post/recursecenter2016/haiku_icons...

It seem TinyVG don't support LOD which I think an important feature for icon use case
Post reply on HN