Page MenuHome

Line Art feature update: More type support and related chaining improvements
ClosedPublic

Authored by YimingWu (NicksBest) on May 19 2021, 12:28 PM.

Details

Summary

This patch needs D11302 D11291 D11288 in place first!

This patch includes:

  • Floating edge type support
  • Special chaining option for floating edge
  • Chaining option for reducing jagged edges when floating edges are involved.

This image demonstrates floating edge selection as well as chaining optimization.

Test file:

Diff Detail

Repository
rB Blender

Event Timeline

YimingWu (NicksBest) requested review of this revision.May 19 2021, 12:28 PM
YimingWu (NicksBest) created this revision.
YimingWu (NicksBest) edited the summary of this revision. (Show Details)
YimingWu (NicksBest) edited the summary of this revision. (Show Details)May 19 2021, 12:31 PM

Only edge and chaining code

Updated to latest master

Fixed naming changes to be consistent with master

Here is the test file for the edge type overlap.
I've marked contour edges with edge marks as well. However the edge marks don't show up when the "allow duplicate" setting is on (or off for that matter).

source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
465

Seems like you changed these around be accident?

(Same for the Enabled -> Active change below as well)

495

Ditto above ^

source/blender/gpencil_modifiers/intern/lineart/MOD_lineart.h
296

This name is a bit misleading as we don't allow duplicate types.
We create multiple edges from and edge that has multiple types assigned to it.

source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
1769

I think this it should be:

"If we allow duplicated edges, one edge should get added multiple times if is has been classified as more than one edge type. This is so we can create multiple different line type chains containing the same edge."

source/blender/makesrna/intern/rna_gpencil_modifier.c
2817

I think the description would be better if it was:

"Floating edges will be classified as contour lines"

Shouldn't this be in the chaining options though?
I don't think this should be in the "Geometry Processing" section as this only matters when chaining, right?

2835

I think we should change the text string for "Image threshold" to something when this is on as we are not chaining in image space anymore. so it is on and "image space threshold" anymore.

2844

I think this should be better in the "Edge type" section no?

From my point of view it feels better to have setting that states that and edge can have multiple types where the rest of the edge type selection. I'm not 100% though, so I'm up for discussing it quite a bit.

However this also doesn't seem to work. I made a file where the would be multiple overlapping types, but it doesn't seem to work.

I'll attach the file.

YimingWu (NicksBest) marked 7 inline comments as done.

Fixed stuff in comments

Update tweaked description.

source/blender/makesdna/DNA_gpencil_modifier_types.h
879

I'm guessing this need versioning code so we don't break older files?

YimingWu (NicksBest) marked an inline comment as done.Jun 24 2021, 7:01 AM
YimingWu (NicksBest) added inline comments.
source/blender/makesdna/DNA_gpencil_modifier_types.h
879

Oh the values are already stored in that struct variable, it's just they happened to be defined in the wrong place. So no further action needed.

source/blender/makesrna/intern/rna_gpencil_modifier.c
2817

Although it happens in loading, but it makes sense to put into chaining panel. Yes

YimingWu (NicksBest) marked an inline comment as done.

Move floating as contour option into Chaining

source/blender/makesrna/intern/rna_gpencil_modifier.c
2833

Should probably only be "Floating Edges" now right?
Otherwise you have "Chain: Chain floating edges" in the UI.

YimingWu (NicksBest) marked an inline comment as done.Jun 24 2021, 5:49 PM
YimingWu (NicksBest) added inline comments.
source/blender/makesrna/intern/rna_gpencil_modifier.c
2833

I'll use UI label in the draw call. Otherwise the property name itself is a bit confusing.

YimingWu (NicksBest) marked an inline comment as done.

Fixed floating edge chaining lable

This revision is now accepted and ready to land.Jun 24 2021, 6:21 PM