Live data from Hacker News

Blend2D – 2D Vector Graphics Engine

blend2d.com

11–20 of 43 posts

Re: Blend2D – 2D Vector Graphics Engine

#11
post #8

Whenever SVG rendering engines come up, sooner or later the question of "which part of the SVG spec does it render incorrectly?" comes up. How does this one fare? I get the impression that often these rendering bugs are partially caused by old optimizations that break later spec changes or missed some edge cases the first time around, so I hope that means this engine does better than most because it's more recent, bu…

Things like this convince me more and more that SVG is overdesigned and solving the wrong problem: The world needed a vector version of PNG far more than it needed a vector version of HTML/CSS.

W3C is creating a subset of SVG called "SVG Native". It is intended for icons and simple graphics, so it won't have support for text, scripts, links or XSL processing. Also, use of CSS or animations isn't recommended. It will be similar to SVG in OpenType fonts: https://docs.microsoft.com/en-us/typography/opentype/spec/sv...

Re: Blend2D – 2D Vector Graphics Engine

#14

This is very interesting. Especially since other vector engines are either unmaintained (like Antigrain) or extremely hard to build (Skia, Cairo). I do wonder if these kind of libraries shouldn't be supplanted by hardware accelerated rendering, though.

This is what we really need, something that outputs an API agnostic set of render commands, (shaders, uniforms, mesh layouts etc) which auto clip themselves and such, so they can just be integrated across various engines and renderers. Of course a better format in the first place(mentioned in another comment) would just solve this anyway

This is similar to the approach libraries like ImGui take. They abstract the rendering backend exactly in this way.

Re: Blend2D – 2D Vector Graphics Engine

#15

This is very interesting. Especially since other vector engines are either unmaintained (like Antigrain) or extremely hard to build (Skia, Cairo). I do wonder if these kind of libraries shouldn't be supplanted by hardware accelerated rendering, though.

Skia is not so terrible, you just have to use their slightly obscure build tool. And it produces >8GB build artefacts with ~50 or more dependencies... Come to think of it is a bit of a nightmare.

Re: Blend2D – 2D Vector Graphics Engine

#16
post #3

Very interesting and useful, but when I read the title I was hoping it would be something different. I would love to find some kind of stripped-down vector graphics engine that is fully geared towards real-time rendering of path-based graphics for games. For example to write retro-style games that use 2D vector graphics instead of textured quads. I've been writing a simple game that uses this graphics style, and so f…

Pathfinder fits the description: https://github.com/pcwalton/pathfinder

This AR demo on MagicLeap shows the potential: https://twitter.com/asajeffrey/status/1106667615622180864

Re: Blend2D – 2D Vector Graphics Engine

#17
post #3

Very interesting and useful, but when I read the title I was hoping it would be something different. I would love to find some kind of stripped-down vector graphics engine that is fully geared towards real-time rendering of path-based graphics for games. For example to write retro-style games that use 2D vector graphics instead of textured quads. I've been writing a simple game that uses this graphics style, and so f…

GPUs really just aren't designed for 2D vector graphics. There is a litany of approaches (three separate ones from pcwalton's Pathfinder R&D alone), and all of them have various issues and tradeoffs. If your GPU has enough power for one of the more advanced approaches like Slug or Pathfinder1's compute shaders, then your CPU likely has enough for Blend2D and the bandwidth for the resulting texture upload.

Pathfinder3 looks promising, but comes with its own tradeoffs. It's an open area of research.

Re: Blend2D – 2D Vector Graphics Engine

#19
post #8

Earlier quoted context omitted.

Things like this convince me more and more that SVG is overdesigned and solving the wrong problem: The world needed a vector version of PNG far more than it needed a vector version of HTML/CSS.

W3C is creating a subset of SVG called "SVG Native". It is intended for icons and simple graphics, so it won't have support for text, scripts, links or XSL processing. Also, use of CSS or animations isn't recommended. It will be similar to SVG in OpenType fonts: https://docs.microsoft.com/en-us/typography/opentype/spec/sv...

Wasn't there already "SVG Tiny" for this purpose? I recall it being used on mobile a long time ago, like circa 2005.

Re: Blend2D – 2D Vector Graphics Engine

#20

This is very interesting. Especially since other vector engines are either unmaintained (like Antigrain) or extremely hard to build (Skia, Cairo). I do wonder if these kind of libraries shouldn't be supplanted by hardware accelerated rendering, though.

Skia is not so terrible, you just have to use their slightly obscure build tool. And it produces >8GB build artefacts with ~50 or more dependencies... Come to think of it is a bit of a nightmare.

I tried to use it a few times, but having to configure a Google build environment, without Google class workstations, meant I always gave up in the process and used Skia.Sharp instead.
Post reply on HN