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

Drawing zones

This discussion is connected to the gimp-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.

28 of 29 messages available
Toggle history

Please log in to manage your subscriptions.

Drawing zones Thorsten Wilms 16 Jan 22:06
  Drawing zones David Gowers 16 Jan 23:54
   Drawing zones David Gowers 17 Jan 02:49
    Drawing zones Sven Neumann 17 Jan 08:27
   Drawing zones Joao S. O. Bueno Calligaris 18 Jan 01:30
    Drawing zones David Gowers 18 Jan 02:54
     Drawing zones Manuel Quiñones 18 Jan 08:25
    Drawing zones Manuel Quiñones 18 Jan 06:57
     Drawing zones Thorsten Wilms 18 Jan 09:54
      Drawing zones David Gowers 18 Jan 10:34
       Drawing zones Thorsten Wilms 18 Jan 11:21
        Drawing zones David Gowers 18 Jan 11:41
      Drawing zones Manuel Quiñones 20 Jan 01:23
       Drawing zones Sven Neumann 21 Jan 12:04
    Drawing zones Thorsten Wilms 18 Jan 09:45
  Drawing zones Sven Neumann 17 Jan 08:28
  Drawing zones Sven Neumann 17 Jan 08:52
   Drawing zones Thorsten Wilms 17 Jan 13:26
    Drawing zones Thorsten Wilms 17 Jan 18:03
     Drawing zones Sven Neumann 18 Jan 07:56
      Drawing zones Thorsten Wilms 18 Jan 10:10
       Drawing zones Sven Neumann 18 Jan 16:20
Drawing zones Saul Goode 17 Jan 10:18
  Drawing zones Thorsten Wilms 17 Jan 13:38
Drawing zones Saul Goode 17 Jan 15:36
  Drawing zones Thorsten Wilms 17 Jan 16:00
   Drawing zones Raphaël Quinet 17 Jan 16:33
a11b70a90701172145h67961502... 07 Oct 20:24
  Drawing zones David Gowers 18 Jan 07:43
Thorsten Wilms
2007-01-16 22:06:41 UTC (almost 18 years ago)

Drawing zones

Hi!

So I was asked to suggest new features on the mailing-list and only file bug report after they have been discussed there ... and it seems theres a misunderstanding to be resolved and i wouldn't mind more exposure for this ... :)

My proposal is about an alternative to using either layers or saved selections to draw on areas of an image with sharp edges between them.

http://bugzilla.gnome.org/attachment.cgi?id=80388

Shows a typical case, ignoring the background we have two such areas: body and hand.

Drawing zones are about dividing the image into 2 or more (non-overlapping) regions. These zones would be a bit like multiple selections. If you start drawing in one zone, you can't draw over another zone without releasing the mouse-button / lifting the pen (same effect as drawing outside of the current selection).

Such a feature would remove the need for using layers and moving between them or constantly changing selections in cases where adjacent areas need sharp edges between them.

Using layers would mean constant switching between them. Same for selections. Long mouse-ways in both cases. Zones, once setup could be left active for long durations.

This has nothing to do with split-views, Sven, as the image is shown the same way, not in parts. You would just need marching ants or similar for the zone extents and the ability to hide them.

If it's still unclear, I'll provide graphical explanation.

http://bugzilla.gnome.org/show_bug.cgi?id=397237

David Gowers
2007-01-16 23:54:46 UTC (almost 18 years ago)

Drawing zones

On 1/17/07, Thorsten Wilms wrote:

Hi!

So I was asked to suggest new features on the mailing-list and only file bug report after they have been discussed there ... and it seems theres a misunderstanding to be resolved and i wouldn't mind more exposure for this ... :)

My proposal is about an alternative to using either layers or saved selections to draw on areas of an image with sharp edges between them.

http://bugzilla.gnome.org/attachment.cgi?id=80388

Shows a typical case, ignoring the background we have two such areas: body and hand.

Drawing zones are about dividing the image into 2 or more (non-overlapping) regions. These zones would be a bit like multiple selections. If you start drawing in one zone, you can't draw over another zone without releasing the mouse-button / lifting the pen (same effect as drawing outside of the current selection).

Such a feature would remove the need for using layers and moving between them
or constantly changing selections in cases where adjacent areas need sharp edges between them.

Using layers would mean constant switching between them. Same for selections. Long mouse-ways in both cases. Zones, once setup could be left active for long durations.

This has nothing to do with split-views, Sven, as the image is shown the same way, not in parts. You would just need marching ants or similar for the zone extents and the ability to hide them.

If it's still unclear, I'll provide graphical explanation.

http://bugzilla.gnome.org/show_bug.cgi?id=397237

This would be wonderfully useful to me for CGing. You would need to be able to define zones per-layer - It would only greatly reduce the need for layers, not obviate them completely, for example when I'm making an alternate coloration or remake of something, I like to paste it over the original as a new layer, and use the enter key to toggle it's visibility.

I think you would have to use saved selections rather than layers, to avoid the strange 'sibling-effects-sibling' behaviour (ie one layer is real, other is zonemasks, but they're both in the same list). If you specified a rule such as 'zonemasks are always the layer immediately above the layer they apply to, if the layer has zonemasks at all' you could probably manage layer based zonemasks (of course they're better cause they can be in color.)

David Gowers
2007-01-17 02:49:57 UTC (almost 18 years ago)

Drawing zones

