News for hackers. Stuff that matters.
Re:NN-SVG by FrostKiwi on Tuesday December 05, 2023 @12:46AM (#38527522)
Direct rendering to SVG is very impressive.
Re:NN-SVG by dang on Tuesday December 05, 2023 @02:03AM (#38527896)
Related:

NN-SVG: Generate publication-ready NN-architecture schematics - https://news.ycombinator.com/item?id=25272360 - Dec 2020 (8 comments)

Re:NN-SVG by choppaface on Tuesday December 05, 2023 @02:32AM (#38528026)
This is a lot more useful than plate notation.
Re:NN-SVG by Two4 on Tuesday December 05, 2023 @03:41AM (#38528366)
what is NN? The website doesn't offer much context
Re:NN-SVG by csjh on Tuesday December 05, 2023 @03:47AM (#38528400)
Neural network
Re:NN-SVG by Mazzen on Tuesday December 05, 2023 @07:06AM (#38529832)
Agreed. The page could already benefit from one catchy subtitle sentence with a description
Re:NN-SVG by dschep on Tuesday December 05, 2023 @10:13AM (#38531856)
Yeah, the github repo is a much better link for this, as it explains what it is. https://github.com/alexlenail/NN-SVG
Re:NN-SVG by vegabook on Tuesday December 05, 2023 @05:48AM (#38529275)
Wow the SVG rendering of AlexNet is excellent, far superior to the WebGL option. 3d in SVG -- must be some maths going on underneath.
Re:NN-SVG by andai on Tuesday December 05, 2023 @07:46AM (#38530049)
SVG renderer is very laggy for me (maybe 5 FPS, so about 10x slower than WebGL).

Edit: Also the grey filling has holes in it from some angles.

Re:NN-SVG by vegabook on Tuesday December 05, 2023 @08:11AM (#38530258)
yeah WebGL definitely snappier.

I wonder though why these 3d stacks are so awful at rendering lines/meshes. Aren't they supposed to be super-optimised for this kind of anti-aliasing work? I mean even blender can be a bit dodgy sometimes on viewport mesh rendering compared with what I'm used to with SVG, even when jacking up the viewport oversampling. Is it that SVG code just spends a huge amount more time/resource on getting line-drawing perfect, whereas the 3d stacks care a lot less?

Re:NN-SVG by krebby on Tuesday December 05, 2023 @10:10AM (#38531825)
Yes, they're essentially optimizing for separate things: https://mattdesl.svbtle.com/drawing-lines-is-hard

SVG naturally spends a lot of time and resources tessellating paths into triangle strips, which requires mitering and sorting and other not easily parallelizable (read: slow for GPU) algorithms.

Re:NN-SVG by andai on Wednesday December 06, 2023 @07:33AM (#38543013)
This is great! I'm currently learning 2D graphics from scratch (making vector art software), can anyone recommend any related resources?

I found this interview (one relevant bit at 29:55) very interesting. Shawn McGrath did the graphics code for the game N++ which is very vectory, so he found efficient ways to render it on a GPU. https://youtu.be/cfyWvJdsDRI?t=1795

Re:NN-SVG by have_faith on Tuesday December 05, 2023 @06:10AM (#38529445)
Why does changing the opacity settings make parts of the output jump around? looks like it's non deterministically rendered based on the settings.
Re:NN-SVG by amelius on Tuesday December 05, 2023 @07:56AM (#38530116)
It shows not all connections, but chooses a bunch, which is different on every rendering.
Re:NN-SVG by prakhar897 on Tuesday December 05, 2023 @07:05AM (#38529825)
Is LLM Vis built on top of this?
Re:NN-SVG by wolframhempel on Tuesday December 05, 2023 @07:11AM (#38529862)
It's a very cool project. But, you'd hugely improve WebGL's line rendering quality by setting antialias: true in your Renderer's initialisation (https://threejs.org/docs/#api/en/renderers/WebGLRenderer.ant...)
Re:NN-SVG by stn8188 on Tuesday December 05, 2023 @09:53AM (#38531565)
This is awesome, thank you! Wish I had it last week working on some slides for a school project :)
Re:NN-SVG by eyelidlessness on Tuesday December 05, 2023 @11:51AM (#38533384)
This is surprisingly accommodating for mobile. That does make one non-accommodation a little more annoying though: since the render area fills the screen, and since it handles touch events to update the rendering, it prevents swipe-to-navigate-back. Might be a nice, er, touch to ignore touch events originating on the viewport edges