Show HN: Graphite, a Blender-inspired 2D procedural design Rust app
For the past three years I've been building what I hope will be the next Blender, tackling the lack of any good 2D design or image editing tools outside the Adobe monopoly. This was our first year participating in Google Summer of Code and this Q3 update includes the big payoff from that, covering the most progress we've made so far as a project. If you're a Rust dev, consider getting involved as we apply for the next GSoC in the new year— you could be our intern next summer :)Q3 progress report: https://graphite.rs/blog/graphite-progress-report-q3-2024/
339 points by Keavon - 54 comments
It makes me very excited to see tools that are built as web apps because more gravity on web means more capabilities for the web platform which is more open and accessible.
Rust is great - amazing. I presume it is compiled to Web Assembly.
I'm just wondering how and why these three passionate gifted individuals didn't go Round A, Round B Investor funding, post valuation SAFE, Press briefing route?
Been thinking a lot about it lately when I see tons of AI wrappers, open weight fine tuned packaged models and everything in between.
Probably passion can't be priced? Happiness is not valuation?
Re: open weight models Most of the innovation happens within companies who use OSS to either appeal to developers or to destroy potential competitors (think Meta spending a fraction of its ad revenue just to ruin the market for OpenAI / Microsoft) Some individuals get grants from VCs who want to make a name in AI for themselves for the cost of peanuts (eg. a16z sponsors some models)
At the same time, for wealthy tech people with skills and a well paid job (think 300-500) raising capital is not always an attractive proposition. You'll likely have a lower salary when doing your own startup and if it turns out your open model can't make enough money you'll just have a bunch of worthless equity and 1-2 years of high stress / pressure.
Personally, I always try to use a PWA when the app is otherwise offered via Electron.
If it’s going to depend on a browser engine, it may as well be the one I already have open and update regularly.
[Open source Rust graphics editor] Graphite progress report (Q2 2024) - https://news.ycombinator.com/item?id=41138691 - Aug 2024 (3 comments)
Graphite 2D graphics editor built in Rust: Looking back on 2023 and what's next - https://news.ycombinator.com/item?id=38855850 - Jan 2024 (2 comments)
Graphite: 2D Raster and Vector Editor - https://news.ycombinator.com/item?id=38169500 - Nov 2023 (4 comments)
Graphite: Open-source raster and vector 2D graphics editor - https://news.ycombinator.com/item?id=36901406 - July 2023 (64 comments)
Graphite – open-source raster and vector 2D graphics editor written in Rust - https://news.ycombinator.com/item?id=30675530 - March 2022 (18 comments)
I read it as a replacement for Blender, but upon testing it I was confused as everything was 2D and looks like Photoshop.
But no, you meant the next Photoshop, while referencing Blender as a popular open source version of closed-source 3D modeling/rendering software? Is that right?
I'm not up on Adobe (I use InkScape which is sort of the default open-source / free alternative) but I guess Adobe Illustrator is the closest analogue here.
You should probably add Graphite to this list [2]. I'll definitely try Graphite and follow its progress.
Good luck!
--
1: https://www.youtube.com/watch?v=lthVYUB8JLs
2: https://github.com/KenneyNL/Adobe-Alternatives
1. https://github.com/awesome-selfhosted/awesome-selfhosted
If there's no plan for that or if its limited to usual suspects like GDrive, Dropbox etc., then I guess there's not much benefit to selfhosting.
Someday, I'd like to try my hand at making my own vector graphics tool that contains a constraint solver. I am just an amateur when it comes to graphic design, but I often find Inkscape incredibly difficult to use. Certain shapes take bizarre combinations of commands to create and once a design is finished it can be hard to make adjustments. I find it much easier to make 2D designs as a fusion 360 sketches because constraining a bunch of lines and curves then playing with measurements is significantly more intuitive and interactive. Also maybe a tool like this already exists and I'm just not aware of it.
Every update (even moving the canvas around takes 1-2 secs on my laptop.
TLDR; looks like this is redrawing everything every time which makes it useable only for very simple projects atm, unless I miss sth. I.e. needs caching of vectors as bitmaps/textures of some sort.
Also doesn't seem to support OpenEXRs yet? They won't show in the file browser.
Screenshots look great and I love the node editor's mapping to the layer stack.
But as always with Graphite it's still unclear to me how many of the screenshots show actual functinality and how many are mockups or the functionality behind some UI elements is simply not implemented yet.
I wish I could do this kind of Rust code in my day job.
Why create a new project instead of advancing InkScape though?
And because it's time for a fresh start. Sometimes you can't turn around a heavy ship, and that ship doesn't want to be turned around. It's easy to write a sentence like that, but once you actually think about it, how does an outsider with a good idea and a capability to execute on it somehow approach an existing project and decide to "take it over"? That would be neither viable nor would it yield a desirable outcome. We're building something fundamentally different from Inkscape that just so happens to eclipse it.
This leaves only three options:
1. start contributing to the project slowly, try to get into their ranks, participate in conversation, and hope that you share the same vision
2. fork it and learn the codebase by yourself
3. write your own
Out of those, given the obviously conscious choice to go with Rust, and the ambitious goals, the third option is the only one that makes sense.
When searching for "scripting" on the pages, I don't see any scripting support. Are there plans to integrate it?
Also some kind of API?
No support for custom scripts yet. But the whole concept is that we're basically building a WYSIWYG editor on top of a node-based compositor on top of a visual programming language (so that's three products in one, lots of work ahead for us!). The result is that the whole thing is a programmatic data pipeline and you'll be able to write custom scripts in both node and code form, then compose them into reusable pieces and pipelines. But since we're building three products in one, we have only been able to focus on the parts that matter most to get things working. Your request hasn't yet been one of those, but worry not, that's very much a core feature.
- Ctrl+1: dotted stamp roller - Ctrl+2: bristle brush - Ctrl+3: diluted ink - Ctrl+4: ragged solid ink brush
This concept will be reimplemented in Graphite eventually. Maybe as a GSoC project.
The actual thesis write-up is here <https://digitalcommons.calpoly.edu/theses/2653/> in case you're really interested for some reason.
Maybe just because it's in the browser?
In short, please be patient :) The app's architecture is designed with performance that'll make your CPU and GPU scream, but it's a big job building all of it. Especially for raster imagery, that's where a CPU-bottlenecked render pipeline is especially affected. But next year is the year we move on from vector graphics to raster once the GPU is utilized in the render pipeline.
Thanks for taking a look!
Here are some things in mine that I've found useful but don't see here (/ might have missed) and could be food for thought (presumably some of these are just NYI but noting them regardless): [edit: a couple of these things are already noted at https://github.com/GraphiteEditor/Graphite/issues/1870]
- shift+G/R/S for setting handle mode (bent, colinear, and colinear+equidistant respectively) works out quite intuitively; mode can be displayed as a different icon on the point (square for bent, rectangle aligned to angle for colinear, and circle for equidistant is what I use; circle is somewhat questionable but my handles have arrow tips)
- while holding just a handle, set the rotation/scale anchor point to its point
- allow both rotate and scale at the same time (maybe never useful but I still did it. ¯\_(ツ)_/¯)
- while rotating/scaling, some shortcut for setting the anchor point (esp. snapped to an element representing the rotational center of a symmetric design)
- middle-mouse-dragging while holding an element should ignore the delta mouse movement during the movement
- I draw visual indicators of the current r/g/s accumulated action (g: a line from the starting mouse position in the canvas to where it'd be dragged to; s: line from the anchor point through the current and original mouse position with different colors (i.e. the ratio of the color lengths is the ratio of scaling); r: lines from the anchor to original & current mouse position, with an arc in between (very busy-looking, don't quite like it))
- some actions - cut a path into two (a thing I don't have but have wanted is drag-selecting to cut into three), snapping to existing points if near enough; and another to join paths if two end-points are selected; and select all linked to current selection
Importantly, it's both "just Rust" and "very Rust". You can stay on the yellow brick road and kinda just get the app out there with incredible multi-threaded CPU + GPU rendering performance from the outset... or dig deeper and go into advanced stuff. Per the docs, it "leverages Rust to its full extent: ownership, borrowing, lifetimes, futures, streams, first-class functions"... it's just up to you how much of that you want to use
The documentation is admittedly WIP but if you need help, the Discord server is very helpful. I'm there virtually 24/7 and happy to answer any questions
The repo is at https://github.com/iced-rs/iced -- check out the readme for two complex apps recently built. It's fully themeable so you can make apps look exactly as you want them to (which is a downside for those looking for more native widgets)