Skip to content

Blender 4.5 LTS: Grease Pencil

Rendering

  • Added a new "Grease Pencil" render pass. The pass can be enabled in the View Layer properties under "Passes" > "Data" > "Grease Pencil" (b05b0f413c).

    Limitations

    The Grease Pencil pass doesn't render occluded Grease Pencil geometry. Using an "Alpha Over" with the Grease Pencil pass, one can recreate the final image. There is one exception where this will not result in the same image. If any of the Grease Pencil layers use a blending mode that changes the chromaticity of the alpha channel, the resulting image might no longer be identical to the "Combined" pass.

  • Added an option to filter out Grease Pencil rendering per viewlayer. The option can be found in the View Layer properties under "Filter" > "Include" > "Grease Pencil" (1f4cae0c46).
  • Added a new supersampling anti-aliasing (SSAA) method for rendering. (299a581b1b)

    The current subpixel morphological anti-aliasing (SMAA) method is still used for the viewport and final render but now can be controlled independently with two different settings (Grease Pencil > Viewport > SMAA Threshold and Grease Pencil > Render > SMAA Threshold).

    The SSAA sample count can be controlled with the Grease Pencil > Render > SSAA Samples render setting. Note that the SSAA filter size is the same as the Film > Filter Size render setting.

    Overall, the new SSAA method produces better Grease Pencil line quality. Here is a comparison between the current method (SMAA) and the new SSAA method. Using both methods together is also possible (for final rendering), but might cause overblurring.

    SMAA (threshold = 1.0) SSAA (samples = 8) SMAA + SSAA
    Credits: Will Goen (images are scaled by 300% to better show the effect).

    Both SMAA and SSAA have pros and cons. In this simple example, there are Grease Pencil objects mixed with Mesh objects. When Grease Pencil objects appear behind Mesh objects, the renderer composites them together using the depth buffer. The current SMAA method can reduce aliasing artifacts at these edges where the objects overlapp. The SSAA method can't, but produces higher quality anti-aliasing for Grease Pencil objects. When both methods are used together, both kinds of aliasing can be mitigated. But note that this might result in overblurred Grease Pencil strokes.

    SMAA SSAA SMAA + SSAA
    Images are scaled by 800% to better show the effect.

    Increasing the SSAA sample count comes at a slight render time cost, however it does not affect memory usage. Using an example production file, rendered at 1080p on an NVIDIA GeForce RTX 3060, we measured the increase in render time compared to the baseline (1 sample, same as 4.4). Note that results might vary depending on the scene complexity.

    SSAA sample count 8 16 32
    Render time increase (compared to baseline, in seconds) +0.14 +0.36 +0.58
  • The minimum thickness clamping of points has been removed, meaning that points can now have a radius greater or equal to zero (1d6f313995).

    Note

    No versioning is applied to older files. If a file relied on the minimum clamping, it may render differently.

    4.4 4.5 (without SSAA) 4.5 (with 8 SSAA samples)
    The radii are clamped to a minimum value to avoid artifacts. The radii are not clamped. Strokes that are very thin can dissapear. With more SSAA samples, the thin strokes are rendered correctly.

Modifiers

  • The built-in modifiers that support layer filtering now also support filtering by layer group (236f401695). This will select all layers inside of the group.

Geometry Nodes

The integration with Geometry Nodes continues to improve. New Grease Pencil nodes have been added, the "Add" menu now has Grease Pencil sub-menu, and Layer names are searchable. For more details, see the Geometry Nodes page.

Node Tools

