7 ms·
This problem seems to create a continuous stream of software attempting to solve it with no definitive solution. It's kind of strange, because there is a singl
by devit 2y ago
This problem seems to create a continuous stream of software attempting to solve it with no definitive solution.
It's kind of strange, because there is a single objectively correct rendering for any vector graphics scene given a pixel sampling function and colorspace metric (the one where each output pixel's value is the closest representable color to the convolution of that function with the scene, expressed as a function from R^2 to R and a linear color scheme respectively), and it seems like it would be achievable with GPU compute and some care with error bounds on either curve tessellation or numerical computation of the exact symbolic integrals of curves.
And it also seems easy to make such a solution have a tunable level of approximation to have faster rendering.
- an_ko 2y agoSounds like you should write a vector graphics library.
- watersb 2y agohttps://xkcd.com/927/ https://xkcd.com/927/ :-)
- raphlinus 2y agoI think you've got a point here. 2D rendering is reasonably well defined. The problem is the overwhelming complexity of the GPU ecosystem. If you just had a decent parallel computer, it wouldn't be so hard. But instead you have to adapt your rendering logic to the particular combination of pile of hacks your GPU infrastructure supports, each having an exquisitely unique set of limitations and tradeoffs. You'll likely enjoy our upcoming GPU-friendly stroke expansion paper - the core of it is exactly numerical methods with error bounds for the exact symbolic integrals of (certain curvature metrics) of curves. And the code is in Vello main (shader/flatten.wgsl) if you're curious and want to look at it now.
- UncleEntity 2y agoI poked at this a few times over the years, think my initial intent was to add SVG textures to Blender. What I always found is the 'good' renderers were a small part of a massive project (totally impractical to add as a dependency) and the small, standalone ones weren't necessarily 'good'. I think I found one (nanoVG IIRC) that could have probably been beaten into submission with some hacking but that was around the same time I was winding down my involvement in Blender. A quick peek at the code seem like this is exactly what I needed those 15 years ago and it just so happens I have some python bindings that could be easily be ported over to this if anyone is interested.