RSS/Atom feed Twitter
Site is read-only, email is disabled

is watercolor (brush color blending mode)...

This discussion is connected to the gegl-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 12 messages available
Toggle history

Please log in to manage your subscriptions.

is watercolor (brush color blending mode)... pippin-dZkOyQknF4g@public.gmane.org 28 Jul 18:40
  is watercolor (brush color blending mode)... Souichi TAKASHIGE 28 Jul 19:20
a21f61350807261528q4bb9fddh... 07 Oct 20:29
481c39560807262046o505046f9... 07 Oct 20:29
7bf6f2dc0807270749x1e08c74c... 07 Oct 20:29
481c39560807270919t5c3a3152... 07 Oct 20:29
1217179283.6544.53.camel@lo... 07 Oct 20:29
481c39560807271134i506c90c7... 07 Oct 20:29
7bf6f2dc0807271138u76bc8334... 07 Oct 20:29
481c39560807271709t4a7dfb54... 07 Oct 20:29
23f4e3390807271721h60db6e4c... 07 Oct 20:29
481c39560807280747l77e2cbe9... 07 Oct 20:29
pippin-dZkOyQknF4g@public.gmane.org
2008-07-28 18:40:45 UTC (over 16 years ago)

is watercolor (brush color blending mode)...

On 7/28/08, Souichi TAKASHIGE wrote:

Hi,

No, it's only destructive if we have no way of regenerating the cache as needed.
With GEGL, we can cache just at the newest node in the graph. Stroke information can be fully stored in the node.

From my understanding, if stroke information is stored in the node, then the stroke can be regenerated, and that operation will be non-destructive since the cache can be regenerated. I think David says about "non-destructive" brush operation. I saw source code of gegl-paint. It seems that gegl_vector stores the information of the path, so I think it is also about non-destructive brush tool.

It is, right now that test program is destructive in that it forces a save/merge-down of the stroke as a temporary workaround until cache management in GEGL becomes better.

On the other hand, Øyvind says that we can implement "destructive" brush. I think being "destructive" implies that there's no way to regenerate the stroke since being able to regenerate the stroke means that the cache is regeneratable, so the operation must not have any path information.

The task of the painting operation is to provide the rendered result for a series of input events/coordinates, as well as a configuration for how it should be rendered. The code is written in a manner that makes it possible to append to the path and recompute a minimal region (semi working, but has some visual artifacts). All the things GIMP currently do can be expressed using this. It can also be easily extended to store line width and opacity varying along the stroke.

When it comes to implementing more destructive like buffer access for performance reasons one could implement an operation that operates on a GeglBuffer in-place. It would still be possible to replay it from history, but there wouldn't be valid caches for each operation, and the replay would be much more expensive. We could add a smaller undo stack for the buffer though adding support for undo tiles for GeglBuffers has existed in the past and could be resurrected. Such a smaller undo stack might be useful, but that is probably something to keep in mind later after purging of caches, and copy on write works better.

I am not actively pursuing experimenting with this at the moment, but there is enough proof of concept code that it should be possible to start porting the current GIMP tools to such an infrastructure. This would also be the moment that the GIMP tools gain higher bitdepth retouching capabilities, initially it would make sense to port it in such a manner that it works, but is perhaps slow. Then to optimize as needed. How it makes sense to store this in a graph in GIMP probably should wait until the projection of the layer stack in GIMP has been ported, then it would be possible to add the strokes as a layer group or similar.

/Øyvind K.

Souichi TAKASHIGE
2008-07-28 19:20:46 UTC (over 16 years ago)

is watercolor (brush color blending mode)...

Hi,

2008/7/29 :

It is, right now that test program is destructive in that it forces a save/merge-down of the stroke as a temporary workaround until cache management in GEGL becomes better.

[...snip...]

The task of the painting operation is to provide the rendered result for a series of input events/coordinates, as well as a configuration for how it should be rendered. The code is written in a manner that makes it possible to append to the path and recompute a minimal region (semi working, but has some visual artifacts). All the things GIMP currently do can be expressed using this. It can also be easily extended to store line width and opacity varying along the stroke.

When it comes to implementing more destructive like buffer access for performance reasons one could implement an operation that operates on a GeglBuffer in-place. It would still be possible to replay it from history, but there wouldn't be valid caches for each operation, and the replay would be much more expensive. We could add a smaller undo stack for the buffer though adding support for undo tiles for GeglBuffers has existed in the past and could be resurrected. Such a smaller undo stack might be useful, but that is probably something to keep in mind later after purging of caches, and copy on write works better.

Thank you for your explanation.
Now I understand what you mean "destructive", and your idea of brush implementation. Basically brush operations are ready to be non-destructive in that it has a path information. And we can choose destructive operations instead of default cache updating algorithm for better performance as needed. I think implementing undo cache is a good idea.

My main concern is about the performance of the brush processing both for speed and memory usage.
I'm anxious about the performance a little yet, but I hope GEGL to have enough performance in the future. --
Souichi TAKASHIGE