Page MenuHome

T66266: Grease Pencil Simplify Adaptive is not behaving correctly
ClosedPublic

Authored by Sebastian Parborg (zeddb) on Jul 4 2019, 2:34 PM.

Details

Summary

Now the simplify code works correctly in 3D space. Before it was trying to project the strokes down into a local 2D space, but that didn't work nicely for strokes with overhangs or big changes in the stroke direction.

The code in question was simplified as well which lead to some nice code reduction.

Diff Detail

Repository
rB Blender

Event Timeline

@Sebastian Parborg (zeddb) I have not tested your patch, but the RDP algorithm can be useful...or you are using the same? If not, maybe we could add a new type for your solution. Always is better to have more options.

Also, we need to add this new option to the corresponding edit menus, so maybe we can move to 2.81 and add to T63757.

@Matias Mendiola (mendio) @Daniel Martinez Lara (pepeland) What do you think?

This should still be the RDP algoritm as it still uses the perpendicular distance to the line. This is now simply in 3D space instead of 2D space. (I simply changed how the distance calculation is done. 2D -> 3D)

I don't think that the previous 2D method was useful as it didn't do what the user expects in many cases.
The previous method would work for strait-ish strokes. But for anything with some twists and turns, it would fail horribly.

So I don't think there is really much to do here really. It can be merged as is without any updates to the UI.

@Sebastian Parborg (zeddb) If the algorith is RDP, no problem them....but.....we need change this too:

EDIT: I mean, verify is working fine too.

This revision is now accepted and ready to land.Jul 4 2019, 4:19 PM