Also consider reopening the bug report -- you can do this since you're the reporter, and as Sven resolved it WONTFIX under a huge misapprehension of it, I recommend doing so. It may influence the volume of discussion on it here.

Sven Neumann
2007-01-17 08:27:39 UTC (almost 18 years ago)

Drawing zones

Hi,

On Wed, 2007-01-17 at 12:19 +1030, David Gowers wrote:

Also consider reopening the bug report -- you can do this since you're the reporter, and as Sven resolved it WONTFIX under a huge misapprehension of it, I recommend doing so. It may influence the volume of discussion on it here.

David, new features should always be discussed here before a bug report is opened at all. That ensures that the bug reports make sense and that there's a consensus among the GIMP developers about if and how it should be implemented. Filing this request first in bugzilla was a mistake. Please don't encourage people to redo their mistakes.

Sven

Sven Neumann
2007-01-17 08:28:37 UTC (almost 18 years ago)

Drawing zones

Him

On Tue, 2007-01-16 at 22:06 +0100, Thorsten Wilms wrote:

My proposal is about an alternative to using either layers or saved selections to draw on areas of an image with sharp edges between them.

http://bugzilla.gnome.org/attachment.cgi?id=80388

Shows a typical case, ignoring the background we have two such areas: body and hand.

Drawing zones are about dividing the image into 2 or more (non-overlapping) regions. These zones would be a bit like multiple selections. If you start drawing in one zone, you can't draw over another zone without releasing the mouse-button / lifting the pen (same effect as drawing outside of the current selection).

Sorry, I don't understand it. No clue, really.

Sven

Sven Neumann
2007-01-17 08:52:48 UTC (almost 18 years ago)

Drawing zones

Hi,

On Tue, 2007-01-16 at 22:06 +0100, Thorsten Wilms wrote:

My proposal is about an alternative to using either layers or saved selections to draw on areas of an image with sharp edges between them.

I start to realize what you are asking for now. But, instead of suggesting a solution, could you perhaps try to explain where the problems are when you try to use the currently available features to implement your workflow? You should be able to do this with layers or selections. If that doesn't work for you, then perhaps there's something that we need to change about how layers and/or selections are handled. I don't think that we need to introduce a completely new feature.

This is one of the main reasons why I ask for enhancement requests to be discussed here first. I would like users to explain their goals and the way they would like to work. Users are good at pointing out problems with our user interface but they tend to suggest features that would be difficult to implement and to maintain. Quite often there is a simpler solution that fits in better with the current feature set and codebase.

Sven

Saul Goode
2007-01-17 10:18:35 UTC (almost 18 years ago)

Drawing zones

On Tue, 2007-01-16 at 22:06 +0100, Thorsten Wilms wrote:

My proposal is about an alternative to using either layers or saved selections to draw on areas of an image with sharp edges between them.

If I might offer a possible work-around. I have written a some scripts which permit you to save a selection so that it is associated with a specific layer. You can then, at a later date, reload that selection while the layer is active.

