0
$\begingroup$

I am trying to import PNG images into the grease pencil. I want the images to remain in PNG format and not convert them to vector.

I figured out I can do it like this: draw a box shape in grease pencil And then in Material Properties I select Fill -> Style -> Texture -> Open image.

Then the image appears on the box shape, but it is seemingly randomly deformed, and I have to adjust the scale and location to have the image properly displayed. After that I go back into Edit Mode and adjust the size of the box shape so it will fit the image.

I was wondering if there is a more efficient way to do this. Or if there no other way, can I automate this process this with a script?

animation character rigs

Some more details for if you are wondering why I want to do this: I have a drawn characters on paper. The characters all have multiple parts (head, body, arms, legs etc.) I've rigged these characters in blender. The reason why I want the images in grease pencil format is because with grease pencil I can use a TimeOffset modifier to use replacement parts. For example in this way I can replace a stretched arm with a bend arm, or replace a happy facial expression with an angry expression.

$\endgroup$

1 Answer 1

0
$\begingroup$

I don't know of a faster way to do this. However, if what you are interested is being able to swap between images, you can do this using a regular textured mesh. Which can be done easily using the addon Import Images as Planes:

First enable the addon:

addon

Then go to the Import menu:

import

Select your target file(s) and set your preferences before importing:

Import prefs

You should enable Animate Image Sequence to force making an image sequence node, and maybe also Shadeless material setting to have the image displayed as is without reflections and other shading effects.

You will end up with a mesh plane with this node inside its material:

shader

This is what reads your pictures as sequence. To be able to manually choose which frame of the sequence to display, set the Frames and Start Frame to 1, and use the Offset as your frame selector. You can also key the Offset by hovering it with your mouse cursor and pressing I.

If you need to animate this, make sure the keyframes' interpolation is set to Constant by going in any animation editor, selecting the Offset's keys, pressing T and choosing Constant:

constant interp

This way, there will be no value change between each key.

Do keep in mind that, by default, animation editors only show the keys of selected elements. So you need to select that node to see its keys. Or, you can disable the selection display filter by unchecking this button in the Graph or Dopesheet editors' headers:

display only selected

$\endgroup$
2
  • $\begingroup$ Aah, this is a much better solution. I tried importing the images as planes before, but I didn't realise there was a way to control which frame is displayed in the image sequence. I really appreciate you taking the time to reply so extensively! Thank you, L0Lock! :) $\endgroup$
    – aap
    Commented Nov 3, 2022 at 13:21
  • $\begingroup$ My pleasure, glad it could help. Though I'd love if this was possible in GP with simpler tools, so that we can profit of the GP modifiers with transparency awareness. $\endgroup$
    – Lauloque
    Commented Nov 3, 2022 at 18:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .