Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Performing a Clone stamp on multiple layers at the same time
#1
I am trying to work out the best way to use clone stamp to make changes to multiple layers of an image at the same time.

I have a project that has 5 layers each layer is a different part of a PBR texture, top layer is an albedo map, then I have a normal map, height map etc...
I am trying to make changes to each layer at the same time using the clone stamp, the goal here is to perform standard clone stamp operations but have the exact same clone stamp changes applied to all the layers at the same time.

In addition it would be good to be able to preview the image that I am editing as a tiled image.

what is the quickest most flexible way to do this kind of work?

Thanks
Reply
#2
(04-17-2021, 11:21 AM)Rathe Wrote: I am trying to work out the best way to use clone stamp to make changes to multiple layers of an image at the same time.

I have a project that has 5 layers each layer is a different part of a PBR texture, top layer is an albedo map, then I have a normal map, height map etc...
I am trying to make changes to each layer at the same time using the clone stamp, the goal here is to perform standard clone stamp operations but have the exact same clone stamp changes applied to all the layers at the same time.

In addition it would be good to be able to preview the image that I am editing as a tiled image.

what is the quickest most flexible way to do this kind of work?

Thanks
  • Make the clone stamp on a separate new layer above the top layer
  • Make duplicates of that layer, move over each other layer and merge down (if necessary). You can automate that step using my ofn-interleave-layers script, but for 5 layers it might not be worth it.
Edit: missed the tiles, so:
  • Use my ofn-layer-tiles to make a big layer where your layers are tiles
  • Start the "symmetry painting" dialog Windows ➤ Dockable dialogs ➤ Symmetry painting
  • Set the the Symmetry to Tile mode and enter the size of your layers
  • Now use the Clone tool on any of the  tiles, the painting will be replicated on the rest
  • When done use ofn-layer-tiles to split the big layer into layers again.
The two scripts are available here.
Reply
#3
(04-17-2021, 12:34 PM)Ofnuts Wrote:
(04-17-2021, 11:21 AM)Rathe Wrote: I am trying to work out the best way to use clone stamp to make changes to multiple layers of an image at the same time.

I have a project that has 5 layers each layer is a different part of a PBR texture, top layer is an albedo map, then I have a normal map, height map etc...
I am trying to make changes to each layer at the same time using the clone stamp, the goal here is to perform standard clone stamp operations but have the exact same clone stamp changes applied to all the layers at the same time.

In addition it would be good to be able to preview the image that I am editing as a tiled image.

what is the quickest most flexible way to do this kind of work?

Thanks
  • Make the clone stamp on a separate new layer above the top layer
  • Make duplicates of that layer, move over each other layer and merge down (if necessary). You can automate that step using my ofn-interleave-layers script, but for 5 layers it might not be worth it.
Edit: missed the tiles, so:
  • Use my ofn-layer-tiles to make a big layer where your layers are tiles
  • Start the "symmetry painting" dialog Windows ➤ Dockable dialogs ➤ Symmetry painting
  • Set the the Symmetry to Tile mode and enter the size of your layers
  • Now use the Clone tool on any of the  tiles, the painting will be replicated on the rest
  • When done use ofn-layer-tiles to split the big layer into layers again.
The two scripts are available here.

Could you perhaps elaborate a little further? I am having the same issue (minus the tiling part, I just want to repeat the clone operation for each layer). However, I do not understand what you mean by making the clone stamp on a separate layer. A separate layer is just empty and nothing happens when anything is cloned there, right?
Reply
#4
Painting directly on a layer, or painting on a transparent layer above it in "Normal" mode, gives exactly the same result.

So the idea here is that instead of painting directly on one of the layers (because cloning is still painting), you clone to a new transparent layer above one your layers. Then, when done with that first layer, you replicate this clone layer, and put each copy above each of the other layers, thus replicating the painting operation on each layer.

The other technique that uses symmetry painting puts all your layers side by side as a big layer, and sets up the symmetry painting so that the replication happens in real time on all layers, whatever the layer you are actually painting on. And when done you break up the set up to recover your individual layers.
Reply
#5
I think I have now understood what you mean. Could it be that you have not entirely understood what Rathe and I are trying to achieve? If I have followed your steps correctly, then the clone operation is replicated, but always with the same source. As Rathe has said, we are trying to modify multiple parts of a PBR material (albedo, normal maps and so on). Therefore, we need to change all of the layers in the same way - but with each layer being its own source and not one layer being the source for all of them. I have attached two images, one where a single layer is used as source and one where the correct layer is used (these examples are drawn by hand and therefore not correct - they only server for visualization). Please note that drawing by hand is not an option - the clone has to replicated in a pixel-perfect way or the textures can not be used in materials anymore.


Attached Files Thumbnail(s)
       
Reply
#6
Yes, I didn't get the multiple source requirement.

So a totally different technique:

  1. Copy what would have been the clone source layer over the target layer
  2. Add a layer mask, fill with black (transparent)
  3. Paint the mask in white where you would have cloned
  4. When done on the first layer, do the same on other layers, but instead of painting the mask again, just re-use the mask of the first layer (on first layer Mask to Selection, on other layers: Initialize mask from selection ). merge down if necessary.
   


(layers shown side by side)
   

Example done on a black backdrop but this could just as well be target images.

See attached XCF.


Attached Files
.xcf   ClonedMasks.xcf (Size: 421.2 KB / Downloads: 95)
Reply


Forum Jump: