Live data from Hacker News

TinyVG: A challenger to the throne of vector graphics

zig.news

121–130 of 196 posts

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

#122
Tiger rendering issue: https://imgur.com/a/huaKQgk

Your effort to create a lightweight vector file format with these features is really appreciable, even if it can never replace SVG for the more general use case. Anyway the tiger has rendering problems (I am quite obsessed with this tiger: even my rasterizer initially did not draw it correctly).

Spoiler: I'm one of the developers of AmanithSVG - http://www.amanithsvg.com

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

#123
post #52
post #7

There are many other popular vector graphics formats beyond those mentioned here. Lottie has already displaced SVG for animation/motion graphics, and for static content IconVG exists and is backed by Google. There's also PDF, PostScript, Flash, the glyf format in OpenType, etc.

Franky somebody should do like a TinyDF replacement for pdf... That's also a somewhat bloated format at this point. Ideally though, the tiny* formats should be forward compatible (?) and interpretable as a valid non-Tiny* document. That would be quite nice for wider adoption (like JSON).

PDF is indeed a very bloated format, but documents are inherently complex. I don't think you can create anything that deserves the name "tiny" but can still handle anything you might want to send to a printer (and that's a much smaller use case than "anything you want to display on a screen").

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

#124
post #108

The best streamable vector animation format was invented 20 years ago, called Macromedia Shockwave Flash. It was killed by poor mobile processors and Steve Jobs' "Thoughts on Flash"

poor mobile processors I don't think even the first generation of iPhone (400MHz ARM) was too slow to run the average Flash games of the time, given that SWF was originally designed to work well on mid-90s PCs (200-300MHz Pentium/Pentium II). and Steve Jobs' "Thoughts on Flash" That's more likely.

> was too slow to run the average Flash games of the time

The peak performance was enough, but the it will drain battary very quickly.

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

#125
This looks nice, i was thinking of adding some vector support in my Little Forms[0] GUI toolkit at some point but everything feels overcomplicated and bloated - however this looks quite nice at a first glance. As i don't have any advanced vector drawing code at all (aside from the basic "draw line, draw circle" etc needed to draw the GUI itself) it can work as a template for what to put in there.

[0] http://runtimeterror.com/tech/lforms/

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

#126

Earlier quoted context omitted.

IMO as long as animation isn't tied to After Effects like Lottie is, you can't go wrong. The fact that the most popular open vector animation format is tied to an expensive, proprietary piece of software that isn't even primarily a vector art package makes me very sad…

Not to mention After Effects is an extremely poorly performing and highly bloated piece of software tied to mountains of spyware… It’s almost impressive how bad the software is by modern standards.

In no universe could After Effects even be remotely considered bad software.

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

#127
post #83
post #52

Earlier quoted context omitted.

Franky somebody should do like a TinyDF replacement for pdf... That's also a somewhat bloated format at this point. Ideally though, the tiny* formats should be forward compatible (?) and interpretable as a valid non-Tiny* document. That would be quite nice for wider adoption (like JSON).

"somewhat bloated" is the understatement of the century. PDF documents can contain executable code in two different programming languages (JavaScript and PostScript), interactive content, digital signatures, their own form of encryption, and more. Why they thought adding JavaScript to an already infamous attack vector of a format is beyond my understanding.

PDF can contain executable PostScript? That was new to me. I know the syntax is still PostScript, but without the programming language. Is there a nice description somewhere?

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

#128
post #26

Earlier quoted context omitted.

Then you should check out the TinyVG text format: (tvg 1 (32 32 1/1 u8888 reduced) ( (1 0 0) ) ( (fill_polygon (flat 0) ( (16 0) (32 32) (0 32) )) ) ) This draws you a tiny triangle. The only problem you'll get is when doing text, but for SVG: These wouldn't be portable anyways

Am I the only one who dislikes S-expressions and prefers XML or JSON or even YAML? The parenthesis are way too confusing when editing manually and the format doesn't have enough semantic information to always correctly parse into common structures in any language besides lisp. I enjoy writing lisp myself but I really think it is a mistake to use them for common formats everywhere that I've seen it tried.

I'm not a fan of the usual uses of S-expressions in data formats, but for quite the opposite reasons. People seem to have a thing for making up new syntax, so you can't just throw a normal S-expression parser at the problem, and be done with it. For example, the wasm2ps reader [1] has to know how to read a comment in the WebAssembly text format. I decided to leave the project at handling integer instructions and control flow only, as there are other oddities like using a single atom for alignment and offsets in load and store instructions [2]. Some people I've talked to wished that people would stop inventing ad-hoc syntaxes, and just use S-expressions or something. Using S-expressions but adding more ad-hoc syntax gives you the worst of both options.

While admittedly less of a problem for implementation, it is also annoying to see lists with dangling parens on their own lines, and symbols with underscores or camelCase in the names, once you are used to the normal way of formatting Lisp code.

[1] https://github.com/no-defun-allowed/wasm2ps/blob/master/Code... [2] https://github.com/WebAssembly/spec/blob/master/interpreter/...

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

#129
I really appreciate the idea, but with the given subset I really like to know more about the use case. The only one I can think about is icons. Considering that there is no animation support, only two point gradients and no text support (as far as I understand the spec), that rules tinyvg out for pretty much 95% of what I use vector graphics for.

If I want to have use those features I now need two (or more) formats, which kind of defeats the point of a less complicated format, for size, complexity and security reasons.

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

#130

Tiger rendering issue: https://imgur.com/a/huaKQgk Your effort to create a lightweight vector file format with these features is really appreciable, even if it can never replace SVG for the more general use case. Anyway the tiger has rendering problems (I am quite obsessed with this tiger: even my rasterizer initially did not draw it correctly). Spoiler: I'm one of the developers of AmanithSVG - http://www.amanithsvg…

Oh, good catch. But this is actually not a problem in the rendering, but a conversion problem from SVG to TinyVG. The converter doesn't do hierarchical attributes yet, so if something uses a to disable filling, it will still fill those elements
Post reply on HN