The Script-fu (available at http://flashingtwelve.brickfilms.com/GIMP/Scripts/zonemasks.scm) adds three commands to the Layers window's menu (the one you see when you right-click on a layer preview. They are (I used Simon's term, "zonemask"):

* Save zonemask - Saves the current selection to a channel that has the same name as the layer. If a channel already exists with that name, it is replaced.

* Load zonemask - If a channel exists with the same name as the layer, it is loaded into the selection. If there is no selection associated with the layer, the selection is cleared (ie, Select None)

* Remove all zonemasks - Removes any channels that are zonemasks. It does not remove other channels.

I currently attach a parasite (named "zone-mask") to the channel and assign it the value of the tattoo of the associated layer. The parasites permit "Remove all zonemasks" to ignore other channels. The value of the parasite is presently unused but in the future might permit multiple selections to be associated with a layer.

If I am understanding you correctly, these scripts should be helpful to you in your workflow. You would still have to manually invert the selection; but I would point out that the Select menu can torn off so that "Select->Invert" is just a mouse-click away.

If nothing else, perhaps you could test the scripts and tell me if whether I understood your workflow.

A final caveat on the scripts: I do not have a stable install (version 2.2) of the GIMP available right now. I tested the scripts on the development version (2.3.13) and I tried to account for differences in coding required. If you have a recent development version (2.3.13) available, it would be best if you used that.

-------- "It is amazing what you can accomplish if you do not care who gets the credit." -- Harry S. Truman

Thorsten Wilms
2007-01-17 13:26:07 UTC (almost 18 years ago)

Drawing zones

On Wed, Jan 17, 2007 at 08:52:48AM +0100, Sven Neumann wrote:

I start to realize what you are asking for now. But, instead of suggesting a solution, could you perhaps try to explain where the problems are when you try to use the currently available features to implement your workflow? You should be able to do this with layers or selections. If that doesn't work for you, then perhaps there's something that we need to change about how layers and/or selections are handled. I don't think that we need to introduce a completely new feature.

# The goal:
Draw on several areas of an image while maintaining sharp edges around each of them (in many cases they will touch, so before I talked about edges between them).
With the least amount of interruption!

# Motivation You often have parts of an image that need the same treatment, but are clearly divided (like hand and body on my example image). You draw with the same base colour, draw light and shadow, texturing ... all best done in one go.

[Drawing from scratch might not be seen as typical use of GIMP, but I know I'm not the only one and the closest commercial counterpart, Photoshop is used for this alot, even though there's Painter. Check for example
http://forums.cgsociety.org/forumdisplay.php?s=f49edc03bcbdb53f623009e1366edda9&f=133]

# Layers Using layers, you will likely end up with one layer per area. You need to switch between them. Just today I took notice it can be done with Page Up/Down, layer name appears in status bar. If you don't use the shortcuts, you need the layers dialog, taking away space from the drawing area. If you use them, it's just a keypress, but you have to take care in which layer you end up (drawing something on the wrong layer is a mistake i make often enough, even usuing the layers dialog).

# Selections Loading selections to me means having to change between layer and channel tabs and a lot of mouse movement away from the canvas. This already makes me use layers with locked alpha everywhere I can. Only with exactly 2 areas, one could use inverse selection.

# Drawing zones I think drawing zones would have to be organised in sets. The zones of a set would always cover a full rectangle like layers do.
Inside a set you would add/delete zones and select the zone you want to edit. Editing could then happen with the current selection tools. Masking would require 1 colour for each zone.

I admit this sounds a bit complicated. Now for the nice part: once setup, you just draw! If you move the pointer outside the zone you started drawing in, nothing happens (just like painting outside a selection). You don't have to hit a single button, but get to focus on drawing completely.

# Stop lines My initial idea was to have just lines (non-closed paths), which you can't draw past. So they act like a selection boundary, but are not closed. You could even draw all around them, something that might be helpful on drawing armpits. I then thought it might be hard to check for this, so closed regions/zones might be easier. The management of stop lines might be more simple, though.

-- Thorsten Wilms

Thorwil's Creature Illustrations: http://www.printfection.com/thorwil

Thorsten Wilms
2007-01-17 13:38:08 UTC (almost 18 years ago)

Drawing zones

On Wed, Jan 17, 2007 at 01:18:35AM -0800, Saul Goode wrote:

If I am understanding you correctly, these scripts should be helpful to you in your workflow. You would still have to manually invert the selection; but I would point out that the Select menu can torn off so that "Select->Invert" is just a mouse-click away.

Sorry, no. I don't see the benefit over switching between layers.

Lets try another description: Drawing zones would be like 2 or more non-overlapping selections that are active at the same time. Which one is applied to a drawing operation is determined by where the mouse/pen-down happens.

Implicit area selection (to not say Selection selection) :)

-- Thorsten Wilms

Thorwil's Creature Illustrations: http://www.printfection.com/thorwil

Saul Goode
2007-01-17 15:36:27 UTC (almost 18 years ago)

Drawing zones

Sorry, no. I don't see the benefit over switching between layers.

#1: A selection does not overlap its inverse. #2: There is no need to keep track of which layers are associated with each other (and for "switching between layers", presumably they would need to be adjacent in the layerstack). #3: Switching between "drawing zones" (i.e., inverting the selection) uses the same keystroke/action regardless of which zone is active. (For layers, the user would have to remember whether to activate the layer above or below.)
#4: The Layers window is not cluttered with "zone layers".

Lets try another description:
Drawing zones would be like 2 or more non-overlapping selections that are active at the same time. Which one is applied to a drawing operation is determined by where the mouse/pen-down happens.

If the only difference is whether a mouse-click is used on the canvas or a keystroke/menu/widget action is used to invert the selection, I suspect you shall have a difficult time convincing the GIMP developers to add your concept of a "drawing zone" to the core and have it honored by all the paint tools.

-------- "It is amazing what you can accomplish if you do not care who gets the credit." -- Harry S. Truman

Thorsten Wilms
2007-01-17 16:00:00 UTC (almost 18 years ago)

Drawing zones

On Wed, Jan 17, 2007 at 06:36:27AM -0800, Saul Goode wrote:

Lets try another description:
Drawing zones would be like 2 or more non-overlapping selections that are active at the same time. Which one is applied to a drawing operation is determined by where the mouse/pen-down happens.

If the only difference is whether a mouse-click is used on the canvas or a keystroke/menu/widget action is used to invert the selection, I suspect you shall have a difficult time convincing the GIMP developers to add your concept of a "drawing zone" to the core and have it honored by all the paint tools.

No. First it's important that it's not an additional mouse-click. Not even a click, just where the button/pen-down happens if you start to draw.

If you work 10 hours + on an image, every click more or less counts. Especialy not having to think about any other operation but drawing is a big one.

Then it's not simply inversion, as there could be more than 2 zones.

Raphaël Quinet
2007-01-17 16:33:07 UTC (almost 18 years ago)

Drawing zones

On Wed, 17 Jan 2007 16:00:00 +0100, Thorsten Wilms wrote:

On Wed, Jan 17, 2007 at 06:36:27AM -0800, Saul Goode wrote:

If the only difference is whether a mouse-click is used on the canvas or a keystroke/menu/widget action is used to invert the selection, I suspect you shall have a difficult time convincing the GIMP developers to add your concept of a "drawing zone" to the core and have it honored by all the paint tools.

No. First it's important that it's not an additional mouse-click. Not even a click, just where the button/pen-down happens if you start to draw.

Keep in mind that what you are suggesting is a rather specialized use case. Even if the concept is interesting and would save you some time, it has a cost for all other GIMP users: menu clutter, additional stuff in the UI, etc. And of course there is also a cost for the developers, not only in implementing the feature but also in maintaining it and fixing bug reports releated to this new feature and its interaction with other current or future GIMP features.

So unless you can convince the developers that the concept of "Drawing Zones" would be useful for a significant percentage of GIMP users, you have to balance the advantages of that new feature with the (minor) disadvantages that it would cause to all other users.

It looks like the best solution in your case would be to use some keyboard shortcuts for switching quickly between layers: this would have a small cost for you without costing anything to anybody else.

If you work 10 hours + on an image, every click more or less counts. Especialy not having to think about any other operation but drawing is a big one.

On the other hand, if you work 10+ hours on an image and if you do that on a regular basis, then you could consider using some additional input device (e.g. MIDI controller) so that you can bind some of its controls to GIMP actions. I haven't checked what is really possible with cheap MIDI controllers, but you might be able to use a pedal or something like that and switch layers with your feet. :-)

-Raphaël

Thorsten Wilms
2007-01-17 18:03:18 UTC (almost 18 years ago)

Drawing zones

On Wed, Jan 17, 2007 at 01:26:07PM +0100, Thorsten Wilms wrote:

# The goal:
Draw on several areas of an image while maintaining sharp edges around each of them (in many cases they will touch, so before I talked about edges between them).
With the least amount of interruption!

# Drawing zones

# Stop lines

Thinking some more about this, a "switch to highest in the stack layer with non-zero alpha at pointer location", option, triggered on button/pen-down before drawing is actually executed could do the trick while been least intrusive in GIMP.

It would be a bit like the Pick_a_layer_or_guide option of the Move tool, allthough it might be of advantage to stay on the last painted on layer, not jumping back to the previous layer selection.

Joao S. O. Bueno Calligaris
2007-01-18 01:30:32 UTC (almost 18 years ago)

Drawing zones

Ok - I've read the request and got the idea.

I have the followwing proposal: what if one had a set of pre-loaded selections, and could switch back and forth among then with a single keystroke - Do you (and others) think it could be as usefull/more usefull/just the same as these proposed drawing zones?

Why do I ask this?
Because implementing what you are asking requires some fiddling in the core, and will complicate the interface with another kind of object, besides selections, channels, layers, masks, guides, sample points and the grid...

Ok, you can imagine that what it brings of convenience for some it brings of complication to certain user groups.

The idea I propose, instead, would use already existing objects, like this: one would store his drawing zones as a set of selections, each in a separate image channel, and a simple script, with no imput parameters, would replace the current selection with a selection in the channel stack.

Todo this manually, one would have to: 1) select the channel tab in the layers/channels dock 2) select the apropriate channel
3) click on "channel to selection"
4) change back to the layers tab on the dock 5) select the actyual layer where one is drawing back 6) start painting.

