it's been since 2021 the last progress report of this project here... but i'm back here to show what is done all this time.
NPainter is free and open source fast and simple digital painting software, it aims to be a proper alternative to popular painting software like Paint Tool SAI. this project is focused to be lightweight, easy to use (wip) and powerful
The following stuff was made this time:
Next short-term features:
Repository: https://github.com/mrgaturus/npainter
itch.io: https://mrgaturus.itch.io/npainter
twitter: https://x.com/mrgaturus
me, as a beginner artist i found generative AI art quite disgusting, so npainter will not have AI features.
as an alternative i will try make the gui toolkit more for general propurses (write documentation, try remove some build hacks, examples, treeform's stuff integration, etc), so you may use it to make something like a tiny native comfyui, idk.
me, as a beginner artist i found generative AI art quite disgusting, so npainter will not have AI features.
Fair enough.
Nice.
I have been following the project for awhile. As a professional artist (learned during the days of traditional 2D frame by frame animation using pencils/dip pens and paper (looking forward to that ability in the program) before computers), personally I'm glad that it doesn't have AI. I don't mind if it has plugins for such a thing, but not in the main program. I wish more programs took that approach, but to each their own.
Looking forward to the gui framework as well.
the maximun plugin stuff that is likely i will make in a long future is an optional g'mic support, i have some ideas to create a g'mic frontend using my gui toolkit to avoid qt dependency
I would envision plugins to be more 3rd party created, so the bugs would be dealt with by the maintainers of the individual plugin. Like what Blender and Krita do (although doesn't necessarily have to by python plugins).
I wasn't thinking of this type of plugin being done by the project itself. Just something that 3rd parties could hook into for their needs.
The GUI-Toolkit "nogui" seems to be lightweight and not overloaded. As far as I understand you are creating a native window for GL-context and don't use GLFW or other fw.
For the painting/drawing on the GPU you use only textures and not primitive GPU objects (triangle) to construct a rectangle or circle. Is there a reason?
Is antialiasing implemented? How does antialiasing work? I don't mean MSAA.
Maybe this UX-framework could be a starting point of: https://forum.nim-lang.org/t/10301#72013
A solid, simple, imperative UX framework (rendertree, eventmanagement, ...) would be a good base for further development to connect other backend drawing technologies like WebGPU direct or over Skia "graphite" wrapper and to extend it with further widgets.
Will try the GUI-Toolkit to better understand how rendering, painting, ... are working.
Thanks for the cool work!
As far as I understand you are creating a native window for GL-context and don't use GLFW or other fw.
i know it was quite wheel reinventing but i had to do my own windowing because one big reason: graphics tablet support, other windowing libs don't want implement graphics tablet support
For the painting/drawing on the GPU you use only textures and not primitive GPU objects (triangle) to construct a rectangle or circle. Is there a reason?
npainter brush engine and layer compositor are cpu accerelated by simd and multihreading, only the canvas view is gpu accelerated, also npainter is a raster-based program
Is antialiasing implemented? How does antialiasing work?
npainter: brush engine is dab based and the antialiased circle shape is from a simple 2d circle sdf code i found somewhere to avoid supersampling
nogui: gui rendering uses the same ideas as dear imgui triangle batches, the antialiasing is done by extruding geometry 1px and do a simple gradient to 0% alpha in that extruding and icons are pre-rasterized antialiased by a small companion tool called "nopack".
Maybe this UX-framework could be a starting point of: https://forum.nim-lang.org/t/10301#72013
i don't think this gui toolkit will be the "rule them all" but i think the core approach is other perspective how it can be done
Will try the GUI-Toolkit to better understand how rendering, painting, ... are working.
nogui/tests have some examples, after compile one of those run nopack to create a important data folder, have fun ^^
I cloned the repo https://github.com/mrgaturus/nogui.
Building with 'nim c .\tests\tform.nim' on Win11 ->
Additional info: Requested command not found: 'nopack reset C:\...\nogui\tests'. OS error:
After calling "nimble install" to get 'nopack' dependencies I get following errror:
gcc.exe: error: unrecognized command-line option '--cflags'
gcc.exe: error: unrecognized command-line option '--cflags'
gcc.exe: error: unrecognized command-line option '--cflags'
gcc.exe: error: unrecognized command-line option '--cflags'
gcc.exe: error: unrecognized command-line option '--cflags'
Error: execution of an external compiler program 'gcc.exe -c -w -fmax-errors=3 -mno-ms-bitfields
-DWIN32_LEAN_AND_MEAN Error running startProcess: System can't find the requested file.
Additional info: Requ stedgcc.exe:gcc.exe: mmand not found: 'pkg-config --cflags gdk-pixbuf-2.0'.
OS error: -O3 -fno-strict-aliasing -fno-ident -fno-math-err o gcc.exe: -IC:\nim\lib -IC:
\Users\...\AppData\Local\Temp\nimble_11704\githubcom_mrgaturusnopack\src -o C:
\Users\...\nimcache\nopack_r\@mnopack.c.o C:
\Users\...\AppData\Local\Temp\nimble_11704\githubcom_mrgaturusnopack\src\nopack.c' failed
with exit code: 1
compiling on windows requires be in a msys2 mingw64 environment, nim installed through choosenim, nim properly configured in PATH and install the following msys2 dependencies:
git
base-devel
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-gdk-pixbuf2
mingw-w64-x86_64-librsvg
mingw-w64-x86_64-freetype
mingw-w64-x86_64-wintab-sdk
after those features i will continue the nice simple but powerful user interface