Page MenuHome

Implement display of weight isoline contours in the fragment shader.
ClosedPublic

Authored by Alexander Gavrilov (angavrilov) on Sep 29 2018, 9:58 AM.

Details

Summary

Add an option to display contour lines tracing through points with the
same interpolated weight value in weight paint mode. This can be useful
for working on gentle gradients over a relatively high resolution mesh,
where the difference in color between adjacent vertices is very small.

The contour grid has 3 levels of detail going down to step 0.001,
which automatically fade in or out based on the weight gradient.
Fade out works by capping both screen space and weight space line
width, and reducing alpha when the weight space limit is dominant.

Diff Detail

Repository
rB Blender
Branch
temp-angavrilov-weight-contours (branched from blender2.8)
Build Status
Buildable 2177
Build 2177: arc lint + arc unit

Event Timeline

source/blender/makesdna/DNA_scene_types.h
1904 ↗(On Diff #12006)

One question I'm uncertain about is whether it's worth it to bother with the bitfield, or is a simple 'char weight_contours' boolean field better.

Reduce fade out and make the smallest lines black to reduce confusion.

Some degree of fade out is necessary to avoid moire and jitter when lines become too thin or too dense.

Replaced special handling for 0 and 1 with generic suppression of near-zero gradients, plus more tweaks.

This revision is now accepted and ready to land.Oct 8 2018, 11:58 AM
This revision was automatically updated to reflect the committed changes.