Looking at this, it si a lot of work, and the drawing zones seems a better idea.
However, a script fu can perform steps 1-5 with a single keystroke (if one will select the next/same/previous channel on the stack that has been previusly used). so it becomes: 1) hit key that changes teh selection until the desired selection is set
2) start painting

Which seems as practical as the drawing zones proposal.

There is a final advantage in this proposal: it is ready for serving _now_,a s writing such a script would take less than 30min.

What do you say?

js ->

On Tuesday 16 January 2007 20:54, David Gowers wrote:

On 1/17/07, Thorsten Wilms wrote:

Hi!

So I was asked to suggest new features on the mailing-list and only file bug report after they have been discussed there ... and it seems theres a misunderstanding to be resolved and i wouldn't mind more exposure for this ... :)

My proposal is about an alternative to using either layers or saved selections to draw on areas of an image with sharp edges between them.

http://bugzilla.gnome.org/attachment.cgi?id=80388

Shows a typical case, ignoring the background we have two such areas: body and hand.

Drawing zones are about dividing the image into 2 or more (non-overlapping) regions. These zones would be a bit like multiple selections. If you start drawing in one zone, you can't draw over another zone without releasing the mouse-button / lifting the pen (same effect as drawing outside of the current selection).

Such a feature would remove the need for using layers and moving between them
or constantly changing selections in cases where adjacent areas need sharp edges between them.

Using layers would mean constant switching between them. Same for selections. Long mouse-ways in both cases. Zones, once setup could be left active for long durations.

This has nothing to do with split-views, Sven, as the image is shown the same way, not in parts. You would just need marching ants or similar for the zone extents and the ability to hide them.

If it's still unclear, I'll provide graphical explanation.

http://bugzilla.gnome.org/show_bug.cgi?id=397237

This would be wonderfully useful to me for CGing. You would need to be able to define zones per-layer - It would only greatly reduce the need for layers, not obviate them completely, for example when I'm making an alternate coloration or remake of something, I like to paste it over the original as a new layer, and use the enter key to toggle it's visibility.

I think you would have to use saved selections rather than layers, to avoid the strange 'sibling-effects-sibling' behaviour (ie one layer is real, other is zonemasks, but they're both in the same list). If you specified a rule such as 'zonemasks are always the layer immediately above the layer they apply to, if the layer has zonemasks at all' you could probably manage layer based zonemasks (of course they're better cause they can be in color.)

David Gowers
2007-01-18 02:54:57 UTC (almost 18 years ago)

Drawing zones

On 1/18/07, Joao S. O. Bueno Calligaris wrote:

Ok - I've read the request and got the idea.

I have the followwing proposal: what if one had a set of pre-loaded selections, and could switch back and forth among then with a single keystroke - Do you (and others) think it could be as usefull/more usefull/just the same as these proposed drawing zones?

Why do I ask this? Because implementing what you are asking requires some fiddling in the core, and will complicate the interface with another kind of object, besides selections, channels, layers, masks, guides, sample points and the grid...

Ok, you can imagine that what it brings of convenience for some it brings of complication to certain user groups.

The idea I propose, instead, would use already existing objects, like this: one would store his drawing zones as a set of selections, each in a separate image channel, and a simple script, with no imput parameters, would replace the current selection with a selection in the channel stack.

Todo this manually, one would have to: 1) select the channel tab in the layers/channels dock 2) select the apropriate channel
3) click on "channel to selection"
4) change back to the layers tab on the dock 5) select the actyual layer where one is drawing back 6) start painting.

Looking at this, it si a lot of work, and the drawing zones seems a better idea.
However, a script fu can perform steps 1-5 with a single keystroke (if one will select the next/same/previous channel on the stack that has been previusly used). so it becomes: 1) hit key that changes teh selection until the desired selection is set
2) start painting

Which seems as practical as the drawing zones proposal.

There is a final advantage in this proposal: it is ready for serving _now_,a s writing such a script would take less than 30min.

What do you say?

js ->

That sounds good. It allows some sort of status display (make the active zone the only visible channel) and is flexible. It misses one of the values of binary, mutually-exclusive selections, though -- they can all be stored in
one channel, and if you decide a certain area should belong to a different zone, you only have to fill that area on one channel.

In Python, this is fairly simple to implement: * Name the channel like "10-Zonemap; Current: AA" (layertattoo-Zonemap; current: XX)

* The cycle op extracts the 'current' specifier (ranging 00-ff -- ie a pixel intensity in hex) and chooses the next unique value found in the channel. It loads the zonemap into the selection and thresholds it accordingly.
Then it updates the channel name: "10-Zonemap; Current: CC"

I want this, so I'll implement it today.

Manuel Quiñones
2007-01-18 06:57:30 UTC (almost 18 years ago)

Drawing zones

I've had a similar idea than yours, and implemented it right away. But instead of changing zones with keystrokes, the zone can be selected using the crosspoint of two perpendicular guides. I know this is ugly, and maybe your idea about changing to next/previous zone is better. Here it is:

http://www.box.net/public/arhs7a3h9m

I'm sorry but not direct link. I cannot register it to the gimp registry, because of http errors. And a fine tutorial:

http://wiki.gimp.org/gimp/DrawingZones

Regards, Manuel

2007/1/17, Joao S. O. Bueno Calligaris :

Ok - I've read the request and got the idea.

I have the followwing proposal: what if one had a set of pre-loaded selections, and could switch back and forth among then with a single keystroke - Do you (and others) think it could be as usefull/more usefull/just the same as these proposed drawing zones?

Why do I ask this? Because implementing what you are asking requires some fiddling in the core, and will complicate the interface with another kind of object, besides selections, channels, layers, masks, guides, sample points and the grid...

Ok, you can imagine that what it brings of convenience for some it brings of complication to certain user groups.

The idea I propose, instead, would use already existing objects, like this: one would store his drawing zones as a set of selections, each in a separate image channel, and a simple script, with no imput parameters, would replace the current selection with a selection in the channel stack.

Todo this manually, one would have to: 1) select the channel tab in the layers/channels dock 2) select the apropriate channel
3) click on "channel to selection"
4) change back to the layers tab on the dock 5) select the actyual layer where one is drawing back 6) start painting.

Looking at this, it si a lot of work, and the drawing zones seems a better idea.
However, a script fu can perform steps 1-5 with a single keystroke (if one will select the next/same/previous channel on the stack that has been previusly used). so it becomes: 1) hit key that changes teh selection until the desired selection is set
2) start painting

Which seems as practical as the drawing zones proposal.

There is a final advantage in this proposal: it is ready for serving _now_,a s writing such a script would take less than 30min.

What do you say?

js ->

On Tuesday 16 January 2007 20:54, David Gowers wrote:

On 1/17/07, Thorsten Wilms wrote:

Hi!

So I was asked to suggest new features on the mailing-list and only file bug report after they have been discussed there ... and it seems theres a misunderstanding to be resolved and i wouldn't mind more exposure for this ... :)

My proposal is about an alternative to using either layers or saved selections to draw on areas of an image with sharp edges between them.

http://bugzilla.gnome.org/attachment.cgi?id=80388

Shows a typical case, ignoring the background we have two such areas: body and hand.

Drawing zones are about dividing the image into 2 or more (non-overlapping) regions. These zones would be a bit like multiple selections. If you start drawing in one zone, you can't draw over another zone without releasing the mouse-button / lifting the pen (same effect as drawing outside of the current selection).

Such a feature would remove the need for using layers and moving between them
or constantly changing selections in cases where adjacent areas need sharp edges between them.

Using layers would mean constant switching between them. Same for selections. Long mouse-ways in both cases. Zones, once setup could be left active for long durations.

This has nothing to do with split-views, Sven, as the image is shown the same way, not in parts. You would just need marching ants or similar for the zone extents and the ability to hide them.

If it's still unclear, I'll provide graphical explanation.

http://bugzilla.gnome.org/show_bug.cgi?id=397237

This would be wonderfully useful to me for CGing. You would need to be able to define zones per-layer - It would only greatly reduce the need for layers, not obviate them completely, for example when I'm making an alternate coloration or remake of something, I like to paste it over the original as a new layer, and use the enter key to toggle it's visibility.

I think you would have to use saved selections rather than layers, to avoid the strange 'sibling-effects-sibling' behaviour (ie one layer is real, other is zonemasks, but they're both in the same list). If you specified a rule such as 'zonemasks are always the layer immediately above the layer they apply to, if the layer has zonemasks at all' you could probably manage layer based zonemasks (of course they're better cause they can be in color.)

