Reference Images Tool
Open, WishlistPublic

Description

The current reference images docker has problems:

  • the images are not saved with the kra document, so you cannot have a set of references associated with your document
  • if there's an image a QImageIO plugin crashes on in the current folder for the reference images docker, krita crashes on startup
  • the file management sucks
  • zooming and panning doesn't work like on the canvas
  • the image is constrained to a docker, so it isn't shown near where you want to draw

I propose to replace the docker with a reference images tool. The tool would manage reference images places on the workspace. Reference images (or filesnames) would be saved with the .kra file.

  • Dropping an image on the canvas would add an extra option to the drop menu (add as reference image)
  • The tool would allow
    • adding images
    • moving images
    • scaling images
    • rotating images
    • removing images
    • adjust opacity and saturation of the images
  • Krita should save the images with the document. The user should be able to select to save the image itself in the .kra file, or a file path. Images can be placed anywhere on the workspace, relative to the image, so the gray area outside the image is usable as well.
  • The color picker should pick colors from the reference images
  • When the document is scaled or cropped the reference images should scale and translate appropriately

Open questions

  1. Should references and assistants be available to users as layers (similar to global selection)?: No
rempt created this task.Apr 3 2017, 12:56 PM
rempt updated the task description. (Show Details)
woltherav triaged this task as Wishlist priority.Apr 3 2017, 12:58 PM
deburger added a subscriber: deburger.EditedMay 30 2017, 9:48 AM

There have to be some way to crop images. I like the way Kuadro handle all this. https://goo.gl/KK2ho1

And just few thoughts about saving all this images.
What if we can save reference settings in a separated file like *.kref or something, to have possibility open same compilation of images in different working documents? Could be very useful while working on big projects where references are mostly the same for every image you creating.

rempt added a comment.May 30 2017, 9:49 AM

I don't know about Kuadro? The other idea sounds interesting -- we have something similar for assistants already.

In T5805#95906, @rempt wrote:

I don't know about Kuadro?

https://goo.gl/KK2ho1

woltherav added a subscriber: woltherav.

Someone asked for a grid to be possibly overlaid on top of the reference so they can eyeball-measure it.

Just wanted to note it here:

The easiest way to implement a reference images overlay is to use our implementation of vector objects in flake. We have ImageShape and we have DefaultTool, which support everything we need for references management, like move, scale and transform.

To implement such the tool, one has two approaches:

  1. Make a separate hierarchy of KoShapeBasedDocumentBase (reimplement), KoShapeController and KoShapeManager in the decoration class and point DefaultTool to it
  2. Don't create a separate KoShapeBasedDocumentBase, but implement an additional KoShapeLayer (like is it done in KisShapeLayer) with its own shape manager. The rendering in the decoration will happen with a usual KoShapeManager, like it is done in KisShapeLayer. We should just make sure the clipping in QPainter is set correctly to be able to paint outside the image.
jounip claimed this task.Nov 23 2017, 6:08 PM
jounip updated the task description. (Show Details)
jounip edited projects, added Krita: Next Features; removed Krita: Abyss.
rempt updated the task description. (Show Details)Nov 24 2017, 1:38 PM
januz added a subscriber: januz.Nov 24 2017, 4:48 PM

I tried the image reference tool for a while, have a couple of thoughts about it, I know is in early state, thus my comment is also taking in account the description in this task.

  • Images on canvas, is nice, but it comes with some possible disadvantages, thus "constrained to a docker" as a problem, may not be totally accurate as dockers can be place anywhere in the window on different workspace layout, when the image is on the canvas, the image moves along with it, as long as we paint 1:1, there is no problem, but I'm suspecting I'm not along in a workflow where we constantly pan/zoom the canvas, thus images are often out of sight.

I'm not sure if the proposition of "When the document is scaled or cropped the reference images should scale and translate appropriately" means that the image will stay in place regarding of pan/zooming the canvas.

I think the images should be "pinned" and not directly affected by canvas manipulations as it happens right now.

  • The undo/redo history is affected by the placement and manipulation of the images, I think this is counterproductive as such actions has little to do with the art worked on, creating possible conflict between them if for example maximum amount of undo steps are reached, manipulating the reference image may unintentionally destroy some history unaware to the user. This is most highlighted when the above behavior is present as one may have to move the images as we zoom/pan the canvas, interpolating those steps with the drawing ones.

I'm understanding that the RI tool is a svg tool? that seems clever as it does many of the propositions and cover most of the needs of references, I'm not sure if my previous concerns are part of the limitations of the tool itself. As for the overall performance, it seems very robust to me, a couple of contextual menu bugged entries, but mostly functional. I'm sorry if I jumped into conclusions, I'm looking forward to use this tool.

rempt added a comment.Mar 28 2018, 9:22 AM

I agree that the reference images tool shouldn't affect the undo/redo stack. I think they should zoom with the canvas, though.

In T5805#135208, @rempt wrote:

I agree that the reference images tool shouldn't affect the undo/redo stack. I think they should zoom with the canvas, though.

maybe in the options you could "pin" the image

like have 3 options
zoom
rotation
position

if you check these it will be like normal

if you uncheck rotation,rotation of the canvas wont rotate the reference
if you uncheck position,the reference remains in place (if you want it in the same place always)
if you uncheck zoom it will be same size always regardless of zoom

There are sometimes moments you want to zoom but i can imagine plenty of times when you dont want to do this
If you can pin an image too you wont need to reset it every time as well.

Bollebib added a comment.EditedMar 28 2018, 9:35 AM

As a seperate wish i also would like a 'crop" function

Blender has this i believe for reference images
where you can import a large image horizontal image with 3 characters on it, input a parameter

for example : crop off 250 pixels on the left ,30 on the bottom

to have ultimatly a smaller image

When working you dont always have your own files and need to work with references of other people on your team, being able to crop quickly would just save time.

alternatively you could do a mask selection of some sort? paint or lasso select what you want shown,but this might be getting too much

(i'm brainstorming a bit,i like to write down what i think about or else i forget ^^)

rjquiralta added a comment.EditedApr 5 2018, 6:12 PM

maybe in the options you could "pin" the image

like have 3 options ...

Bollebib had a better explanation of what I tried to say with the zooming/rotating/panning : ) still not sure how doable (code wise) is.

On a side note, I wonder how useful could be (and whether is possible) to have a "view" toggle mode, just like the layers, where clicking a button (like the eye icon) on the tools options panel, will hide all references, for quick "clean" canvas. Just another Idea.

Edit: Just realized the functionality is there (with the shortcut), Thus the idea would be only to add a button to toggle it.

I've used the new reference tool for quite some time now. And actually like that it gets affected by the canvas change which is very nice when the users does photo studies. But I can understand that this isn't a behavior not everybody wants.

At the moment I manually crop my references in a new Krita document, but making it possible with the tool would be awesome, non destructive like the Transform masks.