Page MenuHome

Annotations: Add surface offset to annotation tools to avoid some eraser fails
Needs ReviewPublic

Authored by Lictex Steaven (lictex_) on Apr 1 2022, 8:55 PM.

Details

Summary

add a surface offset option to the annotation paint tools.


surface stroke placement + occluded annotations (08d2428632ed) makes the eraser unstable.
points that perfectly overlap the surface sometimes cannot be erased, due to the lack of depth buffer precision.


give some offset to the strokes could avoid this.
note this basically works the same as gpencil surface offset, which has some known really weird behaviors (T61854, T94735)

Diff Detail

Repository
rB Blender

Event Timeline

Lictex Steaven (lictex_) requested review of this revision.Apr 1 2022, 8:55 PM
Lictex Steaven (lictex_) created this revision.
Antonio Vazquez (antoniov) retitled this revision from fix: add surface offset to annotation tools to avoid some eraser fails to Annotations: Add surface offset to annotation tools to avoid some eraser fails.
Antonio Vazquez (antoniov) requested changes to this revision.Apr 2 2022, 10:21 AM

I have tested the patch and the code looks good, but I have seen that the default offset is too much and the annotations are too separated from the surface. Really, I don't see too much problems in my system keeping the offset to 0 as it was before the patch.

@Matias Mendiola (mendio) Can you test the offset value. For the UI, I don't see any problem.

release/scripts/startup/bl_ui/space_view3d.py
6846 ↗(On Diff #50007)

The default value for annotations looks too much.

source/blender/editors/gpencil/annotate_paint.c
327

Comments start in Uppercase and ends with point

330

Comment Format

This revision now requires changes to proceed.Apr 2 2022, 10:21 AM
Lictex Steaven (lictex_) edited the summary of this revision. (Show Details)
  • format comments
  • set default offset for annotations to 0 (same as old behavior) so this becomes a opt-in feature

just uploaded a wrong diff file sry...

@Matias Mendiola (mendio) Could you test the patch? If we think is ok, we can approve it and put in master when the new release will be opened.

@Matias Mendiola (mendio) Could take a look to see if we can move this to master?

source/blender/editors/gpencil/gpencil_data.c
116

must be 0.0f

Anyway, we can fix after apply the patch

219

Same 0.0f

source/blender/editors/space_view3d/view3d_gizmo_ruler.c
516

Same 0.0f