David Gowers
2007-01-18 07:43:20 UTC (almost 18 years ago)

Drawing zones

On 1/18/07, Manuel Quiñones wrote:

I've had a similar idea than yours, and implemented it right away. But instead of changing zones with keystrokes, the zone can be selected using the crosspoint of two perpendicular guides. I know this is ugly, and maybe your idea about changing to next/previous zone is better. Here it is:

http://www.box.net/public/arhs7a3h9m

I'm sorry but not direct link. I cannot register it to the gimp registry, because of http errors. And a fine tutorial:

http://wiki.gimp.org/gimp/DrawingZones

Regards, Manuel

That gives me an idea: Sample points are probably quite appropriate to use here. We just need a PDB interface to access them.

My implementation of my idea is attached. It ISN'T a plugin, it's just a module that can be copy+pasted into a plugin. (or in my case, imported. I have written >360k of libraries for pygimp so I set up PyGimp to be able to find them)

Sven Neumann
2007-01-18 07:56:47 UTC (almost 18 years ago)

Drawing zones

Hi,

On Wed, 2007-01-17 at 18:03 +0100, Thorsten Wilms wrote:

Thinking some more about this, a "switch to highest in the stack layer with non-zero alpha at pointer location", option, triggered on button/pen-down before drawing is actually executed could do the trick while been least intrusive in GIMP.

This is to some extent already handled in http://bugzilla.gnome.org/show_bug.cgi?id=86274

Sven

Manuel Quiñones
2007-01-18 08:25:51 UTC (almost 18 years ago)

Drawing zones

I've had a similar idea than yours, and implemented it right away. But instead of changing zones with keystrokes, the zone can be selected using the crosspoint of two perpendicular guides. I know this is ugly, and maybe your idea about changing to next/previous zone is better. Here it is:

http://www.box.net/public/arhs7a3h9m

I'm sorry but not direct link. I cannot register it to the gimp registry, because of http errors. And a fine tutorial:

http://wiki.gimp.org/gimp/DrawingZones

Regards, Manuel

2007/1/17, David Gowers :

On 1/18/07, Joao S. O. Bueno Calligaris wrote:

Ok - I've read the request and got the idea.

I have the followwing proposal: what if one had a set of pre-loaded selections, and could switch back and forth among then with a single keystroke - Do you (and others) think it could be as usefull/more usefull/just the same as these proposed drawing zones?

Why do I ask this? Because implementing what you are asking requires some fiddling in the core, and will complicate the interface with another kind of object, besides selections, channels, layers, masks, guides, sample points and the grid...

Ok, you can imagine that what it brings of convenience for some it brings of complication to certain user groups.

The idea I propose, instead, would use already existing objects, like this: one would store his drawing zones as a set of selections, each in a separate image channel, and a simple script, with no imput parameters, would replace the current selection with a selection in the channel stack.

Todo this manually, one would have to: 1) select the channel tab in the layers/channels dock 2) select the apropriate channel
3) click on "channel to selection"
4) change back to the layers tab on the dock 5) select the actyual layer where one is drawing back 6) start painting.

Looking at this, it si a lot of work, and the drawing zones seems a better idea.
However, a script fu can perform steps 1-5 with a single keystroke (if one will select the next/same/previous channel on the stack that has been previusly used). so it becomes: 1) hit key that changes teh selection until the desired selection is set
2) start painting

Which seems as practical as the drawing zones proposal.

There is a final advantage in this proposal: it is ready for serving _now_,a s writing such a script would take less than 30min.

What do you say?

js ->

That sounds good. It allows some sort of status display (make the active zone the only visible channel) and is flexible. It misses one of the values of binary, mutually-exclusive selections, though -- they can all be stored in
one channel, and if you decide a certain area should belong to a different zone, you only have to fill that area on one channel.

In Python, this is fairly simple to implement: * Name the channel like "10-Zonemap; Current: AA" (layertattoo-Zonemap; current: XX)

* The cycle op extracts the 'current' specifier (ranging 00-ff -- ie a pixel intensity in hex) and chooses the next unique value found in the channel. It loads the zonemap into the selection and thresholds it accordingly.
Then it updates the channel name: "10-Zonemap; Current: CC"

I want this, so I'll implement it today.

Thorsten Wilms
2007-01-18 09:45:55 UTC (almost 18 years ago)

Drawing zones

On Wed, Jan 17, 2007 at 10:30:32PM -0200, Joao S. O. Bueno Calligaris wrote:

I have the followwing proposal:
what if one had a set of pre-loaded selections, and could switch back and forth among then with a single keystroke - Do you (and others) think it could be as usefull/more usefull/just the same as these proposed drawing zones?

Useful, yes. Just the same no. You need to explicitly switch and keep track of the order of selections to navigate efficiently.

Ok, you can imagine that what it brings of convenience for some it brings of complication to certain user groups.

Well, I think drawing zones could have a tab like layers and co, so the feature could stay completely hidden if someone wishes so.

The idea I propose, instead, would use already existing objects, like this: one would store his drawing zones as a set of selections, each in a separate image channel, and a simple script, with no imput parameters, would replace the current selection with a selection in the channel stack.

Todo this manually, one would have to: 1) select the channel tab in the layers/channels dock 2) select the apropriate channel
3) click on "channel to selection"
4) change back to the layers tab on the dock 5) select the actyual layer where one is drawing back 6) start painting.

Looking at this, it si a lot of work, and the drawing zones seems a better idea.
However, a script fu can perform steps 1-5 with a single keystroke (if one will select the next/same/previous channel on the stack that has been previusly used). so it becomes: 1) hit key that changes teh selection until the desired selection is set
2) start painting

Which seems as practical as the drawing zones proposal.

There is a final advantage in this proposal: it is ready for serving _now_,a s writing such a script would take less than 30min.

What do you say?

It's just not the same, but cool nonetheless and I'm glad my proposal has led to thinking and experimentation and propably useful scripts :)

--
Thorsten Wilms

Thorwil's Creature Illustrations: http://www.printfection.com/thorwil

Thorsten Wilms
2007-01-18 09:54:08 UTC (almost 18 years ago)

Drawing zones

On Thu, Jan 18, 2007 at 02:57:30AM -0300, Manuel Quiñones wrote:

I've had a similar idea than yours, and implemented it right away. But instead of changing zones with keystrokes, the zone can be selected using the crosspoint of two perpendicular guides. I know this is ugly, and maybe your idea about changing to next/previous zone is better. Here it is:

(...)

http://wiki.gimp.org/gimp/DrawingZones

I like the idea of using a layer and a palette to draw the zones. Even though I talked about hard edges, I (and everyone else drawing) need anti-aliased ones in almost all cases :}

The selection via 2 guides isn't practical, of course. I understand why you do it for now, lets hope there will be a solution.

-- Thorsten Wilms

Thorwil's Creature Illustrations: http://www.printfection.com/thorwil

Thorsten Wilms
2007-01-18 10:10:21 UTC (almost 18 years ago)

Drawing zones

On Thu, Jan 18, 2007 at 07:56:47AM +0100, Sven Neumann wrote:

Hi,

On Wed, 2007-01-17 at 18:03 +0100, Thorsten Wilms wrote:

Thinking some more about this, a "switch to highest in the stack layer with non-zero alpha at pointer location", option, triggered on button/pen-down before drawing is actually executed could do the trick while been least intrusive in GIMP.

This is to some extent already handled in http://bugzilla.gnome.org/show_bug.cgi?id=86274

If I understand the whole thread, it's about another way to select any layer, not only one that has highest z-order and non-zero alpha at a specific location (pointer).

[Anyway, this made me think about showing layers as tabs on the image window or doing Apple Expose style thumbnailing or the variation of it in MS Vista.]

-- Thorsten Wilms

Thorwil's Creature Illustrations: http://www.printfection.com/thorwil

David Gowers
2007-01-18 10:34:28 UTC (almost 18 years ago)

Drawing zones

On 1/18/07, Thorsten Wilms wrote:

On Thu, Jan 18, 2007 at 02:57:30AM -0300, Manuel Quiñones wrote:

I've had a similar idea than yours, and implemented it right away. But instead of changing zones with keystrokes, the zone can be selected using the crosspoint of two perpendicular guides. I know this is ugly, and maybe your idea about changing to next/previous zone is better. Here it is:

(...)

http://wiki.gimp.org/gimp/DrawingZones

I like the idea of using a layer and a palette to draw the zones. Even though I talked about hard edges, I (and everyone else drawing) need anti-aliased ones in almost all cases :}

Well, the simple case of that is easily done -- I just inserted two lines in my zonemap tool that automatically antialias the zone mask using potrace. I think that repeatedly drawing in a non-binary selection is a mistake, though -- layer masks or 'preserve layer alpha' do it better.

I rarely ever use antialiased selections for drawing, only exclusively for fills (either color fills, alpha-clearing fills, or editing layer masks). Drawing into AAed selections makes selecting objects a no-win (ie. cannot get a perfect result, because the colors along the edges are uncontrolled) situation, and dirties colors.

In fact, the best simple solution could be to copy selection masks onto layer masks. Like, you have a 'painting' layer, and when you change zones: 1. Any changes are saved onto the underlying layer 2. The entire content of the underlying layer is copied to the paint layer
3. The layer mask is copied from the next zone-mask (channel)

This would play well with my 'apply paint' plugin, which applies any paint on a layer (specially marked by name, beginning with the character '+') to the underlying layer and then clears it to a neutral color.

Thorsten Wilms
2007-01-18 11:21:58 UTC (almost 18 years ago)

Drawing zones

On Thu, Jan 18, 2007 at 08:04:28PM +1030, David Gowers wrote:

I like the idea of using a layer and a palette to draw the zones. Even though I talked about hard edges, I (and everyone else drawing) need anti-aliased ones in almost all cases :}

Well, the simple case of that is easily done -- I just inserted two lines in my zonemap tool that automatically antialias the zone mask using potrace. I think that repeatedly drawing in a non-binary selection is a mistake, though -- layer masks or 'preserve layer alpha' do it better.

I rarely ever use antialiased selections for drawing, only exclusively for fills (either color fills, alpha-clearing fills, or editing layer masks). Drawing into AAed selections makes selecting objects a no-win (ie. cannot get a perfect result, because the colors along the edges are uncontrolled) situation, and dirties colors.

I usually work with a bunch of alpha-locked layers (paint shape in flat-colour, lock alpha, paint shadows, light, texture ...)

I guess the perfect zone implementation would actualy need some overlap to have the same effect of alpha-locked layers.

