Falk

@filedescriptors

Joined on Feb 28, 2023

  • Is there a good reason for having a separate renderer for Grease Pencil ? Is this similar to the question "how do we do NPR rendering in Blender" ?People want more control over Grease Pencil rendering, e.g. a shading node-tree. Current Grease Pencil render engine has anti-aliasing issues. This is probably the current biggest rendering related problem. luna Grease Pencil is moving from an AoS approach to SoA. The batch cache for rendering is still using an AoS approach. Would it make sense to rewrite the render engine to take in the attributes rather than an Aos ? We have to triangulate every stroke at the moment, because the render engine needs the triangles for all strokes, regardless of the material. Could we optimize this? (maybe it isn't a bottleneck).
     Like  Bookmark
  • Attributes Attribute StatisticOnly layer domain Domain Size Only layer domain -> output number of layers Capture Attribute
     Like  Bookmark
  • (Find the curves that intersect the bounding box of the brush in screen space) Go through all the curves and check each segment for intersections with the eraser (circle) 1.1. Per segment: Store the intersections (t-values, 0 to 1) and the number of cuts 1.2. Calculate how many points are added and how many are removed Create a new CurvesGeometry with the right number of target points 2.1. Fill the curves' offsets with the accumulated number of cuts 2.2. Copy/interpolate all the attributes of the points in the destination. To do so, we are looping through the source segment, getting the index range of the corresponding destination points (should be between 0 to 3 points), and then fill the points in the destination with interpolated versions of the source segment. For points that are removed in the destination, we get an IndexRange of size 0 and skip it. Replace the old geometry with the new one, tag it for changes, and done :) .
     Like  Bookmark
  • Mockup of keyframes in Grease Pencil 3.0 GP Keyframes are not a single point in time. They start, are held for 1 or more frames and then end. Is "Keyframe" even the right word? (Static? Block? Discrete?) Cel!Probably needs its own eAnim_KeyType. In general: how do we deal with animation channels that do not have (or cannot be represented by) an FCurve? What about Annotations? Plan is to keep using the current grease pencil data-block (bGPdata). Could be moved to their own Dopesheet maybe?
     Like  Bookmark
  • A grease pencil layer is represented as a curve instance.Layer data is stored on the instance domain. The output of the modifier is a InstancesComponent from which the (flat) list of layers is reconstructed. Some data like the visibility is important because it needs to be read for rendering. Others are not so important (like a layer being locked, which is only important for editing). All the curve nodes like "Trim Curve" should still work for instances. So they could also work for the GP layers. We can add a subtype for grease pencil layer (-group)s. Internally it is an integer reffering to the instance ID. Can be exposed as a dropdown list in the modifier UI. That way it is easy to select a particular layer to run the nodes on.
     Like  Bookmark
  • This document summarizes the ideas for how to integrate Grease Pencil into geometry nodes. The Grease Pencil data-block at a specific scene frame can be thought of as a tree of CurvesGeometry. %%{init: {'theme': 'dark', 'themeVariables': { 'darkMode': 'true' }} }%%
     Like  Bookmark
  • In 2008, Joshua Leung started to work on Grease Pencil for the first time. It started out as an annotation tool, directly in the 3D viewport. (Credits Virgilio Vasconcelos) Joshua designed it to be very simple with just the functionalities it needed. But the community that formed around Grease Pencil had bigger plans and started to use it for things he did not anticipate. Fast forward to 2019, when Grease Pencil became its own object for 2D animation in Blender 2.80 - a big milestone from the initial implementation. This version was a major overhaul and had many new features, better performance, and new rendering capabilities. The main developers working on it were Antonio Vázquez and Clément Foucault. (Credits Sergi Miranda)
     Like  Bookmark
  • Test file: 2 GP Objects 109 Layers 15,069 Frames 405,517 Strokes 4,904,707 Points Hardware:
     Like  Bookmark
  • Stored in the .blend file Grease Pencil dataPoint attributes: position, pressure (radius factor), strength (opacity), time (seconds since start of drawing stroke), flag (selection), uv_fac, uv_rot, uv_fill, vert_color (vertex color). Stroke attributes: thickness, material_index, inittime, caps (type of cap, e.g. round or flat), hardness, aspect_ratio (for dot materials), fill_opacity_fac, uv_rotation, uv_translation, uv_scale, vert_color_fill, flag (selection, cyclic).Note: Triangles and bounding box become runtime data. Can be derived from positions. What to do about editcurve? What to do about dvert? Frame data: frame_number, key_type, selection. Where to store the key_type and selection? Probably in the layer map.
     Like  Bookmark
  • Yiming: Not sure how we can get geometry results from compositing. Sebastian: Should we have one solution, or two solutions?Was surprised by the GPU solutions Miguel: There is still a plan to have a NPR renderer, so it makes sense to combine the techniques. Falk: Can we have a geometry nodal system (geometry nodes) with the render approach? Does not seem like a good idea. Better to share the code and do it all on the CPU somehow. The render approach would use a material nodal system.
     Like  Bookmark
  • The data-block The following code describes the proposed structure of the new grease pencil data-block: /** * A grease pencil drawing is a set of strokes. The data is stored using * the CurvesGeometry data structure and the custom attributes within it. * It can either own the data or reference it from another GreasePencil * data-block. * * Note: When a drawing references another data-block, it will always
     Like  Bookmark