Live data from Hacker News

Show HN: Forma – An efficient vector-graphics renderer

github.com

41–50 of 64 posts

Re: Show HN: Forma – An efficient vector-graphics renderer

#41
post #3

Mozilla peeps, is it conceivable that this could eventually get into firefox, or is it not the right fit in some way. There was a recent discussion about map rendering and I commented to "just convert to SVG and let the browser render it" to which someone said that's too slow, to which I said "so improve the browsers vector rendering" rather than do a high performance renderer just for map software.

Was this conversation about OsmAnd+ by chance? Because that could use something like this. Edit: glossed over the "browser" part. My bad.

I wonder why their renderer is so slow. Organic Maps is super fast and smooth on my phone, though.

Re: Show HN: Forma – An efficient vector-graphics renderer

#42
post #13

The README mentions WebGPU - do you have a URL to a demo of this running in the browser using WebAssembly?

It's quite easy to get the CPU back-end running with WASM. GPU might work as well with Chrome Canary, but I haven't tested it yet. Using WebGPU should make this just as easy.

Re: Show HN: Forma – An efficient vector-graphics renderer

#43
post #34

Earlier quoted context omitted.

Putting "not official Google products" under github.com/google is the dumbest policy. I wonder why they don't realize/care about this.

Yeah, I suppose they could create a separate org, "Google Open Source" and put it there, but probably they'd like to reserve the right to own and then change the "not official" to "official" whenever they please. There are many lawyers and such at Google who think about these things more intensely than you and I do. I'm sure they have looked at all angles. EDIT: I do find it amusing to watch HN and other forums whene…

I'm sure the lawyers looked at all the legal angles but I don't know if they thought about the perception. But on a scale from 1 to "what were they thinking" this is pretty minor.

Re: Show HN: Forma – An efficient vector-graphics renderer

#44
post #2

I'm curious how this relates to Skia (the library that handles cross-platform rendering for Chrome and Flutter). Seems like this could be an alternative backend but also could serve as faster replacement?

forma is geared towards vector-graphics heavy use cases. A very good example would be Lottie or Rive animations or games that make use of vector graphics. Another possible use case would be places where you need a very small software renderer, like an OS's early boot.

How about 3D modeling programs, like FreeCAD? That's currently single threaded and doesn't use hardware acceleration so it could use the boost for sure.

Re: Show HN: Forma – An efficient vector-graphics renderer

#45
post #13

The README mentions WebGPU - do you have a URL to a demo of this running in the browser using WebAssembly?

It's quite easy to get the CPU back-end running with WASM. GPU might work as well with Chrome Canary, but I haven't tested it yet. Using WebGPU should make this just as easy.

You don't need Canary, there's an origin trial for WebGPU. You can ship to users on Chrome Stable today.

BTW WebGPU 1.0 now has a target date of May 4 2023 to be enabled by default in Chrome Stable. But with the origin trial you don't have to wait.

Re: Show HN: Forma – An efficient vector-graphics renderer

#46

I'm very happy to see this work! The era of rendering vector graphics in GPU compute shaders is upon us, and I have no doubt it we'll start seeing these in production soon, as there's just such a performance advantage over CPU rendering, and I believe trying to run vector 2D graphics through the GPU rasterization pipeline doesn't quite work. This code is simpler than Vello (the new name for piet-gpu), focused on vect…

> I believe trying to run vector 2D graphics through the GPU rasterization pipeline doesn't quite work.

I mean, it does work, it's just slower than using compute in most cases. I mean, people have emulated Linux in the GPU rasterization pipeline [1], so the raster pipeline is clearly Turing complete :)

[1]: https://blog.pimaker.at/texts/rvc1/

Re: Show HN: Forma – An efficient vector-graphics renderer

#47

Earlier quoted context omitted.

Was this conversation about OsmAnd+ by chance? Because that could use something like this. Edit: glossed over the "browser" part. My bad.

I wonder why their renderer is so slow. Organic Maps is super fast and smooth on my phone, though.

Is it rendering or the database access?

I see no slowness in OSM+ rendering on Android once the data for an area is loaded, as you pan, zoom, etc. But the pause between opening a new location and having it rendered is quite noticeable.

Re: Show HN: Forma – An efficient vector-graphics renderer

#48

A while ago I wanted to make some vector-based toy games for fun. I surveyed the available options and basically couldn't find any. If an engine supports vector graphics, it wants to rasterize them ASAP. If I asked online, the general answer was, "GPUs are for rasters, it gets rasterized one way or another. So just do that." I dunno. I'm not that bright. I don't fully understand it all. But I feel like it should be e…

I work on a project that builds an SVG compliant vector scene graph and allows for detailed interaction via its API. Writing client code that can plug into the rendering pipeline or just altering the existing code is also fairly easy - comparatively at least.

It's at https://github.com/parasol-framework/parasol but fair warning though, it is in alpha right now and going through an overhaul.

Re: Show HN: Forma – An efficient vector-graphics renderer

#49
post #34

Earlier quoted context omitted.

If you're a Google employee, there's a few different paths to 'legally' open sourcing stuff without violating your employment contract. The simplest and fastest one is just to assign copyright to Google, use an approved license (basically anything non-copyleft) and stick it under the google/ github org. It being there doesn't mean Google sponsored or authored it, just that a Googler worked/works on it. And the "not o…

Putting "not official Google products" under github.com/google is the dumbest policy. I wonder why they don't realize/care about this.

It’s very similar for Khronos, the github org of which contains projects that aren’t official Khronos products, but just something related and made by one of Khronos members.

Re: Show HN: Forma – An efficient vector-graphics renderer

#50
post #33

I hope this makes its way into web browser rendering. I've been working on a "game engine" using SVG in the browser. When I started, everything I read said don't - because performance. However, manipulating an SVG using a reactive framework (I use Vue) makes for very readable code. Our game client is meant to be a "reference" client so readability is more important than performance, which just needs to be "good enoug…

Yeah, I doubt that it would. My impression is that it would be more used for Fuscia and/or Flutter.
Post reply on HN