Page MenuHome

Line Art face normal tolerance patch.
ClosedPublic

Authored by YimingWu (NicksBest) on Jun 2 2021, 11:20 AM.

Details

Summary

This tolerance allows faces that are perpendicular to the view vector to be ignored while calculating occlusion. Files mentioned in T88675 now works very nicely.

This patch works especially in ortho cameras, also it will work in perspective cameras when the stars aligned.

I haven't find any problems that this fix has caused in my existing files, so I need more people to test it.

(I recommend this to get into master without applying other weird patches from line art branch. It's not conflicting with any of those functions.)

Diff Detail

Repository
rB Blender

Event Timeline

YimingWu (NicksBest) requested review of this revision.Jun 2 2021, 11:20 AM
YimingWu (NicksBest) created this revision.
This revision is now accepted and ready to land.Jun 2 2021, 12:26 PM
source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
2339

Update the comment as discussed in blender chat.

2342

Use fabsf instead.

YimingWu (NicksBest) marked 2 inline comments as done.
YimingWu (NicksBest) added inline comments.
source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c
2342

It's a double. I use fabs. The tolerance value needs to be FLT_EPSILON (as opposed to DBL_EPSILON) as the error introduced in the original matrix is from a float.