In fact, the best simple solution could be to copy selection masks onto layer masks. Like, you have a 'painting' layer, and when you change zones: 1. Any changes are saved onto the underlying layer 2. The entire content of the underlying layer is copied to the paint layer
3. The layer mask is copied from the next zone-mask (channel)

This would play well with my 'apply paint' plugin, which applies any paint on a layer (specially marked by name, beginning with the character '+') to the underlying layer and then clears it to a neutral color.

In short, drawing zones happening on the level of layer masks?

Another model I thought about would require a graph, so I guess it's really a bit far out for GIMP: Having a layer/node for compositing drawing layers/nodes. It would be like a free-form multi-split view on a number of layers. Drawing starting in one zone of the view and continuing the stroke outside of it could paint on the underlying layer/node, maintaining the advantage that using layers has now: you can draw below a layer and later change the shape of an upper layer without having to fill a gap.

David Gowers
2007-01-18 11:41:42 UTC (almost 18 years ago)

Drawing zones

On 1/18/07, Thorsten Wilms wrote:

I usually work with a bunch of alpha-locked layers (paint shape in flat-colour,
lock alpha, paint shadows, light, texture ...)

I guess the perfect zone implementation would actualy need some overlap to have the same effect of alpha-locked layers.

In fact, the best simple solution could be to copy selection masks onto

layer masks. Like, you have a 'painting' layer, and when you change

zones:

1. Any changes are saved onto the underlying layer 2. The entire content of the underlying layer is copied to the paint layer
3. The layer mask is copied from the next zone-mask (channel)

This would play well with my 'apply paint' plugin, which applies any

paint

on a layer (specially marked by name, beginning with the character '+')

to

the underlying layer and then clears it to a neutral color.

In short, drawing zones happening on the level of layer masks?

Drawing zones happening by layer masks. This would allow you to decrease the total layer count needed while maintaining cleanness.

Another model I thought about would require a graph, so I guess

it's really a bit far out for GIMP: Having a layer/node for

Ehe, have you poked around with the GEGL editor at all? As GIMP begins to use GEGL more and more, there are various almost 'free' features that would be a side effect of using GEGL:

Graph based image model (most likely shown as a simplification of the underlying GEGL graph), hence Layer grouping also. Adjustment layers

Those are the most relevant features. I've heard that the painting system would also be GEGL-based, so what you describe below may be possible (though it would probably be after 2.6 at the least.)

compositing drawing layers/nodes. It would be like a free-form

multi-split view on a number of layers. Drawing starting in one zone of the view and continuing the stroke outside of it could paint on the underlying layer/node, maintaining the advantage that using layers has now: you can draw below a layer and later change the shape of an upper layer without having to fill a gap.

What you describe is not exactly a graph -- because the destination is variable. I can think of a design with a few additional nodes that would make it work though.

Sven Neumann
2007-01-18 16:20:45 UTC (almost 18 years ago)

Drawing zones

Hi,

On Thu, 2007-01-18 at 10:10 +0100, Thorsten Wilms wrote:

http://bugzilla.gnome.org/show_bug.cgi?id=86274

If I understand the whole thread, it's about another way to select any layer, not only one that has highest z-order and non-zero alpha at a specific location (pointer).

No, it's explicitely about making it easier to select one of the layers below the mouse pointer. That could probably be extended to selecting the one with the highest z-order.

Sven

Manuel Quiñones
2007-01-20 01:23:23 UTC (almost 18 years ago)

Drawing zones

2007/1/18, Thorsten Wilms :

On Thu, Jan 18, 2007 at 02:57:30AM -0300, Manuel Quiñones wrote:

I've had a similar idea than yours, and implemented it right away. But instead of changing zones with keystrokes, the zone can be selected using the crosspoint of two perpendicular guides. I know this is ugly, and maybe your idea about changing to next/previous zone is better. Here it is:

(...)

http://wiki.gimp.org/gimp/DrawingZones

I like the idea of using a layer and a palette to draw the zones. Even though I talked about hard edges, I (and everyone else drawing) need anti-aliased ones in almost all cases :}

You are right. It's trivial to add anti-aliasing zones, and I'll add them for the next release.

Also it will be better to get rid of the palette, but I found no method to automatically get the basic colors from a layer. This can be done interactively using Import Palette with an image, and setting "number of colors" option to the number of zones. Doing that I get a palette with the basic colors of the layer. Anyone knows a scriptable method for this?

The selection via 2 guides isn't practical, of course. I understand why you do it for now, lets hope there will be a solution.

Yes. However, I'm planning to add functions to go to the next/previous zone as Joao and David said.

PD: I know this kind of discussion may bother developers, and I understand you are leading to a major release for us all. So, why not open a mailing list dedicated to gimp-scripting? I ask questions about scripting in the gimp-users mailing list, but they may sound too technical for normal users.

Regards, Manuel
- Ocultar texto citado -

--
Thorsten Wilms

Thorwil's Creature Illustrations: http://www.printfection.com/thorwil

Sven Neumann
2007-01-21 12:04:39 UTC (almost 18 years ago)

Drawing zones

Hi,

On Fri, 2007-01-19 at 21:23 -0300, Manuel Quiñones wrote:

PD: I know this kind of discussion may bother developers, and I understand you are leading to a major release for us all. So, why not open a mailing list dedicated to gimp-scripting? I ask questions about scripting in the gimp-users mailing list, but they may sound too technical for normal users.

IMO it's fine to discuss scripting here. If another mailing-list was created, I would have to monitor it anyway and I would expect other developers to do that as well.

Sven