The Grease Pencil object now supports Node Tools. Some things to note:

  • Node Tools work in Object Mode, Edit Mode, Sculpt Mode, and Draw Mode.
  • While Grease Pencil Edit Mode has advanced editing capabilities like multi-frame editing and more, Node Tools can currently only read and write the current frame.
  • Node Tools cannot do arbitrary changes to the layer tree. For example, it is not possible to reorder layers or delete a layer using a node tool. Adding a new layer is possible.
  • The Selection and Set Selection nodes work with Grease Pencil, however, in Draw Mode, the selection is always True.
  • The Active Element node has a Layer mode that provides the index of the active layer (if it exists).
  • When Auto-Key is on, new keyframes will be added to the current frame (if possible).
  • Locked/Invisible Grease Pencil layers are not editable with node tools (they won't be part of the input geometry).

Fill Guides

In 4.2 LTS, this feature was called "Boundary Strokes" (see the 4.2 LTS manual). Now these are referred to as Fill Guides. Using the fill tool, while holding ALT+LMB (by default), the user can draw fill guides. These are special strokes used to manually close gaps between other strokes to ensure the filling can work in a bounded area. Additionally, there is an option in the Advanced menu under the Fill tool options to automatically remove guides after creating a fill called "Auto-Remove Fill Guides".

Operators

  • Added two new options "Mask with Layer Above" and "Mask with Layer Below" in the "Extras" menu in the layers panel. Used to easily add masking layers from above or below to the active layer. (f702eba53f)
  • Added the "Split" operator (from 4.2 LTS) (f5ceb3822a). Shortcut changed to Shift + v (127fbaa0e6)
  • Added the "Remove Fill Guides" edit mode operator in the "Grease Pencil" > "Clean Up" menu. In 4.2 LTS this was called "Remove Boundary Strokes" (d332411b21).
  • Added the "Outline" edit mode operator (from 4.2 LTS) (2fd5b39a1b).
  • Added a new "Convert Curve Type" operator. This is meant to be a better replacement for the "Set Curve Type" operator. The latter is still available for compatibility, but no longer exposed in the "Stroke" menu. The new operator has a threshold setting that controls the visual fidelity of the conversion to the other curve types. Lower thresholds result in visually closer fittings, but also more control points. Higher thresholds result in less accurate fittings, but fewer control points (889751b0c5).
    • When converting to poly curves, the curves are simply resampled and thus no threshold setting is exposed.
    • When converting to catmull-rom curves, an approximation for a curve fitting is used. First the curves are resampled, then simplified (using a ramer-douglas-peucker algorithm) and then converted to catmull-rom curves. It is recommended to resample poly curves, before converting them to catmull-rom, to get more accurate fits.
    • The "Convert Type" operator can also be found in the context menus (RMB by default).

Viewport

  • Added an option to only show onion skinning for the active object (668aed18e9).

Export

  • The SVG exporter can now export an animation of multiple frames. Users can choose between a selection of frames or the whole scene range. The resulting SVG file contains all the packed frames and will show the animation when opening it in a program that supports the <animate> tag like any modern browser (manual) (8242eeb7ab).

Python API

  • The bpy.types GreasePencilLayer and GreasePencilLayerGroup are now subclasses of a new bpy.types.GreasePencilTreeNode. Common properties between layers and groups are now part of this base class. This also means that layer groups now have the channel_color and select property. (3ef2ee7c53)
  • The new GreasePencilTreeNode type now has two new properties (next_node and prev_node) to get the next/previous nodes at the same level in the tree. The next node is the node "above" in the tree and the previous node is the one "below". If the node is at the very top of its group, the next node is None. When it's at the very bottom, the previous node is None. (4229d7fa65)
  • Added new functions (vertex_group_assign and vertex_group_remove) to set/remove vertices from specific vertex group. Grease Pencil stores the deform verts and groups on individual drawings, thus these functions are in the Drawing API. (ba2e567efb)
    Example:
    import bpy
    
    C = bpy.context
    
    drawing = C.active_object.data.layers['Lines'].current_frame().drawing
    drawing.vertex_group_assign(vgroup_name="Group", indices_ptr=[2, 6, 10, 18, 19, 20], weight = 0.9)
    drawing.vertex_group_remove(vgroup_name="Group", indices_ptr=[2, 6, 10])
    
  • Added a function set_vertex_weights to set the vertex weights of multiple points at once. This function is also on the GreasePencilDrawing. (fd433a0a5c)
    Example for a GP Stroke (primitive):
    import bpy
    
    ob = bpy.context.active_object
    
    # Add a vertex group
    ob.vertex_groups.new(name="Group")
    # Get the drawing
    frame = ob.data.layers.active.current_frame()
    drawing = frame.drawing
    # Set the vertex weights of points at index 0, 5, 10, and 15
    drawing.set_vertex_weights("Group", [0, 5, 10, 15], [0.1, 0.2, 0.5, 1.0], assign_mode='ADD')
    
  • Added handle_left and handle_right properties to the GreasePencilStrokePoint API. This provide access to the handle attributes position, type, and select for both the left and right handle. The handle properties are only populated if the GreasePencilStrokePoint is part of a bézier stroke. Otherwise they are None (d5b697b3f1).