Grease pencil edit extrude : odd behavior

Question Grease Pencil

I'm a latecomer to GP. Currently using 2.81a on very old laptop. Haven't had a chance to try 3.4 on another computer.

Usually when extruding a stroke in GP edit, I get a new segment ending with a semicircle. From time to time, a square or triangular end appears instead (often unstable and flickering). Am I missing something obvious? Thanks.

  • CCWieland replied

    Are you using the Arc tool in Draw mode?

  • techworker1 replied

    No, generally Pencil tool, sometimes Line tool.

    Maybe important: I was using additive drawing.

  • Omar Domenech replied

    Well I'm not sure, but I remember as the grease pencil was being developed that they fixed things like that along the way. Maybe you're just using an old one? Try downloading the latest version of Blender and see if it still does that, even if it's just for testing.

  • techworker1 replied

    On another computer, I tested with 3.4.0. Behavior is a lot better. If extrude is done at each keyframe, there seem to be no artifacts at all. If I interpolate a sequence between keyframes, there is a little bit of garbage/noise, but that is not surprising. And it is much better than 2.81a in any case. So I guess that is what I need to live with.

    A workaround in 2.81a (additive drawing) seems to be to add new strokes instead of extruding existing ones. This can get the job done, just not as precise or convenient.

    [UPDATE: THIS ANSWER OF MINE IS NOT REALLY CORRECT, PLEASE READ ON]

  • Martin Bergwerf replied

    It's not supposed to happen, but you are using an old (early stage) GP on a very old laptop with (probably) also an old GPU, which might not have an updated driver....that's asking for trouble 😉

    I tested this on 2.80 and 2.82 (don't have a 2.81 lying around and don't think it's worth the trouble downloading it, just for this case), but could not reproduce the issue.

  • techworker1 replied

    Actually the issue seems to be different from what I thought. It still happens when I start from scratch in 3.4.0.

    • Turn on Additive Drawing
    • Draw a line at frame 1 - edit line to have only two points
    • Advance to frame 3
    • Extrude the line to have a third point (using E hotkey)
    • Repeat the process a few times to extend the line

    If I then step backward on the timeline, I always see junk at the end of the line. If I look carefully in edit mode, it seems that each extrusion actually produced 2 points at exactly the same location. If the duplicates are carefully deleted/dissolved (at each keyframe), then stepping looks clean. Mysterious.

    Basically I am trying to imitate something like a Build modifier, but on a stroke.

  • Martin Bergwerf replied

    Sorry, I don't think I understand what you are doing exactly. Extrusion doesn't appear to create double vertices when I try it.

    But I have not really used GP yet, so that's probably just me; I don't know what Additive Drawing is (I know it is a thing, just don't know what it is...I switched the Blend to Add...).

    How did you edit a line to have two points? (Dissolve the inner points, or draw a line with 0 Subdivisions, or....)

    You do know that GP already has a Build Modifier, right?

  • techworker1 replied

    (I'm not EXACTLY doing a Build - actually want to grow at front, shrink at rear)

    Maybe this isn't worth all the trouble... I made a crude video which I hope explains better. I hacked a small script which shows the duplicated spline points when I'm all done. Usually the artifacts are much worse than in the video.


    ts-list-3-cooked.jpg


  • CCWieland replied

    I don't think blender can do this, animate vertex to vertex in edit mode. I got the same artifacts as you did animating the line this way. I am using blender 3.4. I see no work around, but I am also not sure what you are doing.

  • techworker1 replied

    After the extra duplicate points have been dissolved, everything seems to work fine. Just an extra step required.

    Behavior (and workaround) are basically the same for 2.81a and 3.4.0. (Before workaround, 2.81a looks worse, probably due to older code and/or old GPU.)

    [Link
    https://www.instagram.com/reel/CoV_jRau0iv/?utm_source=ig_web_copy_link 
    to project I was working on]

  • Martin Bergwerf replied

    Well, it looks to me that the lines are Z-fighting with the lines from Onion Skinning.

    Turning the Opacity of the Onion lines to 0 doesn't help with the Z=fighting, unfortunately. Setting the number of Keyframes in the Onion Skinning to 0 doesn't help either; it just 'hides' them.Even turning them off in the Overlays doesn't help.

    Also, the last drawn Vertex (in a certain Keyframe) is double, but the earlier ones are not; that has probably also to do with the Onion Skinning.

    I'm not being much of a help, I know. You should ask Paul Caggegi...


  • techworker1 replied

    Definitely seems to be Z-fighting, between duplicate stroke points at the same location. Independent of onion-skinning (and Additive Drawing, for that matter). I could post a better video.

    I can't explain why Extrude seems to actually create 2 new stroke points at the starting location, and then lets you move one.

    Maybe ppcaggegi has an explanation.

  • Paul Caggegi replied

    Hi techworker1 - this sounds like you need to toggle the line caps. Firstly, in later versions (I'm unsure which one exactly, but at least 3.3) you can toggle it via the tool shelf.


  • Paul Caggegi replied

    If you're using the pencil tool, any pressure sensitivity should override this, and is controlled by the "Radius" option. Toggling the Pressure sensitivity icon nest to it will enable/disable this.


  • Paul Caggegi replied

    You can further tweak your brush settings - Advanced, Stroke options - and in your brush tool window (N-Key, Tool Tabe) you can adjust the curve that will dictate how the pressure sensitivity should act. You also have post-processing and randomize settings to play with as well.


  • techworker1 replied

    Hi ppcaggegi , in 3.4.0 it is set to round with the button. (I think that was also the default in 2.81a although the control is in a different place.)

    I'm using strength 1.0, fixed radius, with tablet controls all disabled. (I have a tablet but often use the mouse.)

    The line ends appear as round while extrusion is being done.

    If I then scrub/step back and forth in the timeline, (while the duplicated stroke points exist), the ends appear square/angled for all keyframes except the last.

    When each hidden duplicate stroke point is dissolved, the affected end then correctly appears as round.

    After all the duplicated stroke points have been dissolved, scrubbing back and forth displays the ends properly as round at every keyframe.

    Hopefully this clarifies things. It's a little hard to explain without a video.

  • techworker1 replied

    Extruding on a straight line minimizes the artifacts. I should have chosen a better example like a curved path. But invisible duplicate points occur in either case.

     I imagine that real artists rarely use edit mode. Since I sketch/paint poorly, I use it a lot 😉. And it is extremely handy for “geometric”/“SVG-like” animations.

  • Paul Caggegi replied

    Hi techworker1 - yes this problem persists even in the latest version of Blender. I don't know why it happens, I'm sorry, but I do offer an alternative. Instead of extruding one point at each keyframe, do this: draw the entire stroke/image. Then apply the build modifier. This will allow you to animate the stroke drawing on AND have control on how fast or slow it happens. Check this video out

  • techworker1 replied

    Thanks to all.

    For stroke zero-to-full-length, Build modifier is clearly the simplest.

    For sliding a stroke along a curved path (similar to 3D Curve modifier), there are several ways to redraw or edit the stroke. I was using extrude-head + delete-tail (with cleanups) since this seems easiest and most accurate. Of course a full draw at a new position (classic method) or other edit operations are also possible.

    Putting this one to bed for now.

  • Paul Caggegi replied

    To put on a bow on - you can always add a second build modifier and set it to erase the line as well. :)