Can Krita integrate Godot for 3D?

I’d say it is optimization because video games make use of the most effective resource for faster performance.
The use of dedicated hardware is not an exclusion.

I really really don’t believe that the quantity of features is directly the reason as to why a given software is faster than the other.
At the beginning, Krita didn’t have as many features as today. There was probably enough time to take care of the first few implemented features and optimize them. If on the other hand, you said “speed at which all these features are optimized individually” and compared how it’s done on Krita’s, Medibang’s, or HeavyPaint’s sides, your argument would be more believable to me. But sadly this is data we probably will never find out as it can’t be accurately measured by either of us. So the only case in which you’d be right would be by going with the general idea, that regardless of the software and regardless of the feature’s complexity, each feature takes an average and general time to develop, and optimize. With this introduction, your argument becomes totally valid and 100% believable. But you didn’t do this introduction.

Now, it’s nevertheless interesting to witness what a painting software powered by a game engine can do. And HeavyPaint is such a program.

Well this discussion has certainly steered far away from what I inteded when I brought the subject up.

I’ll just try to address some of this but not too much since I’d really prefer if the discussion was more on point with the topic I started and that’s possible 3D features in Krita which might be possible utilizing the Godot engine rather than reworking krita in the engine (which doesn’t make sense).

@novames00
I’m afraid your enthusiasm might be misplaced.
Optimzation is independent of game engine or not as you know.
Games are very particular field, increasing performance is often done at cost of precision, games increase performance be faking lots of stuff. With brushes this would be an unwanted behaviour. I know this I make games ;0. You create specif code cases to work around issues since that will work for you in games, this is not that easily applicable on a brush or a filter.

Secondly large part of the game’s peformance lies with a GPU which is not used in Krita and many other painting apps for painting.

There was PaintToolSai brought up, since the latest PTS versions bring brushes which can work at incredible performance at large sizes on large canvas sizes I was also interested in this, so I did a lot of testing and with Krita’s built-in brush engines I built as performant (if not more but it’s difficult to test peformance overreach as a user) brushes in the same cases as PTS. They use some clever approaches to fake how brushes work to make them more performant, I really like it because I never though I could have 1000px blending brush on a 14k px canvas in Krita to work real-time but turns out it’s actually very possible even on my dusty old HW.
This example of mine above I think should speak enough for how much performance you can get from Krita the issues is whether you ever tried it or not ;).

Now back to Heavypaint, I talked with the dev about how it is made. Again, the complexity of brushes is very different, the way they are implemented also isn’t the same and the precision isn’t such a big issue since lots of the stuff he does he doesn’t need it for which allows him to make it look like it does. But as I said, you can get a lot more performance out of Krita than you realize at this very moment.
Some of the stuff in heavy paint is sped up with a gpu which again isn’t how Krita currently works and most other painting apps either.

Now to clarify, I’m not saying Krita can’t improve with more optimizations or reiterations, I’m a user not Krita dev so I can afford to cry for more performance and the devs have to deal with these cries on their own xDD.
But yeah, there’s a lot more performance in Krita than even Krita’s default brushes showcase.
Though some areas such as filters/layer styles (or what is it called) could use a boost whether it’s optimization or UX I’m not sure.

But please, if possible, back to the topic. It’s mostly probably related to Krita’s dev to be honest if any decide to pop in at some point. But if you have something regarding this direction it would be nice to read :slight_smile:

5 Likes

I now think I shouldn’t have mentioned the name of the software. I thought since godot is mentioned it will be interesting for others to know that there is a painting app done with godot (although not free software and open source even when godot itself is free software) but then I didn’t expect it to be yet another software added to the comparison list. Sorry everyone.

Not with the moderator hat on, please be on topic.

@novames00
Exactly this. GPUs are extremely fast and optimized for matrix operations which raster image manipulation is, simply. One of the reasons why most painting programs don’t use the GPU is that they also need to use the video memory to not waste time copying data from normal RAM do video RAM and back, and video RAM isn’t that plenty. Even my powerful graphics card has only 8 GB of RAM. For that reason I don’t use my graphics card for rendering in Blender because large scenes don’t fit in there. And 8 GB wouldn’t be enough for most of my Krita projects.

Alright.

@tiar Hi, I’d like to ask you something related if you don’t mind :slight_smile:

The original post is about godot as shared library which is still in works but I have a different question though related to godot and krita.

Since godot exports to html/wasm and pyqt can work with webview and webassembly, would it be possible to create the 3d scene in godot, export to html/wasm and use that in Krita through pyqt? Let’s say a new type of layer, the main part of its function would be to just ensure it’s in the layer stack and displays the wasm exported from godot with something like a transparent background or so?
(just to clarify, this does not use godot as a shared library just an exported project which is possible now just fine)
I’m not sure if this is how it works, I never tried it I just got pointed out in this direction by someone else and checked the docs and it seems it’s possible (?).

Note: I know that qt5 comes with 3D and it’s a big part fo the 6th version but I’m sure it’s still lot of work just getting qt6 to work in krita, althought qt5 is in the 3d itself needs a lot of work to be useful since it basically “just” displays stuff, so that’s why I brought this question up since all the 3d interactions are already possible in godot if qt could display the export in krita it could mean a lot less work overall and I assume webview/webassembly isn’t going to dramatically change from qt5 → qt6 and even if it did it still seems not to be lot of work (well compared to implementing everything from the scratch :wink: ) considering most of the 3d stuff would be handled through the export rather than Krita side?

It’s just an idea, maybe not even possible and since you tried the 3d already a bit I was wondering what your thoughts on it are, please?