I would like to add halftone to fill in stroke areas without using texture.
I know it can be done for shading material, can it be done in grease pencil fill in tool?
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.Sign up to join this community
Unfortunately it is not possible to use procedural textures in Grease Pencil fills. I read that is is planned but definitely not a priority right now.
When I needed to use hatches for Grease Pencil objects I created a script to automatically populate Textures with different hatch patterns (Squares, Bands, Discs). It could be expanded to add other patterns. Maybe this can help :
""" Running this script will create arrays of images Which can then be used as "Textures" in Grease Pencil materials Each array features varying sizes of shapes Currently there are Disc, Squares and Stripes. """ import bpy def generate_img_shape(size, name, is_in_shape): image = bpy.data.images.get(name) if image is None: image = bpy.data.images.new(name, width=size, height=size) else: image.generated_width = size image.generated_height = size image.file_format = 'PNG' pixels = [None] * (size * size) for x in range(size): for y in range(size): pixels[(y * size) + x] = is_in_shape(x, y) pixels = [v for v in pixels for _ in range(4)] image.pixels = pixels if __name__ == "__main__": size = 150, 150 middle_x = size / 2 middle_y = size / 2 # Generate patterns with 10%, 20%, 30%, 40% and 49% fill : for rad, rad_size in zip((0.1, 0.2, 0.3, 0.4, 0.49), ("10", "20", "30", "40", "50")): radius_squared = (rad * min(size, size)) ** 2 # Disc patterns : generate_img_shape(size, "GP_HATCH_DISC_" + rad_size + ".png", lambda x, y: int(((x - middle_x) ** 2 + (y - middle_y) ** 2) < radius_squared)) # Square patterns : generate_img_shape( size, "GP_HATCH_SQUARE_" + rad_size + ".png", lambda x, y: int( (x - middle_x) ** 2 < radius_squared and (y - middle_y) ** 2 < radius_squared ) ) # Band patterns : generate_img_shape( size, "GP_HATCH_BAND_" + rad_size + ".png", lambda x, y: int( (x - middle_x) ** 2 < radius_squared ) )
Note : You may need to run the script twice for the textures to register properly. No idea why but it may be an oversight in my script.
Note 2 : You have to be in Material Preview or Rendered Mode to see the Textures.