Create dot-dash effect for grease pencil strokes. User can manually edit the length, gap and styles for each segment of dashed lines.
The values in each segment can all be key-framed to make animations.
Differential D11876
GPencil: Dot-dash modifier Authored by YimingWu (NicksBest) on Jul 10 2021, 3:59 PM.
Details
Create dot-dash effect for grease pencil strokes. User can manually edit the length, gap and styles for each segment of dashed lines. The values in each segment can all be key-framed to make animations.
Diff Detail
Event TimelineThere are a very large number of changes, so older changes are hidden. Show Older Changes Comment Actions Hand drawn grease pencil objects will have different results because of dense points. But for this sampling modifier should be used. The case is the same for adding noise mod to lineart or to Mesh converted to GP. Lineart had sampling option, but was removed for the same reason - this is a job for sampling modifier. Functionality should not be repeated. Plus there are artistic use cases to work with lets dense geometry.
Materials list works the same way.
Imagine having a list of 10 segments, each having different material assigned. Naming is handy for organization
Imagine using this with randomize offset modifier. Splitting into strokes is desired thing and allows for more artistic options. Please don't shut this down. Subsurface is inefficient but we have it for artistic expression Yimings comment from the chat: In short I would dismiss all of those objections. Comment Actions
humm, maybe an option for internally sample the stroke before generating dash lines. Performance-wise it's gonna be more or less the same, but if we take segments instead of distance, the dash modifier could adapt to the drawing speed of each stroke.
The only reason is just for it needs an identifier for properties in each list item to be keyed correctly. I'm fixing the rest of the problems. Comment Actions After some testing, I think the UI works well now! I left some comments suggesting different property descriptions though. The "Offset" property seems redundant with the length modifier, what do you think about removing that so that each modifier is a bit simpler and does just one thing? In general the patch description is still lacking, and has an old screenshot of the UI. The description can explain what the modifier does in more detail, a bit about how it works.
To be clear, a sampling modifier doesn't exist, right? The confusion is probably understandable then.
Yes, but those are data-blocks, so it's obvious they have names. It's not so obvious here, though the other arguments for the names seem to make sense.
I was noting that there are other designs that allow achieving the same results, clearly the results are nice, they basically speak for themselves. Noting a future bottleneck seems quite reasonable for code review.
Comment Actions @Hans Goudey (HooglyBoogly) agreed about the point of the code review, we are in the same boat :) I am all in favor for the code optimization. I am just extra careful about optimizing on the expense of removing some possibilities. I am arguing that having the thing split into strokes is desired result. Because you might want to further modify it with randomizing offset, especially in conjunction with weight modifier. About sampling: Simplify -> sample. It follows the principle of not having duplicated functionality. Anyways, I am getting build error with this patch applied, wanted to provide you with some examples, and if you can feedback this with other approaches to achieve the same result more efficiently I am all in favor.
Comment Actions This needs updating for changes in icons in master again. I didn't see a response about the point about the offset's redundancy with the length modifier?
Comment Actions @Hans Goudey (HooglyBoogly) Hi! Thanks for the comments
I'm not sure, length modifier does not offset anything.
Comment Actions Also fixed logic for when offset<0
Comment Actions Various updates:
Comment Actions I just committed some updates I talked to Yiming about. I guess it probably deserves another test from others now, but the code is satisfying to me, and the UI looks good. Comment Actions @Hans Goudey (HooglyBoogly), @YimingWu (NicksBest), I tested with multiple scenarios, tried animating every value, all works as expected, zero issues. Comment Actions Great addition to the grease pencil toolset. Thanks to all people involved in the patch! | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||